Actions

SCHG

Difference between revisions of "Sonic Adventure 2/Object Editing"

From Sonic Retro

m (City Escape (0013))
(Object Lists)
Line 56: Line 56:
 
The following are a listing of objects available to be used in levels. The number following the level name is the level number (for example, <tt>0013</tt> is City Escape).
 
The following are a listing of objects available to be used in levels. The number following the level name is the level number (for example, <tt>0013</tt> is City Escape).
  
{{red|Note: These lists may be incomplete, inaccurate, or completely wrong.}}
+
Each object is given by its ID, codename (the verbatim text string from the level file that corresponds to that slot), and where it's known, a readable description of just what that object is. Apart from the first few stages that were created (Green Forest, White Jungle, Pumpkin Hill, Sky Rail, and Aquatic Mine), the team settled into a common scheme for shared objects, so the first 50 or so object IDs will usually be the same across levels.
 +
 
 +
{{red|Note: These lists may be incomplete or inaccurate. If you notice a possible improvement, edit it in!}}
  
 
=== City Escape (0013) ===
 
=== City Escape (0013) ===
*<tt>00</tt> - Ring
+
*<tt>00</tt> - RING: single ring
*<tt>01</tt> - Trail of rings?
+
*<tt>01</tt> - RING_LINEAR: line of rings
*<tt>02</tt> - Ring (possibly another trail of rings)
+
*<tt>02</tt> - RING_CIRCLE: circle of rings
*<tt>03</tt> - Spring
+
*<tt>03</tt> - SPRA: spring
*<tt>04</tt> - Angle able spring
+
*<tt>04</tt> - SPRB: another spring
*<tt>05</tt> - Rectangle spring
+
*<tt>05</tt> - 3SPRING: set of three springs
*<tt>06</tt> - Dash ramp
+
*<tt>06</tt> - BIGJUMP: blast ramp
*<tt>07</tt> - Dash panel
+
*<tt>07</tt> - KASOKU: dash panel
*<tt>08</tt> - Checkpoint
+
*<tt>08</tt> - SAVEPOINT: checkpoint
*<tt>09</tt> - Switch
+
*<tt>09</tt> - SWITCH: ball switch
*<tt>0A</tt> - ground item box
+
*<tt>0A</tt> - ITEMBOX: anchored item box
*<tt>0B</tt> - air item box
+
*<tt>0B</tt> - ITEMBOXAIR: floating item box
*<tt>0C</tt> - balloon item box
+
*<tt>0C</tt> - ITEMBOXBALLOON: item balloon
*<tt>0D</tt> - upgrade hoop
+
*<tt>0D</tt> - LEVUPDAI: upgrade item (Magic Hands)
*<tt>0E</tt> - goal ring
+
*<tt>0E</tt> - GOALRING: goal ring, back ring, lost Chao, or 1-up (depending on mission)
*<tt>0F</tt> - ?
+
*<tt>0F</tt> - EMERALD: hunting item
*<tt>10</tt> - Pulley handel
+
*<tt>10</tt> - UDREEL: pulley
*<tt>11</tt> - Black cage
+
*<tt>11</tt> - ORI: cage
*<tt>12</tt> - dynamite (tails + eggman shoot)
+
*<tt>12</tt> - DYNAMITE: dynamite pack
*<tt>13</tt> - Wooden box
+
*<tt>13</tt> - CONTWOOD: wooden box
*<tt>14</tt> - Steel box
+
*<tt>14</tt> - CONTIRON: metal box
*<tt>15</tt> - Rocket
+
*<tt>15</tt> - ROCKET: rocket
*<tt>16</tt> - Closed rocket platform
+
*<tt>16</tt> - ROCKETMISSSILE: missile launch pad
*<tt>17</tt> - thingy that gives hints to knuckles and rouge
+
*<tt>17</tt> - SCHBOX: hint monitor
*<tt>18</tt> - Same as above (?)
+
*<tt>18</tt> - HINTBOX: ?
*<tt>19</tt> - Homochao - D
+
*<tt>19</tt> - MSGER: Omochao
*<tt>1A</tt> - see through cylinder
+
*<tt>1A</tt> - SSS: ?
*<tt>1B</tt> - Black solid box
+
*<tt>1B</tt> - SOLIDBOX: black box
*<tt>1C</tt> - Nothing
+
*<tt>1C</tt> - DMYOBJ: ?
*<tt>1D</tt> - Nothing
+
*<tt>1D</tt> - SOAP SW: ?
*<tt>1E</tt> - Pick-me-up skull - D
+
*<tt>1E</tt> - SKULL: skull pickup
*<tt>1F</tt> - Same as above
+
*<tt>1F</tt> - PSKULL: immovable skull
*<tt>20</tt> - Pipe (whistle)
+
*<tt>20</tt> - CHAOPIPE: pipe with small animal
*<tt>21</tt> - Small animal
+
*<tt>21</tt> - MINIMAL: small animal
*<tt>22</tt> - Nothing
+
*<tt>22</tt> - WSMMLS: ?
*<tt>23</tt> - Chao box
+
*<tt>23</tt> - CONTCHAO: Chao box
*<tt>24</tt> - Nothing
+
*<tt>24</tt> - STOPLSD: ?
*<tt>25</tt> - Mystic Melody Alter
+
*<tt>25</tt> - KNUDAI: mystic shrine
*<tt>26</tt> - Nothing
+
*<tt>26</tt> - KDASIBA: shrine-activated mystic platform
*<tt>27</tt> - Nothing
+
*<tt>27</tt> - KDWARPHOLE: shrine-activated mystic warp
*<tt>28</tt> - Mystic Melody door (opened by alter)
+
*<tt>28</tt> - KDDOOR: shrine-activated mystic door
*<tt>29</tt> - Nothing
+
*<tt>29</tt> - KDITEMBOX: shrine-activated item box
*<tt>2A</tt> - Nothing
+
*<tt>2A</tt> - KDDRNGL: shrine-activated line of rings
*<tt>2B</tt> - Nothing
+
*<tt>2B</tt> - KDDRNGC: shrine-activated circle of rings
*<tt>2C</tt> - Nothing
+
*<tt>2C</tt> - KDSPRING: shrine-activated spring
*<tt>2D</tt> - Nothing
+
*<tt>2D</tt> - KDSPRINGB: another shrine-activated spring
*<tt>2E</tt> - collision
+
*<tt>2E</tt> - SPHERE: spherical repulsive collision sector
*<tt>2F</tt> - collision
+
*<tt>2F</tt> - CCYL: cylindrical repulsive collision sector
*<tt>30</tt> - Same as above
+
*<tt>30</tt> - CCUBE: orthogonal repulsive collision sector
*<tt>31</tt> - Same as above
+
*<tt>31</tt> - CWALL: orthogonal repulsive collision polygon
*<tt>32</tt> - Nothing
+
*<tt>32</tt> - CCIRCLE: circular repulsive collision polygon
*<tt>33</tt> - shadow of something, wonder what it could be?
+
*<tt>33</tt> - MODMOD: ?
*<tt>34</tt> - Nothing
+
*<tt>34</tt> - EFFOBJ0: ?
*<tt>35</tt> - The sun, very bright, and an actual object apparently
+
*<tt>35</tt> - EFFLENSF: lens flare
*<tt>36</tt> - Heavy weight
+
*<tt>36</tt> - BUNCHIN: moving weight
*<tt>37</tt> - Spinning balls o_o
+
*<tt>37</tt> - IRONBALL2: rotating spike balls
*<tt>38</tt> - GUN Beetle
+
*<tt>38</tt> - E KUMI: beetle enemy
*<tt>39</tt> - E-gunner thing
+
*<tt>39</tt> - E AI: hunter enemy
*<tt>3A</tt> - Nothing
+
*<tt>3A</tt> - LIGHT SW: ?
*<tt>3B</tt> - Off board sensor
+
*<tt>3B</tt> - BOARDCOL: board on/off trigger
*<tt>3C</tt> - Nothing
+
*<tt>3C</tt> - CARMAN: moving car
*<tt>3D</tt> - Car
+
*<tt>3D</tt> - CARKAZ: stationary car
*<tt>3E</tt> - Ramp?
+
*<tt>3E</tt> - TJUMPDAI: trick ramp
*<tt>3F</tt> - Cyldinder platform
+
*<tt>3F</tt> - HAMMER: bobbing hexagon pillar
*<tt>40</tt> - Nothing
+
*<tt>40</tt> - TRUCK: truck appearance trigger
*<tt>41</tt> - Horizontal pole flip
+
*<tt>41</tt> - IRONBAR: pole swing
*<tt>42</tt> - Tree
+
*<tt>42</tt> - TREEST: tree
*<tt>43</tt> - Nothing
+
*<tt>43</tt> - SWDRNGL: switch-activated line of rings
*<tt>44</tt> - Nothing
+
*<tt>44</tt> - SWDRNGC: switch-activated circle of rings
*<tt>45</tt> - Nothing
+
*<tt>45</tt> - TREESHADOWS:
*<tt>46</tt> - Streetlamp
+
*<tt>46</tt> - LAMP: decorative lamp
*<tt>47</tt> - Nothing
+
*<tt>47</tt> - CARMANC: moving car
*<tt>48</tt> - STOP floor sign
+
*<tt>48</tt> - SIGNS: ?
*<tt>49</tt> - Same as above
+
*<tt>49</tt> - SIGNS_F: ?
*<tt>4A</tt> - Chao in space billboard
+
*<tt>4A</tt> - SBLG: ?
*<tt>4B</tt> - Recycle bin
+
*<tt>4B</tt> - ROADOBJ: ?
*<tt>4C</tt> - Big tree
+
*<tt>4C</tt> - PALM: palm tree
*<tt>4D</tt> - Nothing
+
*<tt>4D</tt> - BOARD: board initial position
*<tt>4E</tt> - Super parked taxi
+
*<tt>4E</tt> - CARKAZ_S: stationary car
*<tt>4F</tt> - Roll-underneath sign
+
*<tt>4F</tt> - SLIDER: somersault barrier
*<tt>50</tt> - Hedge
+
*<tt>50</tt> - GREEN_B: green bush
*<tt>51</tt> - Nothing
+
*<tt>51</tt> - ADXCHG: music change trigger
*<tt>52</tt> - Nothing
+
*<tt>52</tt> - BAR: ?
*<tt>53</tt> - Gate
+
*<tt>53</tt> - FENCES: small fence
*<tt>54</tt> - Longer gate
+
*<tt>54</tt> - FENCEL: large fence
*<tt>55</tt> - Big the Cat, lolwut
+
*<tt>55</tt> - BIG THE CAT: self-explanatory
*<tt>56</tt> - Sonic pizza billboard
+
*<tt>56</tt> - SIGNBOARD: billboard
*<tt>57</tt> - Nothing
+
*<tt>57</tt> - POSTER: poster
*<tt>58</tt> - Another big tree
+
*<tt>58</tt> - TREESTNB: tree
*<tt>59</tt> - Nothing
+
*<tt>59</tt> - POSTER3: poster
*<tt>5A</tt> - Nothing
+
*<tt>5A</tt> - LINKLINK: trick point delimiter
*<tt>5B</tt> - Nothing
+
*<tt>5B</tt> - E PATH: moving beetle enemy
*<tt>5C</tt> - Nothing
+
*<tt>5C</tt> - GUIDANCE: arrow guidance barrier
*<tt>5D</tt> - Golden beetle
+
*<tt>5D</tt> - E GOLD: gold beetle
*<tt>5E</tt> - Glowing Arrows
+
*<tt>5E</tt> - SARROW: ?
*<tt>5F</tt> - Nothing
+
*<tt>5F</tt> - TRBACK: ?
*<tt>60</tt> - Nothing
+
*<tt>60</tt> - CARMAN_NEAR: moving car
*<tt>61</tt> - Nothing
+
*<tt>61</tt> - SE_PATCAR: police siren
*<tt>62</tt> - Nothing
+
*<tt>62</tt> - SE_KAZE: ?
*<tt>63</tt> - Nothing
+
*<tt>63</tt> - POSTERM: poster
*<tt>64</tt> - Nothing
+
*<tt>64</tt> - NOINPCOL: input-disabling sector
*<tt>65</tt> - Tire -- unused until SA2B
+
*<tt>65</tt> - PIC: stage projectile (tire)
*<tt>66</tt> - Nothing
 
