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.

Faces in Menu

Hey there.

I was wondering if anybody had a script that replaces the character sprites in the DMS with character portraits.

I've looked around but haven't been able to locate one.

I'd really appreciate it if someone could help me out.

Thanks :)
---Mr. Ishbuu
 

Kaito

Member

Put this code in Window_Base:

Code:
 def draw_actor_face(actor, x, y)
  bitmap = RPG::Cache.picture("MenuFace/"+@actor.id.to_s)
   cw = bitmap.width 
   ch = bitmap.height 
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x - cw/5, y - ch, bitmap, src_rect)
 end

And now...Go to Window_MenuStatus, find draw_actor_name(actor, x, y) put on top/under it: draw_actor_face(actor, x ,y).

Faces you use must be in a folder name MenuFace in your Pictures folder, named by your character's ID.

that's all~
cya!
 
A small error in your code.
Code:
 def draw_actor_face(actor, x, y)
  bitmap = RPG::Cache.picture("MenuFace/#{actor.id}")
   cw = bitmap.width 
   ch = bitmap.height 
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x - cw/5, y - ch, bitmap, src_rect)
 end
 
I made a menu system that encorporates RM2K styled facesets (kept in the Graphics\Pictures folder) so it won't interfere with the use of battlers. It also allows for faceset use in a messagesystem. Look in my sig (or in the Forum Script Listings). I made it some time ago.
 

Mac

Member

The reason is most likely that the positioning codding is messed up.

So go into Window_Menustatus where the code should be placed.

Code:
draw_actor_face(actor, x ,y).

And you will need to fiddle around with the x and y co-ordinates.

When you have got the placements right. Go to lines 26 and 27 and there will be a code like this.

Code:
      x = 90
      y = i * 98

This is the way you sort out the spacing between each character, so you will need to change the numbers until you get that spacing you need.

If you can't suss it out send me your game and i will sort it for you.
 

Lexy

Member

Its really quite simple

Open up your game file and choose graphics then click pictures and make a new folder called MenuFace

now go into ms [aint or photoshop or whatever program you use make your faces and save them to your desktop as 1 2 3 4 ect. ect. depending on which actor they are in the list note i dont know why this is but you must have a 4 in the files or you will get a error when opening the menu now just copy the codes from the first post and paste them in the apropriate spots then goto Menu_Status and erase the Draw actor code and set the faces

x - 40, y +80


hope that helps i dont know how to upload my game yet never have
 

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