The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: Rune on March 18, 2008, 10:37:49 PM

Title: New Status Screen
Post by: Rune on March 18, 2008, 10:37:49 PM
It returns.

This time, i've conjured up a little recipe I like to call...
Spoiler for Screeny:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi163.photobucket.com%2Falbums%2Ft302%2Fpsychomathic-paniac%2FStat_Scrn_blu.png&hash=e490212835a4e45ef04ce7fcdad6605d838594a8)
This.

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...

So...

First, add this into Window_Base, before the last end.
Spoiler for Window_Base addition:
Code: [Select]
  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.
Spoiler for Window_Status:
Code: [Select]
#==============================================================================
# ** 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.
Spoiler for Scene_Status:
Code: [Select]
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

Should be pretty much plug 'n' play. If you have any problems or queries, as usual, you know where I am. ;)

(That should be my catchphrase ::) )
Title: Re: New Status Screen
Post by: &&&&&&&&&&&&& on March 19, 2008, 06:04:23 AM
Note: Windowskin not included ;)

Can you take a screenshot of it, with a different window skin?
Title: Re: New Status Screen
Post by: Rune on March 19, 2008, 11:34:52 AM
'Tis done.
Title: Re: New Status Screen
Post by: &&&&&&&&&&&&& on March 19, 2008, 11:56:56 AM
<3
I like it.
Title: Re: New Status Screen
Post by: Leventhan on March 19, 2008, 01:11:04 PM
Somehow it seems a little to boxy.
But<3
Title: Re: New Status Screen
Post by: Rune on March 19, 2008, 01:15:20 PM
Maybe I should merge the stat and equipment boxes together :-\ But it  looks rather cool in my eyes as it is. :P

I'll wait for further replies, glad you like it, and thanks for the replies. ^_^
Title: Re: New Status Screen
Post by: &&&&&&&&&&&&& on March 19, 2008, 01:17:50 PM
It's good. Here's a reward. http://rmrk.net/index.php/topic,25311.0.html
Title: Re: New Status Screen
Post by: modern algebra on March 19, 2008, 05:12:27 PM
It does look good, but I see what is meant by boxy - they're all in rows. One way to mix it up would be to move the battler graphic up and the HP TP box below it. I think that would look good. Of course, it's up to you.
Title: Re: New Status Screen
Post by: Rune on March 19, 2008, 05:21:21 PM
I may do that, if I do, i'll update A.S.A.P ;)
Title: Re: New Status Screen
Post by: Mjustin on April 27, 2008, 08:37:48 PM
It didn't work for me. I did everything you said in the first post, but this happened:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi198.photobucket.com%2Falbums%2Faa54%2FMjusin%2FRPGStatusError.jpg&hash=ca161aa6b8fb8c66ef140b34c71614e7c48e3d3a)
Title: Re: New Status Screen
Post by: Rune on April 28, 2008, 05:38:05 PM
Y'mango -.- It seems you erased the draw_item_name method.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fcodebloo.net%2Fstuff%2Fpicard-headesk.jpg&hash=561768a9939a44c9af9b75dfe8a51d98d04f80dd)

No worries, simply add this above "def draw_actor_battler". Don't overwrite anything other than the green lines, they're only comments, and they're unneeded.
Code: [Select]
  def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
Title: Re: New Status Screen
Post by: Mjustin on April 28, 2008, 08:45:25 PM
Thanks!
Title: Re: New Status Screen
Post by: Caesis on May 02, 2008, 01:08:49 PM
It works great. :D

I had a few issues with SDK, my antilag, and a few other things. With some tweaking it was compatible with all my other 900 scripts I downloaded =p
Title: Re: New Status Screen
Post by: diablosbud on May 16, 2008, 12:02:55 AM
Just wondering: how in the world did you add new stats. I have been wanting to add vitality and energy for the longest time now, could you please tell me how you did that?
Title: Re: New Status Screen
Post by: Rune on May 16, 2008, 04:26:41 PM
How do you mean new stats? You mean the TP? If that's the case, just go into the database and into the system tab. At the right side should be a list of all the current stats you have. Rename then whatever you want, so for example, you could rename "HP", "Health", or "STR", "Powah!", etc.

If that's not what you're on about, say.
Title: Re: New Status Screen
Post by: diablosbud on May 17, 2008, 07:54:53 PM
Oh, never mind it's because you but Physical Def, Magical Def and Attack in the same place as Strength and stuff. Sorry got confused ::).
Title: Re: New Status Screen
Post by: Klarth F. Lester on May 23, 2008, 07:43:27 AM
I was wondering... is there a possible  way to insteadd of the sprite graphic you can put the chars face in it...


if its posible that would be awsome ^^


I was also wondering the new CMS you made if this would also be possible in it (change the sprite graphic for a face)

Thanks in advance for any help ^^

