Enable/Disable Tails in certain levels
From Sonic Retro
Revision as of 11:11, 25 August 2018 by Black Squirrel (talk | contribs) (Text replacement - "\[\[Category:SCHG How-tos.*" to "")
- (Originally posted by Tamkis)
This is a really, really simple Sonic 2 how-to to help people enable Tails in any level (such as and including Death egg zone) or disable him in a level. For my purposes, we will use the S2 Xenowhirl disasm. Since you are reading this guide, I am assuming that you have already splitted your Sonic 2 rom, so first, let's open the s2.asm file. In the file, goto label "sub_446E" or "InitPlayers". Under here, you will find the following code:
InitPlayers:
move.w (Player_mode).w,d0
bne.s InitPlayers_Alone ; branch if this isn't a Sonic and Tails game
move.b #1,(MainCharacter).w ; load Obj01 Sonic object at $FFFFB000
move.b #8,(Sonic_Dust).w ; load Obj08 Sonic's spindash dust/splash object at $FFFFD100
cmpi.b #6,(Current_Zone).w
beq.s return_44BC ; skip loading Tails if this is WFZ
cmpi.b #$E,(Current_Zone).w
beq.s return_44BC ; skip loading Tails if this is DEZ
cmpi.b #$10,(Current_Zone).w
beq.s return_44BC ; skip loading Tails if this is SCZ''
move.b #2,(Sidekick).w ; load Obj02 Tails object at $FFFFB040
move.w (MainCharacter+x_pos).w,(Sidekick+x_pos).w
move.w (MainCharacter+y_pos).w,(Sidekick+y_pos).w
subi.w #$20,(Sidekick+x_pos).w
addi.w #4,(Sidekick+y_pos).w
move.b #8,(Tails_Dust).w ; load Obj08 Tails' spindash dust/splash object at $FFFFD140
To enable Tails in WFZ, DEZ, or SCZ, simply comment out the appropiate cmpi.b and beq.s pair at the lines with the comment "skip loading Tails if this is ___". To disable tails in any level, insert before or after those "skip loading Tails" lines:
cmpi.b #VAL,(Current_Zone).w
beq.s return_44BC
Where VAL is the corresponding level ID where you want to disable Tails. The IDs are as follows, from Nemesis' hacking guide
00 | Emerald Hill Zone |
04 | Metropolis Zone |
05 | Metropolis Zone Act 3 |
06 | Wing Fortress Zone |
07 | Hill Top Zone |
08 | Hidden Palace Zone |
0A | Oil Ocean Zone |
0B | Mystic Cave Zone |
0C | Casino Night Zone |
0D | Chemical Plant Zone |
0E | Death Egg Zone |
0F | Aquatic Ruin Zone |
10 | Sky Chase Zone |
Also, if you want to disable Tails from Special stages in a Sonic & Tails game, goto and comment out the line underneath the label loc_514C:
loc_514C:
move.b #$10,(Sidekick).w ; load Obj10 (special stage Tails)
|Enable/Disable Tails in certain levels]]