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

[转载发布] Mobius's "The Story So Far" Script

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

    连续签到: 2 天

    [LV.7]常住居民III

    9015

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-15 22:20:58 | 显示全部楼层 |阅读模式
    The Story So Far
        by
        MobiusXVI



    Release Notes
    Dec 2013 - v. 1.0 Initial Release
    Mar 2023 - v. 1.1 Fixed a bug where it would ask the user if they wanted to watch the story even if it didn't exist

    Introduction
        The purpose of this script is to allow you to remind the player about what has happened in the story whenever they load their game.  I hope you enjoy it!


    Features
      - Very little scripting needed to make script work, since it uses maps for cutscenes.
      - Can have as many or few chapters as you want
      - Allows player to skip watching the cutscene and load directly into game (especially useful when reloading a game due to     death)

    Screenshots
    None.


    How to Use
      - Place this script below the defaults but above main. If you have other scripts that modify saving/loading, put this one  below them.
      - What this script does is check a game variable of your choosing to  determine the current "chapter". Then it loads a map that you specify to let you play out a cutscene of your own design to recap the story. So you'll need to complete the configuration section below to do this.

    - You can do whatever you want on the cutscene maps, including going to  additional maps if need be. Whenever you finish with your cutscene, all you have to do is put the following script call in an event and the game will then load and allow the player to keep going:  "Mobius_Story_So_Far.finish_cutscene" (without quotes)
    - The additional configuration needed is listed in the script under "Configuration"

    Demo

    http://www.mediafire.com/download/alsku2kn3c2ke0d/Story So Far Demo.zip

    Script

    Spoiler                Code:       
    1. #===============================================================================
    2. # The Story So Far
    3. # Author: Mobius XVI
    4. # Version: 1.1
    5. # Date: 02 MAR 2023
    6. #===============================================================================
    7. #
    8. # Introduction:
    9. #
    10. #   The purpose of this script is to allow you to remind the player about what
    11. #   has happened in the story whenever they load their game.
    12. #
    13. # Instructions:
    14. #
    15. #  - Place this script below the defaults but above main. If you have other
    16. #    scripts that modify saving/loading, put this one below them.
    17. #  - What this script does is check a game variable of your choosing to
    18. #    determine the current "chapter". Then it loads a map that you specify to
    19. #    let you play out a cutscene of your own design to recap the story.
    20. #    So you'll need to complete the configuration section below to do this.
    21. #  - You can do whatever you want on the cutscene maps, including going to
    22. #    additional maps if need be. Whenever you finish with your cutscene, all
    23. #    you have to do is put the following script call in an event and the game
    24. #    will then load and allow the player to keep going.
    25. #    "Mobius_Story_So_Far.finish_cutscene" (without quotes)
    26. #
    27. # Features:
    28. #
    29. #  - Very little scripting needed to make script work, since it uses maps for
    30. #    cutscenes.
    31. #  - Can have as many or few chapters as you want
    32. #  - Allows player to skip watching the cutscene and load directly into game
    33. #    (especially useful when reloading a game due to death)
    34. #
    35. # Issues/Bugs/Possible Bugs:
    36. #
    37. #   - There may be incompatibility issues with any script that heavily modifies
    38. #     the saving/loading of the game. Placing this script below them should
    39. #     alleviate most problems
    40. #
    41. #  Credits/Thanks:
    42. #    - Mobius XVI, author
    43. #    - Monkeysnow55, for requesting it
    44. #
    45. #  License
    46. #    - Copyright 2023 Mobius XVI
    47. #    - This script is licensed under the MIT license.
    48. #      The full license is availble here:
    49. #      https://opensource.org/license/mit/
    50. #      Further, if you decide to use this script in a commercial product,
    51. #      I'd ask that you let me know via a forum post or a PM. Thanks.
    52. #
    53. #===============================================================================
    54. #                             CONFIGURATION
    55. #===============================================================================
    56. module Mobius_Story_So_Far
    57.   CHAPTER_VARIABLE = 0
    58.   # Define the game variable that will be used to determine what chapter
    59.   # the player is on.
    60.   CUTSCENE_MAPS = [[5, 0, 0],  # Chapter 0
    61.                    [1, 9, 21],  # Chapter 1
    62.                    [15, 30, 0], # Chapter 2
    63.                    # ...
    64.                    #[MAP_ID, STARTING_X, STARTING_Y], # CHAPTER X
    65.                    # ...
    66.                    ] # Array end - DON'T DELETE!
    67.   # This is an array of arrays. The inner arrays have three entries. The first
    68.   # is the Map_ID for whatever map you want to use for the cutscene. The second
    69.   # and third entries are for the player's x and y coordinates respectively.
    70.   # The inner arrays are all indexed, so whichever one comes first is used
    71.   # when the chapter variable is 0, the second array is used when the chapter
    72.   # variable is 1, and so on. Make sure all inner arrays are separated by commas
    73. end
    74. #===============================================================================
    75. # ** Story So Far - EDIT BELOW THIS LINE AT OWN RISK
    76. #===============================================================================
    77. class Game_Temp
    78.   attr_accessor :cutscene_filename  # filename to load after cutscene
    79. end
    80. class Scene_Load
    81.   # alias old loading method
    82.   alias mobius_ssf_on_decision on_decision
    83.   # new loading method
    84.   def on_decision(filename)
    85.     # If file doesn't exist
    86.     unless FileTest.exist?(filename)
    87.       # Play buzzer SE
    88.       $game_system.se_play($data_system.buzzer_se)
    89.       return
    90.     end
    91.     # Read save data
    92.     file = File.open(filename, "rb")
    93.     read_save_data(file)
    94.     file.close
    95.     # Get chapter info
    96.     chapter_variable = Mobius_Story_So_Far::CHAPTER_VARIABLE
    97.     chapter = $game_variables[chapter_variable]
    98.     # Get cutscene info
    99.     @cutscene_info_array = Mobius_Story_So_Far::CUTSCENE_MAPS[chapter]
    100.     if @cutscene_info_array == nil or @cutscene_info_array.length < 3
    101.       # If there's no info, then load the save as normal
    102.       # Play load SE
    103.       $game_system.se_play($data_system.load_se)
    104.       # Load savefile as normal
    105.       mobius_ssf_on_decision(filename)
    106.       return
    107.     end
    108.     # If there is a cutscene, ask the player if they want to see it
    109.     # Play decision SE
    110.     $game_system.se_play($data_system.decision_se)
    111.     # Set help text
    112.     @help_text = "Do you want to watch the story so far?"
    113.     @help_window.set_text(@help_text)
    114.     # Create choice window
    115.     @choice_window = Window_Command.new(120, ["Yes", "No"])
    116.     @choice_window.active = true
    117.     # Center choice window
    118.     @choice_window.x = 640 / 2 - @choice_window.width / 2
    119.     @choice_window.y = 480 / 2 - @choice_window.height / 2
    120.     @choice_window.z = 200
    121.     # Wait for input
    122.   end
    123.    
    124.   # Load into cutscene
    125.   def load_into_cutscene(filename)
    126.     # Play load SE
    127.     $game_system.se_play($data_system.load_se)
    128.     # Remeber filename
    129.     $game_temp.cutscene_filename = filename  
    130.     # Set cutscene info
    131.     cutscene_map_id = @cutscene_info_array[0]
    132.     cutscene_x = @cutscene_info_array[1]
    133.     cutscene_y = @cutscene_info_array[2]
    134.     # Stop BGM
    135.     Audio.bgm_stop
    136.     # Load cutscene map
    137.     # Set up new map
    138.     $game_map.setup(cutscene_map_id)
    139.     # Move player to initial position
    140.     $game_player.moveto(cutscene_x, cutscene_y)
    141.     # Refresh player
    142.     $game_player.refresh
    143.     # Straighten player
    144.     $game_player.straighten
    145.     # Run automatic change for BGM and BGS set with map
    146.     $game_map.autoplay
    147.     # Update map (run parallel process event)
    148.     $game_map.update
    149.     # Switch to map screen
    150.     $scene = Scene_Map.new
    151.   end
    152. end
    153. class Scene_File
    154.   # alias old update method
    155.   alias mobius_ssf_update update
    156.   def update
    157.     # If choice window is up don't do other updating
    158.     if @choice_window != nil and @choice_window.active
    159.       # Update command window
    160.       @choice_window.update
    161.       # If C button was pressed
    162.       if Input.trigger?(Input::C)
    163.         # Branch by command window cursor position
    164.         case @choice_window.index
    165.         when 0  # Yes
    166.           # Load into cutscene
    167.           load_into_cutscene(make_filename(@file_index))
    168.         when 1  # No
    169.           # Call old loading method
    170.           mobius_ssf_on_decision(make_filename(@file_index))
    171.         end
    172.         @choice_window.dispose
    173.       end
    174.       return
    175.     else # If no choice window, perform normal updating
    176.       mobius_ssf_update
    177.     end
    178.   end
    179. end
    180. module Mobius_Story_So_Far
    181.   def Mobius_Story_So_Far.finish_cutscene
    182.     # Prevent Screen Changes
    183.     Graphics.freeze
    184.     # Recall old filename
    185.     filename = $game_temp.cutscene_filename
    186.     # Create Load screen
    187.     $scene = Scene_Load.new
    188.     # Load savefile using original method
    189.     $scene.mobius_ssf_on_decision(filename)
    190.   end
    191. end
    复制代码






    FAQ
    None yet.

    Credit and Thanks
    Special thanks to Monkeysnow55 for requesting this script.

    Author's Notes
    Copyright 2023 Mobius XVI
    This script is licensed under the MIT license

    The full license is available here: https://opensource.org/license/mit/
    Further, if you decide to use this script in a commercial product, I'd ask that you let me know via a post here or a PM. Thanks.



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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-4 12:52 , Processed in 0.077271 second(s), 51 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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