Edit: I got an error of line 23 [ Script `window_status' line23: Argumenterror occurred. wrong number of arguments(3 of 4) ]

dunno what i did wrong I mean I followed every step
><
Title: Re: New Status Screen
Post by: Demonic Blade on May 25, 2008, 01:21:53 PM
Didn't you post something like this? Or am I wrong? Anyways, it looks nice. I might use it. ;)
Title: Re: New Status Screen
Post by: Rune on May 25, 2008, 05:55:15 PM
Didn't you post something like this?
You mean the char face thing or the script itself?
Title: Re: New Status Screen
Post by: Klarth F. Lester on May 25, 2008, 06:51:07 PM
Rune is there a way you can help me with my error? please?  :tpg:

if not I understand ><
Title: Re: New Status Screen
Post by: Rune on May 25, 2008, 07:43:00 PM
I fail to discover the same error, what other scripts are you using?
Title: Re: New Status Screen
Post by: Klarth F. Lester on May 26, 2008, 04:38:24 AM
ok...

the error only shows when I leave it the same way you have it.

but if i take this out:

draw_actor_battler(@actor, 280, 430) I delete that no error but no battler (obviously), so what I'm thinking is... do I need to have your smae battle pic in my graphics/ pictures folder?

I still dunno whats wrong... the error however dpoesnt mention "fail to find blablabla" and stuff.. it simply says there is an argument error in line 23 wich where this "draw_actor_battler(@actor, 280, 430)" is writen I take out... no battler but no error either and umm...

other than that I am using the follwing scripts... just these:

1. Tsunokiete's HP,SP,EXP bars script
2. Battle result script by A3D
3. Status customatization by Sinthezis
4. UMS by Ccoa
5. and the party changer by Lean Westbrooke

aside from your lates CMS and this Status menu.

Thanks in advance for any help Rune-san~! ><
Title: Re: New Status Screen
Post by: Rune on May 26, 2008, 09:06:39 AM
Ctrl+Shift+F to search for
Code: [Select]
def draw_actor_battler
If you find any results from any of your custom scripts, post the whole def draw_actor_battler from that script(s). I have an idea what's wrong, I just need to confirm it.
Title: Re: New Status Screen
Post by: Demonic Blade on May 26, 2008, 01:47:30 PM
You mean the char face thing or the script itself?

The script itself. The whole layout of it, seems like something you've already posted... but I might just be wrong...:-\
Title: Re: New Status Screen
Post by: Rune on May 26, 2008, 02:26:19 PM
Nope, Only other place I've posted this is CP, and I can't remember making anything else like this.
Title: Re: New Status Screen
Post by: Demonic Blade on May 26, 2008, 03:38:02 PM
I think it might have been one of your menus (you have made so many...) I'm thinking of. Maybe the one with the equipment... anyways, I don't wanna spam your thread.
Title: Re: New Status Screen
Post by: Klarth F. Lester on May 26, 2008, 05:58:22 PM
I query 2 results.

one in window base (line 321)

and one in scene menu (line11)

but none in any of the custom scripts.... I am using your latest CMS the one you have in. (CMS#5 by you ver. 1.0)

btw thanks for the replies ^^
Title: Re: New Status Screen
Post by: Rune on May 26, 2008, 06:41:31 PM
Post the whole def draw_actor_battler from the CMS script.
Title: Re: New Status Screen
Post by: Klarth F. Lester on May 27, 2008, 03:59:22 AM
Code: [Select]
class Window_Base
  def draw_actor_battler(actor, x, y, opacity)
    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

I'm sorry for being such a pain btw Rune-sempai, I really apreciate the help man.
Title: Re: New Status Screen
Post by: Rune on May 27, 2008, 08:00:41 AM
Thought so. In the error line, change the ')' to ', 255)'

It's because I added in something to change the battler opacities to 160 or something, but didn't work because of the dimming of the back window whilst on the command window. Guess I forgot to take it out again. ;8
Hope that helps, if not, tell me. ;)
Title: Re: New Status Screen
Post by: Klarth F. Lester on May 28, 2008, 06:12:58 AM
Oh I see it now~! xDD

thank you Rune-sempai~!!!! :tpg:


EDIT: not to be a further pain in the ass but in your latest CMS (CMS#5) and this status window.. is it possible to put char faces instead of their sprites? if not don't worry about it... they still look pretty hawt xD.
Title: Re: New Status Screen
Post by: Rune on May 28, 2008, 11:05:54 AM
I've posted that somewhere else before, search through all my CMS topics, you should find it. :P
Title: Re: New Status Screen
Post by: Zendah on November 16, 2008, 09:33:27 PM
Oh, man, it's awesome!!   ;8  I almost cried of joy when I tested it and it worked because I've tried a lot of scripts that didn't.  (Is that a little weird?  ::))
Title: Re: New Status Screen
Post by: Rune on November 17, 2008, 04:45:40 PM
I wouldn't call it weird, just a little strange XD
Glad you like it though :P
Title: Re: New Status Screen
Post by: warmenace3 on May 03, 2009, 07:08:04 PM
what do i put right after the @status_window = Window_Status.new it said that there was an error there.
Title: Re: New Status Screen
Post by: Rune on May 03, 2009, 07:51:25 PM
Change that line to:
    @status_window = Window_Status.new(@actor)
Title: Re: New Status Screen
Post by: basicna on May 09, 2009, 03:55:53 AM
 :blizj: Thanks. lol very nice.