Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=========================================================================#
- # Scrolling Actor Sytle Menu (Requested by new) v1.03 #
- # * THIS ADD-ON REQUIRES the Script "Z-Systems Neo Menu System" by Zetu * #
- #=========================================================================#
- module Z_Systems
- module NeoMenu
- PARAMETERS = [ #State definitions for parameters
- ['ATK', 'actor.atk'],
- ['DEF', 'actor.def'],
- ['INT', 'actor.spi'],
- ['AGI', 'actor.agi'],
- ['HIT', '"#{actor.hit}%"'],
- ['EVA', '"#{actor.eva}%"'],
- ['CRIT', 'actor.cri']]
- #This was for a request. Leave as false.
- DRAWEP = false
- EP = ['actor.ep', 'actor.maxep']
- end
- end
- class Scene_Menu < Scene_Base
- alias nms_ucs update_command_selection
- def update_command_selection
- if Input.trigger?(Input::R)
- @status_window.next_actor
- return
- elsif Input.trigger?(Input::L)
- @status_window.previous_actor
- return
- end
- nms_ucs
- end
- def start_actor_selection
- script = Z6::MENU_ITEMS[@command_window.index][2]
- script = script.sub('@status_window.index', '@status_window.actor_id')
- eval(script)
- end
- end
- class Window_MenuStatus < Window_Selectable
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- actor = $game_party.members[actor_id]
- prevactor = $game_party.members[previous_actor_id]
- nextactor = $game_party.members[next_actor_id]
- draw_frame(129, 0, 98, 98, text_color(14))
- draw_actor_face(actor, 130, 1, 96)
- draw_actor_face(prevactor, 40, 6, 84)
- draw_actor_face(nextactor, 232, 6, 84)
- draw_actor_name(actor, 2, 96)
- draw_actor_class(actor, 186, 96)
- draw_actor_level(actor, 90, 96)
- draw_actor_state(actor, 184, 144)
- draw_actor_hp(actor, 2, 118, 166)
- draw_actor_mp(actor, 2, 142, 166)
- draw_actor_xp(actor, 184, 118, 168)
- draw_actor_ep(actor, 184, 142, 168) if Z_Systems::NeoMenu::DRAWEP
- neo_draw_params(0, 168)
- neo_draw_equips(156, 168)
- end
- def neo_draw_params(x, y)
- actor = $game_party.members[actor_id]
- for parameter in Z_Systems::NeoMenu::PARAMETERS
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 96, WLH, parameter[0])
- self.contents.font.color = normal_color
- stat = eval(parameter[1])
- self.contents.draw_text(x+70, y, 52, WLH, stat, 2)
- y += WLH
- end
- end
- def neo_draw_equips(x, y)
- actor = $game_party.members[actor_id]
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 216, WLH, "Equipment")
- data = []
- for item in actor.equips do data.push(item) end
- for i in 0...data.size
- draw_item_name(data[i], x, y + WLH * (i + 1))
- end
- end
- def next_actor
- @actor_index = next_actor_id
- refresh
- end
- def previous_actor
- @actor_index = previous_actor_id
- refresh
- end
- def actor_id
- @actor_index ||= 0
- return @actor_index
- end
- def next_actor_id
- id = actor_id + 1
- if id >= $game_party.members.size
- id -= $game_party.members.size
- end
- return id
- end
- def previous_actor_id
- id = actor_id - 1
- id += $game_party.members.size if id < 0
- return id
- end
- def update_cursor
- return
- end
- def draw_frame(x, y, width, height, color = normal_color)
- self.contents.fill_rect(x, y, 1, height, color)
- self.contents.fill_rect(x, y, width, 1, color)
- self.contents.fill_rect(x + width - 1, y, 1, height, color)
- self.contents.fill_rect(x, y + height - 1, width, 1, color)
- end
- end
- class Window_Base < Window
- def draw_actor_xp(actor, x, y, width = 120)
- draw_actor_xp_gauge(actor, x, y, width)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 30, WLH, "XP")
- self.contents.font.color = normal_color
- last_font_size = self.contents.font.size
- if width < 120
- self.contents.draw_text(x + 32, y, width - 32, WLH, actor.exp_til, 2)
- else
- self.contents.font.color = normal_color
- text = actor.exp_til.to_s + " / " + actor.exp_max.to_s
- text = actor.level == 99 ? "-------" : text
- self.contents.draw_text(x + 32, y, width - 32, WLH, text, 2)
- end
- end
- def draw_actor_xp_gauge(actor, x, y, width = 120)
- gw = actor.exp_max != 0 ? width * actor.exp_til / actor.exp_max : width
- gc1 = text_color(16)
- gc2 = text_color(22)
- self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
- self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
- end
- end
- class Game_Actor < Game_Battler
- def exp_til
- return (@exp - @exp_list[@level])
- end
- def exp_max
- return 0 if @level == 99
- return @exp_list[@level+1] - @exp_list[@level]
- end
- end
Add Comment
Please, Sign In to add comment