Ideally, a limited amount of pictures should be shown at a time, so the picture count would not usually go above, say, 10 maximum?
The picture number can be reused to create new pictures every time for each map.
The main feature that my script adds on top of regular parallax mapping (and therefore, most scripts that I'm aware of that provides this functionality) is that you have control over each layer, and you have control over the pictures.
A picture may be used for more than just setting up the atmosphere. Suppose you wanted to create a hidden path where the player would walk into the path and disappear from view. This can be done with a picture. Of course, you just need one picture for all the paths, so that isn't really a problem. It's basically just a ceiling layer.
But let's say you wanted to create roofs for every house, and whenever you enter a house, the roof goes transparent, revealing the insides of the house. And better yet, the roof fades out instead of just disappearing immediately. This can be done with pictures and changing its opacity over a period of time. This is a pretty common feature and makes your maps look better. If you had 10 houses, that's 10 pictures right there (you don't want every house to become visible just because you entered one).
So perhaps a way to control whether a picture is "local" or "global" would be necessary, as right now, all pictures are global.
Similar to saving and loading, when you leave a map, all of the local pictures will be saved and then removed so they don't appear in the new map. Once you re-enter the map, all of the pictures will be restored the way you left it.
Consider it like setting a permanent map tint for each separate map.
Some existing overlay scripts I have seen use fixed layers.
For example,
Yami's script provides 4 layers (light, shadow, parallax, ground), each controlled by a switch. Variables are then used to allow you to change images if you need to.
Each map has their own overlay image settings, so they are automatically handled on map change.
An add-on could be written to allow you to reserve certain pictures for overlay purpose (and for automatic handling), but I haven't thought about how that might be used.
For my
tunnel effect example, you have an additional set of challenges.
First, the picture should be shown if you're in a specific set of maps, since the dungeon might be broken up into multiple maps. The picture can be resized or have various properties changed, so you may want to preserve that across maps.
Second, the picture should be removed once you exit the dungeon. There are two ways to do this
1: Erase the picture when you leave the dungeon
2: Erase the picture when you enter a map that is not the dungeon
Not something my script would handle, but there definitely would need to be some add-ons to make things easier to manage the pictures.