(not sure what else to tag this with...)
Okay, so I'm using SoulPour777's Menu á la Majo no Ie (minus the item menu changing stuff because I'm using a different setup for that) but the script uses the actor's level as their age. I would still like to show the age of the actors, but I'd also like to be able to use levels as well.
What I'd like is either for a variable to be switched in for the age on the menu, or for a variable to take place of the level the actor is supposed to actually be at (I'm guessing the first one would be easier)
Thanks in advance for any help.
Switch out actor level for a variable
● ARCHIVED · READ-ONLY
-
-
First off, thanks for using the script. The first thing you need to do is to actually make a method of drawing a variable into the window_menustatus. I have saved that for you, you can try to use this script, and change the age from the module to the age you want.
Supposing you want to use game variables, you can also do this:Spoiler=begin#==============================================================================# ** Menu á la Majo no Ie# ** By: SoulPour777#------------------------------------------------------------------------------# This script configures the menu and the item to be compatible for making# good horror games.## Features: - Item Numbers have been ommited in the Key Items. - The Menu is designed a la Witch's House / Majo no Ie - Only contains Items and Load - The item description has been fixed.#===============================================================================endmodule Soulpour module WH AgeName = "Age" ActorAge = 22 #Because I'm 22 endendclass Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- alias start_new_command start def start super create_command_window create_status_window end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- alias create_command_window_majo_no_ie create_command_window def create_command_window @command_window = Window_MenuCommand.new @command_window.set_handler:)item, method:)command_item)) @command_window.set_handler:)load, method:)command_load)) @command_window.set_handler:)cancel, method:)return_scene)) end def command_load SceneManager.call(Scene_Load) end endclass Window_MenuCommand < Window_Command alias majo_no_ie_initialize initialize def initialize super(18, 310) select_last end #-------------------------------------------------------------------------- def make_command_list add_main_commands add_original_commands end #-------------------------------------------------------------------------- # * Add Main Commands to List #-------------------------------------------------------------------------- def add_main_commands add_command(Vocab::item, :item, main_commands_enabled) add_command("Load", :load, main_commands_enabled) endendclass Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :pending_index # Pending position (for formation) #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y) super(160, 280, window_width, window_height) @pending_index = -1 refresh end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- alias soul_window_width window_width def window_width return 340 end #-------------------------------------------------------------------------- # * Get Window Height #-------------------------------------------------------------------------- alias soul_window_height window_height def window_height return 130 end #-------------------------------------------------------------------------- # * Get Number of Items #-------------------------------------------------------------------------- def item_max return 1 endendclass Window_Base < Window alias majo_no_ie_draw_actor_simple_status draw_actor_simple_status def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y) draw_actor_level(actor, x, y + line_height * 1) draw_actor_age(actor, x, 40 + line_height * 1) draw_actor_hp(actor, 60 + 120, y + line_height * 1) end #-------------------------------------------------------------------------- # * Draw Age #-------------------------------------------------------------------------- def draw_actor_age(actor, x, y) change_color(system_color) draw_text(x, y, 32, line_height, Soulpour::WH::AgeName) change_color(normal_color) draw_text(x + 32, y, 24, line_height, Soulpour::WH::ActorAge, 2) end end#------------------------------------------------# Removes the Item Number or Count#------------------------------------------------class Window_ItemList < Window_Selectable def draw_item(index) item = @data[index] if item rect = item_rect(index) rect.width -= 4 draw_item_name(item, rect.x, rect.y, enable?(item)) end endendclass Window_Command < Window_Selectable def initialize(x, y) clear_command_list make_command_list super(x, y + 10, 130, window_height) refresh select(0) activate endendclass Scene_Item < Scene_ItemBase def start super create_help_window create_item_window end def create_item_window @help_window.x = 68 @help_window.width = 415 wy = @help_window.height wh = Graphics.height - wy item_position = 67 @item_window = Window_ItemList.new(item_position, wy, Graphics.height, wh) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.set_handler:)ok, method:)on_item_ok)) @item_window.set_handler:)cancel, method:)return_scene)) @item_window.category = :item # ^ change to :key_item if you want to use key items instead @item_window.select_last @item_window.activate endend
Choose from the two of them which works for you best. happy gaming.Spoiler=begin#==============================================================================# ** Menu á la Majo no Ie# ** By: SoulPour777#------------------------------------------------------------------------------# This script configures the menu and the item to be compatible for making# good horror games.## Features: - Item Numbers have been ommited in the Key Items. - The Menu is designed a la Witch's House / Majo no Ie - Only contains Items and Load - The item description has been fixed.#===============================================================================endmodule Soulpour module WH AgeName = "Age" VariableNumber = 1 # number of the variable to store age endendclass Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- alias start_new_command start def start super create_command_window create_status_window end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- alias create_command_window_majo_no_ie create_command_window def create_command_window @command_window = Window_MenuCommand.new @command_window.set_handler:)item, method:)command_item)) @command_window.set_handler:)load, method:)command_load)) @command_window.set_handler:)cancel, method:)return_scene)) end def command_load SceneManager.call(Scene_Load) end endclass Window_MenuCommand < Window_Command alias majo_no_ie_initialize initialize def initialize super(18, 310) select_last end #-------------------------------------------------------------------------- def make_command_list add_main_commands add_original_commands end #-------------------------------------------------------------------------- # * Add Main Commands to List #-------------------------------------------------------------------------- def add_main_commands add_command(Vocab::item, :item, main_commands_enabled) add_command("Load", :load, main_commands_enabled) endendclass Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :pending_index # Pending position (for formation) #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y) super(160, 280, window_width, window_height) @pending_index = -1 refresh end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- alias soul_window_width window_width def window_width return 340 end #-------------------------------------------------------------------------- # * Get Window Height #-------------------------------------------------------------------------- alias soul_window_height window_height def window_height return 130 end #-------------------------------------------------------------------------- # * Get Number of Items #-------------------------------------------------------------------------- def item_max return 1 endendclass Window_Base < Window alias majo_no_ie_draw_actor_simple_status draw_actor_simple_status def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y) draw_actor_level(actor, x, y + line_height * 1) draw_actor_age(actor, x, 40 + line_height * 1) draw_actor_hp(actor, 60 + 120, y + line_height * 1) end #-------------------------------------------------------------------------- # * Draw Age #-------------------------------------------------------------------------- def draw_actor_age(actor, x, y) change_color(system_color) draw_text(x, y, 32, line_height, Soulpour::WH::AgeName) change_color(normal_color) draw_text(x + 32, y, 24, line_height, $game_variables[Soulpour::WH::VariableNumber], 2) end end#------------------------------------------------# Removes the Item Number or Count#------------------------------------------------class Window_ItemList < Window_Selectable def draw_item(index) item = @data[index] if item rect = item_rect(index) rect.width -= 4 draw_item_name(item, rect.x, rect.y, enable?(item)) end endendclass Window_Command < Window_Selectable def initialize(x, y) clear_command_list make_command_list super(x, y + 10, 130, window_height) refresh select(0) activate endendclass Scene_Item < Scene_ItemBase def start super create_help_window create_item_window end def create_item_window @help_window.x = 68 @help_window.width = 415 wy = @help_window.height wh = Graphics.height - wy item_position = 67 @item_window = Window_ItemList.new(item_position, wy, Graphics.height, wh) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.set_handler:)ok, method:)on_item_ok)) @item_window.set_handler:)cancel, method:)return_scene)) @item_window.category = :item # ^ change to :key_item if you want to use key items instead @item_window.select_last @item_window.activate endend -
Thank you; got it to work exactly how I want. Now I can work on what I was planning a whole lot easier.
-
You're welcome.
-
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.