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.

Menu question

i was wondering if there was a script that allowed me to have my own pictures in the menu for representing characters. Like instead of where you would see the charac-set you would see a diffrent graphic, im trying to explain as best as i can, im using RPG maker XP. Any help would be greatly appreciated!

EDIT: Woops im sorry i just noticed that i put this in the wrong sectipn, i am very sorry!!
 
At least you noticed ;)  It happens.

To answer your question, though, it's only a simple edit... so let's try to do it yourself:

Go into RMXP- open the script editor.

Go to Menu_Status
Look at this line:
Code:
draw_actor_graphic(@actor, 40, 112)
Change it to:
Code:
draw_actor_picture(@actor, 40, 112)

Okay, okay good job.  Moving forward:

Go to Window_Base

find this function (around line 108)


  def draw_actor_graphic(actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end


Good.  Now copy that.  Insert a new script (right click, insert...)
Name it "Powersurge00 Menu Edit Kungfu X" or something like that...

Now paste the function into your new script.

Change it as follows:

class Window_Base
def draw_actor_picture(actor, x, y)
    bitmap = RPG::Cache.picture(actor.character_name, 0)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
end


Congratulations.  Put a picture in your pictures folder with the character's name, and you've got yourself the script you just requested.
 
No prob  :lol: anytime.  The only thing I ask in return is that form now on, before you post a request, scan through the existing scripts- 9/10 times it's something this simple.
 

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