Semi-solid sprites which can be stepped on. When the Extra Bit is cleared, it will trigger a specific bit of a configurable RAM address, depending on the Extra Byte 1 (the 1st byte in the Extension field in LM) setting. Because of the way the sprite calculates the RAM and bit to write to, you can technically have up to 256 unique Switch Palaces. The Extra Byte 2 (the 2nd Extension byte) determines which of the 8 palettes to use (i.e. 00 = palette 8, 07 = palette F).
If the Extra Bit is set however, only Extra Byte 1 is used and determines which of the default Switch Palace switches to trigger; - x00 - Green Switch - x01 - Yellow Switch - x02 - Blue Switch - x03 - Red Switch Palette for these is determined in the sprite's .ASM file.
Lastly, the important part!: This also comes with a custom ObjecTool "normal" object. When "./objects/SwitchBlocks.asm" is inserted under one of the "CustObjXX" labels and the patch is inserted into your ROM, you can utilize the custom object. With the Extension Field in Lunar Magic, you can have up to 256 objects that change when any of the 256 bits of RAM are triggered.
Please read the enclosed Readme (and check out the screenshots) to see how you can utilize the sprite/object together.
To utilize the custom object, you must use ObjecTool: https://www.smwcentral.net/?p=section&a=details&id=24217
It is also recommended you change the "!RAM_SwitchPalace" variable in ./sprites/BigSwitch.asm and ./objects/SwitchBlocks.asm if you already use these addresses for something else. Preferably, the changed addresses should be loaded and saved to SRAM using an SRAM expansion patch, however the default RAM should normally do so anyways if no patches disable that functionality.
bonus, objectool, switch, switch palace
Though this is a pretty nice sprite, there are unfortunately some issues with it right now:
The first one is that the game crashes when the extra bit is enabled, the corresponding switch is enabled and the switch is about to spawn.
Another reason is the lack of proper GFX since it looks like you have including some foreground graphics and not the switch's graphics...
It also behaves weirdly with Yoshi in the sense that Yoshi gets scared by one. Even if you set the "Don't interact with fireballs/start/etc." bit, you still can enable the switch jump by running over it.
It's also affected by other sprites and can be killed by shells, for examples.
In fact, you could have checked some other CFG settings since the switch also is affected by silver p-switches and the goal.
Suggestion: What about providing the option to open a message when you activate a switch? This may be especially useful for the switches with the extra bit set.
Minor but: You could have used SingleBlockObjects instead of providing your own routine since your included object does the same (i.e. a rectangular object made of one type of tiles), just in a more specialised way.