The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Yami on February 12, 2007, 10:09:11 PM

Title: [Fixed] Custom Pictures in Menu?
Post by: Yami on February 12, 2007, 10:09:11 PM
Is there a script that makes it so instead of the character sprites on the menu, it's a picture that you choose.

Here's what I mean:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fyamisiterawr.com%2Fimages%2Fscript_please.png&hash=fb7c4a709410196e1b6b6dc3ff955d56ca98c21f)
Title: Re: Custom Pictures in Menu?
Post by: Blizzard on February 18, 2007, 06:26:42 PM
Just use a "faceset" script and use some other pictures instead of faces.

*hopes that he's not too late with answering*
Title: Re: Custom Pictures in Menu?
Post by: Yami on February 18, 2007, 07:27:43 PM
Thanks! Is that in the script database?
Title: Re: Custom Pictures in Menu?
Post by: Blizzard on February 18, 2007, 10:04:16 PM
Actually you merely need to change this line

draw_actor_graphic(actor, x - 40, y + 80)

into

draw_actor_face(actor, x - 40, y + 80)

in Window_MenuStatus. And add this code as well:

class Window_Base < Window

  def draw_actor_face(actor, x, y)
    if actor != nil and actor.character_name != ""
      bitmap = RPG::Cache.character(actor.character_name + "_face", actor.character_hue)
      src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
      self.contents.blt(x - bitmap.width/2, y - bitmap.height/2, bitmap, src_rect)
    end
  end

end


Add it anywhere below the normal Window_Base.
The graphics go into the "Characters" folder. Give them the same names like the spritesets, but add _face at the end.
Title: Re: Custom Pictures in Menu?
Post by: Yami on February 18, 2007, 10:50:57 PM
Oh thank you! ^^
Title: Re: Custom Pictures in Menu?
Post by: blazinhandle on February 19, 2007, 01:08:18 AM
*blizz to the rescue*

add resolved to the topic, Yami ;)
Title: Re: [Fixed] Custom Pictures in Menu?
Post by: Blizzard on February 19, 2007, 12:16:53 PM
I'll include that little nothing of code in the next release of Tons of Add-ons. :) There are tons of people who need it, lol! That makes the name having a double meaning. xD
Title: Re: [Fixed] Custom Pictures in Menu?
Post by: tSwitch on February 19, 2007, 08:27:57 PM
yeah, I love how your Nemesis menu automatically does that