Battle Window Opacity

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.
Moved to: RGSSx Script Support

For viewers, this is for RMXP.
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.

Original thread: https://forums.rpgmakerweb.com/threads/battle-window-opacity.134863/