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.

MOG menu help

i want to use the MOG menu, but if you change the character name (players can choose their own name's) the faces don't work anymore. could someone change it that instead of the faces, it shows the character graphic depending on what character it is? i need this in: MOG_MPW_HUD_Elena, MOG_Scene_Shop, MOG_Scene_Menu_NOT, MOG_Scene_Skill, MOG_Scene_Shop
 
Possible solution is using actor id instead of actor name, like this:
Code:
def drw_face(actor,x,y)
  face = RPG::Cache.picture(actor.id + "_fc") rescue nada
  cw = face.width 
  ch = face.height 
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x , y - ch, face, src_rect)    
end
(I didn't test it)
Of course, picture file name should be (actor ID)_fc and so on.
 
Landarma;278230 said:
Possible solution is using actor id instead of actor name, like this:
Code:
def drw_face(actor,x,y)
  face = RPG::Cache.picture(actor.id + "_fc") rescue nada
  cw = face.width 
  ch = face.height 
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x , y - ch, face, src_rect)    
end
(I didn't test it)
Of course, picture file name should be (actor ID)_fc and so on.

o.0 thats even better than i wanted
the only thing i still need to do is find all the faces :p
EDIT: wait, it doesn't work >.< your graphic changes in the game :P
 
OK, actually, it's like this:
Code:
def drw_face(actor,x,y)
  actorid = actor.id
  face = RPG::Cache.picture(actorid.to_s + "_fc") rescue nada
  cw = face.width 
  ch = face.height 
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x , y - ch, face, src_rect)    
end
I forgot actor id should be converted to string.
 
Landarma;278772 said:
OK, actually, it's like this:
Code:
def drw_face(actor,x,y)
  actorid = actor.id
  face = RPG::Cache.picture(actorid.to_s + "_fc") rescue nada
  cw = face.width 
  ch = face.height 
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x , y - ch, face, src_rect)    
end
I forgot actor id should be converted to string.

:( it doesn't work for me, should i name the face 001_fc ?
 

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