Trying to draw animations, popups, and images above, not inside, the Battle Status Window.

TheTitan99

Veteran
Veteran
Joined
Nov 2, 2015
Messages
168
Reaction score
68
First Language
English
Primarily Uses
RMMV
Put quickly:
I am trying to play animations, draw pictures, and have popups appear above the Battle Status Window (ideally any window, but for now just Battle Status.) Not inside it, but above it. Having... less than ideal results.

Put into far more detail:
So, I'm using a Front View battle system. Instead of sprites, I'm using faces to represent the players. I am using Yanfly's Battle Engine. Ideally, also SumRndmDde's Battle Status, but I can worry on that later. I use Front Actor Sprite = true in the Battle Engine along with invisible character sprites to get animations to play on the Faces, as well as to get damage popups to appear. And it all works! Mostly.

I quickly ran into a problem. All the animations and damage popups are happening, but they're happening below the Battle Status Window, not above, thus defeating most of the point of this! So, I want to get those animations and popups on a higher layer. The highest layer! They should be on top of everything!

Figured this would be easy enough to do on my own. Just add onto Window_BattleStatus something like, .z = 1000; Or -1000? That should take care of it! But, turns out, Windows don't even use layering like that. They use some weird parent/child system that's far beyond my understanding. I'm sure there's a reason for layers being done this way, but I don't know why.

So, thought, alright, why not just envelope the entire screen in 1 giant window that's a child to the Battle Status, and play all animations on that? So, they'll all appear on top! Well, besides that being incredibly hard to program to begin with, that would be awful for compatibility with other scripts, as well as be terrible 'cause MV just doesn't like layering windows over top of each other. Windows tend to vanish when that's done.

So.... I'm at a loss. What seemed like a really simple thing, just Photoshop-like dragging a layer upwards, has me stumped.

Any and all help is welcome!
 

TheTitan99

Veteran
Veteran
Joined
Nov 2, 2015
Messages
168
Reaction score
68
First Language
English
Primarily Uses
RMMV
Does anyone have any ideas on this? Is it deceptively complicated, or am I overthinking it?
 

Fornoreason1000

Black Sheep
Veteran
Joined
Mar 1, 2014
Messages
205
Reaction score
94
First Language
English
Primarily Uses
RMMV
I'm pretty sure its like more of an Object hierarchy or tree of objects each having their own branches, so yeah its kinda annoying to work with especially that you have no possible way of visualizing it. Basically you have the Parent, and its children. Stage is the root Object of everything that is displayed... infact Stage is basically an empty class that inherits from PIXI.Container. (not PIXI.Stage) its just a a root object. Window , Sprite, Tilemap, Weather,Tone also all inherit from PIXI.Container. Scenes inherit from Stage. Most of the child adding happens in the Scene objects, some window also have it. Windows are created as children of a object called WindowLayer. which is a child of the Scene object.

Code:
Stage(sceneBattle)
>Spriteset
>>Parralax
>>EnemeiesandActors
>>Flash
>>Animations
>WindowLayer
>>WindowBattleStatus
>>your giant window
Now that is confusing, and what does that have to do with the render order? Everything your target is window layer, not the windows themselves. so in PIXI there is no Z coordindate, render order is handled by the children array. the last element is rendered ontop. so your solution is to create a PIXI.Container of some kind and add it as a child of the scene with higher index than window layer.. not the sprite set or window layer.
the trouble with that is Animations and pictures are displayed in SpritesetBattle, which is added first in the array, before Window Layer. simple moving this up will move Everything above the Widnows making them invisible.

so you have few options,
1. Add a window as a container for animation as you said, highly incompatible.

2. split up Spriteset Battle and create the another layer ontop of Window Layer, not as bad as 1, but still a alot of work and has incompatibles when references animations.

3. set the window layer a a child of the sprite set instead of the scene and make sure its added before any anitmations or pictures but after your actors and backgrounds. then make the sprite set spewup the reference when ever the scene needs it. This may require some modification or overloading to Yanfly' Battle Core.
 
Last edited:

TheTitan99

Veteran
Veteran
Joined
Nov 2, 2015
Messages
168
Reaction score
68
First Language
English
Primarily Uses
RMMV
All this is pretty advanced to me. I'm mostly a script editor more so than writer from scratch. It does sound like rearranging the parent/child order is the best option listed here, but even that sounds like a real pain.

Hmm... placing all windows below animations? Sounds like it'll run into issues down the line. Would doing this also rearrange in other scenes, such as making animations play overtop during Scene Map as well? Also, do you know of where that would be, in the scripts? Where to possibly go about rearranging them? I have some ideas, but the default scripts are pretty bad at documentation.

Sorry for asking a ton, just a bit overwhelmed on all this.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

In other news, my new computer is now ordered, and I'll have it in my hot little hands by the end of the week! CAN'T WAIT!!!
I've said my cat's names in such a baby-talk manner over the years, Biggs is now Biggoro, Bella is now Bellllyyaah, and somehow.....somehow Tessa is Sessashan
Did a massive ****up in my code that would have caused the game to crash on most computers and almost released an update without noticing it.
I keep thinking today is Thursday.
And I look forward to the next preview thread coming this afternoon.
And then I realise it's not Thursday at all.
And then I get sad :(

Forum statistics

Threads
100,449
Messages
976,080
Members
132,082
Latest member
nwr
Top