Actions

SCHG How-to

Difference between revisions of "Add Extra Characters To Sonic 2"

From Sonic Retro

(Created page with "I was very surprised that this guide didn't exist anywhere else. It seems like nowadays this is the what everybody has in their hacks. This guide will show you how to add extra c…")
 
Line 1: Line 1:
 +
(Guide By [[User:ManicRemix|Manic Remix]])
 +
 +
 
I was very surprised that this guide didn't exist anywhere else. It seems like nowadays this is the what everybody has in their hacks. This guide will show you how to add extra characters to Sonic The Hedgehog 2 16-bit. We will use the SVN Version of Sonic 2 Split Dissembly. In this guide, I will refer to Knuckles, and Amy.  
 
I was very surprised that this guide didn't exist anywhere else. It seems like nowadays this is the what everybody has in their hacks. This guide will show you how to add extra characters to Sonic The Hedgehog 2 16-bit. We will use the SVN Version of Sonic 2 Split Dissembly. In this guide, I will refer to Knuckles, and Amy.  
  

Revision as of 14:36, 27 July 2011

(Guide By Manic Remix)


I was very surprised that this guide didn't exist anywhere else. It seems like nowadays this is the what everybody has in their hacks. This guide will show you how to add extra characters to Sonic The Hedgehog 2 16-bit. We will use the SVN Version of Sonic 2 Split Dissembly. In this guide, I will refer to Knuckles, and Amy.

First, open up s2.asm. Search for "InitPlayers".

You will see: <asm>

       dc.l Obj01	; Sonic

dc.l Obj02 ; Tails dc.l Obj03 ; Collision plane/layer switcher dc.l Obj04 ; Surface of the water dc.l Obj05 ; Tails' tails dc.l Obj06 ; Rotating cylinder in MTZ, twisting spiral pathway in EHZ dc.l Obj07 ; Oil in OOZ dc.l Obj08 ; Water splash in Aquatic Ruin Zone, Spindash dust dc.l Obj09 ; Sonic in Special Stage dc.l Obj0A ; Small bubbles from Sonic's face while underwater... </asm>

And it will go on. Now, search for "dc.l ObjNull". Replace <asm>

       dc.l ObjNull	; Obj4C

dc.l ObjNull ; Obj4D dc.l ObjNull ; Obj4E dc.l ObjNull ; Obj4F </asm>

with

<asm>

       dc.l Obj4C	; Knuckles

dc.l Obj4D ; Amy dc.l ObjNull ; Obj4E dc.l ObjNull ; Obj4F </asm>

You've now create an "Knuckles", and "Amy" object. These will be the object in which will be used to be your new characters.

Next, search for "InitPlayers". You will see: <asm>

       InitPlayers_TailsAlone:

subq.w #1,d0 move.b #2,(MainCharacter).w; load Obj02 Tails object at $FFFFB000 move.b #8,(Tails_Dust).w; load Obj08 Tails' spindash dust/splash object at $FFFFD100 addi.w #4,(MainCharacter+y_pos).w rts </asm>

Below <asm> subq.w #1,d0 </asm>

add <asm> bne.s InitPlayers_KnuxAlone bne.s InitPlayers_AmyAlone </asm>

Now, below the "rts", add <asm>

InitPlayers_KnuxAlone: move.b #$4E,($FFFFB000).w move.b #8,($FFFFD100).w rts

InitPlayers_AmyAlone: move.b #$4E,($FFFFB000).w move.b #8,($FFFFD100).w rts </asm>

Oh No! We made a mistake. We need to replace the $4E with Knuckle's & Amy's object IDs. If you noticed, in tails code you will see: <asm> move.b #2,(MainCharacter).w; load Obj02 Tails object at $FFFFB000</asm>

The "move.b" will tell the code which object to load. Do you see it? by tails "move.b" there was a # sign, followed by a number. This number is tails object ID, since Sonic's object ID is "OBJ01", Tails is "OBJ02". The OBJ0 is removed, and they put a "#2" by tails code, to state his ID. We will do the same with Knuckles and Amy. Since we used "OBJ4C" and "OBJ4D" for Knuckles and Amy, we will put "#4C" for Knuckles, and "#4D" for their "move.b" codes. So, replace Knuckle's "#4E" with "#4C", and Amy's "#4E" with "#4D". Your code should now look like: <asm>

InitPlayers_KnuxAlone: move.b #$4C,($FFFFB000).w move.b #8,($FFFFD100).w rts

InitPlayers_AmyAlone: move.b #$4D,($FFFFB000).w move.b #8,($FFFFD100).w rts </asm>

Next, search for "word_917A", and replace "dc.w $2FF" with "dc.w $4FF". The number you put there will represent the number of characters you have. This is "Sonic", "Tails", "Amy", & "Knuckles".

Now, search for "off_92DE", and below "byte_981C", add "dc.l byte_KTEA", and "dc.l byte_AYRE".

Now search for "byte_981C: dc.b $E,"TAILS ALONE "", and below it add <asm> byte_KTEA: dc.b $E,"KNUCKLES ALONE " byte_AYRE: dc.b $E,"AMY ALONE " </asm>


Congratulations! You have two new characters. Now you will need to make new sprites & palette! And if you want your characters to have new abilities, see SCHG How-to:Work with Objects, and learn how to edit abilities.