0.0/5 rating (0 votes)
Hits: 2774

New Status Window

Thursday, 09 April 2009
  • Author: Polraudio

Screenshots

Script Download

  • Hits: 28

The Script

 #================================
# ¦ Scene_Status                    
#-------------------------
# By:Polraudio                              
#================================

class Scene_Status
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  def main
    @actor = $game_party.actors[@actor_index]
    @status1_window = Window_Status1.new(@actor)
    @status2_window = Window_Status2.new(@actor)
    @status2_window.x = 0
    @status2_window.y = 210
    @status3_window = Window_Status3.new(@actor)
    @status3_window.x = 250
    @status3_window.y = 64
    @status4_window = Window_Status4.new(@actor)
    @status4_window.x = 250
    @status4_window.y = 180
    @help_window = Window_Help1.new
    @help_window.set_text("Welcome to the status screen")
    @help_window.x =250
    @help_window.y = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @status1_window.dispose
    @status2_window.dispose
    @status3_window.dispose
    @status4_window.dispose
    @help_window.dispose
  end
  def update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(3)
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      return
    end
  end
end
class Window_Status1 < Window_Base
  def initialize(actor)
    super(0, 0, 250, 210)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    @actor = actor
    refresh
  end
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 35, 80)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144,50 )
    self.contents.font.color = system_color
    self.contents.draw_text(90, 50, 80, 32, "Class:")
    draw_actor_level(@actor, 90, 75)
    draw_actor_state(@actor, 4, 75)
    draw_actor_hp(@actor, 4, 112, 172)
    draw_actor_sp(@actor, 4, 144, 172)
end
end
class Window_Status2 < Window_Base
  def initialize(actor)
    super(0, 0, 250, 270)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    @actor = actor
    refresh
  end
  def refresh
    self.contents.clear
    draw_actor_parameter(@actor, 4, 0, 0)
    draw_actor_parameter(@actor, 4, 32, 1)
    draw_actor_parameter(@actor, 4, 64, 2)
    draw_actor_parameter(@actor, 4, 96, 3)
    draw_actor_parameter(@actor, 4, 128, 4)
    draw_actor_parameter(@actor, 4, 160, 5)
    draw_actor_parameter(@actor, 4, 192, 6)
  end
end
class Window_Status3 < Window_Base
  def initialize(actor)
    super(0, 0, 390,116 )
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    @actor = actor
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 20, 80, 32, "Exp")
    self.contents.draw_text(0, 52, 80, 32, "Next Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(50 , 20, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(50 , 52, 84, 32, @actor.next_rest_exp_s, 2)
  end
end
class Window_Status4 < Window_Base
  def initialize(actor)
    super(0, 0, 390, 300)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    @actor = actor
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 96, 32, "Equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 0, 48)
    draw_item_name($data_armors[@actor.armor1_id], 0, 96)
    draw_item_name($data_armors[@actor.armor2_id], 0, 144)
    draw_item_name($data_armors[@actor.armor3_id], 0, 192)
    draw_item_name($data_armors[@actor.armor4_id], 0, 240)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(0, 48, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(0, 96, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(0, 144, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(0, 192, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(0, 240, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 0, 48)
    draw_item_name($data_armors[@actor.armor1_id], 0, 96)
    draw_item_name($data_armors[@actor.armor2_id], 0, 144)
    draw_item_name($data_armors[@actor.armor3_id], 0, 192)
    draw_item_name($data_armors[@actor.armor4_id], 0, 240)
  end
end
class Window_Help1 < Window_Base
  def initialize
    super(0, 0, 390, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    end
  def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
      @text = text
      @align = align
      @actor = nil
    end
    self.visible = true
  end
  def set_actor(actor)
    if actor != @actor
      self.contents.clear
      draw_actor_name(actor, 4, 0)
      draw_actor_state(actor, 140, 0)
      draw_actor_hp(actor, 284, 0)
      draw_actor_sp(actor, 460, 0)
      @actor = actor
      @text = nil
      self.visible = true
    end
  end
  def set_enemy(enemy)
    text = enemy.name
    state_text = make_battler_state_text(enemy, 112, false)
    if state_text != ""
      text += "  " + state_text
    end
    set_text(text, 1)
  end
end
class Game_Actor < Game_Battler
  def exp_s
    return @exp_list[@level+1] > 0 ? @exp.to_s : "MAX"
  end
  def next_exp_s
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "None"
  end
  def next_rest_exp_s
    return @exp_list[@level+1] > 0 ?
      (@exp_list[@level+1] - @exp).to_s : "None"
    end
    end 

Instructions

Place code after Scene_Status and above Main

Compatibility

Everything That uses Scene_Status

Future Updates

An award system - Need help making it where each actor has its own award

Comments (0)

Leave a comment

Please login to leave a comment.

Archive Stats

Login to remove our Sponsored Links.

Latest Comments

  • Indeed it is.
    Kiriashi

    Kiriashi

    03. September, 2010 |

  • o.o That link gives a corupt zip file
    Darkwick

    Darkwick

    03. September, 2010 |

  • I'm having trouble adding custom face sets. Can anyone help me figure this out?
    VianoceGames

    VianoceGames

    28. August, 2010 |

  • Why does it matter?

    It won't effect the script. I tested it; works fine.
    Kiriashi

    Kiriashi

    26. August, 2010 |

  • I tell you how to do it, and you go and tell him wrong... silly Marked.

    Its like this:

    $scene = Scene_Beastairy.new
    Kiriashi

    Kiriashi

    26. August, 2010 |

  • You can't. Use the second one, it allows full screen only when the game is played when you open Game.exe. When you test play it from the...
    Marked

    Marked

    26. August, 2010 |

  • Use the call script command and type this:
    $scene=Game_Beastairy.new
    Marked

    Marked

    26. August, 2010 |

  • can't you just remove the japanese characters? I'm pretty sure the author isn't japanese so that's strange they're there. Its super old...
    Marked

    Marked

    26. August, 2010 |

  • I added screens. Everytime you test run the game, your data is backed up. Prevents the error you get when you open your game and it says...
    Marked

    Marked

    26. August, 2010 |

  • Just make sure your characterset and battler graphic have the same filename
    Marked

    Marked

    26. August, 2010 |

Affiliates