*<tt>67</tt> - !Crash!
 
*<tt>68</tt> - Nothing
 
*<tt>69</tt> - Nothing
 
*<tt>6A</tt> - !Crash!
 
*<tt>6B</tt> -
 
*<tt>6C</tt> -
 
*<tt>6D</tt> -
 
*<tt>6E</tt> -
 
*<tt>6F</tt> -
 
  
 
==Programs==
 
==Programs==

Revision as of 05:48, 18 September 2011

SCHG: Sonic Adventure 2
Dreamcast
GameCube
PC


Level layouts are stored as .bin files.
For the Dreamcast version, they are in the /SONIC2 directory of the disc.
For the GameCube version, they are in the root of the disc.
Note: In the Gamecube version, these files are in big endian byte order! You'll need to convert them with SETswitch if you want to edit them with a program other than a hex editor, then convert them again before putting them back in the game.

File Name Layout

Level object files for levels 59 and under are always in the same format:

SETLLLL(_SS)(_C).BIN

Where LLLL is the level number, SS (optional) is the mode, and C (optional) is unknown. See below for usable values.

Listing of Levels

  • 0000 - Test Level
  • 0013 - City Escape

Modes

  • 2P - 2 Player
  • HD - Hard Mode

Examples

  • SET0013_HD_S.BIN - City Escape Hard Mode

