[YANFLY] TRYING TO GET ANIMATIONS TO PLAY ON TOP OF STATUS WINDOW.
Posts
Pages:
1
Hello,
I've been messing around a bit with Yanfly's Battle Engine Core script, trying to find a solution to animations playing under the actor status window instead of above. Looking in the script, I can't find a Z index for the status window or for the battle animations.
I did find a Z index for the battler sprite, which when I put it at -100 or less would place the battler sprite under the battle background, effectively hiding animations. You would think that if you pushed it up high enough it would put the sprite on top of the status window but even at 9999999 this didn't happen.
Looking around in the comments section on Yanfly's battle engine script, I can see a lot of people requesting/asking the same thing but it seems no one has an answer.
Is this just not possible (doubtful) or am I just missing something here?
EDIT: Messing around some more with the Z values, I could get every window in the game to be invisible...except for the battle status window. It's like it's its own entity or just completely cut off from any and all Window classes.
EDIT2: testing in new project without any scripts. a Z value of -1000 in Window_Base makes every single window appear behind every other element basically turning them invisible. Yet the status window remains, as does the party command and actor command window.
I honestly have no clue why these three windows are not affected...
I've been messing around a bit with Yanfly's Battle Engine Core script, trying to find a solution to animations playing under the actor status window instead of above. Looking in the script, I can't find a Z index for the status window or for the battle animations.
I did find a Z index for the battler sprite, which when I put it at -100 or less would place the battler sprite under the battle background, effectively hiding animations. You would think that if you pushed it up high enough it would put the sprite on top of the status window but even at 9999999 this didn't happen.
Looking around in the comments section on Yanfly's battle engine script, I can see a lot of people requesting/asking the same thing but it seems no one has an answer.
Is this just not possible (doubtful) or am I just missing something here?
EDIT: Messing around some more with the Z values, I could get every window in the game to be invisible...except for the battle status window. It's like it's its own entity or just completely cut off from any and all Window classes.
EDIT2: testing in new project without any scripts. a Z value of -1000 in Window_Base makes every single window appear behind every other element basically turning them invisible. Yet the status window remains, as does the party command and actor command window.
I honestly have no clue why these three windows are not affected...
I'm guessing it's the viewports the windows are inside of. When considering what is drawn on top of what viewport's Z index takes precedence over their contents. For example if you have Window A in Viewport 1 and Window B in Viewport 2 the window's Z index doesn't matter when compared against each other but the viewport's Z index does. Now if you add Window C to Viewport 1 then Window A and C's Z index matters as it affects which is drawn on top of the other inside Viewport 1.
Ah, interesting. So the battle status and party/actor command windows are all in viewport 1 while the rest are in 2 for example.
I managed to track down a few viewports and was able to figure out what windows are attached to which viewport, at least without any extra scripts installed.
There's the viewport, viewport1, viewport2, viewport3, savefile_viewport and info_viewport.
@viewport seems to be for the item, equip, skill and shop menus. Setting the z to -200 made them invisible.
@viewport1/2/3 are used in battle for the enemy sprites, battle background, flashes/shaking and brightness. But also outside of battle for sprites and some other things.
@savefile_viewport is used for the save menu (wow, what a surprise).
@info_viewport is used for the actor/party command and actor status windows. Which is exactly what I was looking for.
Unfortunately, simply changing the z values isn't working.
Even if I set the @viewport1 z value to -10000 and @info_viewport z value to -9999 (so the battle windows are still visible) the animations are still playing behind the window.
I haven't been able to pinpoint any kind of animation viewport. But since a z value of -9999 on the battle windows makes the animations still play behind the windows but in front of the background which is set at -10000, I wonder if the animations are actually playing on a viewport at all...
Or perhaps the animations are playing on @viewport1, meaning that I would have to seperate them somehow or create a different viewport for them. Only problem is I literally see no line of code where battle animations are added to a viewport and then played.
EDIT: It seems animations are tied to the battle sprites. I put the sprites in @viewport2 instead of @viewport1 (where the battle background is in also) and cranked up the z value on @viewport2 to be higher than the @info_viewport. Animations now play on top of the windows, though enemy sprites also overlap them so it breaks more than it fixes...
I guess I really do need to seperate them somehow.
Sprite_Base seems to have the answer, but it seems to create the viewports in the Sprite class which you don't actually have access to...
Then again I could be completely mistaken.
I managed to track down a few viewports and was able to figure out what windows are attached to which viewport, at least without any extra scripts installed.
There's the viewport, viewport1, viewport2, viewport3, savefile_viewport and info_viewport.
@viewport seems to be for the item, equip, skill and shop menus. Setting the z to -200 made them invisible.
@viewport1/2/3 are used in battle for the enemy sprites, battle background, flashes/shaking and brightness. But also outside of battle for sprites and some other things.
@savefile_viewport is used for the save menu (wow, what a surprise).
@info_viewport is used for the actor/party command and actor status windows. Which is exactly what I was looking for.
Unfortunately, simply changing the z values isn't working.
Even if I set the @viewport1 z value to -10000 and @info_viewport z value to -9999 (so the battle windows are still visible) the animations are still playing behind the window.
I haven't been able to pinpoint any kind of animation viewport. But since a z value of -9999 on the battle windows makes the animations still play behind the windows but in front of the background which is set at -10000, I wonder if the animations are actually playing on a viewport at all...
Or perhaps the animations are playing on @viewport1, meaning that I would have to seperate them somehow or create a different viewport for them. Only problem is I literally see no line of code where battle animations are added to a viewport and then played.
EDIT: It seems animations are tied to the battle sprites. I put the sprites in @viewport2 instead of @viewport1 (where the battle background is in also) and cranked up the z value on @viewport2 to be higher than the @info_viewport. Animations now play on top of the windows, though enemy sprites also overlap them so it breaks more than it fixes...
I guess I really do need to seperate them somehow.
Sprite_Base seems to have the answer, but it seems to create the viewports in the Sprite class which you don't actually have access to...
Then again I could be completely mistaken.
Pages:
1















