- Messages
- 19
- Location
- Sky Base Zone, South Island
So, I figured I'd kickstart this thread over here, as a place for smaller tutorials that don't really deserve their own posts, mostly just to save thread space. Credit goes to DeltaWooloo for the original thread over on SSRG.
So, let's start with a simple tutorial of mine: changing basic level order in S3&K.
So, S3&K, instead of using an array of level order, does something different, mostly due to how it handles stuff in general.
What it does is call StartNewLevel:
As you can see, StartNewLevel takes an input of d0 for what level it sets up. Now, let's show an example of a basic use of this routine:
This is the general format all branches to StartNewLevel follow: moving the level ID to d0 and then branching.
Now, let's do a general example: Restoring the original level order.
(This example will only work in S3K, for obvious reasons.)
In loc_6E80C, we find the branch to ICZ during the CNZ cannon cutscene:
Simply change #$500 to #$400.
But now we'll just skip to SOZ after CNZ & FBZ! And MHZ still goes to FBZ!
We need to change other branches.
loc_7645E is where MHZ to FBZ takes place:
So, change the value to SOZ: #$800.
And now, to make FBZ go to ICZ.
loc_70938 holds the FBZ to SOZ piece:
Change #$800 to #$500.
And with that, Sonic and Tails play through FBZ after CNZ and Knuckles skips it!
Hopefully that's helpful, and let's see how this iteration of the thread goes.
So, let's start with a simple tutorial of mine: changing basic level order in S3&K.
So, S3&K, instead of using an array of level order, does something different, mostly due to how it handles stuff in general.
What it does is call StartNewLevel:
Code:
StartNewLevel:
move.w d0,(Current_zone_and_act).w
move.w d0,(Apparent_zone_and_act).w
move.w #1,(Restart_level_flag).w
clr.b (Last_star_post_hit).w
clr.b (Special_bonus_entry_flag).w
rts
As you can see, StartNewLevel takes an input of d0 for what level it sets up. Now, let's show an example of a basic use of this routine:
Code:
move.w #$A01,d0
jmp (StartNewLevel).l
This is the general format all branches to StartNewLevel follow: moving the level ID to d0 and then branching.
Now, let's do a general example: Restoring the original level order.
(This example will only work in S3K, for obvious reasons.)
In loc_6E80C, we find the branch to ICZ during the CNZ cannon cutscene:
Code:
move.w #$500,d0
jsr (StartNewLevel).l
jmp (Go_Delete_Sprite_2).l
Simply change #$500 to #$400.
But now we'll just skip to SOZ after CNZ & FBZ! And MHZ still goes to FBZ!
We need to change other branches.
loc_7645E is where MHZ to FBZ takes place:
Code:
loc_7645E:
move.w #$400,d0
jsr (StartNewLevel).l
jmp (Delete_Current_Sprite).l
So, change the value to SOZ: #$800.
And now, to make FBZ go to ICZ.
loc_70938 holds the FBZ to SOZ piece:
Code:
loc_70938:
move.w #$800,d0
jsr (StartNewLevel).l
jmp (Delete_Current_Sprite).l
And with that, Sonic and Tails play through FBZ after CNZ and Knuckles skips it!
Hopefully that's helpful, and let's see how this iteration of the thread goes.