Help - Search - Members - Calendar
Full Version: Cool Edited Status Screen.
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS
Black Shadow
This is a cool edition I have done in the Status screen, so I want to share it.

First, have the Faces script

CODE
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end


Go into your games folder (it mentions it when you create your project, usually C:/Documents and Settings/<Your name here>/My Documents/RMXP/<Your game's name here>/. If it's not there, open your game, and along the top bar select Game, Open Game Folder). In there go to Graphics, Characters, and in there make a folder called Faces

Then, In Window_Status, find first this line.

CODE
draw_actor_graphic(@actor, 40, 112)


Change it to.

CODE
draw_actor_face(@actor, 150, 450)


For this, I recommend to have your battler as face. Name the face the same as the character et you are using.

Then, on this lines.

CODE
self.contents.draw_text(320, 48, 80, 32, "Exp")
    self.contents.draw_text(320, 80, 80, 32, "Next Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "Equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)


Change it to.
CODE
self.contents.draw_text(420, 48, 80, 32, "Exp")
    self.contents.draw_text(420, 80, 80, 32, "Next Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(420 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(420 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(480, 160, 96, 32, "Equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 420 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 420 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 420 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 420 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 420 + 16, 400)


I hope it will work for you.

If it works, it could look like this.



I don't want to call it script. It's just an edit, that's very cool.

Hope you like it. Credits To Sephirothspawn for the Bars script, wich is seperate to this script.
Heavyblues
VERY nice, might I ask how you came up wit this?

I'd like to make at least a simple script on my own x3 and this seems like it's really simple :3
TheSilentOne
Can I ask where you got that character art? I know its gozarus....but Ive only seen the faceset. Unless its on his site too?

EDIT: Nevermind. I found them, those are really nice. The status screen is pretty topnotch too.
Black Shadow
QUOTE
VERY nice, might I ask how you came up wit this?


It was in the middle of the night......


Nah, I was just tired of the old one, so I tried to make it look good.
PMussulo
QUOTE (TheSilentOne @ Jul 21 2007, 09:16 AM) *
Can I ask where you got that character art? I know its gozarus....but Ive only seen the faceset. Unless its on his site too?

EDIT: Nevermind. I found them, those are really nice. The status screen is pretty topnotch too.



Where did you find them? I love that pic. Looks really ace!


Plus, the script doesn't seem to work for me...

I pasted the Face script in Window_MenuStats and made it look like this:

CODE
#==============================================================================
# Window_MenuStatus
#------------------------------------------------------------------------------
# Displays menu status windows.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  
  #--------------------------------------------------------------------------
  # - Object Initialization
  #--------------------------------------------------------------------------
  
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
       self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
    self.active = false
    self.index = -1
  end
  
  #--------------------------------------------------------------------------
  # - Refresh
  #--------------------------------------------------------------------------
  
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 80)
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x, y + 32)
      draw_actor_state(actor, x + 90, y + 32)
      draw_actor_exp(actor, x, y + 64)
      draw_actor_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
  
  # Face Graphic #
  def draw_actor_face(actor, x, y)
   face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
   fw = face.width
   fh = face.height
   src_rect = Rect.new(0, 0, fw, fh)
   self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end
end
  
  #--------------------------------------------------------------------------
  # - Rectangle Selection Renewal
  #--------------------------------------------------------------------------
  
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end


and Window_Status:

CODE
#==============================================================================
# Window_Status
#------------------------------------------------------------------------------
# É a janela que mostra os Status
#==============================================================================

class Window_Status < Window_Base

  #--------------------------------------------------------------------------
  # - Inicialização dos Objetos
  #
  #     ator : Objeto
  #--------------------------------------------------------------------------

  def initialize(actor)
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
           self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = actor
    refresh
  end
  
  #--------------------------------------------------------------------------
  # - Atualizar
  #--------------------------------------------------------------------------
  
  def refresh
    self.contents.clear
    draw_actor_face(@actor, 150, 450)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 1)
    draw_actor_parameter(@actor, 96, 256, 2)
    draw_actor_parameter(@actor, 96, 304, 3)
    draw_actor_parameter(@actor, 96, 336, 4)
    draw_actor_parameter(@actor, 96, 368, 5)
    draw_actor_parameter(@actor, 96, 400, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(420, 48, 80, 32, "Exp")
    self.contents.draw_text(420, 80, 80, 32, "Next Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(420 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(420 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(480, 160, 96, 32, "Equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 420 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 420 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 420 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 420 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 420 + 16, 400)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  end
end


I hope you can help me....
Black Shadow
Don't paste the Face script in Window_MenuStats script. They need to be seperated.

Also, do you have a folder called faces?
PMussulo
nevermind...


changed to Mog Menu style.

But I'd still like to know where those pics are. I tried Ruruga's site but they aren't there....
Daeher
i was searching for menu scripts and i found this one. It looks REALLY nice...But i dont understand how to use it sad.gif

I made the folder Faces in scripts and then put in
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end



After that i did all the editing for the Window_Status. I imported the exact same picture you used into the Character folder of the resource manager.
I load the game up go to status and i get this : Unable to find Graphics/Characers/Faces/001-Fighter01.
PK8
Please do not necropost. lock.gif
rgalaxy
excuse me, hmm, but i have a problem..
why i still find an error? when i open the status screen there is an error said like this
Script "window_Status' line 37: NameError Occured
undefined local variable or method 'elf' for # <Window_status:0x161ff58>



what's about that, wish u help me.. pleasee.....

obsorber
I've got one thing to say and that is that I am stunned. Your status screen looks fantastic although I won't be trying or testing it out because I'm using the Mog status screen which will go well with all the other Mog menus. Good job. After I finish my game, if I decide to make a new one again then I will definately consider looking into this in the future. Good job, it works well with those character pictures to. happy.gif
rgalaxy
QUOTE (Black Shadow @ Jul 20 2007, 01:34 AM) *
This is a cool edition I have done in the Status screen, so I want to share it.

First, have the Faces script

CODE
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end



excuse me Black Shadow..

i want to chage my font.. how to do that? mw font was normal font and it looks not cool... T_T

hehe.. help me please//
36inc
What do you mean by make a folder named faces?
This seems simple but i have no clue what your talking about when you say first have this script.
Where do i put that code?
Night_Runner
You don't do that in the code.

In RMXP, go Game (Next to Tools) >> Open Game Folder. From there open Graphics/Characters/ and then right click, create new folder, and name it Faces

I'll fix the original post, seeing as how Daeher had the same problem smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.