NOTE: If there is no file for a certain character in a level, it will load Sonic's file by default. If there is no file for Sonic, then no objects will be loaded. This can be corrected, though. Simply copy the appropriate file and rename it accordingly and the objects will appear in the level with that character.

The Object Format

Header

Every file starts with a 32 byte (20 in hex) header in the following format, where red is an unsigned integer containing the total amount of objects in the level.

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 00 00 00 00

(If you ever forget the amount of objects, take the offset of the very last object, divide in hex by 20, and convert to decimal.)

Body

Objects are defined after the header in the following format:

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 00 00 00 00
  • The first byte, and part of the next byte are an unsigned short for the object type. You can find what value corresponds to each object here.
  • This determines the lowest clipping level the object can appear on. 0 = Low (always), 1 = Normal, 2 = High
  • This unsigned short is the X rotation of the object in BAMS (Binary Angle Measurement System).
  • This unsigned short is the Y rotation of the object in BAMS.
  • This unsigned short is the Z rotation of the object in BAMS.
    • Note: To convert from degrees to BAMS: (degrees * 182) = BAMS.
  • This float is the X position of the object.
  • This float is the Y position of the object.
  • This float is the Z position of the object.
  • This float is the object's first property.
  • This float is the object's second property.
  • This float is the object's third property.

