Actions

SCHG How-to

Difference between revisions of "Enable/Disable Tails in certain levels"

From Sonic Retro

(removed signature)
(wikify table)
Line 35: Line 35:
 
Where VAL is the corresponding level ID where you want to disable Tails. The IDs are as follows, from Nemesis' hacking  guide ([http://info.sonicretro.org/SCHG:Nem_s2#Introduction])
 
Where VAL is the corresponding level ID where you want to disable Tails. The IDs are as follows, from Nemesis' hacking  guide ([http://info.sonicretro.org/SCHG:Nem_s2#Introduction])
  
<table border align="center">
+
{|
<tr>
+
|-
  <td>00</td>
+
| 00
  <td>Emerald Hill zone</td>
+
| Emerald Hill Zone
</tr>
+
|-
<tr>
+
| 04
  <td>04</td>
+
| Metropolis Zone
  <td>Metropolis zone</td>
+
|-
<tr>
+
| 05
<td>05</td>
+
| Metropolis Zone Act 3
<td>Metropolis zone act 3</td>
+
|-
</tr>
+
| 06
<tr>
+
| Wing Fortress Zone
<td>06</td>
+
|-
<td>Wing fortress zone</td>
+
| 07
</tr>
+
| Hill Top Zone
<tr>
+
|-
<td>07</td>
+
| 08
<td>Hill Top zone</td>
+
| Hidden Palace Zone
</tr>
+
|-
<tr>
+
| 0A
<td>08</td>
+
| Oil Ocean Zone
<td>Hidden Palace zone</td>
+
|-
</tr>
+
| 0B
<tr>
+
| Mystic Cave Zone
<td>0A</td>
+
|-
<td>Oil Ocean zone</td>
+
| 0C
</tr>
+
| Casino Night Zone
<tr>
+
|-
<td>0B</td>
+
| 0D
<td>Mystic Cave zone</td>
+
| Chemical Plant Zone
</tr>
+
|-
<tr>
+
| 0E
<td>0C</td>
+
| Death Egg Zone
<td>Casino Night zone</td>
+
|-
</tr>
+
| 0F
<tr>
+
| Aquatic Ruin Zone
<td>0D</td>
+
|-
<td>Chemical Plant zone</td>
+
| 10
</tr>
+
| Sky Chase Zone
<tr>
+
|}
<td>0E</td>
 
<td>Death Egg zone</td>
 
</tr>
 
<tr>
 
<td>0F</td>
 
<td>Aquatic Ruin zone</td>
 
</tr>
 
<tr>
 
<td>10</td>
 
<td>Sky Chase zone</td>
 
</tr>
 
</table>
 
  
 
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:
 
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:
Line 95: Line 83:
 
move.b #$10,(Sidekick).w ; load Obj10 (special stage Tails)
 
move.b #$10,(Sidekick).w ; load Obj10 (special stage Tails)
 
</asm>
 
</asm>
 +
 +
--[[User:Tamkis|Tamkis]] 19:07, 28 November 2010 (CST)
  
 
[[Category:SCHG How-tos|Enable/Disable Tails in certain levels]]
 
[[Category:SCHG How-tos|Enable/Disable Tails in certain levels]]

Revision as of 21:35, 28 November 2010

(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)