Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Custom Status

Hello, i was just wondering if someone could tell me how to apply something into the default status screen.

I would like for somewhere in the status screen to display a picture of whatever element that character is.

For example in chrono trigger, in the top right of the status menu theres a picture of the element.
I would like to do just that.

Could someone explain to me please how to insert a picture like that into the menu, and on top of that a different picture for each character since each one is a different element.

If i need to describe this more let me know, but im pretty sure its self explanatory and pretty simple.

Thanks alot
Joe
 
How do you intend to associate each character with an element? (individually, by class, etc..)
What size are your element icons/pictures?
Is the status menu the only place where these element icons should appear?
Where in the menu do you want the icon to appear? (an edited screenshot would really help)

If you're looking for help doing this yourself, it should be in Script Support. Let a mod know & we'll move it.
 
I wasnt really sure but i guess doing it by class, would be pretty easy.
I dont care about the size as long as they fit in the status screen.
The status screen is really the only place i want it.
No where specific i guess, maybe in the top right , or wherever theres a an open spot, not picky.

Well i was hoping someone could do it for me, but if not im willing to try myself with some help.

Thanks again
 
Tell ya what. This will make it even easier, and it's more generic so other people can use it too...

For each actor, create an icon (24 x 24) using the actor's name (Aluxes.png, Basil.png, etc...) and place it in the /Graphics/Icons folder. e.g. You're icon for Aluxes might be the 'Water' symbol.

Paste this above Main...

Code:
#--------------------------------------------------------------------------

# Draw Actor Icon

# Adds an icon to the upper right corner of the menu status window for

# each actor.

# Place an icon file (24x24) for each actor in the /Graphics/Icons folder.

# e.g. Aluxes.png, Basil.png

#--------------------------------------------------------------------------

 

 

class Window_MenuStatus < Window_Selectable

    

  alias element_icon_refresh refresh

  

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    element_icon_refresh

    for i in 0...$game_party.actors.size

      actor = $game_party.actors[i]

      draw_actor_icon(actor, 380, i * 116)

    end

  end

  #--------------------------------------------------------------------------

  # * Draw Icon

  #     actor : actor

  #     x     : draw spot x-coordinate

  #     y     : draw spot y-coordinate

  #--------------------------------------------------------------------------

  def draw_actor_icon(actor, x, y)

    bitmap = RPG::Cache.icon(actor.name)

    self.contents.blt(x, y, bitmap, bitmap.rect)

  end

end
 
Thats great, i will use this, but im gonna see if i can edit it to work with pictures, becuase a 24 X24 icon is just a little small, my pictures are a tad bigger. Im not sure how to go about this but ill try.

Thanks for this quick script, i appreciate your time.
Joe

EDIT, Hmm its not working, im not sure why, im using XP by the way.
I put the icon in the folder named as the character and its not showing up.
 
No ist fine i just had to download it again, but as my last post said, i need that in the STATUS window , not the menu status.

I got it to go into the status window, buts its still showing 4 icons, instead of just the character your looking at.
 
OOOHHHHHHH, that status window! :scruff:

You just need to get rid of the 'for' loop, and the 'i' in the 'draw_actor_icon' statement.
Then use @actor instead of actor (look in the default Window_Status for reference)
You'll have to jockey the numbers (380, 0) around to get it where you want it.
Here it is for Window_Status:

Code:
#--------------------------------------------------------------------------

# Draw Actor Icon

# Adds an icon to the upper right corner of the status window for

# each actor.

# Place an icon file (24x24) for each actor in the /Graphics/Icons folder.

# e.g. Aluxes.png, Basil.png

#--------------------------------------------------------------------------

 

 

class Window_Status

    

  alias element_icon_refresh refresh

  

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    element_icon_refresh

    draw_actor_icon(@actor, 380, 0)

  end

  #--------------------------------------------------------------------------

  # * Draw Icon

  #     actor : actor

  #     x     : draw spot x-coordinate

  #     y     : draw spot y-coordinate

  #--------------------------------------------------------------------------

  def draw_actor_icon(actor, x, y)

    bitmap = RPG::Cache.icon(actor.name)

    self.contents.blt(x, y, bitmap, bitmap.rect)

  end

end
 
Thanks alot, it worked nicely, now i just gotta edit it some more to get it to work with this custom status im using, its not showing up for some reason, when i have that status on.

Thanks again, you were a big help
 
Hello, i tried to get it to work but couldnt.

Heres the script.

Code:
#================================#

# ¦ 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 = $fontface

    self.contents.font.size = $fontsize

    @actor = actor

    refresh

  end

  def refresh

    self.contents.clear

    draw_actor_graphic(@actor, 35, 80)

    draw_actor_name(@actor, 4, -10)

    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 = $fontface

    self.contents.font.size = $fontsize

    @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 = $fontface

    self.contents.font.size = $fontsize

    @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 = $fontface 

    self.contents.font.size = $fontsize

    @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 = $fontface 

    self.contents.font.size = $fontsize

    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
 
There is no Window_Status in your custom Scene_Status script...

Make sure this script is pasted below your custom script.
Change the class to Window_Status1
Change the x position of the icon to something smaller, like 150

Code:
#--------------------------------------------------------------------------

# Draw Actor Icon

# Adds an icon to the upper right corner of the status window for

# each actor.

# Place an icon file (24x24) for each actor in the /Graphics/Icons folder.

# e.g. Aluxes.png, Basil.png

#--------------------------------------------------------------------------

 

 

class Window_Status1

    

  alias element_icon_refresh refresh

  

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    element_icon_refresh

    draw_actor_icon(@actor, 150, 0)

  end

  #--------------------------------------------------------------------------

  # * Draw Icon

  #     actor : actor

  #     x     : draw spot x-coordinate

  #     y     : draw spot y-coordinate

  #--------------------------------------------------------------------------

  def draw_actor_icon(actor, x, y)

    bitmap = RPG::Cache.icon(actor.name)

    self.contents.blt(x, y, bitmap, bitmap.rect)

  end

end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top