Special Objects

Object Lists

The following are a listing of objects available to be used in levels. The number following the level name is the level number (for example, 0013 is City Escape).

Each object is given by its ID, codename (the verbatim text string from the level file that corresponds to that slot), and where it's known, a readable description of just what that object is. Apart from the first few stages that were created (Green Forest, White Jungle, Pumpkin Hill, Sky Rail, and Aquatic Mine), the team settled into a common scheme for shared objects, so the first 50 or so object IDs will usually be the same across levels.

Note: These lists may be incomplete or inaccurate. If you notice a possible improvement, edit it in!

City Escape (0013)

  • 00 - RING: single ring
  • 01 - RING_LINEAR: line of rings
  • 02 - RING_CIRCLE: circle of rings
  • 03 - SPRA: spring
  • 04 - SPRB: another spring
  • 05 - 3SPRING: set of three springs
  • 06 - BIGJUMP: blast ramp
  • 07 - KASOKU: dash panel
  • 08 - SAVEPOINT: checkpoint
  • 09 - SWITCH: ball switch
  • 0A - ITEMBOX: anchored item box
  • 0B - ITEMBOXAIR: floating item box
  • 0C - ITEMBOXBALLOON: item balloon
  • 0D - LEVUPDAI: upgrade item (Magic Hands)
  • 0E - GOALRING: goal ring, back ring, lost Chao, or 1-up (depending on mission)
  • 0F - EMERALD: hunting item
  • 10 - UDREEL: pulley
  • 11 - ORI: cage
  • 12 - DYNAMITE: dynamite pack
  • 13 - CONTWOOD: wooden box
  • 14 - CONTIRON: metal box
  • 15 - ROCKET: rocket
  • 16 - ROCKETMISSSILE: missile launch pad
  • 17 - SCHBOX: hint monitor
  • 18 - HINTBOX: ?
  • 19 - MSGER: Omochao
  • 1A - SSS: ?
  • 1B - SOLIDBOX: black box
  • 1C - DMYOBJ: ?
  • 1D - SOAP SW: ?
  • 1E - SKULL: skull pickup
  • 1F - PSKULL: immovable skull
  • 20 - CHAOPIPE: pipe with small animal
  • 21 - MINIMAL: small animal
  • 22 - WSMMLS: ?
  • 23 - CONTCHAO: Chao box
  • 24 - STOPLSD: ?
  • 25 - KNUDAI: mystic shrine
  • 26 - KDASIBA: shrine-activated mystic platform
  • 27 - KDWARPHOLE: shrine-activated mystic warp
  • 28 - KDDOOR: shrine-activated mystic door
  • 29 - KDITEMBOX: shrine-activated item box
  • 2A - KDDRNGL: shrine-activated line of rings
  • 2B - KDDRNGC: shrine-activated circle of rings
  • 2C - KDSPRING: shrine-activated spring
  • 2D - KDSPRINGB: another shrine-activated spring
  • 2E - SPHERE: spherical repulsive collision sector
  • 2F - CCYL: cylindrical repulsive collision sector
  • 30 - CCUBE: orthogonal repulsive collision sector
  • 31 - CWALL: orthogonal repulsive collision polygon
  • 32 - CCIRCLE: circular repulsive collision polygon
  • 33 - MODMOD: ?
  • 34 - EFFOBJ0: ?
  • 35 - EFFLENSF: lens flare
  • 36 - BUNCHIN: moving weight
  • 37 - IRONBALL2: rotating spike balls
  • 38 - E KUMI: beetle enemy
  • 39 - E AI: hunter enemy
  • 3A - LIGHT SW: ?
  • 3B - BOARDCOL: board on/off trigger
  • 3C - CARMAN: moving car
  • 3D - CARKAZ: stationary car
  • 3E - TJUMPDAI: trick ramp
  • 3F - HAMMER: bobbing hexagon pillar
  • 40 - TRUCK: truck appearance trigger
  • 41 - IRONBAR: pole swing
  • 42 - TREEST: tree
  • 43 - SWDRNGL: switch-activated line of rings
  • 44 - SWDRNGC: switch-activated circle of rings
  • 45 - TREESHADOWS:
  • 46 - LAMP: decorative lamp
  • 47 - CARMANC: moving car
  • 48 - SIGNS: ?
  • 49 - SIGNS_F: ?
  • 4A - SBLG: ?
  • 4B - ROADOBJ: ?
  • 4C - PALM: palm tree
  • 4D - BOARD: board initial position
  • 4E - CARKAZ_S: stationary car
  • 4F - SLIDER: somersault barrier
  • 50 - GREEN_B: green bush
  • 51 - ADXCHG: music change trigger
  • 52 - BAR: ?
  • 53 - FENCES: small fence
  • 54 - FENCEL: large fence
  • 55 - BIG THE CAT: self-explanatory
  • 56 - SIGNBOARD: billboard
  • 57 - POSTER: poster
  • 58 - TREESTNB: tree
  • 59 - POSTER3: poster
  • 5A - LINKLINK: trick point delimiter
  • 5B - E PATH: moving beetle enemy
  • 5C - GUIDANCE: arrow guidance barrier
  • 5D - E GOLD: gold beetle
  • 5E - SARROW: ?
  • 5F - TRBACK: ?
  • 60 - CARMAN_NEAR: moving car
  • 61 - SE_PATCAR: police siren
  • 62 - SE_KAZE: ?
  • 63 - POSTERM: poster
  • 64 - NOINPCOL: input-disabling sector
  • 65 - PIC: stage projectile (tire)

Programs

If all that stuff above confuses you, there are two programs for editing objects.

DXEdit

Main Article: DXEdit

This is a simple tool that allows you to edit objects in a numerical format.

SETedit

Main Article: SETedit

This tool allows you to see names for objects, get position data from a running copy of the game, and has a simple preview window.

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