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

[转载发布] Save/Load menu on button press, or quick save/load

[复制链接]
累计送礼:
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-8-2 14:44:29 | 显示全部楼层 |阅读模式
    You will find variations for what this script does, but I couldn't find one that only handled save/load functionality.

                    Ruby:       
    1. =begin
    2. ===============================================================================
    3. Save Menu on button press (by Zero_G) v1.0
    4. Version: RGSS3
    5. ===============================================================================
    6. ==  Description ==
    7. This script will open the save/load window on a button press.
    8. If quick function is activate it will save/load to a determine slot
    9. More actions for buttons can be done.
    10. == Terms of Use ==
    11. - Free for use in non-commercial projects with credits
    12. - Free for use in commercial projects
    13. - Please provide credits to Zero_G
    14. == Credits ==
    15. -Script modified from "Button Common Events" by "Yanfly"
    16. == Usage ==
    17. Just add the plugin before main.
    18. -------------------------------------------------------------------------------
    19. =end
    20. module ZERO
    21.   SAVE_KEY = :L
    22.   LOAD = true    # Activate or deactivate load function
    23.   LOAD_KEY = :F9
    24.   QUICK = false  # Actiavte or deactivate quick save/load function
    25.   SLOT = 0       # Slot to quick save/load
    26. end
    27. class Scene_Map < Scene_Base
    28.   #--------------------------------------------------------------------------
    29.   # alias method: update_scene
    30.   #--------------------------------------------------------------------------
    31.   alias scene_map_update_scene_bce update_scene
    32.   def update_scene
    33.     scene_map_update_scene_bce
    34.     unless scene_changing?
    35.         # Save function
    36.         if Input.trigger?(ZERO::SAVE_KEY)
    37.             if ZERO::QUICK
    38.                 DataManager.save_game(ZERO::SLOT)
    39.               Sound.play_save
    40.             else
    41.               SceneManager.call(Scene_Save)
    42.           end
    43.         end
    44.       
    45.         # Load function
    46.         if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD
    47.             if ZERO::QUICK
    48.                 Sound.play_load
    49.               DataManager.load_game(ZERO::SLOT)
    50.               SceneManager.goto(Scene_Map)
    51.             else
    52.               SceneManager.call(Scene_Load)
    53.           end
    54.         end
    55.         #More inputs con be put here
    56.       end
    57.   end
    58. end # Scene_Map
    59. #Actions during message window
    60. class Window_Message < Window_Base
    61.   alias zero_save_update update
    62.   def update
    63.     zero_save_update
    64.     if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD
    65.         if ZERO::QUICK
    66.             Sound.play_load
    67.           DataManager.load_game(ZERO::SLOT)
    68.           SceneManager.goto(Scene_Map)
    69.         else
    70.           SceneManager.call(Scene_Load)
    71.       end
    72.     end
    73.   end
    74. end # Window_message
    复制代码



    If you want the functionality separated in two scripts.
    SpoilerSave/Load menu on button press
    Spoiler                Ruby:       
    1. =begin
    2. ===============================================================================
    3. Save Menu on button press (by Zero_G)
    4. Version: RGSS3
    5. ===============================================================================
    6.   ==  Description ==
    7. This script will open the save/load window on a button press.
    8. More actions for buttons can be done.
    9. == Terms of Use ==
    10. - Free for use in non-commercial projects with credits
    11. - Free for use in commercial projects
    12. - Please provide credits to Zero_G
    13. == Credits ==
    14. -Script modified from "Button Common Events" by "Yanfly"
    15. == Usage ==
    16. Just add the plugin before main.
    17. -------------------------------------------------------------------------------
    18. =end
    19. module ZERO
    20.   SAVE_KEY = :L
    21.   LOAD = true    #Activate or deactivate load function
    22.   LOAD_KEY = :F9
    23. end
    24. # Actions during normal play
    25. class Scene_Map < Scene_Base
    26.   alias scene_map_update_scene_bce update_scene
    27.   def update_scene
    28.     scene_map_update_scene_bce
    29.     unless scene_changing?
    30.       if Input.trigger?(ZERO::SAVE_KEY)
    31.         SceneManager.call(Scene_Save) # Input code for button press here
    32.       end
    33.       if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD
    34.         SceneManager.call(Scene_Load)
    35.       end
    36.       #More inputs con be put here
    37.     end
    38.   end
    39. end # Scene_Map
    40. #Actions during message window
    41. class Window_Message < Window_Base
    42.   alias zero_save_update update
    43.   def update
    44.     zero_save_update
    45.     if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD
    46.       SceneManager.call(Scene_Load)
    47.     end
    48.   end
    49. end # Window_message
    复制代码






    Quick save/load on button press
    Spoiler                Ruby:       
    1. =begin
    2. ===============================================================================
    3. Save Quick on button press (by Zero_G)
    4. Version: RGSS3
    5. ===============================================================================
    6.   ==  Description ==
    7. This script will quick save/load to a determine slot
    8. More actions for buttons can be done.
    9. == Terms of Use ==
    10. - Free for use in non-commercial projects with credits
    11. - Free for use in commercial projects
    12. - Please provide credits to Zero_G
    13. == Credits ==
    14. -Script modified from "Button Common Events" by "Yanfly"
    15. == Usage ==
    16. Just add the plugin before main.
    17. -------------------------------------------------------------------------------
    18. =end
    19. module ZERO
    20.   SAVE_KEY = :L
    21.   LOAD = true    #Activate or deactivate load function
    22.   LOAD_KEY = :R
    23.   SLOT = 0
    24. end
    25. # Actions during normal play
    26. class Scene_Map < Scene_Base
    27.   alias scene_map_update_scene_bce update_scene
    28.   def update_scene
    29.     scene_map_update_scene_bce
    30.     unless scene_changing?
    31.         if Input.trigger?(ZERO::SAVE_KEY)
    32.           DataManager.save_game(ZERO::SLOT)
    33.           Sound.play_save
    34.         end
    35.         if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD
    36.           Sound.play_load
    37.           DataManager.load_game(ZERO::SLOT)
    38.           SceneManager.goto(Scene_Map)
    39.         end
    40.         #More inputs con be put here
    41.       end
    42.   end
    43. end # Scene_Map
    44. #Actions during message window
    45. class Window_Message < Window_Base
    46.   alias zero_save_update update
    47.   def update
    48.     zero_save_update
    49.     if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD
    50.       Sound.play_load
    51.       DataManager.load_game(ZERO::SLOT)
    52.       SceneManager.goto(Scene_Map)
    53.     end
    54.   end
    55. end # Window_message
    复制代码












    本贴来自国际rpgmaker官方论坛作者:Zero_G处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/save-load-menu-on-button-press-or-quick-save-load.127065/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 10:30 , Processed in 0.092938 second(s), 51 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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