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.

Question about facesets

Ok I have seen this on here before so I know it exists but I cannot pull up anything when I do searches.

In the subscreen how do I make it so a picture of that character is shown instead of the sprite? I have seen it with the battler being shown but Id rather use a face pic. Using RMXP. Thanks!
 
No in the subscreen.

Right now I have it normal which shows the character's sprite. What I want is to use the face set of my characters in the subscreen. Like you would see in the subscreen of final fantasy or most other rpg games.

I used to have a script that made it so the battler was shown in the subscreen instead of the sprite but Id rather not use the battler. I don't care for the way it looks. I'd like to use the face set. Ive seen something about it here before but didn't grab it and can't find it again.
 
By "Subscreen" I assume you mean "Menu"

Try this out. If you get a "Unable to find File" error, make sure you put that file in the Pictures folder

Code:
 

#==============================================================================

# ** Facesets in Menu

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

#  This window replaces the character sprite with a faceset in the menu

#  Make sure you have a file with the same name in the Pictures folder

#  e.g.  Graphics\Pictures\001-Fighter01.png

#  Designed to work best with a 100x100 pixel faceset

#

#  18Jan09 - Brew         (ref: NekoMaster_Battle)

#==============================================================================

 

#==============================================================================

# ** Window_MenuStatus

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

#  This window displays party member status on the menu screen.

#==============================================================================

 

class Window_MenuStatus < Window_Selectable

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

  # * Object Initialization

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

  def initialize

    super(0, 0, 480, 480)

    self.contents = Bitmap.new(width - 32, height - 32)

    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 = 110

      y = i * 116

      actor = $game_party.actors[i]

      draw_actor_face(actor, 0, y)

      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 + 190, y + 32)

      draw_actor_sp(actor, x + 190, y + 64)

    end

  end

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

  # * Cursor Rectangle Update

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

  def update_cursor_rect

    if @index < 0

      self.cursor_rect.empty

    else

      # Set the last value to the height of your faceset

      self.cursor_rect.set(0, @index * 116, self.width - 32, 100)

    end

  end

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

  # * Draw Face

  #     actor : actor

  #     x     : draw spot x-coordinate

  #     y     : draw spot y-coordinate

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

  def draw_actor_face(actor, x, y)

    bitmap = RPG::Cache.picture(actor.character_name)

    cw = bitmap.width

    ch = bitmap.height

    src_rect = Rect.new(0, 0, cw, ch)

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

  end

end

 

Be Well
 

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