You know how in a late FE7 chapter, Limstella causes the screen to dim and lightning to appear on the map, nearly hitting your units? This may look familiar.
This can be caused by the _LIGHTNING code, which is _0xDD, but if you want the screen to dim, check this out. This is disassembled straight from the chapter (minus the movement codes that move away your units).
_0xE0 0xFFFFFFFF 0x4 0x80 0x802
_0xD0 0xFFFFFFC0 0xFFFFFFF0 0x42
_0xE0 0xFFFFFFFF 0x4 0x100 0x1004
You can simplify this by using the _LIGHTNING code, which seems to do the same thing as _0xD0.
_0xE0 0xFFFFFFFF 0x4 0x80 0x802 // Screen dims
_LIGHTNING 0xFF 0xFF 0xFF 0xC0 0xFF 0xFF 0xFF 0xF0
_0xE0 0xFFFFFFFF 0x4 0x100 0x1004 // Screen un-dims
This is the final result.
Looks nice, right? (Actually no. I think this one's fade is pixely from the gif compression. It doesn't actually look that chunky. Sorry, but trust me. It looks better in game.)
@Zane has some notes on the coordinate system that the code uses here.
Not using the _0xE1 code at the beginning causes this weird effect.
Not using the first fade code but using the second fade code has no fading occur.
If you don't un-fade, the screen will stay dimmed until you go to another screen, much like not using the _0xE1 code.
I suppose this code is not limited to lightning. If you want a spooky effect in a cutscene, here is is.