Actions

SCHG How-to

Edit the Level Order in Sonic 2 with ASM

From Sonic Retro

Revision as of 20:21, 7 August 2008 by Malevolence (talk | contribs)

Editing level order for S2 in ASM (Guide by Malevolence)

Well, since a few people have been asking me lately how to edit the level order in ASM, I figure I might as well created a document which may be able to help some of you out there.

First of all, open your asm files and search for Main game level order. For this part, you'll have to know what each zone's ID is, here's a chart:

<z80>$0-Emerald Hill Zone $1-Unused $2-Unused (Wood Zone in Beta) $3-Unused $4-Metropolis Zone acts 1 and 2 $5-Metropolis Zone acts 3 and 4 (4 is unused) $6-Wing Fortress Zone $7-Hill Top Zone $8-Unused (Hidden Palace in Beta) $9-Unused $A-Oil Ocean Zone $B-Mystic Cave Zone $C-Casino Night Zone $D-Chemical Plant Zone $E-Death Egg Zone $F-Aquatic Ruin Zone $10-Sky Chase Zone And $FFFF is the ending</z80>

Okay, so, now go to the main game level order. The zones go in the order above, and there are two acts for every zone. Each act tells which act and zone to go to next. For the first one you have dc.w 1. Think of it as 001. Since this is in Emerald Hill Zone's (act 1) spot, it's telling it where to go after Emerald Hill Zone act 1. 0 is the zone to go to (Emerald Hill Zone) and 01 is the act (act 2). Here is a list of the order with comments of where to go to:

<z80> dc.w 1 ; Emerald Hill Zone act 1 to Emerald Hill Zone (0) act 2 (01) dc.w $D00 ; 1 ; Emerald Hill Zone act 2 to Chemical Plant Zone (D) act 1 (00) dc.w 0 ; 2 ; Unused level to Emerald Hill Zone (0) act 1 (00) (it doesn't matter where it goes, you aren't playing this in the game unless you change it yourself) dc.w 0 ; 3 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w $201 ; 4 ; Unused level (was Wood Zone act 1) to Unused level (Wood Zone) (2) act 2 (01) dc.w $400 ; 5 ; Unused level (was Wood zone act 2) to Metropolis Zone (4) act 1 (00) dc.w 0 ; 6 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w 0 ; 7 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w $401 ; 8 ; Metropolis Zone act 1 to Metropolis Zone (4) act 2 (01) dc.w $500 ; 9 ; Metropolis Zone act 2 to Metropolis Zone (now 5, act 3 uses a different ID because there are two acts per zone ID) act 3 (00, uses a new zone ID, so it's the first act) dc.w $1000 ; 10 ; Metropolis Zone act 3 to SCZ (10) act 1 (00) dc.w 0 ; 11 ; Metropolis Zone act 4 (unused) to Emerald Hill Zone (0) act 1 (00) dc.w $E00 ; 12 ; Wing Fortress Zone act 1 to Death Egg Zone (E) act 1 (00) dc.w 0 ; 13 ; Wing Fortress Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00) dc.w $701 ; 14 ; Hill Top Zone act 1 to Hill Top Zone (7) act 2 (01) dc.w $B00 ; 15 ; Hill Top Zone act 2 to Mystic Cave Zone (B) act 1 (00) dc.w $801 ; 16 ; Unused level (was Hidden Palace Zone act 1) to Unused level (Hidden Palace Zone) (2) act 2 (01) dc.w $A00 ; 17 ; Unused level (was Hidden Palace Zone act 2) to Oil Ocean Zone (A) act 1 (00) dc.w 0 ; 18 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w 0 ; 19 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w $A01 ; 20 ; Oil Ocean Zone act 1 to Oil Ocean Zone (A) act 2 (01) dc.w $400 ; 21 ; Oil Ocean Zone act 2 to Metropolis Zone (4) act 1 (00) dc.w $B01 ; 22 ; Mystic Cave Zone act 1 to Mystic Cave Zone (B) act 2 (01) dc.w $A00 ; 23 ; Mystic Cave Zone act 2 to Oil Ocean Zone (A) act 1 (00) dc.w $C01 ; 24 ; Casino Night Zone act 1 to Casino Night Zone (C) act 2 (01) dc.w $700 ; 25 ; Casino Night Zone act 2 to Hill Top Zone (7) act 1 (00) dc.w $D01 ; 26 ; Chemical Plant Zone act 1 to Chemical Plant Zone (D) act 2 (01) dc.w $F00 ; 27 ; Chemical Plant Zone act 2 to Aquatic Ruin Zone (F) act 1 (00) dc.w $FFFF ; 28 ; Death Egg Zone act 1 to the ending (FFFF) dc.w 0 ; 29 ; Death Egg Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00) dc.w $F01 ; 30 ; Aquatic Ruin Zone act 1 to Aquatic Ruin Zone (F) act 2 (01) dc.w $C00 ; 31 ; Aquatic Ruin Zone act 2 to Casino Night Zone (C) act 1 (00) dc.w $600 ; 32 ; Sky Chase Zone act 1 to Wing Fortress Zone (6) act 1 (00) dc.w 0 ; 33 ; Sky Chase Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00)</z80> It's as simple as that. If you wanted to change something, let's say CPZ act 2 to WFZ act 1, you go to where CPZ act 2 is ($D-CPZ, $D in decimal=13, 13x2=26 (because there are two acts) and then go down one more because it's the second act, so 27) then change $F00 (ARZ normally) to $600, and it'll go to WFZ. Any questions or comments, feel free to contact me.