Actions

SCHG

Sonic Adventure DX: PC/EXE Editing

From Sonic Retro

Revision as of 00:28, 4 November 2009 by MainMemory (talk | contribs) (Sonic's Actions: Straight from SADXTweaker)

Template:SCHG SADX:PC

Note: There are multiple versions of SADXPC. Addresses in sonic.exe may not work for your version. Make sure the values given match your exe before editing it! Addresses that only work for the US version will be marked with US. Addresses that only work for the European version will be marked with EU. These have not been tested with the Japanese version.
Note: the cracked version is the same as the European version.
Note: to find these in RAM, add $400000.

Animation Swapping

Sonicretro-round.svg This short section needs expansion. You can help Sonic Retro by adding to it.

Sonic's Animations

Address (US) Address (EU) Description Default(dec.)
917F9 91849 Leaning forwards 7
91807 91857 Leaning back 8
92F1C 92F6C Hurt 23
92F7A Jump Cancel 18
93053 Light Speed Dash 64
94FDC Falling 18
951D3 Rolling 15
95B44 Running 1 12
95B97 Springing 16
95BDA Walking 3 11
95C27 Running 2 13
95C77 Jumping/Spindashing 14
95E2C Walking 2 10
95E46 Walking 1 9
961DB Victory! 75
9675C Drowning 85
97CC0 After Jump Dash 18
97F4B Hurt Landing 24
9BDC1 Dying 87
Metal Sonic
95B3A Running 1 146
95BEB Running 2 13

Tails' Animations

Address (US) Address (EU) Description Default(dec.)
5C0D1 Jumping 14
5EB5C Flying 37

Knuckles' Animations

Address (US) Address (EU) Description Default(dec.)
7694A Jumping 14
7865D Gliding 1 51
786E9 Gliding 2 (used for a second glide without landing) 51
7888E After Gliding 34

Action Swapping

Sonicretro-round.svg This short section needs expansion. You can help Sonic Retro by adding to it.

Sonic's Actions

Address (US) Address (EU) Description Default (dec.)
9ABE5 9AC35 Level Start 1
95063 950B3 Standing 1
94848 94898 After Hurt 1
9A83E 9A88E Walking/Running 2
979A1 979F1 Landing and moving 2
97774 977C4 Landing and moving after rolling 2
96EFA 96F4A Spindash 4
951C0 95210 Rolling 5
93049 93099 Light Speed Dash 6
95F11 95F61 Jumping 8
97CDB 97D2B After Homing Attack 8
94F8F 94FDF Falling After Rolling 8
96001 96051 Vertical Spring 9
96048 96098 Spring 10
92F6A 92FBA Jump Cancel 12
94FD3 95023 Falling 12
97843 97893 After Vertical Spring 12
978D0 97920 After Spring 12
97CB8 97D08 After Jump Dash 12
977B9 97809 Homing Attack/Jump Dash 14
92F12 92F62 Hurt 16
963F5 96445 Ladder 38
95E99 95EE9 Jumping from first Panel 40
98547 98597 Jumping from Panel 40
9849A 984EA Landing on Panel 41
9658D 965DD Frozen 43
92FDC 9302C Light Speed Attack 44
99522 99572 Running down building after falling 46
994B1 99501 Running down building after jumping 46
99393 993E3 Rolling down building 47
96353 963A3 Falling down building 48
9936B 993BB Jumping down building 49
9B47A 9B4CA Hit while running down building 50
9676D 967BD Dying 86
9AA29 9AA79 Debug Mode 87
Super Sonic
9673B 9678B Start 75
9A46D 9A4BD Standing from Moving 75
9A558 9A5A8 Standing from Jumping 75
94E38 94E88 After hitting Perfect Chaos 75
9A404 9A454 Moving 76
9A740 9A790 Landing and Moving 76
9A3AF 9A3FF Jump Cancel 78
9A4AE 9A4FE Falling 78
9A6CE 9A71E After Jump Dash 78
9A60E 9A65E After Springing 78
94D1D 94D6D Springing 79
9A5CD 9A61D Homing Attack 81
9A3D6 9A426 Jumping 82
9A75F 9A7AF After Homing Attack 82
94DFA 94E4A Victory 20
94EC2 94F12 Dying 86

Tails' Actions

Address (US) Address (EU) Description Default (dec.)
6186A 618BA Level Start 1
5CF1F 5CF6F Standing 1
5F7E9 5F839 After Tail Attack 1
5F9B3 5FA03 Walking/Running 2
5C1E3 5C233 Wind Path 3
73C29 73C79 Rolling 4
5C096 5C0E6 Jumping 6
5C19F 5C1EF Springing 8
5CE8B 5CEDB Falling 10
5A84A 5A89A Jump Cancel 10
5C1D2 5C222 Floating 10
5EC97 5ECE7 Downwards Spring 10
5EB54 5EBA4 Flying 15
5C6C8 5C718 After Dash Hoop 15
5D6FA 5D74A Tail Attack 20
5C717 5C767 Dash Hoop 61
5C2EE 5C33E Victory/Loss 62

Physics

Locations

These are indexed by $5154E8 + (Character * $84).

Character Address
Sonic 5154E8
Tails 5155F0
Knuckles 515674
Amy 51577C
Gamma 515800
Big 515884

Offsets

These are in the same locations as in RAM. These are all Floats except Hang Time, which is 4 Bytes, measured in frames.

Offset Description Sonic Tails Knuckles Amy Gamma Big
0 Hang Time 60 60 60 60 60 60
4 Amount of grip on floor 2 1.5 2 1.5 2 2
8 Horizontal Speed Cap 16 16 16 16 16 5
C Vertical Speed Cap 16 16 16 16 16 8
10 Something to do with the maximum speed Sonic can accelerate to on his own? 3 2 2.5 0.05 2.5 1
14  ? 0.6 0.6 0.6 0.5 0.6 0.2
18 Initial Jump Speed 1.66 1.66 1.66 1.3 2 2
1C Spring Control? 3 3 3 3 3 3
20  ? 0.23 0.23 0.23 0.23 0.23 0.23
24 Rolling Cancel Speed 0.46 0.49 0.46 0.46 1 0.32
28 Rolling End Speed 1.39 1.39 1.39 1.39 2 1.39
2C Running 1 Speed 2.3 2.8 3.1 2.3 2.5 2.3
30 Minimum speed to get knocked back when hitting a wall. Also affects pushing speed? 3.7 3.7 3.7 3.7 3.7 3.7
34 Running 2 Speed 5.1 5.1 5.1 5.1 5.1 5.1
38 While jump is held, add this to speed. 0.076 0.076 0.076 0.013 0.09 0.1
3C Ground Acceleration? 0.05 0.06 0.05 0.045 0.06 0.08
40 Air Acceleration 0.031 0.031 0.031 0.031 0.031 0.031
44 Ground Deceleration -0.06 -0.06 -0.06 -0.06 -0.06 -0.08
48 Brake Speed -0.18 -0.18 -0.18 -0.18 -0.25 -0.18
4C Air Brake Speed -0.17 -0.17 -0.17 -0.17 -0.17 -0.17
50 Air Deceleration -0.028 -0.028 -0.028 -0.028 -0.028 -0.028
54 Rolling Deceleration -0.008 -0.008 -0.008 -0.008 -0.008 -0.04
58 Speed to add to normal gravity? -0.01 -0.01 -0.01 -0.01 -0.01 -0.01
5C Speed when Sonic hits something? -0.4 -0.4 -0.4 -0.4 -0.4 -0.4
60 Minimum speed before stopping (affects spindash charging and braking) -0.1 -0.1 -0.1 -0.1 -0.1 -0.1
64 Seems to affect movement on sloped surfaces -0.6 -0.6 -0.6 -0.6 -0.6 -0.6
68 Something related to acceleration on ground? Increase it to accelerate faster. 4 Bytes. -1097817129 -1095971635 -1095971635 -1095971635 -1083808154 -1102263091
6C  ? 0.3 0.3 0.3 0.3 0.3 0.3
70 Ripple Size? 4 3.5 4 3.5 4 9.5
74 Collision Size 10 9 11.4 10 21 17
78 Gravity (Multiplied by Gravity values) 0.08 0.08 0.08 0.04 0.1 0.135
7C Y Offset for camera 7 6 9 7 20 15
80 Y Offset 5.4 4.5 5.7 5 14 8

Other Values

Address (US) Address (EU) Description Default
3E007C Water Multiplication 0.65
9439D 943ED Super Sonic's Rolling Deceleration -0.001
943A7 943F7 Super Sonic's Air Deceleration -0.002
943B1 94401 Super Sonic's Air Acceleration 0.05
943BB 9440B Super Sonic's Y Offset 6.4

Text Editing

Main Article: SCHG:Sonic Adventure DX: PC/EXE Editing/Text Editing

Misc. Code

Sonicretro-round.svg This short section needs expansion. You can help Sonic Retro by adding to it.

This section is for code that doesn't fit into any of the above sections. To disable code, replace it with nop instructions ($90)

Address (US) Address (EU) Bytes ASM Description Result when disabled
13D9E C6 05 40 EF B0 03 00 mov byte ptr [03B0EF40],00 Show the HUD Allow hiding the HUD
25AB0 25B00 66 C7 05 E4 F0 B0 03 00 00 mov word ptr [03B0F0E4],0000 Set rings to 0 when hit Don't lose rings when hit
25B7E 00 1d 34 ef b0 03 add [03b0ef34],bl add change to lives Can't lose or gain lives
25C03 25C53 66 89 0D E4 F0 B0 03 mov [03B0F0E4],ecx Ring collection Collecting rings doesn't add to total. Also disables Super Sonic's ring drain.
25CC0 66 A1 E4 F0 B0 03 mov ax,[03B0F0E4] Copy rings value when hit Always spill 20 rings and can't die when hit
496DD 80 7b 09 06

0f 85 cf 00 00 00

cmp byte ptr [ebx+09],06

jne 497b6

Test if you're playing as E-102 Gamma,

and branch if you aren't

NOP the jne, and everyone can walk on water.

Replace it with a jmp, and nobody can.

Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information