#============================================================================== # Moshroom's Menusystem v.0.4: Status #------------------------------------------------------------------------------ # Credits: Moshroom (Jussi Palomäki) # SDK-credits: SDK Team # - This script needs RGSS SDK. Try rmxp.org or google.com if you don't have it # - Commentary only in finnish. Sorry for that. Maybe I'll translate it some day. # - Have fun, God bless you, etc... # # For support, go to Rpg Maker Finland's Forum: http://rpgf.univelka.net/ #============================================================================== #============================================================================== # ** Game_Actor #------------------------------------------------------------------------------ # Lisätään Game_Actoriin yksi uusi muuttuja, class_position #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Class_position #-------------------------------------------------------------------------- def class_position return $data_classes[@class_id].position # kutsutaan luokan asema end end #============================================================================== # ** Window_Status1 #------------------------------------------------------------------------------ # Tässä ikkunassa esitellään hahmon nimi, taso, tila, HP ja SP #============================================================================== class Window_Status1 < Window_Base #-------------------------------------------------------------------------- # * Alustaminen # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 300, 135) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end #-------------------------------------------------------------------------- # * Päivitys #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 4, 0) draw_actor_level(@actor, 14, 32) draw_actor_state(@actor, 14, 64) draw_actor_hp(@actor, 110, 32) draw_actor_sp(@actor, 110, 64) end end #============================================================================== # ** Window_Status2 #------------------------------------------------------------------------------ # Tässä ikkunassa esitellään hahmon perus-statukset #============================================================================== class Window_Status2 < Window_Base #-------------------------------------------------------------------------- # * Alustus # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 135, 300, 345) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end def refresh self.contents.clear a = 43 b = 48 draw_actor_parameter(@actor, b, a + 0, 0) draw_actor_parameter(@actor, b, a + 32, 1) draw_actor_parameter(@actor, b, a + 64, 2) draw_actor_parameter(@actor, b, a + 96, 3) draw_actor_parameter(@actor, b, a + 128, 4) draw_actor_parameter(@actor, b, a + 160, 5) draw_actor_parameter(@actor, b, a + 192, 6) end end #============================================================================== # ** Window_Status3 #------------------------------------------------------------------------------ # Tässä ikkunassa esitellään hahmon luokka, asema, magia sekä kehitysaste #============================================================================== class Window_Status3 < Window_Base #-------------------------------------------------------------------------- # * Alustus # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(300, 0, 340, 240) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end def refresh a = 10 b = 10 self.contents.clear self.contents.font.color = system_color self.contents.draw_text(14 + b, 0 + a, 80, 32, "Class") self.contents.draw_text(14 + b, 32 + a, 80, 32, "Position") self.contents.draw_text(14 + b, 64 + a, 80, 32, "Magic") self.contents.draw_text(14 + b, 128 + a, 80, 32, "Exp") self.contents.draw_text(14 + b, 160 + a, 80, 32, "Next") self.contents.font.color = normal_color draw_actor_class(@actor, 130 + b, 0 + a) # Näytä hahmon asema, tulkitaan numeroarvo if @actor.class_position == 0 self.contents.draw_text(130 + b, 32 + a, 80, 32, "Front") end if @actor.class_position == 1 self.contents.draw_text(130 + b, 32 + a, 80, 32, "Middle") end if @actor.class_position == 2 self.contents.draw_text(130 + b, 32 + a, 80, 32, "Rear") end # HUOM! Seuraavaa ominaisuutta ei ole määritelty databasessa, joten se on muutettava käsin skriptin sisälle! # # Tässä esimerkissä hahmoluokat ovat: Fighter, Lancer, Warrior, Thief, Gunner, Hunter, Cleric ja Mage # Näytä hahmon magiakyvyt if @actor.class_name == "Fighter" or @actor.class_name == "Lancer" or @actor.class_name == "Warrior" or @actor.class_name == "Thief" or @actor.class_name == "Gunner" or @actor.class_name == "Hunter" self.contents.draw_text(130 + b, 64 + a, 80, 32, "None") end if @actor.class_name == "Cleric" self.contents.draw_text(130 + b, 64 + a, 80, 32, "White") end if @actor.class_name == "Mage" self.contents.draw_text(130 + b, 64 + a, 80, 32, "Black") end # Näytä hahmon kehitysaste self.contents.draw_text(130 + b, 128 + a, 84, 32, @actor.exp_s, 0) self.contents.draw_text(130 + b, 160 + a, 84, 32, @actor.next_rest_exp_s, 0) end end #============================================================================== # ** Window_Status4 #------------------------------------------------------------------------------ # Tässä ikkunassa esitellään hahmon varustus #============================================================================== class Window_Status4 < Window_Base #-------------------------------------------------------------------------- # * Alustus # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(300, 240, 340, 240) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end #-------------------------------------------------------------------------- # * Päivitä #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_battler(@actor, 0, 10) draw_item_name($data_weapons[@actor.weapon_id], 125, 32-10) draw_item_name($data_armors[@actor.armor1_id], 125, 64-10) draw_item_name($data_armors[@actor.armor2_id], 125, 96-10) draw_item_name($data_armors[@actor.armor3_id], 125, 128-10) draw_item_name($data_armors[@actor.armor4_id], 125, 160-10) end def draw_actor_battler(actor, x, y) bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue) self.contents.blt(x, y, bitmap, Rect.new(0, 0, 200, 200)) end end #============================================================================== # ** Scene_Status #------------------------------------------------------------------------------ # Kutsutaan ikkunat näkyviin #============================================================================== class Scene_Status < SDK::Scene_Base #-------------------------------------------------------------------------- # * Alustus # actor_index : actor index #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # * Pääsilmukka : Muuttujien alustus #-------------------------------------------------------------------------- def main_variable super # Hae actor @actor = $game_party.actors[@actor_index] end #-------------------------------------------------------------------------- # * Pääsilmukka : Ikkunoiden alustus #-------------------------------------------------------------------------- def main_window super # Luo statusikkunat @status_window1 = Window_Status1.new(@actor) @status_window2 = Window_Status2.new(@actor) @status_window3 = Window_Status3.new(@actor) @status_window4 = Window_Status4.new(@actor) end #-------------------------------------------------------------------------- # * Ruudunpäivitys #-------------------------------------------------------------------------- def update super # Jos B-nappia painetaan if Input.trigger?(Input::B) # Soita peruutus - SE $game_system.se_play($data_system.cancel_se) # Siirry valikkoruutuun $scene = Scene_Menu.new(4) return end # Jos R-nappia painetaan if Input.trigger?(Input::R) # Soita kursori - SE $game_system.se_play($data_system.cursor_se) # Seuraavaan hahmoon @actor_index += 1 @actor_index %= $game_party.actors.size # Luo uusi statusruutu $scene = Scene_Status.new(@actor_index) return end # Jos L-nappia painetaan if Input.trigger?(Input::L) # Soita kursori - SE $game_system.se_play($data_system.cursor_se) # Edelliseen hahmoon @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Luo uusi statusruutu $scene = Scene_Status.new(@actor_index) return end end end