FacWalk File Format - Complete specification

Research related to Arcanum and it's game engine.
Post Reply
User avatar
Arronax's Best Friend
Arronax's Best Friend
Posts: 420
Joined: Wed Jul 08, 2009 5:04 am
Location: Abyss

FacWalk File Format - Complete specification

Post by Crypton » Tue Oct 26, 2010 4:55 am

I'm going to reveal a another file format, this one has no specific file extension, but filename base is always same - "facwalk", so let's call it with that. Every fackwalk file contains a properties of one specific facade (one fackwalk = one facade). The fackwalk files are used by WorldEd only, Arcanum never uses them. These files can be found in "art/facade/" directory.

Data types:

Code: Select all

typedef char FacWalkMarker[14];
static const FacWalkMarker FACWALK_MARKER = {'F', 'a', 'c', 'W', 'a', 'l', 'k', ' ', 'V', '1', '0', '1', ' ', ' '};

struct FacWalkHeader
	FacWalkMarker marker;

	// base terrain, index + outdoor + flippable
	unsigned int terrain; // index to tilename.mes
	unsigned int outdoor; // boolean, 1 = outdoor
	unsigned int flippable; // boolean, 1 = flippable

	unsigned int width; // width of facade, isometric
	unsigned int height; // height of facade, isometric
	unsigned int entryCount; // equals to number of frames of equivalent Art file.

struct FacWalkEntry
	unsigned int x; // x position
	unsigned int y; // y position
	unsigned int walkable; // boolean, 0 = blocked

Code: Select all

-Array of FacWalkEntry, number equals to FacWalkHeader.entryCount
How to find out which FacWalk file is for which facade Art file:

-Open file "art/facade/facadename.mes"
-Find Art file, for example, BHull.art: {0}{BHull}
-Convert number from first brackets, 0, to hexadecimal, with minimum of 2 characters, so after conversion, it will look "00" for number 0, and "1C" for number 28.
-Generate FacWalk filename -> "facwalk." + "00" = "facwalk.00"

So there you go, facwalk.00 is contains info about BHull.art.

Note: When number in brackets is greater than 255, converted hex number have no trailing zeros at beginning, so number 300 is converted to "12C" and not "012C".

I think that this format description is straightforward, but if you don't understand to something, just ask here.


Post Reply