累计送礼: 0 个 累计收礼: 1 个 TA的每日心情 开心 2026-7-12 04:10
签到天数: 209 天
连续签到: 2 天
[LV.7]常住居民III
管理员
VIP
7
卡币
58883
OK点
16
推广点
0
同能卷
50
积分 68848
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: #============================================================================== # Title: Simple Game Message # Author: FamilyGamer7 (FG7) # Version: 1.1 # Engine: RPG Maker VX Ace #============================================================================== # ** Change Log | # --------------- # 1.0 => Created script # 1.1 => Added in window adjustments for graphic screen resize purposes #============================================================================== # ** Description | # ---------------- # The easiest way to implement an a change in the $game_message system. This # provides a few options like the choices inside the $game_message and making # the $game_message text speed able to be instant vs normal. #============================================================================== # ** 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 #============================================================================== # ** Usage | # ---------- # * ALMOST Plug & Play (See "Setup" section for more information) #============================================================================== # ** Setup | # ---------- # To set the Game Message text speed to "instant" # Script call: $game_system.instant_message_text = true # # To set the Game Message text speed to "normal" # Script call: $game_system.instant_message_text = false # # ----------------------------------------------------------------------------- # # To properly show the "new" game message in your game, you will new to create # the event similar to the example below. # # *Note: The actor name will always go up top and you will only have 3 lines # to work with with this script change. # # ------------------------------ # | Game Message Event Example | # ------------------------------------------------------------- # | Text: 'Actor7', 7, Normal, Bottom | # | : \c[6]Richard | # | : \c[0]This is to test Simple Game Message to ensure | # | : all looks good as well as the choice list is | # | : properly added without an issue. | # ------------------------------------------------------------- # # To properly show the game choices within the window, you will need to create # a "fake" game message before your choice list in the event. See example below. # # ------------------------------ # | Game Choices Event Example | # ----------------------------------------------------- # | Text: 'Actor7', 7, Normal, Bottom | # | : \c[6]Richard | # | Show Choices: | # | When [I don't know what to do] | # | @> | # | When [Leave me alone please...] | # | @> | # | When [Okay okay..] | # | @> | # | Branch End | # ----------------------------------------------------- # # *Note: The idea is to ask your question before the choice list and then you # will setup the game choice event after to make a smooth transition. # # - Feel free to use your own color codes in the game message like normal. # # ----------------------------------------------------------------------------- # # For the "X" and "Y" modules, you can use a value like "30" or "-30" which is # to add/subtract to the existing "x" coordinate placement of the scene. The # same applies for the "y" coordinate placement. See examples below. # # - Ex: Message_X_Horizontal = 30 - moves message window to the right # - Ex: Message_X_Horizontal = -30 - moves message window to the left # (Default is 0) # # - Ex: Message_Y_Vertical = 30 - moves message window to the bottom # - Ex: Message_Y_Vertical = -30 - moves message window to the top # (Default is 0) # # For the "Message_Window_Width", you can use a value like "30" which is to add # to the existing window width of the game message. # # - Ex: Message_Window_Width = 30 - extends message window to the right # # *Note: You do not want to do a add a negative value in the window width as it # will make the game message not appear properly. #============================================================================== # ** WARNING! | # ------------ # Due to the changes in the way the $game_message behaves with the script, the # game message & choice list will not be able to extend to "4" total. You will # only be able to use "3" lines at a time. #============================================================================== #============================================================================== # ** Module: FG7::Simple_Game_Message #------------------------------------------------------------------------------ # This modules creates a static variable to be used within the script. #============================================================================== module FG7 module Simple_Game_Message #============================================================================== # -------------------- ALLOWED TO EDIT BELOW THIS LINE ---------------------- # #============================================================================== # Sets the value for the $game_switch used for the instant message text Message_Text_Switch = 11 # Sets the value for the face window width - if game has long actor names Face_Name_Window_Width = 140 # Sets the value to change the "x" coordinate for the game message. # (This is needed if screen is resized higher - For flexibility) Message_X_Horizontal = 0 # Sets the value to change the "y" coordinate for the game message. # (This is needed if screen is resized higher - For flexibility) Message_Y_Vertical = 0 # Sets the value to change the window width for the game message. # (This is needed if screen is resized higher - For flexibility) Message_Window_Width = 0 #============================================================================== # ---------- DO NOT EDIT BELOW THIS LINE (FOR ADVANCED USERS) --------------- # #============================================================================== end end #============================================================================== # ** Game_System #------------------------------------------------------------------------------ # This class handles system data. It saves the disable state of saving and # menus. Instances of this class are referenced by $game_system. #============================================================================== class Game_System #-------------------------------------------------------------------------- # * New Method: instant_message_text (Flag to make text instant) #-------------------------------------------------------------------------- def instant_message_text=(string) @instant_message_text = string $game_switches[FG7::Simple_Game_Message::Message_Text_Switch] = @instant_message_text end end #============================================================================== # ** Window_ChoiceList #------------------------------------------------------------------------------ # This window is used for the event command [Show Choices]. #============================================================================== class Window_ChoiceList < Window_Command #-------------------------------------------------------------------------- # * Alias Method: Update Window Position #-------------------------------------------------------------------------- alias :fg7_simple_game_message_update_placement :update_placement def update_placement fg7_simple_game_message_update_placement # Reupdates corrdinate placement values self.opacity = 0 self.z = 1000 self.x = 17 + FG7::Simple_Game_Message::Message_X_Horizontal self.y = 306 + FG7::Simple_Game_Message::Message_Y_Vertical end #-------------------------------------------------------------------------- # * Alias Method: Get Maximum Width of Choices #-------------------------------------------------------------------------- alias :fg7_simple_game_message_max_choice_width :max_choice_width def max_choice_width # Adds in the new max width for the choice(s) return 473 + FG7::Simple_Game_Message::Message_Window_Width fg7_simple_game_message_max_choice_width end end #============================================================================== # ** Window_Message #------------------------------------------------------------------------------ # This message window is used to display text. #============================================================================== class Window_Message < Window_Base #-------------------------------------------------------------------------- # * Alias Method: Clear Flag #-------------------------------------------------------------------------- alias :fg7_simple_game_message_clear_flags :clear_flags def clear_flags fg7_simple_game_message_clear_flags # Added change to control the game message text speed (Instant or Normal) @show_fast = $game_switches[FG7::Simple_Game_Message::Message_Text_Switch] end #-------------------------------------------------------------------------- # * Alias Method: Get Number of Lines to Show #-------------------------------------------------------------------------- alias :fg7_simple_game_message_visible_line_number :visible_line_number def visible_line_number # Changes the visible line number - more room for adjustments return 12.5 fg7_simple_game_message_visible_line_number end #-------------------------------------------------------------------------- # * Alias Method: Create All Windows #-------------------------------------------------------------------------- alias :fg7_simple_game_message_create_all_windows :create_all_windows def create_all_windows fg7_simple_game_message_create_all_windows # Creates all new windows for the game message (all background windows) x = 10 + FG7::Simple_Game_Message::Message_X_Horizontal y = 302 + FG7::Simple_Game_Message::Message_Y_Vertical window_width = 524 + FG7::Simple_Game_Message::Message_Window_Width @message_bg_window = Window_Base.new(x, y, window_width, 104) @message_bg_window.openness = 0 x2 = 10 + FG7::Simple_Game_Message::Message_X_Horizontal y2 = 260 + FG7::Simple_Game_Message::Message_Y_Vertical face_width = FG7::Simple_Game_Message::Face_Name_Window_Width @face_name_window = Window_Base.new(x2, y2, face_width, 42) @face_name_window.openness = 0 end #-------------------------------------------------------------------------- # * Alias Method: Main Processing of Fiber #-------------------------------------------------------------------------- alias :fg7_simple_game_message_fiber_main :fiber_main def fiber_main # Opens created message background windows @message_bg_window.openness += 255 @face_name_window.openness += 255 fg7_simple_game_message_fiber_main # Closes created message background windows @face_name_window.openness -= 255 @message_bg_window.openness -= 255 end #-------------------------------------------------------------------------- # * Alias Method: Update Window Background #-------------------------------------------------------------------------- alias :fg7_simple_game_message_update_background :update_background def update_background fg7_simple_game_message_update_background # Removes currnet game message opacity (replacing with new window) self.opacity = 0 end #-------------------------------------------------------------------------- # * Alias Method: Update Window Position #-------------------------------------------------------------------------- alias :fg7_simple_game_message_update_placement :update_placement def update_placement fg7_simple_game_message_update_placement # This shifts the window to properly place the continue "flag" (arrow) self.y = 79 + FG7::Simple_Game_Message::Message_Y_Vertical end #-------------------------------------------------------------------------- # * Alias Method: New Page #-------------------------------------------------------------------------- alias :fg7_simple_game_message_new_page :new_page def new_page(text, pos) fg7_simple_game_message_new_page(text, pos) # Clears existing method with new override/alias method contents.clear draw_face($game_message.face_name, $game_message.face_index, 22, 73) reset_font_settings pos[:x] = 20 pos[:y] = 157 pos[:new_x] = 20 pos[:height] = calc_line_height(text) + 45 clear_flags end end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs the map screen processing. #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # * Alias Method: Create Message Window #-------------------------------------------------------------------------- alias :fg7_simple_game_message_create_message_window :create_message_window def create_message_window fg7_simple_game_message_create_message_window # Removes current game message opacity (replacing with new window) @message_window.opacity = 0 end 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