No, because the player needs to walk both below AND above the fog, as they climb higher into the mountains.
How about changing the z-value of the fog depending on the player's location, or using a switch or variable and setting the value appropriately using player touch events.
I would implement elevation and use something to specify the elevation of the map (like a height map) but that's really only practical if you're planning to implement really bumpy mountain ranges with multiple layers of elevation each with different effects.
If it's just a simple "high" or "low" kind of thing you could probably get away with just placing events or region tiles all over the place to adjust the fog sprite or however it's implemented.
I may know of one possible way though there may be easy ways.
If you have a paint program that has layer capiblity you could make an image of the each map you want to use.
Add a second layer over that with your fog bitmap in that layer.
on the first layer use something like a lasso select on areas you don't want in the fog layer.
back on second (fog) layer delete the areas you don't want.
After you have done this use Gaussian blur at very small setting to remove edges where you deleted.
Save the new fog bitmap something that would make you know which map it belongs too.
Then in your script you will need to check the map_id and have it assign which fog bitmap you want to use for that map. (Unsure about how to code this part but I believe I have seen scripts that can check the map_id).
I can't do that - the fog is moving, so any cut-away areas would not stay where they need to be.
Changing the z value won't work either, because the fog needs to be displayed in front of some tiles, and behind others.
The best I can think of at the moment is using player touch events to reduce the opacity as you get higher. This MIGHT solve the problem for one map, but in imagining possibilities, I've already thought of 3 other maps where the same trick wouldn't work 🙁
I think this'll be a backburner project 🙁
Another way is to use the double-tilemap trick by creating a second tilemap and copying tiles that should be on the "upper layer" over, while drawing the fog in between the two tilemaps.
Upper map LayerFog LayerLower map LayerThen it would appear that the fog is moving over certain tiles and under other tiles, and you'd only have to deal with the moving fog rather than trying to figure out how to actually draw fog "behind" certain tiles like the fog rolling behind a tree instead of in front of a tree, which sounds incredibly complex because if you want to place parts of the fog image BETWEEN say an A-tile and a B-tile.You could probably use a static image for the upper layer as well if a tilemap is too expensive on performance.
Then figure out how to deal with character sprites.