ZachPaulusArt

Warper
Member
Joined
Jul 22, 2019
Messages
1
Reaction score
0
First Language
Enlgish
Primarily Uses
RM2k3
Hello, all!

Thank you in advance for your help, I've tried searching forums for a similar topic but I admit I'm not even sure what terms I would be looking for (as searching for "window opacity" on it's own warrants hundreds of results).

test.png
I'm wanting all the windows in my game to have no transparency so I've been going through and replacing opacity values with 255 where need-be. My issue is that during battle the choice window is behind the main window and making the text look garbled. In other programs I would say I want to bring the choice menu forward in Z space so it's on top of the actor's status info and you can read your menu choices, but I'm not sure how I would go about doing this in RMXP. Any help would be appreciated, and thank you again.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,637
Reaction score
15,724
First Language
English
Primarily Uses
RMMV

I've moved this thread to RGSSx Script Support. Thank you.



For viewers, this is for RMXP.
 

Traverse

Veteran
Veteran
Joined
Jul 3, 2014
Messages
193
Reaction score
126
First Language
English
Primarily Uses
In RMXP, you do it the same way as in those other programs. You increase the Z-value of the actor command window to higher than the Ζ-value of the battle status window (as an aside, it does not work the same way in RMMV, that engine does not have controllable Z-values for its windows, but I digress).

In RMXP, all windows come with a default Z-value of 100. You can see this in the script editor, when you look at Window_Base. Window_Base (and the superclass Window, which is hidden in the RGSS dll) is the template from which all other windows are constructed and you can see in it that it automatically sets the Z to 100 in it.

If there are windows that share the same Z, the ones that are drawn later are overlayed ontop of the ones that are drawn earlier.

The windows that you see on the battle screen are all created and adjusted in Scene_Battle, right at the start of its processing - see the entry labeled Scene_Battle 1 in the script editor.

The "@actor_command_window" is the one containing, well, the actor's commands that you are seeing behind your status window, Window_BattleStatus, which is attached to the @status_window variable in Scene_Battle. It ends up behind BattleStatus because it was drawn earlier, even though they both have the default unchanged Z-value of 100.

To push it in front of the status window, you will need to set its Z-value to 101 or higher. You will also see that you can control opacity of windows there, as Scene_Battle itself sets the opacity of the actor window's background to 160 (max 255, transparent is 0) by default. You can check up the RGSS Reference in the help file for all the properties, but there are 3 types of opacities for window objects.

"back_opacity" controls the opacity of the background (but not the frame) of the window graphic, "contents_opacity" controls the opacity of the text and icons or whatever else is drawn in the window and "opacity" controls everything but the contents - both the background and the frame, so if you set it to 0 the whole window sans text will disappear.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg
Step by step, I am coming back.

memorial.png
MasterTenchi wrote on Pixeldrama's profile.
Do you happen to have any of the two lockpicking minigames in RPG Maker MZ format?
I'd love to use them both in my game, and the only ones I've found are yours, but they are in MV format. Strange no one has made a single one for MZ yet. I am hoping you have - but just on the down-low.
SF_People2_8 added!
index.php

1642338286154.png
Trying to draw some pixel art cliffs. Which side looks better, left or right?

Forum statistics

Threads
118,415
Messages
1,115,785
Members
155,364
Latest member
Black-Man
Top