The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => Topic started by: Wrinkle on May 22, 2016, 12:57:55 AM

Title: VXA Custom Menu (need slight help)
Post by: Wrinkle on May 22, 2016, 12:57:55 AM
Hello there, i'm just being a bit of a scrub and was wondering if someone could help me. I was customizing my menu and noticed one thing when going from the map to the menu, all my HUD images would disappear but the rest of the map in the background stayed as I entered the menu. The graphics for the HUD return when I resume the game, but I want the images to stay present in the background of the menu. Can anyone help me with this? I ran into a similar problem like this back in RMXP, but I can't figure out how to fix it in VX Ace. It would be much appreciated fellow gamers and coders.
Title: Re: VXA Custom Menu (need slight help)
Post by: yuyu! on May 23, 2016, 04:04:40 AM
Are you using files from the pictures folder for the HUD? They should be staying, unless something in the script is specifically erasing them when the menu is brought up?
Title: Re: VXA Custom Menu (need slight help)
Post by: Wrinkle on May 23, 2016, 03:09:49 PM
The HUD is being created by another script, and it's using pictures from the Graphics\System folder instead of Graphics\Picture
Title: Re: VXA Custom Menu (need slight help)
Post by: yuyu! on May 23, 2016, 07:17:22 PM
Have you tested without the custom menu to see if the default menu will remove the HUD, too? I'm thinking that the HUD script, rather than your menu script, may be the problem.

It's possible that picture files will stay in the background and system images disappear. There may be a way to go through the HUD script and change the images to be read through the pictures folder, instead. Otherwise, something else in the HUD script might be removing images upon the call of the menu.

Can you provide a link to the HUD script? I'd like to take a look at it and see if one of those solutions can't fix it (assuming that the HUD script is causing the issue).
Title: Re: VXA Custom Menu (need slight help)
Post by: Wrinkle on May 23, 2016, 08:11:42 PM
I'm just altering the default menu script in the project, mostly just resizing and relocating windows. I will try changing the directory to Pictures first and see how it fairs out.
Title: Re: VXA Custom Menu (need slight help)
Post by: Wrinkle on May 23, 2016, 08:54:53 PM
OK no, i'm still a scrub, I can't get it to work. I'll attach the HUD script if you want to look at it. It's been edited a bit, and i've been excluding TP and EXP in the HUD for my project.
Title: Re: VXA Custom Menu (need slight help)
Post by: yuyu! on May 24, 2016, 04:38:42 AM
The HUD script is definitely causing the issue, but switching the graphics to be read from the pictures folder didn't help at all. ;9 From the looks of it, the script clears the HUD upon entering anything other than Scene_Map. This can be changed by editing line ~325:

Code: [Select]
  def self.clear
    #Added code. Doesn't clear the HUD when in Scene_Menu.
    if !SceneManager.scene_is?(Scene_Menu)
      @sprite_b.bitmap.clear
      @sprite_bg.bitmap.clear
    end
  end

However, I'm also a scrub (especially with ruby programming) and can't seem to get the HUD to be positioned behind the menu. ;9
Title: Re: VXA Custom Menu (need slight help)
Post by: Wrinkle on May 24, 2016, 12:51:53 PM
Ahh thank you very much! Everything works great now. Getting the HUD to display behind the menu is a matter changing the Z priority :)
Title: Re: VXA Custom Menu (need slight help)
Post by: yuyu! on May 24, 2016, 08:08:02 PM
Yay! I'm glad everything works now! ^_^

I thought z might change it, but I couldn't figure out how to make that work. :B