Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VXA] Picture instead of character information in menu

Started by Kiyoshi, May 25, 2014, 10:49:42 AM

0 Members and 1 Guest are viewing this topic.

Kiyoshi

Hey guys!
I don't really know how to explain my needs, but a picture is worth a thousands words :Vg;
[SPOILER=Screenshot][/SPOILER]
This screenshot is from the game "Mogeko Castle" and I'd like to have a script to show this character picture and game logo for example instead of the characters with its faces, hp/mp gauge etc.
I could imagine that it's not that difficult, but I don't understand any RGSS at all :D

Or is there maybe a script existing I didn't find?

Cheers :)

pacdiggity

I'm a fan of the idea so I broke my vow of RGSS silence to whip up a steaming pile of code.
module PAC
  Menu_Picture = "MenuBackground"
end

class Scene_Menu < Scene_MenuBase
  alias pac_picturemenu_start start
  def start(*args)
    pac_picturemenu_start(*args)
    create_pac_picture
  end
  def create_status_window
    return
  end
  def create_pac_picture
    @background_sprite2 = Sprite.new
    @background_sprite2.bitmap = Cache.picture(PAC::Menu_Picture)
  end
end


Basically, you'll need to import the picture you want as the overlay picture in to the Pictures folder (set transparency and all that), and change Menu_Picture to the name of that image. Should work. Make sure the image you're using is the correct resolution, as I didn't put in options for placing the image in a specific spot. Just use a 640x480 image and position things as you will.

I hope this is what you're after.
it's like a metaphor or something i don't know

Kiyoshi

Oh, thanks a lot! This is exactly what I was looking for! :)



Works also great with Yanfly's Menu Engine :)
Some additional minirequest: is there a possibility to tint the background a bit (black)?

Ki~

modern algebra

Why not just tint the picture itself in an image editor?

Kiyoshi

Quote from: modern algebra on May 25, 2014, 12:40:08 PM
Why not just tint the picture itself in an image editor?
I meant the map in the background:x

Ki~

modern algebra

Well, sure, but all you need to do to do that is to change the background of the picture from transparent to semi-opaque black.

Kiyoshi

Quote from: modern algebra on May 25, 2014, 12:56:10 PM
Well, sure, but all you need to do to do that is to change the background of the picture from transparent to semi-opaque black.
Oh, I see, my fault, sorry :D Thanks for helping!

Ki~

pacdiggity

it's like a metaphor or something i don't know

Kiyoshi

Well, there is a small problem :x
This error appears, when I want to use menu commands like skills or equipment.
Any idea how to fix this?

pacdiggity

#9
Ah, yes. That should've been clear to me. It's very simple to fix up, I'll get to it tomorrow morning.

To clarify - does your game have only one playable character or more?
it's like a metaphor or something i don't know

Kiyoshi

Okidoke :)

Well, I don't have a clue right now, there will be 4 characters, but I don't no if they will be party members...
Would it be hard to adjust it to 4?

pacdiggity

Well if there's more than one character in the party then the party window is going to have to appear whenever the commands "Skill", "Equip" or "Status" are selected. This will make the script more complex, but not necessarily hard.
it's like a metaphor or something i don't know

pacdiggity

I made it good again.
module PAC
  Menu_Picture = "MenuBackground"
end

class Scene_Menu < Scene_MenuBase
  alias pac_picturemenu_start start
  def start(*args)
    pac_picturemenu_start(*args)
    create_pac_picture
  end
  alias pac_picturemenu_dispose dispose_background
  def dispose_background(*args)
    pac_picturemenu_dispose(*args)
    @background_sprite2.dispose
  end
  def create_status_window
    @status_window = Window_MenuStatus.new(@command_window.width, 0)
    @status_window.hide
    @status_window.close
  end
  def create_pac_picture
    @background_sprite2 = Sprite.new
    @background_sprite2.bitmap = Cache.picture(PAC::Menu_Picture)
  end
  alias pac_picturemenu_cmdpsnl command_personal
  def command_personal(*args)
    @status_window.show
    @status_window.open
    pac_picturemenu_cmdpsnl(*args)
  end
  alias pac_picturemenu_onpsnlcnl on_personal_cancel
  def on_personal_cancel(*args)
    pac_picturemenu_onpsnlcnl(*args)
    @status_window.close
  end
  alias pac_picturemenu_update update
  def update(*args)
    pac_picturemenu_update(*args)
    @status_window.hide if @status_window.close?
  end
end

Let me know if anything else goes wrong.
it's like a metaphor or something i don't know