设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 130|回复: 0

[转载发布] Save File Output Control

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-7-27 16:49:55 | 显示全部楼层 |阅读模式
    Save File Output Control v.1.1

    by Metatron



    Introduction

    This is a little script that allows you to change several settings related to your save files.  It's my first real script!

    Features

    - Change the filename of your save files.

    - Change the maximum number of save files available to your player.

    - Gives you the ability to have more save files in Test Mode.

    - Removes redundant numbers if you only allow for one save file.

    - Allows easy edits to the save prompts.

    Screenshots

    Spoiler









    How to Use

    Just paste it in the Materials section above main and edit the module to your liking.  Be warned that if you set SaveNum or TestNum too high, it will take a long time to create the save file window and may possibly crash your RGSS player.  Also be warned that if you only have one file available to your player but more available in test mode, a save from test mode will not be read when $TEST is not on and vice-versa.  I will fix this shortly.

    Demo

    Not nessecary.

    Script

    Spoiler                Code:       
    1. #===============================================================================
    2. # RGSS3: Save File Output Control v.1.1
    3. #===============================================================================
    4. # by Cryranos
    5. #===============================================================================
    6. # Instructions:  Paste In the Materials section.  Edit Module as desired.
    7. #===============================================================================
    8. # Compatability:  Completely rewrites DataManager#self.save_file_exists?,
    9. # self.savefile_max, self.make_filename(index), dself.load_game(index), and
    10. # Window_SaveFile#refresh. Aliases Scene_File < Scene_MenuBase#visible_max.
    11. #===============================================================================
    12. module CrySave
    13.   SaveNum = 16                # Absolute maximum number of save files. Default: 16
    14.   SaveNom = "Save"        # First part of savefile name. Default: "Save"
    15.   SaveExt = ".rvdata2"# Extension of the savefile name. Default: ".rvdata2"
    16.   SaveVis = 4                 # Number of savefiles visible on one screen. Default: 4
    17.   TestNum = 99                # Maximum number of save files available in test mode.
    18.   # If this number is too high, it will take a long time to load Window_SaveFile.
    19. end
    20. module Vocab
    21.   SaveMessage         = "Save to which file?"
    22.   LoadMessage         = "Load from which file?"
    23.   File                        = "Save"
    24. end
    25. class Save_File_Control_Output_Control
    26.   def DataManager.save_file_exists?
    27.         if CrySave::SaveNum == 1
    28.           !Dir.glob(CrySave::SaveNom + CrySave::SaveExt).empty?
    29.         elsif $TEST
    30.           !Dir.glob(CrySave::SaveNom + '*' + CrySave::SaveExt).empty?
    31.         else
    32.           !Dir.glob(CrySave::SaveNom + '*' + CrySave::SaveExt).empty?
    33.         end
    34.   end
    35.   def DataManager.savefile_max
    36.         if $TEST
    37.           return CrySave::TestNum
    38.         else
    39.           return CrySave::SaveNum
    40.         end
    41.   end
    42.   def DataManager.make_filename(index)
    43.         if CrySave::SaveNum == 1
    44.           sprintf(CrySave::SaveNom + CrySave::SaveExt, index + 1)
    45.         elsif $TEST
    46.           sprintf(CrySave::SaveNom + "%02d" + CrySave::SaveExt, index + 1)          
    47.         else
    48.           sprintf(CrySave::SaveNom + "%02d" + CrySave::SaveExt, index + 1)
    49.         end
    50.   end
    51.   def DataManager.load_game(index)
    52.         load_game_without_rescue(index) rescue false
    53.   end
    54. end
    55. class Window_SaveFile
    56.   def refresh
    57.         contents.clear
    58.         change_color(normal_color)
    59.         if $TEST
    60.           name = Vocab::File + " #{@file_index + 1}"
    61.         elsif CrySave::SaveNum == 1
    62.           name = Vocab::File
    63.         else
    64.           name = Vocab::File + " #{@file_index + 1}"
    65.         end
    66.         draw_text(4, 0, 200, line_height, name)
    67.         @name_width = text_size(name).width
    68.         draw_party_characters(152, 58)
    69.         draw_playtime(0, contents.height - line_height, contents.width - 4, 2)
    70.   end
    71. end
    72. class Scene_File < Scene_MenuBase
    73.   alias visible_max_new visible_max
    74.   def visible_max
    75.         visible_max_new
    76.         return CrySave::SaveVis
    77.   end
    78. end
    复制代码





    FAQ

    None so far.

    Credit and Thanks

    - Cryranos/Metatron, author

    - CaptainJet and Fomar0153


    本贴来自国际rpgmaker官方论坛作者:Cryranos处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/save-file-output-control.2939/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 15:06 , Processed in 0.108441 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表