xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Fable Lev File Format
Keshire
post May 19 2005, 06:05 AM
Post #1


X-S Senior Member
**

Group: Members
Posts: 270
Joined: 20-February 03
From: The Shire Mountain on the small island of Pokaponesia
Member No.: 24491
Xbox Version: v1.0
360 version: v1 (xenon)



So who wants to code a map editor for us?

--------------------------
--- Level file header ----
--------------------------
CODE

4 bytes: A 32 bit integer that's the size of the level file header
(which is always the same as you've noticed).

4 bytes: An 8 bit integer (with 3 bytes of padding) that describes the version number of the header (always the same again).

4 bytes: A 32 bit integer that refers to the position in the file where the map data is.

4 bytes: Unused

4 bytes: A 32 bit integer that refers to the position in the file where some now obsolete data is.

4 bytes: Unused

4 bytes: A 32 bit integer that refers to the position in the file where the navigation data is.


Straight after that header is the header to the map data. If I've
calculated it correctly the third 32 bit integer above should always be
28, which is where the map data header starts.

--------------------------
--- Map data header ------
--------------------------
CODE

4 bytes: A 32 bit integer that's the size of the file header (should always be the same for every level).

4 bytes: An 8 bit integer (with 3 bytes of padding) that describes the version number of the header (always the same again).

8 bytes: A 64 bit integer that describes how many Unique IDs for things that have been used.

4 bytes: The map's width (length along the X axis) (32 bit integer)

4 bytes: The map's height (length along the Y axis - in Fable Z is "up", or height above sea level) (32 bit integer)

4 bytes: A Boolean (with padding) which is always true

33792 bytes: A "palette" of themes that can be on the height field

4 bytes: Another 32 bit integer version number. Will always be 3.

4 bytes: The number of sound themes that are available. Should be the same for all maps.

33792 bytes: A "palette" of sound atmosphere themes that can be on the height field.

4 bytes: A checksum


There then follows a number of sound theme strings saved out. The number
saved out is the one read in above. For each one saved out there's a 4
byte integer giving the number of bytes in the string, then the string
itself.

Then, the real meat of the file: the heightfield data. Width*Height
(read in above) cells are written out. I think they're written out from
the lowest X and Y coordinates, filling in an X row at a time. It
shouldn't be too hard to work out whether that's right or not. smile.gif A cell
consists of the following data:

--------------------------
--- HeightField Data -----
--------------------------
CODE

4 bytes: A 32 bit integer that's the size of the cell being written (should always be the same for every cell).

4 bytes: An 8 bit integer (with 3 bytes of padding) that describes the version number of the cell (always the same again).

4 bytes: A 32 bit floating point number that's the height of the ground at that point divided by 2048.

1 byte: Should be 0.

3 bytes: These are actually an array of 3 single bytes. Each byte refers to a ground theme in the palette defined in the header.

3 bytes: This 3 element array of bytes contains the strength of the ground themes in the previous array. The three numbers should add up to 255.

1 byte: A Boolean that specifies whether the hero can walk on the ground at this point.

1 byte: A Boolean that specifies whether the camera is allowed to pass over the ground at this point.

1 byte: Unused

1 byte: Should be 0.

1 byte: Boolean that specifies whether this cell is a shore point

1 byte: Unused in the game itself.

3 bytes: Padding


There then follows another Width*Height amount of cells. These cells
have the following format:
CODE

4 bytes: A 32 bit integer that's the size of the cell being written (should always be the same for every cell).

4 bytes: An 8 bit integer (with 3 bytes of padding) that describes the version number of the cell (always the same again).

3 bytes: A 3 element array with each byte referring to a sound atmosphere theme in the palette defined in the header.

3 bytes: A 3 element array that contains the strength of the sound atmosphere themes in the previous array. The three numbers should add up to 255.

1 byte: A sound theme palette index.

1 byte: Padding
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Keshire
post Jun 30 2005, 06:22 AM
Post #2


X-S Senior Member
**

Group: Members
Posts: 270
Joined: 20-February 03
From: The Shire Mountain on the small island of Pokaponesia
Member No.: 24491
Xbox Version: v1.0
360 version: v1 (xenon)



Bump. The amount of dedicated coders for fable projects has dropped to nil. I'm not a coder myself but know enough about hex to try and crack the file formats (ie LEV/BIG/WAD files). We're also having issues with the navigation data at the end of the files. It's preventing all ground based NPC's from walking on lev files that don't have that data. (ie fillers).

I think it's way-point based, but It's very convulated in how it was set-up.

Also, anyone experianced with model and animation formats, and writing 3d app plug-ins are sorely needed.

have I asked for enough? wink.gif

As a non-coder I've tried my best to make headway into these formats.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Keshire
post Jun 30 2005, 07:18 AM
Post #3


X-S Senior Member
**

Group: Members
Posts: 270
Joined: 20-February 03
From: The Shire Mountain on the small island of Pokaponesia
Member No.: 24491
Xbox Version: v1.0
360 version: v1 (xenon)



Also, for other interested parties.

Here are the various threads in our coding forum.

LEV/STB Level/Level Texture File format
Audio File Format
BBM/BBA Model/Animation File Formats
BIZ/BIG File Format Discussion
Fable WAD Files - C++ Classes
Full list of built-in script, and their location
START_NEW_ENTITY_SCRIPT (or the... so you wanted to make your own script thread)

This post has been edited by Keshire: Jun 30 2005, 07:29 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 21st May 2013 - 03:19 PM