Enable/Disable Tails in certain levels
From Sonic Retro
Revision as of 21:28, 28 November 2010 by Andlabs (talk | contribs) (Created page with ":''(Originally posted by User: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...")
- (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:
<asm> 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 </asm>
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:
<asm> cmpi.b #VAL,(Current_Zone).w beq.s return_44BC </asm>
Where VAL is the corresponding level ID where you want to disable Tails. The IDs are as follows, from Nemesis' hacking guide ([1])
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:
<asm> loc_514C: move.b #$10,(Sidekick).w ; load Obj10 (special stage Tails) </asm>
--Tamkis 19:07, 28 November 2010 (CST)