Minimalist Menu
DescrizioneQuesto era un menu che avevo realizzato per un adventure game, ma ho deciso di abbandonarlo per non portare avanti troppi progetti a tempo. Magari a qualcuno piace e vuole usarlo nel proprio gioco, e sono più che felice di condividerlo.
Funzionalità
- Le descrizioni di oggetti, abilità ed equipaggiamento sono state rimosse.
- Il menu Status è stato rimosso.
- Tutte le informazioni riguardo i parametri, il livello, l'esperienza e la classe di un personaggio sono state nascoste (ma funzionanti uguali). Le uniche cose visibili sono: Nome, Faccia, HP, MP e stati alterati.
Autore
Morshudiego
Allegati
Spoiler
Istruzioni per l'uso
Creare una nuova voce sopra Main ed inserire lo script.
Configurare lo script sotto la sezione CONFIGURAZIONE.
Script
Spoiler
module MRSH; module S004 ################################################################# # + MINIMALIST MENU + # Versione: # - 1.0.0 # Autore: # - Morshudiego # Condizioni d'uso: # - Crediti non necessari, ma apprezzati. # - Libertà di utilizzo e modifica a fini NON COMMERCIALI. # # Puoi trovare altri script su "http://www.rpg2s.net/" ################################################################# # + CHANGELOG + # 1.0.0 (data di oggi) # Rilascio ################################################################# # + DESCRIZIONE + # Questo script offre una versione minimale del menu, che nasconde # la maggior parte delle informazioni di gioco. # # Modifiche del menu: # - L'opzione Status è stata rimossa. # - Tutte le descrizioni di oggetti, skill ed equip sono state # rimosse. # # Le uniche informazioni che il giocatore avrà sono: # - Nome e faccia dei personaggi # - HP attuali dei personaggi # - MP attuali dei personaggi # - Eventuali states. # # Tutte le altre informazioni (parametri, livello, classe, # esperienza, TP, ecc.) sono presenti e funzionanti, ma non # visualizzabili. ################################################################# # + CONFIGURAZIONE + NOME_OGGETTI_ALTERNATIVO = false NOME_COMANDO_OGGETTI = "Borsa" # Decidi se usare un nome alternativo per il comando oggetti # (true) o se lasciare quello del database (false). # Cambia la stringa nel nome del comando che vuoi usare. SALVA_NEL_MENU = true # Decidi se far comparire il comando salva nel menu (true) o no # (false). COMANDO_FORMAZIONE_DINAMICO = false # Decidi se far comparire il tasto formazione solo quando il # gruppo ha più di un membro (true) o se tenerlo sempre presente # (false). NOME_IN_BATTAGLIA = false # Decidi se visualizzare sia nome che faccia dell'eroe (true) # O solo la faccia (false) in battaglia. INFO_CENTRATE_IN_BATTAGLIA = false # Decidi se centrare i personaggi in battaglia se sono meno di # quattro (true) o se lasciarli comparire normalmente da # sinistra (false). ################################################################# # + BUG E CONFLITTI + # - Sebbene il party può ancora essere composto da più di 4 # membri, il menu non visualizzerà correttamente gli altri # membri. Pertanto è consigliabile tenere il party dentro il # numero di quattro componenti. ################################################################# end; end class Window_MenuCommand < Window_Command def add_main_commands if MRSH::S004::NOME_OGGETTI_ALTERNATIVO == true add_command(MRSH::S004::NOME_COMANDO_OGGETTI,:item,main_commands_enabled) else add_command(Vocab::item, :item, main_commands_enabled) end add_command(Vocab::skill, :skill, main_commands_enabled) add_command(Vocab::equip, :equip, main_commands_enabled) end def add_formation_command if MRSH::S004::COMANDO_FORMAZIONE_DINAMICO == true if $game_party.members.size > 1 add_command(Vocab::formation, :formation, formation_enabled) end else add_command(Vocab::formation, :formation, formation_enabled) end end if MRSH::S004::SALVA_NEL_MENU == false def add_save_command end end end class Window_MenuStatus < Window_Selectable attr_reader :pending_index def initialize(x, y) super(x, y, window_width, window_height) @pending_index = -1 refresh end def spacing; standard_padding * 2 ;end def col_max; $game_party.battle_members.size; end def row_max; 1; end def window_width;(96+(standard_padding*2))*$game_party.battle_members.size;end def window_height; line_height*7 + standard_padding*2; end def item_max; $game_party.members.size; end def item_width; 96; end def item_height; window_height - line_height; end def draw_item(index) actor = $game_party.members[index] enabled = $game_party.battle_members.include?(actor) rect = item_rect(index) draw_item_background(index) draw_text(rect.x,line_height*0,96,line_height,actor.name,1) draw_actor_face(actor,rect.x,line_height*1,enabled) draw_actor_hp(actor,rect.x,line_height*5,48) draw_actor_mp(actor,rect.x+48,line_height*5,48) draw_actor_icons(actor,rect.x,line_height*6) end def draw_current_and_max_values(x, y, width, current, max, color1, color2) change_color(color1) xr = x + width draw_text(xr - 40, y, 42, line_height, current, 1) end end class Window_ItemCategory < Window_HorzCommand def window_width; Graphics.width/2; end def col_max; return 2; end def make_command_list add_command(Vocab::item, :item) add_command(Vocab::key_item, :key_item) end end class Window_ItemList < Window_Selectable def col_max; return 1; end def include?(item) case @category when :item item.is_a?(RPG::Item) && !item.key_item? when :key_item item.is_a?(RPG::Item) && item.key_item? else false end end 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)) draw_item_number(rect, item) if $game_party.item_number(item) > 1 end end end class Window_SkillList < Window_Selectable def col_max; 1; end end class Window_BattleStatus < Window_Selectable def initialize super(0, 0, window_width, window_height) self.openness = 0 @party = $game_party.battle_members.clone end def col_max; return $game_party.max_battle_members; end def battle_members; return $game_party.battle_members; end def actor; return battle_members[@index]; end def update super return if @party == $game_party.battle_members @party = $game_party.battle_members.clone refresh end def draw_item(index) return if index.nil? clear_item(index) actor = battle_members[index] rect = item_rect(index) return if actor.nil? draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?) if MRSH::S004::NOME_IN_BATTAGLIA == true draw_actor_name(actor, rect.x, rect.y, rect.width) draw_actor_icons(actor, rect.x, line_height*1, rect.width) elsif MRSH::S004::NOME_IN_BATTAGLIA == false draw_actor_icons(actor, rect.x, rect.y, rect.width) end contents.font.size = 20 dw = rect.width/2-2 draw_actor_hp(actor, rect.x+2, line_height*3, dw) dw = rect.width - rect.width/2 - 2 draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw) end def item_rect(index) rect = Rect.new rect.width = contents.width / $game_party.max_battle_members rect.height = contents.height rect.x = index * rect.width if MRSH::S004::INFO_CENTRATE_IN_BATTAGLIA == true rect.x += (contents.width - $game_party.members.size * rect.width) / 2 end rect.y = 0 return rect end def draw_face(face_name, face_index, dx, dy, enabled = true) bitmap = Cache.face(face_name) fx = [(96 - item_rect(0).width + 1) / 2, 0].max fy = face_index / 4 * 96 + 2 fw = [item_rect(0).width - 4, 92].min rect = Rect.new(fx, fy, fw, 92) rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92) contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha) bitmap.dispose end def draw_actor_name(actor, dx, dy, dw = 112) reset_font_settings contents.font.size = 20 change_color(hp_color(actor)) draw_text(dx, dy, dw, line_height, actor.name, 1) end def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2) change_color(color1) draw_text(dx, dy, dw, line_height, current.to_s, 1) end def draw_actor_hp(actor, dx, dy, width = 124, h = 6, *args) draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2) change_color(system_color) cy = (Font.default_size - contents.font.size) / 2 + 1 draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a) draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp, hp_color(actor), normal_color) end def draw_actor_mp(actor, dx, dy, width = 124) draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2) change_color(system_color) cy = (Font.default_size - contents.font.size) / 2 + 1 draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a) draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp, mp_color(actor), normal_color) end end class Window_BattleItem < Window_ItemList def initialize(help_window, info_viewport) super(0, 0, Graphics.width/2, info_viewport.rect.y) self.x = (Graphics.width-width)/2 self.visible = false @info_viewport = info_viewport end def show select_last super end def hide super end end class Window_BattleSkill < Window_SkillList def initialize(help_window, info_viewport) super(0, 0, Graphics.width/2, info_viewport.rect.y) self.x = (Graphics.width-width)/2 self.visible = false @info_viewport = info_viewport end def show select_last super end def hide super end end class Scene_Menu < Scene_MenuBase alias morshu_create_command_window create_command_window alias morshu_create_status_window create_status_window def create_command_window morshu_create_command_window @command_window.x = (Graphics.width - @command_window.width)/2 @command_window.y = Graphics.height - @command_window.height end def create_status_window morshu_create_status_window @status_window.x = (Graphics.width-(120*$game_party.battle_members.size))/2 end end class Scene_ItemBase < Scene_MenuBase alias morshu_create_actor_window create_actor_window def create_actor_window morshu_create_actor_window @actor_window.x = (Graphics.width-(120*$game_party.battle_members.size))/2 @actor_window.y = Graphics.height - @actor_window.height @actor_window.z = 200 end def show_sub_window(window) window.show.activate end def hide_sub_window(window) window.hide.deactivate activate_item_window end end class Scene_Item < Scene_ItemBase alias morshu_start start alias morshu_create_category_window create_category_window def start; morshu_start @help_window.hide end def create_category_window; morshu_create_category_window @category_window.x = (Graphics.width - @category_window.width) / 2 @category_window.y = 0 end def create_item_window wy = @category_window.y + @category_window.height wh = Graphics.height - @category_window.height @item_window = Window_ItemList.new(0, wy, Graphics.width/2, wh) @item_window.x = (Graphics.width - @item_window.width) / 2 @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(:on_item_cancel)) @category_window.item_window = @item_window end end class Scene_Skill < Scene_ItemBase alias morshu_start start def start; morshu_start @help_window.hide @status_window.hide end def create_command_window wy = @help_window.height @command_window = Window_SkillCommand.new(0, wy) @command_window.width = Graphics.width / 2 @command_window.viewport = @viewport @command_window.help_window = @help_window @command_window.actor = @actor @command_window.set_handler(:skill, method(:command_skill)) @command_window.set_handler(:cancel, method(:return_scene)) @command_window.set_handler(:pagedown, method(:next_actor)) @command_window.set_handler(:pageup, method(:prev_actor)) @command_window.x = (Graphics.width - @command_window.width) / 2 @command_window.y = 0 end def create_item_window wx = 0 wy = @command_window.height ww = Graphics.width / 2 wh = Graphics.height - wy @item_window = Window_SkillList.new(wx, wy, ww, wh) @item_window.x = (Graphics.width - @item_window.width) / 2 @item_window.actor = @actor @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(:on_item_cancel)) @command_window.skill_window = @item_window end end class Scene_Equip < Scene_MenuBase alias morshu_start start alias morshu_create_command_window create_command_window alias morshu_create_slot_window create_slot_window def start; morshu_start @help_window.hide @status_window.hide end def create_command_window; morshu_create_command_window @command_window.x = (Graphics.width - @command_window.width) / 2 @command_window.y = 0 end def create_slot_window; morshu_create_slot_window @slot_window.x = @command_window.x @slot_window.y = @command_window.y + @command_window.height end def create_item_window wx = @command_window.x wy = @slot_window.y + @slot_window.height ww = @slot_window.width wh = Graphics.height - wy @item_window = Window_EquipItem.new(wx, wy, ww, wh) @item_window.height = Graphics.height - @item_window.y @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.status_window = @status_window @item_window.actor = @actor @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @slot_window.item_window = @item_window end end ################################################################# # M M OOO RRRR SSSS H H U U DDDD I EEEEE GGG OOO # # MM MM O O R R S H H U U D D I E G O O # # M M M O O RRRR SSS HHHHH U U D D I EEE G GGG O O # # M M O O R R S H H U U D D I E G G O O # # M M OOO R R SSSS H H UUU DDDD I EEEEE GGG OOO # #################################################################
Bugs e Conflitti Noti
Anche se si possono avere più di 4 membri nel party, il menu non lo supporta e potrebbe creare situazioni spiacevoli. :P
Essendo uno script alquanto specifico (anche se ottimizzato), può andare in conflitto con altri script.