Main Menu
  • Welcome to The RPG Maker Resource Kit.

New Status Screen

Started by Rune, March 18, 2008, 10:37:49 PM

0 Members and 1 Guest are viewing this topic.

Rune

It returns.

This time, i've conjured up a little recipe I like to call...
[spoiler=Screeny]
This.[/spoiler]

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=Window_Base addition]  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
[/spoiler]

Then replace the whole of Window_Status with this.
[spoiler=Window_Status]#==============================================================================
# ** 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
[/spoiler]

And finally replace your current Scene_Status with this.
[spoiler=Scene_Status]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
[/spoiler]

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 ::) )
Sincerely,
Your conscience.

&&&&&&&&&&&&&

Quote from: Rune on March 18, 2008, 10:37:49 PM
Note: Windowskin not included ;)

Can you take a screenshot of it, with a different window skin?
&&&&&&&&&&&&&&&&

Rune

Sincerely,
Your conscience.

&&&&&&&&&&&&&

&&&&&&&&&&&&&&&&

Leventhan

Somehow it seems a little to boxy.
But<3

Be kind, everyone you meet is fighting a hard battle.

Rune

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. ^_^
Sincerely,
Your conscience.

&&&&&&&&&&&&&

&&&&&&&&&&&&&&&&

modern algebra

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.

Rune

I may do that, if I do, i'll update A.S.A.P ;)
Sincerely,
Your conscience.

Mjustin

It didn't work for me. I did everything you said in the first post, but this happened:


Rune

#10
Y'mango -.- It seems you erased the draw_item_name method.


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.
  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
Sincerely,
Your conscience.


Caesis

#12
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

diablosbud

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?


Current Games:
Darklands (Demon Slayer [new name])

Scripting - About 55% complete.

Eventing - About 1% complete.

Mapping - About .5% complete.

Spriting - 0% complete.

Rune

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.
Sincerely,
Your conscience.

diablosbud

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


Current Games:
Darklands (Demon Slayer [new name])

Scripting - About 55% complete.

Eventing - About 1% complete.

Mapping - About .5% complete.

Spriting - 0% complete.

Klarth F. Lester

#16
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
><

Demonic Blade

Didn't you post something like this? Or am I wrong? Anyways, it looks nice. I might use it. ;)
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

Rune

Quote from: Demonic Blade on May 25, 2008, 01:21:53 PM
Didn't you post something like this?
You mean the char face thing or the script itself?
Sincerely,
Your conscience.

Klarth F. Lester

Rune is there a way you can help me with my error? please?  :tpg:

if not I understand ><

Rune

I fail to discover the same error, what other scripts are you using?
Sincerely,
Your conscience.

Klarth F. Lester

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~! ><

Rune

Ctrl+Shift+F to search for
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.
Sincerely,
Your conscience.

Demonic Blade

Quote from: Rune on May 25, 2008, 05:55:15 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...:-\
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

Rune

Nope, Only other place I've posted this is CP, and I can't remember making anything else like this.
Sincerely,
Your conscience.