New account registration is temporarily disabled.

[RM2K3] EVENT LAYER PRIORITY

Posts

Pages: 1
So I'm using RPG Maker 2009 with RPG Tsukuru 1.8 as my base installation, firstly. In case that makes any difference, although I'm not sure that it does.

Oftentimes, when you have more than one event sprite on the same tile, they'll kind of "compete" with each other over which sprite gets to be on the top draw layer, and as the screen pans around, it keeps changing.

Is there any way to fix this? Is there some patch or plugin that I can use to remedy this problem? I would like to have it so that the sprite with the highest event ID always gets drawn on top (but it should still appear underneath the top half of sprites which are standing one tile below it and are drawn on the same sprite layer, just like it always has).

Also, if there doesn't exist any means of fixing this within the editor itself (I really doubt that there is), and if there exists no patches or plugins (or whatever) to accomplish this... could somebody out there maybe make one? Pretty please with gravy and fries on top? <3 You'll be credited in my game if you do.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
If my memory is correct, rather than event ID, I thought that which event appeared on top was actually based on which event had moved most recently. Maybe I'm wrong though. Is the "competing" happening even when the events are stationary? Does it only happen when the events pan off-screen and then back on?

RPG Maker 2009 only changes the editor, not the game, so in theory the fact that you're using it instead of the normal editor should have no effect on this kind of thing. However, any patches that change how the engine draws off-screen events would absolutely affect this behavior and may make it impossible to find a workaround for.
Hi Tor,

I just wrestled with this concept in RPG Maker 2003 while making my own text engine using events. There is only one way to get a layer above "Above Hero": Make the sprite of whatever is supposed to be above the event only use the upper 16 pixels of its 32-pixel tall bounding box, and the sprite that is supposed to be below, only use the lower 16 pixels. If you have a sprite that is taller than 16 pixels, you might have to temporarily make a single sprite using 2 events each.

If you do this, make sure to place the event one Y-position more south than it's supposed to be (because only its upper 16 pixels will be used—the lower part is blank).
author=LockeZ
Is the "competing" happening even when the events are stationary?

Yes, but only while the screen is panning.

author=LockeZ
Does it only happen when the events pan off-screen and then back on?

No. The events do not have to pan off-screen at all. The "competition" takes place mid-pan. After the screen stops panning, each tile that has multiple sprites on it seems to settle on a draw order for its sprites and they stop competing, but each tile where this is taking place makes its decisions completely independently from any of the other tiles, and it appears to become re-randomized every time; there appears to be no rhyme or reason to it. It's as though it just starts shuffling them when the screen starts panning, and then stops shuffling them when it stops panning, and however it lands is however it lands.

author=LockeZ
RPG Maker 2009 only changes the editor, not the game, so in theory the fact that you're using it instead of the normal editor should have no effect on this kind of thing.

Yeah, that's what I thought, but I figured I'd throw that out there, just in case. But I did think that the "1.8" part might possibly be relevant. ::shrug::

author=LockeZ
However, any patches that change how the engine draws off-screen events would absolutely affect this behavior and may make it impossible to find a workaround for.

I am running a few patches, but none of such a nature as you describe. Also, I've only started using patches recently, but I've noticed this little "phenomena" for over ten years now. It's just never actually mattered for anything I've done until now. lol. So I've never needed to fix it before. So I don't think it's the patches that are causing this.
author=Zachary_Braun
Hi Tor,

I just wrestled with this concept in RPG Maker 2003 while making my own text engine using events. There is only one way to get a layer above "Above Hero": Make the sprite of whatever is supposed to be above the event only use the upper 16 pixels of its 32-pixel tall bounding box, and the sprite that is supposed to be below, only use the lower 16 pixels. If you have a sprite that is taller than 16 pixels, you might have to temporarily make a single sprite using 2 events each.

If you do this, make sure to place the event one Y-position more south than it's supposed to be (because only its upper 16 pixels will be used—the lower part is blank).

