RMVXACE MENU SHOP QUESTION
Posts
Pages:
1
In the context of my game's world, having merchants around would be quite silly. So, where there be a way to add a shop accessed through the menu? It would function exactly the same way as a normal shop would, only it would be able to be accessed from the menu at any time. Anyone know how to go about doing this?
Here's my clumsy thrown together hack!
If you want to change the name of 'Shop' to something else just change "Shop" under
To change the order you'll have to c/p the above line into the Window_MenuCommand class (see the list of scripts on the left, one will have that name) and insert it into make_command_list / add_main_commands where you want it to appear. To change what you can buy look at "def open_menu_shop" above. Hopefully it is clear what you have to do specifically.
e: augh tabs vs ws
class Window_MenuCommand < Window_Command alias add_main_commands_shopori add_main_commands unless $@ def add_main_commands add_main_commands_shopori add_command("Shop", :shop, main_commands_enabled) end end class Scene_Menu alias create_command_window_shopori create_command_window unless $@ def create_command_window create_command_window_shopori @command_window.set_handler(:shop, method(:open_menu_shop)) end def open_menu_shop # Create our list of what can be purchased at the shop shop_goods = [] # The format here is: # - Type of item (0 is item, 1 is weapon, 2 is armor) # - The ID # of the item # - If the item has a specific price or use the default one in the DB # - The specific price shop_goods.push([0, 1, 0, 0]) shop_goods.push([1, 1, 0, 0]) if $game_switches[2] shop_goods.push([2, 1, 1, 50]) else shop_goods.push([2, 1, 0, 0]) end # Flag if the player can sell items at the shop purchase_only = false # Now call the shop scene! SceneManager.call(Scene_Shop) SceneManager.scene.prepare(shop_goods, purchase_only) end end
If you want to change the name of 'Shop' to something else just change "Shop" under
add_command("Shop", :shop, main_commands_enabled)
e: augh tabs vs ws
Pages:
1















