Actions

SCHG

Sonic Heroes/Camera Editing

From Sonic Retro

SCHG: Sonic Heroes
Main Article
Mechanic Editing

DOL Editing
EXE Editing
Music Pointers
Object Parameter Data
Relocatable Editing (PC)
File Offsets

Model Editing
Collision Format
Model Format
Level Editing

Camera Editing
Event Editing
ID list
Indirect Editing
Light Editing
Level List
Object Editing
Object Porting
Spline Editing
Texture Animation Editing
Visibility Editing

Particle Editing
Particle Editing
Sound Editing
Music List

Sound Editing
Voices

SCHG How-Tos

Custom Object Material Effect Tutorial
Level Editing Tutorial


Camera layouts are stored in big endian sLL_cam.bin (or stgLL_cam.bin) files, where LL is the level number. On PC and Xbox, they are located in the /dvdroot folder. Heroes Power Plant includes a Camera Editor tools which allows you to preview and edit these files.

File layout

Each camera entry is 0x9C bytes long, and there are 512 entries in each file. Many entries are blank, however, so the stages use less cameras. The 0x9C bytes of each entry are divided into variables which occupy 4 bytes of space, for a total of 39 variables. They are either longs or floats.

Camera Entry

Number Type Description
1 Long Camera Type
2 Long Camera Speed
3 Long Unknown
4 Long Activation Type
5 Long Trigger Type
6 Float Trigger X Position
7 Float Trigger Y Position
8 Float Trigger Z Position
9 Long Trigger X Rotation
10 Long Trigger Y Rotation
11 Long Trigger Z Rotation
12 Float Trigger X Scale
13 Float Trigger Y Scale
14 Float Trigger Z Scale
15 Float Camera X Position
16 Float Camera Y Position
17 Float Camera Z Position
18 Long Camera X Rotation
19 Long Camera Y Rotation
20 Long Camera Z Rotation
21 Float Point A X Position
22 Float Point A Y Position
23 Float Point A Z Position
24 Float Point B X Position
25 Float Point B Y Position
26 Float Point B Z Position
24 Float Point C X Position
25 Float Point C Y Position
26 Float Point C Z Position
30 Long Unknown
31 Long Force
32 Float Offset A X Position
33 Float Offset A Y Position
34 Float Offset B X Position
35 Float Offset B Y Position
36 Long Unknown
37 Long Unknown
38 Long Unknown
39 Long Unknown

Camera Type List

  • 8 - Camera not fixed, looks at player from no specific position
  • 11 - Camera fixed at offset A, looks through player to point A
  • 12 - Camera fixed at Camera Position, looks at player
  • 20 -
  • 21 - Camera starts from Camera Position and moves using point A as a focus reference. Then it moves to point B, using point C as a focus reference. Looks at player
  • 24 - Camera fixed at offset A, looks through player to offset B

Camera Speed List

  • 2 - Camera changes instantly
  • 4 - Camera changes fast
  • 9 - Camera changes smoothly

Activation Type list

  • 0 - Camera is active forever or until overridden by another camera or user input
  • 1 - Camera is active only while player in trigger

Trigger Type list

  • 1 - Plane
    • Trigger width and height is set by scale X and Y. Z should be the area of the plane (X * Y).
  • 2 - Sphere
  • 3 - Cube
    • Scale X, Y and Z set width, height and depth of the area.
  • 4 - Cylinder

Force list

  • 0 - If auto camera, allows player input to move camera from position
  • 1 - If auto camera, player can't move camera until it is deactivated (if this is 1 and activation type is 0, you'll never be able to control the camera yourself again until reaching another camera)

References


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