Advertisement
TheSixth

Menu Messages

Nov 21st, 2018
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 25.08 KB | None | 0 0
  1. #===============================================================================
  2. # * [ACE] Menu Messages
  3. #===============================================================================
  4. # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
  5. # * Version: 1.0
  6. # * Updated: 21/11/2018
  7. # * Requires: --------
  8. #-------------------------------------------------------------------------------
  9. # * < Change Log >
  10. #-------------------------------------------------------------------------------
  11. # * Version 1.0 (21/11/2018)
  12. #   - Initial release.
  13. #-------------------------------------------------------------------------------
  14. # * < Description >
  15. #-------------------------------------------------------------------------------
  16. # * This script will let you add menu messages that look and work just like the
  17. #   message window on the map.
  18. # * You can also use it as a "tutorial" making script, since it supports many
  19. #   ways of changing the scene in real time.
  20. #   ~ Deactivate/activate any windows (or other objects) before or after the
  21. #     menu message(s).
  22. #   ~ Trigger custom made methods before or after the menu message(s).
  23. #   ~ Show consecutive menu messages that will trigger automatically.
  24. # * This script requires at least some scripting knowledge!
  25. #-------------------------------------------------------------------------------
  26. # * < Script Calls >
  27. #-------------------------------------------------------------------------------
  28. # * To activate a menu message for a scene, you will have to add the message
  29. #   data to the variable that will store and process it. Do that with this
  30. #   script call:
  31. #
  32. #     $game_system.add_menu_msg('key',message_data)
  33. #
  34. #   The 'key' should be the name of the scene you want the message to trigger
  35. #   in. It must be a string!
  36. #
  37. #   The message_data can be setup in two ways:
  38. #   1. Use a setting key from the 'MMsgs' setting area found in this script.
  39. #      If you do this, the settings you have setup under that setting key will
  40. #      be loaded automatically.
  41. #      I recommend this way, since it's easier to setup the data in the script
  42. #      than in that little script call box.
  43. #   2. Use a hash with the message settings. This hash must contain the same
  44. #      options as the ones found in the 'Defaults' setting area in this script.
  45. #      You can omit any option you want, in which case the mentioned default
  46. #      option values will be loaded for them.
  47. #
  48. #   If you use the current scene's class name in this script call for the 'key',
  49. #   and set the :instant option to true in the message data, the message will
  50. #   trigger immediately. Otherwise it will run the next time the player enters
  51. #   the specified scene.
  52. #
  53. #   Note that using 'Scene_Map' for the 'key' is something I did not test, since
  54. #   this script is made to be used in menus mainly.
  55. #   Regardless, I don't see a reason why it shouldn't work even on the map, so
  56. #   go nuts with it if you want. :D
  57. #
  58. #   Examples:
  59. #
  60. #     $game_system.add_menu_msg('Scene_Menu','menu_part1')
  61. #     $game_system.add_menu_msg('Scene_Item','item_part1')
  62. #     $game_system.add_menu_msg('Scene_Skill','skill_spec')
  63. #
  64. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  65. # * To clear a menu message, you can use this script call:
  66. #
  67. #     $game_system.del_menu_msg('key')
  68. #
  69. #   The 'key' should be a previously used scene name in the add_menu_msg script
  70. #   call. If there is no menu message added with the specified key, nothing will
  71. #   happen.
  72. #
  73. #   Examples:
  74. #
  75. #     $game_system.del('Scene_Save')
  76. #     $game_system.del('Scene_Formation')
  77. #     $game_system.del('MyCustomScene')
  78. #
  79. #-------------------------------------------------------------------------------
  80. # * < Installation >
  81. #-------------------------------------------------------------------------------
  82. # * Place this scipt between Materials and Main!
  83. #-------------------------------------------------------------------------------
  84. # * < Compatibility Info >
  85. #-------------------------------------------------------------------------------
  86. # * No known incompatibilities, but depending on the scene you use these menu
  87. #   messages, things can happen.
  88. #-------------------------------------------------------------------------------
  89. # * < Known Issues >
  90. #-------------------------------------------------------------------------------
  91. # * No known issues.
  92. # * Well, if you don't have any scripting knowledge, you may have a hard time
  93. #   with this script, but that can't be helped, sorry.
  94. #-------------------------------------------------------------------------------
  95. # * < Terms of Use >
  96. #-------------------------------------------------------------------------------
  97. # * Free to use for whatever purposes you want.
  98. # * Credit me (Sixth) in your game, pretty please! :P
  99. # * Posting modified versions of this script is allowed as long as you notice me
  100. #   about it with a link to it!
  101. #===============================================================================
  102. $imported = {} if $imported.nil?
  103. $imported["SixthMMsgs"] = true
  104. #===============================================================================
  105. # Settings:
  106. #===============================================================================
  107. module MenuMsgD
  108.   #-----------------------------------------------------------------------------
  109.   # Default Settings:
  110.   #-----------------------------------------------------------------------------
  111.   # You can setup the default settings for your menu messages here.
  112.   # If some option is missing from the message data you used in the add_menu_msg
  113.   # script call, it will be loaded from here automatically.
  114.   #
  115.   # There are many options here, so lets check them all...
  116.   #
  117.   #   :scroll_mode => false,
  118.   # Lets get this out of the way quickly...
  119.   # This setting is just here in case I decide to make it possible to use
  120.   # scrolling menu messages. The chance of that happening is close to zero, so
  121.   # don't hold your breath. :D
  122.   # Bottom line, scrolling messages are NOT supported at the moment, so you
  123.   # should NOT change this setting at all, nor should you use this option in
  124.   # any of your message data settings!
  125.   #
  126.   #   :pos => [x,y],
  127.   # This will decide the position of the message window.
  128.   # If you want to move around the message window in your menus, you will have
  129.   # to trigger a new menu message or make your own methods for moving the menu
  130.   # message window and trigger those methods with the :method1 or :method2
  131.   # options (those options are explained somewhere below too).
  132.   # Both the x and y must be an integer number!
  133.   #
  134.   #   :size => [width,height],
  135.   # The size of the menu message window.
  136.   # Like with moving the window, if you want to resize the window, you either
  137.   # trigger a new menu message, or use your own methods to do so.
  138.   # Both the width and height must be an integer number!
  139.   #  
  140.   #   :z => value,
  141.   # This is the Z level of the message window.
  142.   # Depending on the scene the message window is, you may have to increase or,
  143.   # in some rare cases, decrease this value.
  144.   # This option must be set to an integer number!
  145.   #
  146.   #   :view => '@viewport_name',
  147.   # This option will let you assign a viewport to the message window.
  148.   # Note that the viewport must be an instance variable of the scene the message
  149.   # window is triggered in! You must use the name of the instance variable
  150.   # storing the viewport.
  151.   # If you use nil, the message window will use it's default viewport, which is
  152.   # actually... nil. :D
  153.   # Depending on the scene, you may need to set a viewport to the window.
  154.   #
  155.   #   :background => type,
  156.   # The background type of the message window.
  157.   # It can be set to the following values:
  158.   # 0 - "Normal Window" mode.
  159.   # 1 - "Dim Background" mode.
  160.   # 2 - "Transparent" mode.
  161.   #
  162.   #   :skin => "windowskin_filename",
  163.   # This will setup the windowskin used for the menu message.
  164.   # The default windowskin is the "Window" image in any project that didn't
  165.   # modify this part of the game, so I recommend you to leave this option with
  166.   # that windowskin name here, and change it in your message data if needed.
  167.   # All windowskin image files must be in the "Graphics/System/" folder of your
  168.   # project!
  169.   # The windowskin of the message window only matters if you have set the
  170.   # :background option to 0.
  171.   #
  172.   #   :back_color1 => Color.new(R,G,B,A),
  173.   #   :back_color2 => Color.new(R,G,B,A),
  174.   # The colors of the "Dim Background" mode for the window.
  175.   # One of them is the color in the center of the dim background sprite, and
  176.   # the other is the edge of the sprite. Don't ask me which one is which, I
  177.   # kinda forgot. :D
  178.   # These colors only matter if you have set the :background option to 1.
  179.   # Replace the R, G, B and A parts with integer numbers from 0 to 255.
  180.   # These represent the color's red, green. blue and alpha values.
  181.   #
  182.   #   :face_img => "face_image_name",
  183.   #   :face_index => face_index,
  184.   # These options will setup the face graphic of the message window.
  185.   # If you use an empty string ( "" ) for the :face_img option, no face graphic
  186.   # will be used, otherwise it will load the image you specified from the
  187.   # "Graphcis/Faces/" folder of your project.
  188.   # The :face_index will decide which face will be shown from the image. It
  189.   # must be an integer number from 0 to 7, which represent the 8 face images on
  190.   # your image sheet.
  191.   #
  192.   #   :namepos => [x,y],
  193.   # The position of the name window if the message window got one.
  194.   # This requires Yanfly's Ace Message System script!
  195.   # The x and y must be an integer number!
  196.   #
  197.   #   :text => "your text here, yay!",
  198.   # The text of the message window. The window will show this text in the menu.
  199.   # You can usse any message codes available for the regular message window on
  200.   # the map here too.
  201.   # The text will be shown the same way like the map message window would show
  202.   # it, so depending on the size of your menu window, either all text is shown,
  203.   # or just parts of it, and the player will need to press the confirm button to
  204.   # proceed to the next page of the text.
  205.   # Once all text is processed, the message window will close, and the scene
  206.   # will start to process your :win2 and/or :method2 options if you used them
  207.   # in your message data settings.
  208.   #
  209.   #   :instant => true/false,
  210.   # When you add a menu message with the same key as the current scene's name,
  211.   # you have the option to run that message immediately or the next time the
  212.   # player enters that scene.
  213.   # Use true here to trigger it immediately, or false to trigger it the next
  214.   # time the scene starts.
  215.   #
  216.   #   :times => amount,
  217.   # This will decide how many times the menu message will show up before it's
  218.   # deleted from the menu message storage.
  219.   # Most of the times it is pointless to set this higher than 1, since the main
  220.   # point of this script is to make tutorials for your menus, but in case you
  221.   # want repeated messages for something, you can setup how many times it will
  222.   # repeat before it's deleted.
  223.   # Use 0 to make the menu message premanent. Caution! It will trigger every
  224.   # single time the specified scene is opened this way unless you remove the
  225.   # menu message manually with the del_menu_msg script call!
  226.   # Use integer numbers above 0 to set the repeat amount to that value.
  227.   #
  228.   #   :win1 => '@window_name',
  229.   #   :win2 => '@window_name',
  230.   # These options will let you deactivate and activate windows before and after
  231.   # the menu message.
  232.   # The :win1 option sets up the window to deactivate before the menu message.
  233.   # The :win2 option sets up the window to activate after the menu message.
  234.   # Both of them must be set to a valid instance variable name, and that
  235.   # instance variable must be a window or some other object that has the methods
  236.   # 'activate' and 'deactivate' defined.
  237.   # Yuu will have to search for the correct window/object names in the scene
  238.   # classes you want to show the menu message, there is no way around this.
  239.   # You can also set them to nil, which means no window will get
  240.   # deactivated/activated.
  241.   #
  242.   #   :method1 => ['method_name', arg1, arg2, ...],
  243.   #   :method2 => ['method_name', arg1, arg2, ...],
  244.   # These options will let you run your custom methods before or after the menu
  245.   # message.
  246.   # The method set for the :method1 option will run before the menu message.
  247.   # The method set for the :method2 option will run after the menu message.
  248.   # The 'method_name' must be the name of a valid method defined in the scene
  249.   # or it's parent class(es) where the menu message is triggered.
  250.   # The arg1, arg2, ... are the arguments passed for the specified method.
  251.   # These arguments can be almost anything. Just be aware that they are
  252.   # evaluated right on game startup, so you can't use certain variables that
  253.   # are not yet defined at that time. You can still connect these arguments to
  254.   # those variables in your method if needed, of course.
  255.   # Setting these options to nil will disable this feature, so no methods will
  256.   # run before and/or after the menu message.
  257.   #
  258.   #   :next => "setting_key",
  259.   # This option will let you trigger consecutive menu messages.
  260.   # When the current message ends, and this option is set to something other
  261.   # than nil, it will make the specified menu message trigger.
  262.   # The "setting_key" must be a valid setting key used in the 'MMsgs' setting
  263.   # area found right below this setting area.
  264.   #
  265.   # And these are all the options you can setup at the moment.
  266.   # Note that any options loaded for the menu message window will stay until
  267.   # you trigger another menu message window with different message data.
  268.   # You can change the message window's position, size, background, etc by
  269.   # triggering another menu message, or by using the :method1 and/or :method2
  270.   # options (you can do anything in your methods, so of course, you can change
  271.   # the properties of the menu message window in them too if you want).
  272.   #
  273.   #-----------------------------------------------------------------------------
  274.   Defaults = {
  275.     :scroll_mode => false, # Scrolling message is NOT supported, leave on false!
  276.     :pos         => [0,288],
  277.     :size        => [544,128],
  278.     :z           => 2000,
  279.     :view        => nil,
  280.     :background  => 1,
  281.     :skin        => "Window",
  282.     :back_color1 => Color.new(0,0,0,250),
  283.     :back_color2 => Color.new(0,0,0,200),
  284.     :face_img    => "",
  285.     :face_index  => 0,
  286.     :namepos     => [0,0],
  287.     :text        => "",
  288.     :instant     => false,
  289.     :times       => 1,   # Amount of times the message is active
  290.     :win1        => nil, # Deactivate this window before the message
  291.     :win2        => nil, # Activate this window after the message
  292.     :method1     => nil, # Method to run before the message
  293.     :method2     => nil, # Method to run after the message
  294.     :next        => nil, # Triggers another message after the current one end
  295.   }
  296.  
  297.   #-----------------------------------------------------------------------------
  298.   # Menu Message Settings:
  299.   #-----------------------------------------------------------------------------
  300.   # You can setup pre-made menu message data here to be used in the add_menu_msg
  301.   # script call.
  302.   #
  303.   # The format for a message data setting looks like this:
  304.   #
  305.   #   'setting_key' => { * message options go here * },
  306.   #
  307.   # The 'setting_key' must be a string!
  308.   # It can be any string, just don't make duplicate key names!
  309.   #
  310.   # And the options are the same ones explained in the above setting area.
  311.   # Any options you don't setup will be loaded from the 'Defaults' setting area
  312.   # automatically, so you should only setup what you want to change from those
  313.   # defaults to save some space.
  314.   #
  315.   # Note that it's possible to lock the player out from any inputs forever if
  316.   # you are not careful, so use logic and common sense in your methods and
  317.   # window activation changes!
  318.   #
  319.   # I made a few examples, so you can check how these settings work in the game.
  320.   # Just use the "xxxx_part1" setting keys in the add_menu_msg script call, and
  321.   # assign them to the correct scenes to trigger these in the game.
  322.   #
  323.   # You can see that I used a custom method named 'cursor_change' in the item
  324.   # menu settings. That method will move the category window's cursor around.
  325.   # I won't explain how that works, you can check the method in the script if
  326.   # you are interested. I noted in the header of this script that you will need
  327.   # scripting knowledge to use the more advanced features of this script.
  328.   #-----------------------------------------------------------------------------
  329.   MMsgs = {
  330.   #-----------------------------------------------------------------------------
  331.     'menu_part1' => {
  332.       :win1  => '@command_window',
  333.       :pos   => [(Graphics.width-400)/2,(Graphics.height-96)/2],
  334.       :size  => [400,96],
  335.       :text  => "Welcome to the menu tutorial!\n"+
  336.                 "This tutorial will explain how the menu works.\n"+
  337.                 "Lets get started!",
  338.       :next  => 'menu_part2',
  339.     },
  340.     'menu_part2' => {
  341.       :win2  => '@command_window',
  342.       :pos   => [(Graphics.width-400)/2,(Graphics.height-72)/2],
  343.       :size  => [400,72],
  344.       :text  => "Select a command from the list.\n"+
  345.                 "You will move to that part of the menu.",
  346.     },
  347.   #-----------------------------------------------------------------------------
  348.     'item_part1' => {
  349.       :view  => "@viewport",
  350.       :win1  => '@category_window',
  351.       :pos   => [(Graphics.width-400)/2,(Graphics.height-72)/2],
  352.       :size  => [400,72],
  353.       :text  => "This menu will list all of your items currently owned.\n"+
  354.                 "Your items are categorized based on their type.",
  355.       :next  => 'item_part2',
  356.     },
  357.     'item_part2' => {
  358.       :view  => "@viewport",
  359.       :pos   => [(Graphics.width-500)/2,(Graphics.height-96)/2],
  360.       :size  => [500,96],
  361.       :text  => "Your consumable items are listed under the \\c[17]Items\\c[0] category.\n"+
  362.                 "Use your items from this list if needed.\n"+
  363.                 "Note that certain items can only be used in battle, or not at all!",
  364.       :method2 => ['cursor_change',['@category_window',1,30]], # Move to the next command
  365.       :next  => 'item_part3'
  366.     },
  367.     'item_part3' => {
  368.       :view  => "@viewport",
  369.       :pos   => [(Graphics.width-530)/2,(Graphics.height-96)/2],
  370.       :size  => [530,96],
  371.       :text  => "All of your weapons are listed under the \\c[17]Weapons\\c[0] category.\n"+
  372.                 "You can check or discard (not really) your weapons from this list if needed.\n"+
  373.                 "Note that equipped weapons will not show up on the list!",
  374.       :method2 => ['cursor_change',['@category_window',1,30]], # Move to the next command
  375.       :next  => 'item_part4'
  376.     },
  377.     'item_part4' => {
  378.       :view  => "@viewport",
  379.       :pos   => [(Graphics.width-510)/2,(Graphics.height-96)/2],
  380.       :size  => [510,96],
  381.       :text  => "All of your armors are listed under the \\c[17]Armors\\c[0] category.\n"+
  382.                 "You can check or discard (not really) your armors from this list if needed.\n"+
  383.                 "Note that equipped armors will not show up on the list!",
  384.       :method2 => ['cursor_change',['@category_window',1,30]], # Move to the next command
  385.       :next  => 'item_part5'
  386.     },
  387.     'item_part5' => {
  388.       :view  => "@viewport",
  389.       :pos   => [(Graphics.width-560)/2,(Graphics.height-96)/2],
  390.       :size  => [560,96],
  391.       :text  => "Special items are listed under the \\c[17]Key Items\\c[0] category.\n"+
  392.                 "These items are needed for story progression or to trigger other special events.\n"+
  393.                 "You can use some of these items just like regular consumables.",
  394.       :next  => 'item_part6'
  395.     },
  396.     'item_part6' => {
  397.       :view  => "@viewport",
  398.       :win2  => '@category_window',
  399.       :pos   => [(Graphics.width-400)/2,(Graphics.height-72)/2],
  400.       :size  => [400,72],
  401.       :text  => "And that concludes our little tour of the item menu.\n"+
  402.                 "Exit the item menu to continue with the menu tutorial.",
  403.       :method2 => ['cursor_change',['@category_window',-1,30],['@category_window',-1,30],['@category_window',-1,30]],
  404.     },
  405.   #-----------------------------------------------------------------------------
  406.   # <-- Add more settings here if needed!
  407.   }
  408.  
  409. end
  410. #===============================================================================
  411. # End of settings! Editing anything below may lead to... you know it, right? o.o
  412. #===============================================================================
  413.  
  414. class Game_System
  415.  
  416.   attr_accessor :menu_msg
  417.  
  418.   def menu_msg
  419.     @menu_msg = {} if @menu_msg.nil?
  420.     return @menu_msg
  421.   end
  422.  
  423.   def add_menu_msg(mky,mdt={})
  424.     unless mdt.is_a?(Hash)
  425.       return unless MenuMsgD::MMsgs[mdt]
  426.       mdt = MenuMsgD::MMsgs[mdt].clone
  427.     end
  428.     self.menu_msg[mky] = mdt
  429.     cname = SceneManager.scene.class.to_s
  430.     if mky == cname && mdt[:instant]
  431.       win1 = menu_msg[mky][:win1]
  432.       win2 = menu_msg[mky][:win2]
  433.       SceneManager.scene.start_message(mky,$game_system.menu_msg[mky],win1,win2)
  434.     end
  435.   end
  436.  
  437.   def del_menu_msg(mky)
  438.     self.menu_msg.delete(mky)
  439.   end
  440.  
  441. end
  442.  
  443. class Game_Message
  444.  
  445.   attr_accessor :size, :name_pos, :skin, :z, :back_color1, :back_color2
  446.  
  447. end
  448.  
  449. class Scene_Base
  450.    
  451.   alias add_mmsg0017 post_start
  452.   def post_start
  453.     add_mmsg0017
  454.     cname = self.class.to_s
  455.     if $game_system.menu_msg[cname]
  456.       win1 = $game_system.menu_msg[cname][:win1]
  457.       win2 = $game_system.menu_msg[cname][:win2]
  458.       start_message(cname,$game_system.menu_msg[cname],win1,win2)
  459.     end
  460.   end
  461.  
  462.   def start_message(mky,msg,win1,win2)
  463.     @mky = mky
  464.     setup_message(msg)
  465.     create_msg_win(msg,win1,win2)
  466.   end
  467.  
  468.   def setup_message(msg={})
  469.     msg = MenuMsgD::Defaults.merge(msg)
  470.     $game_message.face_name = msg[:face_img]
  471.     $game_message.face_index = msg[:face_index]
  472.     $game_message.background = msg[:background]
  473.     $game_message.scroll_mode = msg[:scroll_mode]
  474.     $game_message.position = msg[:pos]
  475.     $game_message.name_pos = msg[:namepos]
  476.     $game_message.size = msg[:size]
  477.     $game_message.skin = msg[:skin]
  478.     $game_message.z = msg[:z]
  479.     $game_message.back_color1 = msg[:back_color1]
  480.     $game_message.back_color2 = msg[:back_color2]
  481.     $game_message.add(msg[:text])
  482.   end
  483.  
  484.   def win_operation(win,*mtd)
  485.     instance_variable_get(win).send(*mtd)
  486.   end
  487.  
  488.   def cursor_change(*changes)
  489.     changes.each do |change|
  490.       rwin = instance_variable_get(change[0])
  491.       rwin.select(rwin.index + change[1])
  492.       Sound.play_cursor
  493.       change[2].times { update }
  494.     end
  495.   end
  496.  
  497.   def create_msg_win(msg,win1=nil,win2=nil)
  498.     send(*msg[:method1]) if msg[:method1]
  499.     win_operation(win1,'deactivate') if win1
  500.     @message = MenuMessageD.new(*$game_message.position,*$game_message.size)
  501.     if msg[:view]
  502.       view = instance_variable_get(msg[:view])
  503.       @message.viewport = view
  504.     end
  505.     while $game_message.busy?
  506.       update
  507.     end
  508.     until @message.openness <= 0
  509.       update
  510.     end
  511.     @message.dispose
  512.     @message = nil
  513.     send(*msg[:method2]) if msg[:method2]
  514.     win_operation(win2,'activate') if win2
  515.     if $game_system.menu_msg[@mky] && $game_system.menu_msg[@mky][:times] > 0
  516.       $game_system.menu_msg[@mky][:times] -= 1
  517.       $game_system.menu_msg.delete(@mky) if $game_system.menu_msg[@mky][:times] <= 0
  518.     end
  519.     if msg[:next]
  520.       nmsg = MenuMsgD::MMsgs[msg[:next]]
  521.       start_message(msg[:next],nmsg,nmsg[:win1],nmsg[:win2])
  522.     end
  523.   end
  524.  
  525. end
  526.  
  527. class MenuMessageD < Window_Message
  528.  
  529.   def initialize(x,y,w,h)
  530.     @fiber = nil
  531.     super()
  532.     self.x = @back_sprite.x = x
  533.     self.y = @back_sprite.y = y
  534.     self.width = w
  535.     self.height = h
  536.     self.windowskin = Cache.system($game_message.skin)
  537.     self.z = $game_message.z
  538.     create_contents
  539.   end
  540.  
  541.   def window_width
  542.     return $game_message.size[0]
  543.   end
  544.  
  545.   def window_height
  546.     return $game_message.size[1]
  547.   end
  548.  
  549.   def viewport=(view)
  550.     super
  551.     @back_sprite.viewport = view
  552.   end
  553.  
  554.   if $imported["YEA-MessageSystem"]
  555.   def adjust_message_window_size
  556.     start_name_window
  557.   end
  558.   end
  559.  
  560.   def update
  561.     return if self.disposed?
  562.     super
  563.   end
  564.  
  565.   def update_placement
  566.     # Removed!
  567.   end
  568.  
  569.   def back_color1
  570.     return $game_message.back_color1
  571.   end
  572.  
  573.   def back_color2
  574.     return $game_message.back_color2
  575.   end
  576.  
  577. end
  578.  
  579. if $imported["YEA-MessageSystem"]
  580.  
  581. class Window_NameMessage < Window_Base
  582.  
  583.   alias add_menupos9986 set_x_position
  584.   def set_x_position(x_position)
  585.     if SceneManager.scene_is?(ABSScene)
  586.       self.x = $game_message.name_pos[0]
  587.     else
  588.       add_menupos9986(x_position)
  589.     end
  590.   end
  591.  
  592.   alias add_menupos1186 set_y_position
  593.   def set_y_position
  594.     if SceneManager.scene_is?(ABSScene)
  595.       self.y = $game_message.name_pos[1]  
  596.     else
  597.       add_menupos1186
  598.     end
  599.   end
  600.  
  601. end
  602.  
  603. end # YEA Msg check end
  604. #==============================================================================
  605. # !!END OF SCRIPT - OHH, NOES!!
  606. #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement