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.

Facesets...

Khali

Member

Where can one go about learning how to add facesets to the menu. I might either add the faceset with the actor sprite in the corner of the face, or without the sprite. I've seen many CMS' that have this feature, but the code is so...everywhere, its hard to understand how they have scripted it. I understand how to cache images from a seperate folder, like if I wanted to call the faces from pictures/faces, but I don't know how I make them display on the menu. I've tried changing my script several times but I don't know how to make kind of a... draw_actor_face_graphic kind of command. Not that its what I'm trying to do, but I want it to display the faces automaticly obviously, with the name, hp, etc. :huh:

I've tried searching this board up and down for faceset scripts or tutorials on adding them to the basic menu as well with no luck. I've spent about 2 days on at least before coming here. :sad:



I was going to check through some of the scripts in the Script Listing thread in the Script Analysis forum too, but I keep getting a 500 error, internal server error.
 

Atoa

Member

First of all, create an folder named "Faces" in the Graphics/Character folder
then Add this code above main

Code:
class Window_Base < Window
  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
*There's differents ways of writing this method, I use that way to let the Face files separated from other files.

The Face graphics must have the same name of the charset graphic.
So if you use "001-Figther01" as the char graphic, the face must have the same name.

Now you must replace the "draw_actor_graphic" the with "draw_actor_face"
you can find it in these classe:
Window_MenuStatus
Window_Status
Window_Name Edit

You may need to adjust the face position to fit in the window.
 
Well, there is this menu script that uses faces instead of people, here is a screenshot
Script_Menu09_IM01.jpg
, If you want it, can post the Demo
 

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