Difference between revisions of "Sonic Heroes/EXE Editing"
From Sonic Retro
Igorseabra4 (talk | contribs) m (→Start/End Positions) |
Igorseabra4 (talk | contribs) |
||
Line 74: | Line 74: | ||
=== Multiplayer Start Positions === | === Multiplayer Start Positions === | ||
+ | |||
+ | == Splines (incomplete) == | ||
+ | Splines set path data for autoloops, rails, blue tubes for Casino Park and Bingo Highway and probably other path data. The arrays for each level are located in various different places in the EXE. Each spline starts with a list of points (each point is a 0x14 entry) and ends with a header (footer?) with a length of 0x10.<br /> | ||
+ | |||
+ | Some of the splines are actually set backwards (this probably makes no difference, as any path can be followed backwards)<br /> | ||
+ | |||
+ | Grand Metropolis spline data seems to start at around 0x4B4664. Random data for Rail Canyon rails is around 0x3FDC2C. To find a point, grab the XYZ coordinates of the character when stopped at the very edge of a rail and search for them in hex.<br /> | ||
+ | |||
+ | Point entry:<br /> | ||
+ | {{grey|00 00 00 00}} {{cyan|00 00 00 00}} {{red|00 00 00 00}} {{green|00 00 00 00}} {{blue|00 00 00 00}}<br /> | ||
+ | |||
+ | {| class="prettytable" | ||
+ | !Offset||Type||Description | ||
+ | |- | ||
+ | | {{grey|0x00}} | ||
+ | | {{grey|Long}} | ||
+ | | {{grey|Unknown flags}} | ||
+ | |- | ||
+ | | {{cyan|0x04}} | ||
+ | | {{cyan|Float}} | ||
+ | | {{cyan|Distance to next point<br />Last one is 0}} | ||
+ | |- | ||
+ | | {{red|0x08}} | ||
+ | | {{red|Float}} | ||
+ | | {{red|X Position}} | ||
+ | |- | ||
+ | | {{green|0x0C}} | ||
+ | | {{green|Float}} | ||
+ | | {{green|Y Position}} | ||
+ | |- | ||
+ | | {{blue|0x10}} | ||
+ | | {{blue|Float}} | ||
+ | | {{blue|Z Position}} | ||
+ | |} | ||
+ | |||
+ | Header (footer?) entry:<br /> | ||
+ | {{red|00 00}} {{green|00 00}} {{cyan|00 00 00 00}} {{grey|00 00 00 00 00 00 00 00}}<br /> | ||
+ | |||
+ | {| class="prettytable" | ||
+ | !Offset||Type||Description | ||
+ | |- | ||
+ | | {{red|0x00}} | ||
+ | | {{red|Word}} | ||
+ | | {{red|Always 01 00}} | ||
+ | |- | ||
+ | | {{green|0x02}} | ||
+ | | {{green|Word}} | ||
+ | | {{green|Number of points}} | ||
+ | |- | ||
+ | | {{cyan|0x04}} | ||
+ | | {{cyan|Float}} | ||
+ | | {{cyan|Total path length}} | ||
+ | |- | ||
+ | | {{grey|0x0C}} | ||
+ | | {{grey|Unknown}} | ||
+ | | {{grey|Unknown}} | ||
+ | |} | ||
+ | |||
+ | Note: the header doesn't seem to include info for spline type (rail, autoloop etc) | ||
{{SCHGuides}} | {{SCHGuides}} | ||
[[Category:Sonic Community Hacking Guide]] | [[Category:Sonic Community Hacking Guide]] |
Revision as of 20:18, 30 March 2016
SCHG: Sonic Heroes |
---|
Main Article |
Mechanic Editing |
DOL Editing |
Model Editing |
Collision Format Model Format |
Level Editing |
Camera Editing |
Particle Editing |
Particle Editing |
Sound Editing |
Music List |
SCHG How-Tos |
Custom Object Material Effect Tutorial |
The main EXE of the PC game is Tsonic_win.exe. Unlike the game's binary data, the EXE is little endian.
Contents
Start/End Positions
Start Positions
List of single player start positions begins at 0x3C2FC8. Each level array has the first 4 bytes setting the level number at the first byte and five 0x1C entries for the four teams and Super Hard (although the Super Hard entry seems to be ignored, it uses Team Sonic's instead). Note that the level IDs used are not the same ones as the level and object lists, they are the ones used in RAM, for example Seaside Hill is 02
Start position entry:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Offset | Type | Description |
---|---|---|
0x00 | Float | X Position |
0x04 | Float | Y Position |
0x08 | Float | Z Position |
0x0D | Byte | Pitch (direction) |
0x14 | Byte | Mode 00: Normal 01: Running 02: Rail |
0x18 | Word | Hold time Time spent running |
Ending Positions
List of single player ending positions begins at 0x3C45B8. These are the places where each team does their victory animation and the results are displayed, after the mission is finished. Each level array has the first 4 bytes setting the level number at the first byte and five 0x14 entries for the four teams and Super Hard.
End position entry:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Offset | Type | Description |
---|---|---|
0x00 | Float | X Position |
0x04 | Float | Y Position |
0x08 | Float | Z Position |
0x0D | Byte | Camera pitch Angle from which the characters are seen |
0x0E | Word | ? (Always FF FF) |
0x10 | Long | Null |
Multiplayer Start Positions
Splines (incomplete)
Splines set path data for autoloops, rails, blue tubes for Casino Park and Bingo Highway and probably other path data. The arrays for each level are located in various different places in the EXE. Each spline starts with a list of points (each point is a 0x14 entry) and ends with a header (footer?) with a length of 0x10.
Some of the splines are actually set backwards (this probably makes no difference, as any path can be followed backwards)
Grand Metropolis spline data seems to start at around 0x4B4664. Random data for Rail Canyon rails is around 0x3FDC2C. To find a point, grab the XYZ coordinates of the character when stopped at the very edge of a rail and search for them in hex.
Point entry:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Offset | Type | Description |
---|---|---|
0x00 | Long | Unknown flags |
0x04 | Float | Distance to next point Last one is 0 |
0x08 | Float | X Position |
0x0C | Float | Y Position |
0x10 | Float | Z Position |
Header (footer?) entry:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Offset | Type | Description |
---|---|---|
0x00 | Word | Always 01 00 |
0x02 | Word | Number of points |
0x04 | Float | Total path length |
0x0C | Unknown | Unknown |
Note: the header doesn't seem to include info for spline type (rail, autoloop etc)