SCHG How-to

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 "")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
(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:


	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:

	move.b	#$10,(Sidekick).w ; load Obj10 (special stage Tails)
SCHG How-To Guide: Sonic the Hedgehog 2 (16-bit)
Fixing Bugs
Fix Demo Playback | Fix a Race Condition with Pattern Load Cues | Fix Super Sonic Bugs | Use Correct Height When Roll Jumping | Fix Jump Height Bug When Exiting Water | Fix Screen Boundary Spin Dash Bug | Correct Drowning Bugs | Fix Camera Y Position for Tails | Fix Tails Subanimation Error | Fix Tails' Respawn Speeds | Fix Accidental Deletion of Scattered Rings | Fix Ring Timers | Fix Rexon Crash | Fix Monitor Collision Bug | Fix EHZ Deformation Bug | Correct CPZ Boss Attack Behavior | Fix Bug in ARZ Boss Arrow's Platform Behavior | Fix ARZ Boss Walking on Air Glitch | Fix ARZ Boss Sprite Behavior | Fix Multiple CNZ Boss Bugs | Fix HTZ Background Scrolling Mountains | Fix OOZ Launcher Speed Up Glitch | Fix DEZ Giant Mech Collision Glitch | Fix Boss Deconstruction Behavior | Fix Speed Bugs | Fix 14 Continues Cheat | Fix Debug Mode Crash | Fix 99+ Lives | Fix Sonic 2's Sega Screen
Design Choices
Remove the Air Speed Cap | Disable Floor Collision While Dying | Modify Super Sonic Transformation Methods & Behavior | Enable/Disable Tails in Certain Levels | Collide with Water After Being Hurt | Retain Rings When Returning at a Star Post | Improve the Fade In\Fade Out Progression Routines | Fix Scattered Rings' Underwater Physics | Insert LZ Water Ripple Effect | Restore Lost CPZ Boss Feature | Prevent SCZ Tornado Spin Dash Death | Improve ObjectMove Subroutines | Port S3K Rings Manager | Port S3K Object Manager | Port S3K Priority Manager | Edit Level Order with ASM‎ | Alter Ring Requirements in Special Stages | Make Special Stage Characters Use Normal DPLCs | Speed Up Ring Loss Process | Change spike behaviour in Sonic 2
Adding Features
Create Insta-kill and High Jump Monitors | Create Clone and Special Stage Monitors | Port Knuckles
Sound Features
Expand Music Index to Start at $00 | Port Sonic 1 Sound Driver | Port Sonic 2 Clone Driver | Port Sonic 3 Sound Driver | Port Flamewing's Sonic 3 & Knuckles Sound Driver | Expand the Music Index to Start at $00 (Sonic 2 Clone Driver Version) | Play Different Songs Per Act
Extending the Game
Extend the Level Index Past $10 | Extend the Level Select | Extend Water Tables | Add Extra Characters | Free Up 2 Universal SSTs

|Enable/Disable Tails in certain levels]]