Jump to content

Map and Scene Formats


Gump
 Share

Recommended Posts

If a better place is made for this, please move this.

 

Map Format

 

--HEADER--

--optional--

18000000 03xxxxxx: Start of multi-mesh set; x denotes the local offset where all other mesh definitions are

--end optional--

16000000 000000xx: Start of a mesh set; x specifies echo level (0 none, 1 faint, 4 typical, do not exceed F; does not disable reverb)

08xx0000: xx specifies the number of object sets that exist (00 implies 1)

00000002: Unknown

12000000 01010000: Skybox controls

bb--

00: Skybox enabled; clouds and all panoramic backgrounds will appear

01: Skybox disabled; clouds will not appear, only specific backgrounds supported

10000000 xxxxyy00: Time control

x: Starting time (see Time Modifier)

y: Speed at which time moves (signed value; default is 0A

0A000000 03xxxxxx: Start of mesh data; x is local offset to the mesh data header

0Bxx0000 03yyyyyy: x specifies the number of groups, y is local offset to groups list

01xx0000 03yyyyyy: x specifies the number of actors, y is the local offset to actors list

14000000: Signals end of header

 

--GROUPS LIST--

aaaabbbb ccccdddd....

Each 16-bit block represents one group. List each group consecutively. Group 1 is implied and should not be listed. There are no terminators or other values that should be included in the list.

 

--ACTORS LIST--

aaaaxxxx yyyyzzzz ppppwwww rrrrvvvv

-repeat for each actor-

a = Actor number

x = Position on x-axis

y = Position on y-axis

z = Position on z-axis

p = Rotation around x-axis

w = Rotation around y-axis

r = Rotation around z-axis

v = 16-bit initialization variable sent to actor

 

--MESH DATA HEADER--

02xx0000 03yyyyyy: x specifies number of meshes to load, y is local offset to first mesh data definition

03xxxxxx: x specifies local offset to the end of mesh data header

--repetition starts here--

aaaawwww hhhhllll: a is confinement angle for regular mesh (not sure how it works); w, h, and l are half the width, height, and length of the segment blocks containing the mesh (block forms at the local origin)

03xxxxxx 03yyyyyy: x is the local offset for the mesh display list; y is the local offset for the secondary display list (appears when Link leaves the segment; set 32-bit word to 0's if unused)

--repetition ends here--

01000000: Signals end of header

 

--VERTEX DATA--

xxxxyyyy zzzz0000 uuuuvvvv rrggbbaa

--repeat for each vertex; do not exceed 64 per grouping--

x = Position on x-axis

y = Position on y-axis

z = Position on z-axis

u = Texture x-axis coordinate

v = Texture y-axis coordinate

r = Red channel (if vertex blending is enabled; otherwise ignored)

g = Green channel (if vertex blending is enabled; otherwise ignored)

b = Blue channel (if vertex blending is enabled; otherwise ignored)

a = Alpha channel (if vertex blending is enabled; otherwise ignored)

 

--MESH DATA--

D7: Texture scaling (FFFF FFFF = 1,1; this command will only shrink textures and cannot make them larger)

F5tt00t0 070y8x00: t specifies texture type, x specifies texture property along x-axis, y specifies texture property along y-axis

t-- (third t is ignored by the game)

00: 4-bit RGBA

08: 8-bit RGBA (rare?)

10: 16-bit RGBA

20: 4-bit YUV (rare)

28: 8-bit YUV (rare)

30: 16-bit YUV (rare)

40: 4-bit CI

48: 8-bit CI

50: 16-bit CI

60: 4-bit IA

68: 8-bit IA

70: 16-bit IA

80: 4-bit I

88: 8-bit I

90: 16-bit I

x--

0: Wrap

1: Mirror

2: Clamp

y--

1: Wrap

5: Mirror

9: Clamp

F3000000 070yyxx0: Texture size; x specifies width (function coming soon), y specifies height (function coming soon)

F2000000 0xxx0yyy: Texture clipping; x and y are both 12-bit floats with two heximal points, 31.0 being normal

C8xxxxxx yyyyyyyy: Z-buffering related, maybe?

FA000000 rrggbbaa: Channel-specific texture brightness (00 means channel is disabled, FF means channel is fully used)

01bbbbvv 03xxxxxx: Loads b bytes of v / 2 - 1 vertices (ex. v = 08 with three vertices)

06aabbcc 00ddeeff: Defines two polygons using vertices (a, b, c) and (d, e, f) (order determines normal direction)

05aabbcc: Defines a single polygon using vertices (a, b, c) (order determines normal direction)

FB000000 rrggbbaa: Environment color

F9000000 rrggbbaa: Blend color

F8000000 rrggbbaa: Fog color

 

05aabbcc 00000000: Triangle 1

06aabbcc 00ddeeff: Triangle 2

 

Scene Format

 

15xx0000 000013yy: Signifies start of a scene; x specifies reverb (see echo values), y specifies background music to play

04xx0000 02yyyyyy: x specifies number of maps, y is the offset to the list of their definitions

0Exx0000 02yyyyyy: x specifies number of scene actors (not counting Link), y is the offset to the start of the scene actors

19000000 00000000:

03000000 02xxxxxx: Offset to collision vertices header

06000000 02xxxxxx: x is the offset to the end of the maps definition list

07020000 00000003: Has to do with buffers, I think. Leave as is.

0D000000 02######: Sometimes required for the map to work and collision, but not always; seems to ignore whatever's in the offset

00020000 02xxxxxx: Pointer to Link's position and rotation

11000000 bb000s00: Skybox settings

bb-- Background (Note: Skies and certain backdrops will not appear if disabled by the map file)

00: Skybox is black/disabled

01: Skybox is environment color (or blue skies)

02: Hylian Bazaar

03: Skybox is environment color, I think (or dark and cloudy, no skybox rotation)

04: Crashes/Market Ruins

05: Same as 03 (or dark and cloudy but offset so it doesn't depend on having a ground plane, skybox rotates quickly)

06: Same as 03, possibly lighter? (or mildly pink)

07: Crashes/Link's House

08: Same as 03 (same as 06)

09: Crashes/Market

0A: Crashes/Market (Night)

0B: Happy Mask Shop; two sides of the skybox contain corrupt textures

0C: Crashes/Know-It-All Brothers' House

0D: Same as 03

0E: Kokiri Twins' House; all sides except back are visible, which is typical

0F: Crashes/Stable (no pun intended)

10: Crashes/Stew Lady's House

11: Kokiri Shop

12: Same as 03

13: Goron Shop

14: Zora Shop

15: Same as 03

16: Kakariko Potions Shop

17: Hylian Potions Shop

18: Bomb Shop

19: Same as 03

1A: Crashes/Dog Lady's House

1B: Crashes/Impa's House

1C: Gerudo Tent

1D: Similar to 03, but the color is brighter (or a bluish gray)

1E: Same as 03

1F: Same as 03

20: Mido's House

21: Saria's House

22: Dog Guy's House

23+: Same as 03

s-- Time of day affects shading of textures

0: Outside/Enabled

1+: Inside/Disabled

13000000 02xxxxxx: Pointer to exit definitions

0F040000 02xxxxxx: End of exit definitions

14000000 00000000: Signals end of header

 

--MAP DEFINITIONS--

xxxxxxxx yyyyyyyy

--repeats per map--

x = Starting ROM offset for map file

y = Ending ROM offset for map file

 

--SCENE ACTORS--

INFO: Scene actors change the room that is loaded. That's the only purpose they serve here.

ffmmbbnn aaaaxxxx yyyyzzzz wwwwvvvv

--repeats per actor--

f = Room to switch to when triggered from the front of the object (for doors, the front has the knob on the right)

m = How the camera reacts during the front transition (effects depend on actor, best to experiment; recommended are 0, 0F, and FF)

b = Room to switch to when triggered from the back of the object

n = How the camera reacts during the back transition

a = Actor Number (all must belong to group 1)

x = Position along x-axis

y = Position along y-axis

z = Position along z-axis

w = Yaw rotation (0 = 0°, 2000 = 45°CCW, 4000 = 90°CCW, 6000 = 135°CCW, 8000 = 180°, A000 = 225°CCW, C000 = 270°CCW, E000 = 315°CCW)

v = 16-bit initialization variable for actor

 

--COLLISION VERTEX HEADER--

bbbbcccc ddddeeee ffffgggg vvvv0000 02aaaaaa pppp0000 02llllll 02tttttt 02000484

b = Absolute minimum along the x-axis for collision vertices

c = Absolute minimum along the y-axis for collision vertices

d = Absolute minimum along the z-axis for collision vertices

e = Absolute maximum along the x-axis for collision vertices

f = Absolute maximum along the y-axis for collision vertices

g = Absolute maximum along the z-axis for collision vertices

v = Number of vertices to load

a = Offset to first vertex in the array

p = Number of polygons to load

l = Offset to polygon definitions

t = Offset to polygon type definitions

 

--VERTEX ARRAY--

xxxxyyyy zzzz

--repeats for each vertex--

x = Position along x-axis

y = Position along y-axis

z = Position along z-axis

 

--POLYGON DEFINITIONS--

ttttaaaa bbbbcccc xxxxyyyy zzzzpppp

t = Polygon type

a = First vertex

b = Second vertex

c = Third vertex

x = Normal's x-direction (7FFF being 1.0)

y = Normal's y-direction (7FFF being 1.0)

z = Normal's z-direction (7FFF being 1.0)

p = Collision plane's distance from origin (unit vector normal's (a,b,c) => ax + by + cz + d = 0, (x,y,z) is point from polygon, d is distance from origin)

 

--POLYGON TYPES--

aabbbxcc #w#hkels

a = Object set switcher, maybe? Or instantaneous exit?

0123 4567

1111 1111

0: Nothing by itself?

1: Nothing by itself?

2: Nothing by itself?; 2 + 3 trigger exit immediately (Link stops walking)

3: Nothing by itself?; 2 + 3 trigger exit immediately (Link stops walking)

4 through 7 define the object set/exit number, it appears, where illegal values result in nothing happening (game continues as normal).

b = Special Effect Flags

0123 4567 89AB

1111 1111 1111

0: Climbable; 0 + 2 makes Child Link enter crawling mode (only works in center of polygon; can be glitchy if done improperly)

1: Prevents 0 from working (sometimes climbable; may produce different noise; if so, then 1 + 2 + 3 enters climb-down mode); 1 + 2 enters climb-down mode (used on ladders so Link positions himself properly when approaching from the other side)

2: Prevents 0 from working; 0 + 1 + 2 makes Link able to grab the surface

3: Nothing by itself; part of climbable/grabbable/crawlable combos above

4: Nothing?

5: Nothing?

6: Prevents 7 from working?

7: Jabu-Jabu reaction if struck

8: Out of Bounds (Link screams, level restarts)

9: Damages Link (can be slowed by the Goron Tunic)

A: Nothing?

B: Warp Transition (must be paired with exit number, otherwise crashes)

x = Exit trigger (set it to the exit number as loaded in the scene; values over the defined amount will crash the game); 0 disables trigger

c = Camera view angle

0: Default distance and behavior (same as 5, actually)

1: Extremely high birds-eye view

2: Same

3: Camera follows Link at a close distance

4: Camera follows Link further away

5: Camera stays at a moderate distance away from Link (less than 4, more than 3)

6+: Similar to 5, but at a slightly higher angle

w = Special effects (for walls only)

1234

1111

1: Damages Link

2: Nothing?

3: Nothing?

4: Nothing?

h = Hookshot

Bit 1: Nothing?

Bit 2: Nothing?

Bit 3: Hookshotable

Bit 4: Nothing?

k = Echo (overrides map)

0: Use map value

1-F: Echo ranges

e = Ambient lighting/color/fog effect (only works if fog or environment fog is enabled)

0: Normal

1: Fog becomes turquoise and intensifies to max; can trigger overflow which trips the z-buffer

2: Fog disappears, z-buffering fails and actors get a green tint

3: Fog disappears, z-buffering fails and actors go black

4: Fog becomes black and intensifies to max; can trigger overflow which trips the z-buffer; blue sometimes seeps in

5: Fog fades almost immediately to black; z-buffering might fail; actors are completely black

6: Everything goes black except collision polygons...?

7: Everything goes black, but graphics are rendered properly

8-F are the same as 0-7.

l = Terrain type (note: the hues only appear if fog or environment fog is enabled)

0: Walkable

1: High angle (Link immediately begins to slide)

2: Walkable

3: Walkable

4: Ambient light dims, reddish hue?

5: Ambient light dims, reddish hue, Link begins to slide

6: Ambient light dims, reddish hue

7: Ambient light dims, reddish hue

8: Ambient light dims, blackish

9: Ambient light dims, blackish, Link begins to slide

A: Ambient light dims, blackish

B: Ambient light dims, blackish

C: Ambient light dims slightly with a bit of red

D: Ambient light dims slightly with a bit of red, Link begins to slide

E: Ambient light dims slightly with a bit of red

F: Ambient light dims slightly with a bit of red

s = Sound effect/ground type

0: Earth/dirt

1: Sand

2: Stone

3: Wet stone

4: Shallow water

5: Not-as-shallow water (lower-pitched sound)

6: Underbrush/grass

7: Lava/goo

8: Earth/dirt

9: Wooden plank

A: Packed earth/wood

B: Earth/dirt

C: Ceramic

D: Loose earth

E: Earth/dirt

F: Earth/dirt

 

001C0003 02000460:

00160003 02000472:

00000000 00000000:

00040000 00000000:

003E0000 00000000:

00030000 00000000:

003A0000 00000000:

 

--EXIT DEFINITIONS--

xxxx

--repeats for each exit--

x = Exit value for desired level (matches Exit Modifier)

 

--LINK POSITION & ROTATION--

ggggxxxx yyyyzzzz ppppwwww rrrr#vvv

g = Group number (default = 0, a few others kinda work, but usually it'll either crash or not spawn anything; probably allowed them to test different camera and behavior sets)

x = Position on x-axis

y = Position on y-axis

z = Position on z-axis

p = Rotation around x-axis

w = Rotation around y-axis

r = Rotation around z-axis

v = Variable:

0-- starts the intro cutscene but will get stuck, most likely used for when the scene is only intended for cutscenes

1-- starts with a high angled shot looking down but Link does not appear (may have been intended for camera testing)

2+- starts with the camera a bit of a ways back from the spawn point but without Link

100-- Link appears at around (-1,69,21) and tests his sword, then falls to the ground. Most likely reserved for ToT. Remains in cutscene view until you move Link.

101-- Similar to 100, but does not use cutscene mode. Instead starts with the camera at a very high angle that slowly moves down to Link when he's on the ground. Also likely meant for ToT.

102-- Similar to 100, but the camera starts behind Link and the interface behaves as normal. Very likely used in ToT for typical transitioning sequences.

103-- Similar to 102, but with cutscene mode enabled.

104-- Similar to 102, but with the camera at a normal level.

105+- Same as 102.

200-- Camera starts way off in cutscene mode, but Link spawns normally and can move around. Camera and cutscene mode do not return to normal, though.

201-- Camera starts way off in cutscene mode with Link unable to move. Camera then moves in towards Link and cutscene mode deactivates. Probably used for an intro sequence.

202+- Link falls from high above and then gently lands on the ground.

300-- Camera is far off and stuck in cutscene mode; Link appears, but is immobile.

301-- Camera starts far above and gently zooms in with cutscene mode disabling about partway through. Appears to work more smoothly than 101.

302+- Camera acts normally; Link appears, but is immobile. If he gets injured or sent flying he becomes mobile.

400-- Link jumps up and lands lightly on the ground, but the camera is nowhere near him and stuck in cutscene mode.

401-- Link jumps up slightly and lands on the ground. The camera starts off superbly high and then moves back down to a sane level.

402+- Link jumps up slightly and lands on the ground (yeah, grotto hole behavior for sure). The camera behaves normally.

500-- Link warps in (green particles). Again, the camera is stuck in cutscene mode.

501-- The same, but with the camera up high.

502+- The same, but the camera warps behind Link after he finishes beaming in.

600-- Farore's Wind, it appears, but guess what? You can't see it because the camera is in cutscene mode, staring into the abyss.

601-- Farore's Wind, but Navi appears to wander off a bit. Camera starts off high.

602+- Navi zooms off, then Link jumps out of the ground. Farore's Wind warps towards Link. Camera is normal. The unusual behavior is probably because the tested environment did not have Farore's Wind cast at the time.

700-- Link gets tossed onto his tucchus, but again, you can't see it.

701-- Link gets tossed onto his tucchus as the camera slowly zooms in.

702+- Link gets tossed onto his tucchus with the camera right behind him.

800-- Link walks forward, but you can't see.

801-- Link walks forward slightly with the camera starting up high.

802+- Link walks forward slightly with the camera following behind.

 

 

0000 0147 033B F360 0000 C000 0000 0FFF

0 327 827 -3232 0 -16384 0 4095

Link to comment
Share on other sites

I think Shadow Fire was supposed to reimpliment the tutorial section at some point, according to Zeth's request. For the moment, though, I suppose this is as good a place as any until that happens. Also, I'm pretty sure those are MNGE's notes, the comments don't look like what Zeth writes in his notes (and I think Zeth had his own set of notes about map/scene formats, anyway, and they looked a lot different than this).

Link to comment
Share on other sites

  • 3 weeks later...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.