Funnily enough, my question in my opening post would not have been possible to ask if I didn't already know this. lol. But thanks for the effort anyway. This only makes the problem worse, though, because I don't want it to always appear on top no matter what. I only want it to appear on top of other sprites on the same tile.

author=Tor_Heyerdal
but it should still appear underneath the top half of sprites which are standing one tile below it and are drawn on the same sprite layer, just like it always has

If I set it to "above hero" then it will appear above the top half of sprites which are standing one tile below it and are drawn on the same sprite layer.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I was going to suggest using pictures instead of sprites, since higher picture IDs are drawn on top of lower ones. But... that won't work for your sprites that are more than one tile tall. They need to appear overtop of whatever sprite is to the north of them, so you'd have to change all the picture IDs every time an event moved. That's practically impossible.

As a weird possible workaround: what happens if you use single-frame looping battle animations instead of sprites for your events' graphics? Basically just give the events invisible graphics, and then have a single parallel process in the corner of the map applying all the correct battle animations over each event.

If this is really important, you might end up having to use a newer version of RPG Maker. In RMXP and all later versions, this problem is fixed, and the way that the z-axis is handled can even be edited in the scripts if you know what you're doing.
author=LockeZ
I was going to suggest using pictures instead of sprites, since higher picture IDs are drawn on top of lower ones. But... that won't work for your sprites that are more than one tile tall. They need to appear overtop of whatever sprite is to the north of them, so you'd have to change all the picture IDs every time an event moved. That's practically impossible.

Yeah, I rode that same train of thought to that same station as well. lol. :V

author=LockeZ
As a weird possible workaround: what happens if you use single-frame looping battle animations instead of sprites for your events' graphics? Basically just give the events invisible graphics, and then have a single parallel process in the corner of the map applying all the correct battle animations over each event.

That's crafty as hell, and sounds equally tedious. lol. But it also sounds like it could possibly work. Although I'm not ready to throw in the towel just yet. I might resort to this if I have to, though.

EDIT: Actually, wait... no... I once tried to make a side-scrolling beat 'em up in 2k3 using spell animations as sprites (figured I could have super fluid animations that way), but that project was quickly derailed when I discovered that you could only have one active battle animation playing at a time. Unless maybe there's a work-around for that now? Either way, I would still consider this an absolute last resort.

author=LockeZ
If this is really important, you might end up having to use a newer version of RPG Maker. In RMXP and all later versions, this problem is fixed, and the way that the z-axis is handled can even be edited in the scripts if you know what you're doing.

Nope. That's just not an option. This project must be on 2k3 for pragmatic reasons and also for personal reasons.

What I'm really hoping for is that someone might be able to write a plugin for DynRPG (or something) that will make it so that event IDs directly correlate with draw layer priority among sprites of the same layer (above/below hero or same layer as hero). I'd do it myself, but I don't know the first thing about C++ or other such non-eventing languages.

I feel like this shouldn't necessarily be that difficult of a thing to make happen for somebody who knows what they're doing, but because I don't, I can't really say that with any conviction. lol.

And this project is four years old, and still going. So whoever wrote such a plugin would not be wasting their time, I assure you.
Did you use any other patches on the engine?

Because I have a vague idea what might be connected to this, in which case this would be in the official version too...

Can you get me a minimal demo project where this happens?
I am using...

DynRPG by you.
Hyper Patcher 2 by you.
BetterAEP by... you. x3
Aaaaand UnlockPics... also by you. :D

I love your work, man. ^^ I'm also planning to apply a few others eventually, but I haven't gotten around to them yet.

When you say "minimal demo project", what do you mean exactly? I can zip/rar up a new backup of my project if you want and just give you the dropbox link for it, with a savefile pre-configured to take you straight to a point where it's relevant, if that sounds okay with you. And I'll leave out superfluous resources that don't need to be there for the sake of file size. Does that sound okay?

Also, I really appreciate your assistance. You're exactly the cat I was hoping to see. :D
That sounds good, yes, please!
I have sent you a PM with the link, Cherry. Please get back to me with your input (or better yet, results) whenever you can get around to getting around to it. And thanks so much. <3
Pages: 1