View changes for revision:                                                                                                                                                                                          
? Switch (107, rev. 53)
By  Red Flying Troopa on 02-15-18, 12:38 am
Category 'Event controllers', known
The Classical "?" bump (a.k.a Switch)
Just Jump on it and with correct settings
and you have a working switch!
==Boss notes==
* When sprite set 16 is set to any of the boss sets, the switch timer plays over the BG music, like in the Mega Goomba boss battle and with Red Rings. Though P Switches and ! Switches are silent with a boss sound set.
* If the ? switch is absent in a Mega Goomba boss battle, the game freezes upon taking the key on a real NDS (not on DeSmuME though). Results are the same every time, if no ? switch is present, the game will freeze upon generation of the key (not even a brick block with ? switch will work). If there are more than 1 ? switch, the game will check for the leftmost switch first, then the bottommost if there are 2 or more switches on the same X coordinate, the one to fulfill this condition is the one to pop. [Source: Sharks]
Data files:
• /obj/I_switch_ncg.bin
• /obj/I_enemy_ncl.bin
• /obj/I_enemy_B_ncl.bin
• /obj/I_enemy_W_ncl.bin
• /obj/I_enemy_R_ncl.bin
Sprite fields:
Triggering event ID: value at nybble 0-1. If not set, the switch will always show. If set, the switch will only show while this event ID is activated. Slightly buggy if used with multiple use as the switch will pop back up immediately, which looks a bit strange and also causes Mario to be pushed into the air. No "real" glitch.
Target event ID: value at nybble 2-3
Settings: list at nybble 4: 0=None,1=Falls,4=Loads at midway,2=Unknown [see note]. If 1, the switch will be movable by environment stuff, such as dropping down when bricks below it are destroyed, or riding along a conveyor belt. If 4, the switch will only show if the level has been started from a midway point. Value 2 is used in 2-3, it may have something to do with the target ID.
Delay on multiple use: list at nybble 5: 0=Instantaneous (no delay),2=Short delay,3=Long delay,1=Very long delay,15=Unknown. [Check this nybble]. This will set how long the switch takes to pop up after the timer expires on a multiple use switch. Value 15 may have something to do with the timer. Maybe it pops up just after target ID is deactivated after activation with timer?
Non-timed event: checkbox at nybble 6 with mask 1
Switch mode: list at nybble 8: 0=Activates target (switches event state),1=Deactivates target (switches event state)
Usage mode: list at nybble 9: 0=Single use,1=Multiple use,2=Unknown
Shift ½ block right: checkbox at nybble 10 with mask 1
Upside down: checkbox at nybble 11 with mask 1. If this is checked, the switch will be facing down. Upside down switches cannot fall.
? Switch (107, rev. 54)
By  Helios on 02-18-18, 06:01 pm
Category 'Event controllers', known
==Boss notes==
* When sprite set 16 is set to any of the boss sets, the switch timer plays over the BG music, like in the Mega Goomba boss battle and with Red Rings. Though P Switches and ! Switches are silent with a boss sound set.
* If the ? switch is absent in a Mega Goomba boss battle, the game freezes upon taking the key on a real NDS (not on DeSmuME though). Results are the same every time, if no ? switch is present, the game will freeze upon generation of the key (not even a brick block with ? switch will work). If there are more than 1 ? switch, the game will check for the leftmost switch first, then the bottommost if there are 2 or more switches on the same X coordinate, the one to fulfill this condition is the one to pop. [Source: Sharks]
Data files:
• /obj/I_switch_ncg.bin
• /obj/I_enemy_ncl.bin
• /obj/I_enemy_B_ncl.bin
• /obj/I_enemy_W_ncl.bin
• /obj/I_enemy_R_ncl.bin
Sprite fields:
Triggering event ID: value at nybble 0-1. If not set, the switch will always show. If set, the switch will only show while this event ID is activated. Slightly buggy if used with multiple use as the switch will pop back up immediately, which looks a bit strange and also causes Mario to be pushed into the air. No "real" glitch.
Target event ID: value at nybble 2-3
Settings: list at nybble 4: 0=None,1=Falls,4=Loads at midway,2=Unknown [see note]. If 1, the switch will be movable by environment stuff, such as dropping down when bricks below it are destroyed, or riding along a conveyor belt. If 4, the switch will only show if the level has been started from a midway point. Value 2 is used in 2-3, it may have something to do with the target ID.
Delay on multiple use: list at nybble 5: 0=Instantaneous (no delay),2=Short delay,3=Long delay,1=Very long delay,15=Unknown. [Check this nybble]. This will set how long the switch takes to pop up after the timer expires on a multiple use switch. Value 15 may have something to do with the timer. Maybe it pops up just after target ID is deactivated after activation with timer?
Non-timed event: checkbox at nybble 6 with mask 1
Switch mode: list at nybble 8: 0=Activates target (switches event state),1=Deactivates target (switches event state)
Usage mode: list at nybble 9: 0=Single use,1=Multiple use,2=Unknown
Shift ½ block right: checkbox at nybble 10 with mask 1
Upside down: checkbox at nybble 11 with mask 1. If this is checked, the switch will be facing down. Upside down switches cannot fall.