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

[转载发布] FG7 - Simple Game Message

[复制链接]
累计送礼:
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 18:59:57 | 显示全部楼层 |阅读模式
    Simple Game Message
    By: FamilyGamer7​


    Introduction
                            The easiest way to implement an a change in the $game_message and choice(s) system.               
    Click to expand...


    Features
                            This does a mini overhaul on the message system and provides a few options like the choices inside the $game_message and making the $game_message text speed able to be instant vs normal.               
    Click to expand...


    Screenshot(s)





    Click to expand...


    Script
    Spoiler: FG7 - Simple Game Message
                    Ruby:       
    1. #==============================================================================
    2. # Title: Simple Game Message
    3. # Author: FamilyGamer7 (FG7)
    4. # Version: 1.1
    5. # Engine: RPG Maker VX Ace
    6. #==============================================================================
    7. # ** Change Log |
    8. # ---------------
    9. # 1.0 => Created script
    10. # 1.1 => Added in window adjustments for graphic screen resize purposes
    11. #==============================================================================
    12. # ** Description |
    13. # ----------------
    14. # The easiest way to implement an a change in the $game_message system. This
    15. # provides a few options like the choices inside the $game_message and making
    16. # the $game_message text speed able to be instant vs normal.
    17. #==============================================================================
    18. # ** Terms of Use |
    19. # -----------------
    20. # * Free to use in non-commercial projects and commercial projects
    21. # * Feel free to modify and improve the script. Credit is still required.
    22. # * Credit FamilyGamer7
    23. #==============================================================================
    24. # ** Usage |
    25. # ----------
    26. # * ALMOST Plug & Play (See "Setup" section for more information)
    27. #==============================================================================
    28. # ** Setup |
    29. # ----------
    30. # To set the Game Message text speed to "instant"
    31. # Script call: $game_system.instant_message_text = true
    32. #
    33. # To set the Game Message text speed to "normal"
    34. # Script call: $game_system.instant_message_text = false
    35. #
    36. # -----------------------------------------------------------------------------
    37. #
    38. # To properly show the "new" game message in your game, you will new to create
    39. # the event similar to the example below.
    40. #
    41. # *Note: The actor name will always go up top and you will only have 3 lines
    42. #        to work with with this script change.
    43. #
    44. # ------------------------------
    45. # | Game Message Event Example |
    46. # -------------------------------------------------------------
    47. # | Text: 'Actor7', 7, Normal, Bottom                         |
    48. # |     : \c[6]Richard                                        |
    49. # |     : \c[0]This is to test Simple Game Message to ensure  |
    50. # |     : all looks good as well as the choice list is        |
    51. # |     : properly added without an issue.                    |
    52. # -------------------------------------------------------------
    53. #
    54. # To properly show the game choices within the window, you will need to create
    55. # a "fake" game message before your choice list in the event. See example below.
    56. #
    57. # ------------------------------
    58. # | Game Choices Event Example |
    59. # -----------------------------------------------------
    60. # | Text: 'Actor7', 7, Normal, Bottom                 |
    61. # |     : \c[6]Richard                                |
    62. # | Show Choices:                                     |
    63. # | When [I don't know what to do]                    |
    64. # | @>                                                |
    65. # | When [Leave me alone please...]                   |
    66. # | @>                                                |
    67. # | When [Okay okay..]                                |
    68. # | @>                                                |
    69. # | Branch End                                        |
    70. # -----------------------------------------------------
    71. #
    72. # *Note: The idea is to ask your question before the choice list and then you
    73. #        will setup the game choice event after to make a smooth transition.
    74. #
    75. # - Feel free to use your own color codes in the game message like normal.
    76. #
    77. # -----------------------------------------------------------------------------
    78. #
    79. # For the "X" and "Y" modules, you can use a value like "30" or "-30" which is
    80. # to add/subtract to the existing "x" coordinate placement of the scene. The
    81. # same applies for the "y" coordinate placement. See examples below.
    82. #
    83. # - Ex: Message_X_Horizontal = 30 - moves message window to the right
    84. # - Ex: Message_X_Horizontal = -30 - moves message window to the left
    85. #   (Default is 0)
    86. #
    87. # - Ex: Message_Y_Vertical = 30 - moves message window to the bottom
    88. # - Ex: Message_Y_Vertical = -30 - moves message window to the top
    89. #   (Default is 0)
    90. #
    91. # For the "Message_Window_Width", you can use a value like "30" which is to add
    92. # to the existing window width of the game message.
    93. #
    94. # - Ex: Message_Window_Width = 30 - extends message window to the right
    95. #
    96. # *Note: You do not want to do a add a negative value in the window width as it
    97. #        will make the game message not appear properly.
    98. #==============================================================================
    99. # ** WARNING! |
    100. # ------------
    101. # Due to the changes in the way the $game_message behaves with the script, the
    102. # game message & choice list will not be able to extend to "4" total. You will
    103. # only be able to use "3" lines at a time.
    104. #==============================================================================
    105. #==============================================================================
    106. # ** Module: FG7::Simple_Game_Message
    107. #------------------------------------------------------------------------------
    108. #  This modules creates a static variable to be used within the script.
    109. #==============================================================================
    110. module FG7
    111.   module Simple_Game_Message
    112. #==============================================================================
    113. # -------------------- ALLOWED TO EDIT BELOW THIS LINE ---------------------- #
    114. #==============================================================================
    115.     # Sets the value for the $game_switch used for the instant message text
    116.     Message_Text_Switch = 11
    117.     # Sets the value for the face window width - if game has long actor names
    118.     Face_Name_Window_Width = 140
    119.    
    120.     # Sets the value to change the "x" coordinate for the game message.
    121.     # (This is needed if screen is resized higher - For flexibility)
    122.     Message_X_Horizontal = 0
    123.    
    124.     # Sets the value to change the "y" coordinate for the game message.
    125.     # (This is needed if screen is resized higher - For flexibility)
    126.     Message_Y_Vertical = 0
    127.    
    128.     # Sets the value to change the window width for the game message.
    129.     # (This is needed if screen is resized higher - For flexibility)
    130.     Message_Window_Width = 0
    131. #==============================================================================
    132. # ---------- DO NOT EDIT BELOW THIS LINE (FOR ADVANCED USERS) --------------- #
    133. #==============================================================================
    134.   end
    135. end
    136. #==============================================================================
    137. # ** Game_System
    138. #------------------------------------------------------------------------------
    139. #  This class handles system data. It saves the disable state of saving and
    140. # menus. Instances of this class are referenced by $game_system.
    141. #==============================================================================
    142. class Game_System
    143.   #--------------------------------------------------------------------------
    144.   # * New Method: instant_message_text (Flag to make text instant)
    145.   #--------------------------------------------------------------------------
    146.   def instant_message_text=(string)
    147.     @instant_message_text = string
    148.     $game_switches[FG7::Simple_Game_Message::Message_Text_Switch] = @instant_message_text
    149.   end
    150. end
    151. #==============================================================================
    152. # ** Window_ChoiceList
    153. #------------------------------------------------------------------------------
    154. #  This window is used for the event command [Show Choices].
    155. #==============================================================================
    156. class Window_ChoiceList < Window_Command
    157.   #--------------------------------------------------------------------------
    158.   # * Alias Method: Update Window Position
    159.   #--------------------------------------------------------------------------
    160.   alias :fg7_simple_game_message_update_placement :update_placement
    161.   def update_placement
    162.     fg7_simple_game_message_update_placement
    163.     # Reupdates corrdinate placement values
    164.     self.opacity = 0
    165.     self.z = 1000
    166.     self.x = 17 + FG7::Simple_Game_Message::Message_X_Horizontal
    167.     self.y = 306 + FG7::Simple_Game_Message::Message_Y_Vertical
    168.   end
    169.   #--------------------------------------------------------------------------
    170.   # * Alias Method: Get Maximum Width of Choices
    171.   #--------------------------------------------------------------------------
    172.   alias :fg7_simple_game_message_max_choice_width :max_choice_width
    173.   def max_choice_width
    174.     # Adds in the new max width for the choice(s)
    175.     return 473 + FG7::Simple_Game_Message::Message_Window_Width
    176.     fg7_simple_game_message_max_choice_width
    177.   end
    178. end
    179. #==============================================================================
    180. # ** Window_Message
    181. #------------------------------------------------------------------------------
    182. #  This message window is used to display text.
    183. #==============================================================================
    184. class Window_Message < Window_Base
    185.   #--------------------------------------------------------------------------
    186.   # * Alias Method: Clear Flag
    187.   #--------------------------------------------------------------------------
    188.   alias :fg7_simple_game_message_clear_flags :clear_flags
    189.   def clear_flags
    190.     fg7_simple_game_message_clear_flags
    191.     # Added change to control the game message text speed (Instant or Normal)
    192.     @show_fast = $game_switches[FG7::Simple_Game_Message::Message_Text_Switch]
    193.   end
    194.   #--------------------------------------------------------------------------
    195.   # * Alias Method: Get Number of Lines to Show
    196.   #--------------------------------------------------------------------------
    197.   alias :fg7_simple_game_message_visible_line_number :visible_line_number
    198.   def visible_line_number
    199.     # Changes the visible line number - more room for adjustments
    200.     return 12.5
    201.     fg7_simple_game_message_visible_line_number
    202.   end
    203.   #--------------------------------------------------------------------------
    204.   # * Alias Method: Create All Windows
    205.   #--------------------------------------------------------------------------
    206.   alias :fg7_simple_game_message_create_all_windows :create_all_windows
    207.   def create_all_windows
    208.     fg7_simple_game_message_create_all_windows
    209.     # Creates all new windows for the game message (all background windows)
    210.     x = 10 + FG7::Simple_Game_Message::Message_X_Horizontal
    211.     y = 302 + FG7::Simple_Game_Message::Message_Y_Vertical
    212.     window_width = 524 + FG7::Simple_Game_Message::Message_Window_Width
    213.     @message_bg_window = Window_Base.new(x, y, window_width, 104)
    214.     @message_bg_window.openness = 0
    215.     x2 = 10 + FG7::Simple_Game_Message::Message_X_Horizontal
    216.     y2 = 260 + FG7::Simple_Game_Message::Message_Y_Vertical
    217.     face_width = FG7::Simple_Game_Message::Face_Name_Window_Width
    218.     @face_name_window = Window_Base.new(x2, y2, face_width, 42)
    219.     @face_name_window.openness = 0
    220.   end
    221.   #--------------------------------------------------------------------------
    222.   # * Alias Method: Main Processing of Fiber
    223.   #--------------------------------------------------------------------------
    224.   alias :fg7_simple_game_message_fiber_main :fiber_main
    225.   def fiber_main
    226.     # Opens created message background windows
    227.     @message_bg_window.openness += 255
    228.     @face_name_window.openness += 255
    229.     fg7_simple_game_message_fiber_main
    230.     # Closes created message background windows
    231.     @face_name_window.openness -= 255
    232.     @message_bg_window.openness -= 255
    233.   end
    234.   #--------------------------------------------------------------------------
    235.   # * Alias Method: Update Window Background
    236.   #--------------------------------------------------------------------------
    237.   alias :fg7_simple_game_message_update_background :update_background
    238.   def update_background
    239.     fg7_simple_game_message_update_background
    240.     # Removes currnet game message opacity (replacing with new window)
    241.     self.opacity = 0
    242.   end
    243.   #--------------------------------------------------------------------------
    244.   # * Alias Method: Update Window Position
    245.   #--------------------------------------------------------------------------
    246.   alias :fg7_simple_game_message_update_placement :update_placement
    247.   def update_placement
    248.     fg7_simple_game_message_update_placement
    249.     # This shifts the window to properly place the continue "flag" (arrow)
    250.     self.y = 79 + FG7::Simple_Game_Message::Message_Y_Vertical
    251.   end
    252.   #--------------------------------------------------------------------------
    253.   # * Alias Method: New Page
    254.   #--------------------------------------------------------------------------
    255.   alias :fg7_simple_game_message_new_page :new_page
    256.   def new_page(text, pos)
    257.     fg7_simple_game_message_new_page(text, pos)
    258.     # Clears existing method with new override/alias method
    259.     contents.clear
    260.     draw_face($game_message.face_name, $game_message.face_index, 22, 73)
    261.     reset_font_settings
    262.     pos[:x] = 20
    263.     pos[:y] = 157
    264.     pos[:new_x] = 20
    265.     pos[:height] = calc_line_height(text) + 45
    266.     clear_flags
    267.   end
    268. end
    269. #==============================================================================
    270. # ** Scene_Map
    271. #------------------------------------------------------------------------------
    272. #  This class performs the map screen processing.
    273. #==============================================================================
    274. class Scene_Map < Scene_Base
    275.   #--------------------------------------------------------------------------
    276.   # * Alias Method: Create Message Window
    277.   #--------------------------------------------------------------------------
    278.   alias :fg7_simple_game_message_create_message_window :create_message_window
    279.   def create_message_window
    280.     fg7_simple_game_message_create_message_window
    281.     # Removes current game message opacity (replacing with new window)
    282.     @message_window.opacity = 0
    283.   end
    284. end
    复制代码


    How to Use
                            Add this script in the script editor under in the "Materials" section and above "Main Process".
    The instructions and setup for the script are held within the script header itself. No need to repeat here.               
    Click to expand...


    Terms of Use
                            - Free to use in non-commercial projects and commercial projects
    - Feel free to modify and improve the script. Credit is still required.
    - Credit FamilyGamer7               
    Click to expand...




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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 09:26 , Processed in 0.123163 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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