This also just lead me to another idea I had awhile back regarding faking transparencies. I was just thinking, what would happen if I used this code to make a foreground map layer flicker on, and off at a specified rate (example. every tick). I presume it would make it appear that the tiles on that layer would be 50% transparent. Now what if I made the map tiles on that layer look like clouds. This should make it appear as if my character is semi-visible while passing below these clouds. It could make for a nice effect, but I fear it may also slow down the game immensely depending on the size of the map.
I have seen people do rain-like effects in their games without noticeable slow downs though, so I could be wrong. I'll have to give it a try, but unfortunately don't have time at the moment.
It'd work, but as James mentioned it'd be really jarring visually and coupled with OHRRPGCE's relatively low framerate it'd look pretty bad.
An alternative would be to overlay some crosshatch/checkerboard pixels over the walkabout/NPC layer. I did an experiment with this by having animated maptiles with crosshatched pixels that toggle in an alternating pattern every 1 tick. Honestly, it didn't look very good. I think it might be feasible if OHRRPGCE's framerate gets increased down the line though, because the flickeriness would be greatly reduced.
I gave my idea a try... No slow down in the game, but definitely sore on the eyes. 1 tick is just too long of a gap between turning on and off the map layer. If it were possible, I'd say about 1/16 to 1/4 of a tick would be a better delay.
Though I must say it did look like a pretty trippy effect so maybe I'll think of a better use for it.
I added an extra dithering/fog-of-war layer to obscure exterior areas while indoors. Also, I'm slowly and clumsily drawing real maptiles; feast your eyes.
Here's the updated .hss script, feel free to use it, include it, make edits however you see fit:
#***********************
#* Cutaway view toggle *
#***********************
# Use the following layers in this order:
# - Map layer 0: base background
# - Map layer 1: exterior view background
# - Walkabout/NPC layer
# - Map layer 2: interior view foreground
# - Map layer 3: exterior view foreground
# - Map Layer 4: interior view dithering/fog-of-war
# Then, place a step-on NPC with 'hide exterior' at the first step going into a building,
# and 'show exterior' at the first step going outside a building (e.g. the doorstep)
# Also, disable Map Layers 2 & 4 in the map editor if the map starts in an exterior view area.
# This prevents the interior foreground layer from being shown on top of the exterior background layer
# before the hide/show scripts get a chance to display the proper layers.
include, plotscr.hsd
plotscript, hide exterior, begin
set slice visible(lookup slice(sl:map layer1), off) #-Turns off the exterior background layer
set slice visible(lookup slice(sl:map layer3), off) #-Turns off the exterior foreground layer
set slice visible(lookup slice(sl:map layer2), on) #-Turns on the interior foreground layer
set slice visible(lookup slice(sl:map layer4), on) #-Turns on the dithering/FOW layer
end
plotscript, show exterior, begin
set slice visible(lookup slice(sl:map layer1), on) #-Turns on the exterior background layer
set slice visible(lookup slice(sl:map layer3), on) #-Turns on the exterior foreground layer
set slice visible(lookup slice(sl:map layer2), off) #-Turns off the interior foreground layer
set slice visible(lookup slice(sl:map layer4), off) #-Turns off the dithering/FOW layer
end