Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Rune on March 24, 2008, 10:01:32 am

Title: [XP] Rune's Status Screen Edit
Post by: Rune on March 24, 2008, 10:01:32 am
Rune's Status Screen [Edit]
Authors: Rune
Version: 1.0.0
Type: Script Edit
Key Term: Menu Add-on



Introduction

Basically, it's an edited version of the original status screen, but moved around, and with a grand total of seven windows to make it look good. It also displays the battler picture in the bottom centre window.
A simple edit, but I like it...


Features




Screenshots

(http://i163.photobucket.com/albums/t302/psychomathic-paniac/Stat_Scrn_blu.png)


Demo

None needed


Script

First, add this into Window_Base, before the last end.
Window_Base addition: ShowHide
  def draw_actor_battler(actor, x, y)
    bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end


Then replace the whole of Window_Status with this.
Window_Status: ShowHide
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
#  This window displays full status specs on the status screen.
#==============================================================================

class Window_Status < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_battler(@actor, 280, 430)
    draw_actor_graphic(@actor, 182, 80)
    self.contents.font.size = 36
    self.contents.font.name = "Monotype Corsiva"
    draw_actor_name(@actor, 240, 32)
    self.contents.font.size = 22
    self.contents.font.name = "Tahoma"
    draw_actor_class(@actor, 250, 80)
    draw_actor_level(@actor, 32, 32)
    draw_actor_state(@actor, 32, 64)
    draw_actor_hp(@actor, 200, 144, 172)
    draw_actor_sp(@actor, 200, 176, 172)
    self.contents.font.color = system_color
    self.contents.draw_text(0, 160, 170, 32, "Stats:", 1)
    draw_actor_parameter(@actor, 0, 224, 0)
    draw_actor_parameter(@actor, 0, 256, 1)
    draw_actor_parameter(@actor, 0, 288, 2)
    draw_actor_parameter(@actor, 0, 320, 3)
    draw_actor_parameter(@actor, 0, 352, 4)
    draw_actor_parameter(@actor, 0, 384, 5)
    draw_actor_parameter(@actor, 0, 416, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(400, 32, 80, 32, "EXP")
    self.contents.draw_text(400, 64, 80, 32, "NEXT")
    self.contents.font.color = normal_color
    self.contents.draw_text(400 + 80, 32, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(400 + 80, 64, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(400, 160, 210, 32, "Equipment", 1)
    draw_item_name($data_weapons[@actor.weapon_id], 410 + 16, 208 + 16)
    draw_item_name($data_armors[@actor.armor1_id], 410 + 16, 256 + 16)
    draw_item_name($data_armors[@actor.armor2_id], 410 + 16, 320)
    draw_item_name($data_armors[@actor.armor3_id], 410 + 16, 354 + 16)
    draw_item_name($data_armors[@actor.armor4_id], 410 + 16, 416)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(410, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(410, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(410, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(410, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(410, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 410 + 24, 160)
    draw_item_name($data_armors[@actor.armor1_id], 410 + 24, 208 + 16)
    draw_item_name($data_armors[@actor.armor2_id], 410 + 24, 272 + 16)
    draw_item_name($data_armors[@actor.armor3_id], 410 + 24, 336 + 16)
    draw_item_name($data_armors[@actor.armor4_id], 410 + 24, 416)
  end
end


And finally replace your current Scene_Status with this.
Scene_Status: ShowHide
class Window < Window_Base
  def initialize
    super(0, 0, 64, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
  end
end

#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
#  This class performs status screen processing.
#==============================================================================

class Scene_Status
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Get actor
    @actor = $game_party.actors[@actor_index]
    # Make status window
    @status_window = Window_Status.new(@actor)
    @w1 = Window.new
    @w1.x = 200
    @w1.y = 230
    @w1.height = 250
    @w1.width = 200
    @w2 = Window.new
    @w2.x = 200
    @w2.y = 150
    @w2.height = 80
    @w2.width = 200
    @w3 = Window.new
    @w3.x = 0
    @w3.y = 230
    @w3.height = 250
    @w3.width = 200
    @w4 = Window.new
    @w4.x = 400
    @w4.y = 150
    @w4.height = 80
    @w4.width = 240
    @w5 = Window.new
    @w5.x = 400
    @w5.y = 230
    @w5.height = 250
    @w5.width = 240
    @w6 = Window.new
    @w6.x = 0
    @w6.y = 150
    @w6.height = 80
    @w6.width = 200
    @w7 = Window.new
    @w7.x = 0
    @w7.y = 0
    @w7.height = 150
    @w7.width = 640
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @w1.dispose
    @w2.dispose
    @w3.dispose
    @w4.dispose
    @w5.dispose
    @w6.dispose
    @w7.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(3)
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Switch to different status screen
      $scene = Scene_Status.new(@actor_index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Switch to different status screen
      $scene = Scene_Status.new(@actor_index)
      return
    end
  end
end



Instructions

It's basically plug-n-play.

If you can't see the name font, download it, and put it in your computer's 'Fonts' folder.
Linky >> http://www.newfonts.net/index.php?pa=show_font&id=130 (http://www.newfonts.net/index.php?pa=show_font&id=130)



Compatibility

No known incompatibility issues.


Credits and Thanks




Author's Notes

Any problems, or queries, reply here, or contact me via PM. ;)
Title: Re: Rune's Status Screen Edit
Post by: Fantasist on March 24, 2008, 12:10:54 pm
The top-most window kinda resembles my own status screen mod. And the battler looks good too. Nice work :)

Here's my mod:
Spoiler: ShowHide
(http://img510.imageshack.us/img510/2346/menufs9.jpg)
Title: Re: Rune's Status Screen Edit
Post by: Rune on March 24, 2008, 12:42:30 pm
Thanks. :P
Yours looks good too, but what's that box at the left? ???
Title: Re: Rune's Status Screen Edit
Post by: Fantasist on March 24, 2008, 03:45:05 pm
Oh, that's supposed to be the faceset. It supports charsets and facesets, and I was just testing if the positioning was right. And that pic was a part of my favourite wallpaper back then ^.^
Title: Re: Rune's Status Screen Edit
Post by: Rune on March 24, 2008, 04:29:45 pm
Ah, fair enough :P I may add a face option into this status screen.
Title: Re: Rune's Status Screen Edit
Post by: Fantasist on March 25, 2008, 08:01:43 am
Cool, good luck :)
Title: Re: Rune's Status Screen Edit
Post by: Sase on April 04, 2008, 10:40:51 am
Fantasist, is it the level 99 or why theres no EXP numbers?
Title: Re: Rune's Status Screen Edit
Post by: Fantasist on April 04, 2008, 11:41:16 am
Good point, I didn't realize. Thanks for tpointing that out, I'll correct it.