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.

Very small and simple request...

Hey guys, I've finally decided to just ditch catchm's FFX-2 CMS, and instead, just modify the default menu. Basically, in the menu, I need the character graphics changed to an 80x80 (pixels) image from a folder that contains several face graphics. The target directory would be "My Documents\RPGXP\GAME001\Characters\Faces."
I have in bold print the location from where my images will come from. Also, I noticed this in Blizzard's merged FFX-2 CMS (based on catchm's original work) combined with the Limit Break script:

#=====================================
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

If anyone can use this or something similar to this to change the graphic, I would very much appreciate it.

I'd rather do this early on that play with CMS's right off. I hope someone can help me out.
 
Hmmm try this:
Code:
class Window_Base
  alias draw_actor_graphic1 draw_actor_graphic
  def draw_actor_graphics
    if $scene.is_a?(Scene_Menu)
      face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
      src_rect = Rect.new(0, 0, 80, 80)
      self.contents.blt(x - 40, y - 80, face, src_rect)
    else
      draw_actor_graphic1
    end
  end
end
 
Not working :S

I tried just inserting this script above main, then even tried putting it in the Window_Base itself under "Draw Graphic."

Is there something that I'm not doing right?
 
Hmmm sorry, a small error... :s
But I'm not sure what do you need
Code:
class Window_Base
  alias draw_actor_graphic1 draw_actor_graphic
  def draw_actor_graphic
    if $scene.is_a?(Scene_Menu)
      face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
      src_rect = Rect.new(0, 0, 80, 80)
      self.contents.blt(x - 40, y - 80, face, src_rect)
    else
      draw_actor_graphic1
    end
  end
end

Be sure to paste it just before Main.
 
Sorry... again :s
Code:
class Window_Base
  alias draw_actor_graphic1 draw_actor_graphic
  def draw_actor_graphic(x, y, actor)
    if $scene.is_a?(Scene_Menu)
      face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
      src_rect = Rect.new(0, 0, 80, 80)
      self.contents.blt(x - 40, y - 80, face, src_rect)
    else
      draw_actor_graphic1(x, y, actor)
    end
  end
end
 
Sorry again... if this fails again, i'll test it by myself :)
Code:
class Window_Base
  alias draw_actor_graphic1 draw_actor_graphic
  def draw_actor_graphic(actor, x, y)
    if $scene.is_a?(Scene_Menu)
      face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
      src_rect = Rect.new(0, 0, 80, 80)
      self.contents.blt(x - 40, y - 80, face, src_rect)
    else
      draw_actor_graphic1(actor, x, y)
    end
  end
end
 

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