MV Event behind map

Is there any way to make an event draw below the map? I have a map that's transparent with a parallax background, and I want some smoke coming up from behind the cliff. Here's a screenshot:

temp.png


In that image it looks like the smoke is issuing up from the ground, and you'll have to walk through it. I want it to be coming from behind the cliff, and you'll just pass by it. The most obvious solution to me would be to draw it between the parallax and the tiles.
Make an event using an image that covers that area. Place it as same as character and through. Then make sure the animation is below character and that should work.
Why not just cut off the lower part of the image (where the tile is) and it should be fine?
Certainly cutting off the lower part of the image would get the desired effect. But it's not very flexible – in fact, after posting this, I found I also wanted the top cut off in some places. And it would mean I need to figure out exactly which piece needs to be cut off, which would be a huge pain since the cell size for the fume is 200x200 (not a multiple of the grid size, in other words).

Anyway, I figured out a way to do it on my own since posting this – I set the move route to "Custom" and added the following script command to it:

JavaScript:
this._priorityType = -1

EDIT: However, if someone is aware of a plugin that does this in a less "hacky" way, I'm still interested.
EDIT: However, if someone is aware of a plugin that does this in a less "hacky" way, I'm still interested.
I didn't know the -1 though, only 0, 1, 2 based on lower, normal above, but not -1.
it is probably also possible to run this if you make a comment tag or notetag if it is always
like that.

I can look into it as it is definitely a great idea to put some events behind tiles.
but I think if tiles are drawn on layer 2, than it may go to layer 1 instead?

something above parallax, below tiles would probably be cleaner.
A priority type of -1 certainly doesn't have any meaning to the engine. (I would guess it's not possible to interact with such an event, but I don't need any interactions for this event, so that's fine.)

But the reason I did it that way is because I noticed screenZ is simply a formula based on the priority type, so setting it to something lower pushes the screenZ down. (I think that also means that parallel events draw above autorun events, which draw above "above characters" events, as their priority types are 4 and 3 respectively.)

I was slightly surprised that it even worked though. It would've been entirely possible for it to fail if the game just drew all the tiles followed by all the events, but it seems it doesn't work that way.
This would be the quickest way without having to deal with other code - I haven't really had any issues except with interaction, and that can be addressed with a few Math functions if you really want it to still maintain interaction. I mean, you can sort the children accordingly based on how it is drawn on the screen as well I suppose, but I haven't had any issues myself with this.

In fact, you can use float values for it as well.

Let's say you have two events with IDs 1 and 4 and both are set to Below Character. This means that Event 1 will be on top. Well, if you wanted both to still be below the player and Event 4 to be on top of Event 1, you set the ._priorityType of Event 4 to 0.1 (or anything higher than Event 1's priority but still less than the player).

I believe that actual "retail" value to be under the tiles is to be less than -0.5 (so -0.51 will make it below the tiles. I wouldn't be surprised if you can go through layers too with this or be in between layers, haven't fully tested though).
Probably the non hacky way to do this would be to alias screenZ() and make it read note tags (so you don't need to modify the priority type at all), but for right now I can't be bothered to actually do that, since it was only the one small area that needed a few tweaks. Maybe I'll do it in the future if I find myself needing this sort of thing a lot.
I think if its only 1 or 3 events, the priorityType = -1 is already enough.
dealing with codes can be tricky too.

for example, events is below tiles, but if you walk up (parallax moves a little)
so you want the effect for that event too. further away is lower, while close it higher.

so it can be more complicated to make it nice without to much hassle.

parallax layer or mapLayer can have different and in between, the best way for
between layers is to use PixiFilter, but that require coding as well for collisions
to actor as normal for when and when not (or not at all).

but only events, I think your way is easiest if it just a few.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/event-behind-map.180097/