Actions

SCHG

Sonic Adventure 2/Object Editing

From Sonic Retro

Revision as of 17:38, 6 July 2011 by Morph (talk | contribs) (City Escape (0013))
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).

Note: These lists may be incomplete, inaccurate, or completely wrong.

City Escape (0013)

  • 00 - Ring
  • 01 - Trail of rings?
  • 02 - Ring (possibly another trail of rings)
  • 03 - Spring
  • 04 - Angle able spring
  • 05 - Rectangle spring
  • 06 - Dash ramp
  • 07 - Dash panel
  • 08 - Checkpoint
  • 09 - Switch
  • 0A - ground item box
  • 0B - air item box
  • 0C - balloon item box
  • 0D - upgrade hoop
  • 0E - goal ring
  • 0F - ?
  • 10 - Pulley handel
  • 11 - Black cage
  • 12 - dynamite (tails + eggman shoot)
  • 13 - Wooden box
  • 14 - Steel box
  • 15 - Rocket
  • 16 - Closed rocket platform
  • 17 - thingy that gives hints to knuckles and rouge
  • 18 - Same as above (?)
  • 19 - Homochao - D
  • 1A - see through cylinder
  • 1B - Black solid box
  • 1C - Nothing
  • 1D - Nothing
  • 1E - Pick-me-up skull - D
  • 1F - Same as above
  • 20 - Pipe (whistle)
  • 21 - Small animal
  • 22 - Nothing
  • 23 - Chao box
  • 24 - Nothing
  • 25 - Mystic Melody Alter
  • 26 - Nothing
  • 27 - Nothing
  • 28 - Mystic Melody door (opened by alter)
  • 29 - Nothing
  • 2A - Nothing
  • 2B - Nothing
  • 2C - Nothing
  • 2D - Nothing
  • 2E - collision
  • 2F - collision
  • 30 - Same as above
  • 31 - Same as above
  • 32 - Nothing
  • 33 - shadow of something, wonder what it could be?
  • 34 - Nothing
  • 35 - The sun, very bright, and an actual object apparently
  • 36 - Heavy weight
  • 37 - Spinning balls o_o
  • 38 - GUN Beetle
  • 39 - E-gunner thing
  • 3A - Nothing
  • 3B - Off board sensor
  • 3C - Nothing
  • 3D - Car
  • 3E - Ramp?
  • 3F - Cyldinder platform
  • 40 - Nothing
  • 41 - Horizontal pole flip
  • 42 - Tree
  • 43 - Nothing
  • 44 - Nothing
  • 45 - Nothing
  • 46 - Streetlamp
  • 47 - Nothing
  • 48 - STOP floor sign
  • 49 - Same as above
  • 4A - Chao in space billboard
  • 4B - Recycle bin
  • 4C - Big tree
  • 4D - Nothing
  • 4E - Super parked taxi
  • 4F - Roll-underneath sign
  • 50 - Hedge
  • 51 - Nothing
  • 52 - Nothing
  • 53 - Gate
  • 54 - Longer gate
  • 55 - Big the Cat, lolwut
  • 56 - Sonic pizza billboard
  • 57 - Nothing
  • 58 - Another big tree
  • 59 - Nothing
  • 5A - Nothing
  • 5B - Nothing
  • 5C - Nothing
  • 5D - Golden beetle
  • 5E - Glowing Arrows
  • 5F - Nothing
  • 60 - Nothing
  • 61 - Nothing
  • 62 - Nothing
  • 63 - Nothing
  • 64 - Nothing
  • 65 - Tire -- unused until SA2B
  • 66 - Nothing
  • 67 - !Crash!
  • 68 - Nothing
  • 69 - Nothing
  • 6A - !Crash!
  • 6B -
  • 6C -
  • 6D -
  • 6E -
  • 6F -

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