LFL (File Format)
- LE-CODE & related file formats
- LE-CODE: General description
- LE-CODE: History
- LE-CODE: FAQ for track creators
- LE-CODE: Distribution Tutorial
- LE-CODE: Definition file for distributions
- LE-CODE: FAQ for distribution creators
- LE-CODE: Item Cheat
- LE-CODE: Controllers & Buttons
- LE-CODE: Slot usage
- LE-CODE: Exception Handler
- LPAR: File format for parameters
- LEX: File format and definitions
- LTA: LE-CODE Track Archive
- LFL: LE-CODE File List
- Wiimm's Test Tracks
- Extended presence flags
- Related Categories
LE-CODE supports track dependent versions of different files of Common.szs. To keep all track related files together, track authors are advised to place those files into the sub-directory ./Common/ of the track's SZS. See »LE-CODE/Track« for details.
The game loads the common files before it loads the track's SZS. So it is mandatory, to store the common files outside of the track files. And this is where the LFL file format comes into play. When creating a LTA file, each SZS file is checked to see whether it contains ./Common/* files. If so, then these are extracted and saved as an LFL file. The format of an LFL file is chosen so that LE-CODE can easily access it.
- LFL is a chain of files. Each node contains metrics, the filename and the data. The end of the chain is a special termination node.
- LE-CODE can easily iterate through the chain.
- Because of the small size of common files, the data is not compressed. This makes accessing easier.
- LFL files are created automatically when generating LTA files.
- When comparing file names, capitalization is ignored. Therefore, all file names are converted to lowercase letters. The files themselves are sorted alphabetically. This makes it easier to recognize identical LFL files.
- The leading ./ and a leading common/ are removed from the file names. For example, file name ./common/ObjFlow.bin becomes objflow.bin.
- The entire LFL file is aligned to 32 bytes within the LTA and is loaded in one step. The data within an LFL file is aligned to 4 bytes.
All integer values are stored in network byte order (big endian).
|0x00||magic||char||File magic, always »L-FL«|
|0x04||version||uint32||Major version number, 1 at the moment.|
|0x08||file_size||uint32||Total size of this LFL file. Aligned to 4 bytes.|
|0x0c||End of file header and begin of chain list|
Nodes (chain list)
The chain begins at file offset 0x0c direct behind the file header. All offsets within a node are relative to the node itself. So each node can be used isolated. A node with data_size=0 is the termination node and ends the chain.
|0x00||data_offset||char||Offset of data. Relative to start of node. Aligned to 4 bytes.|
|0x04||data_size||uint32||Size of data. Value 0 ends the chain.|
|0x08||offset_to_next||uint32||Offset to next node. Aligned to 4 bytes.|
|0x0c||file_name||char[*]||File name. Lower case. Leading ./ and common/ removed.|
|?||data||binary||Data of file. Aligned to 4 bytes.|
Manage LFL files
Other commands: Command wszst filetype detects LTA files. Command wszst list (including all list variants) lists the content of LTA files. Command wszst extract extracts all included files. wszst create --lfl creates a LFL file.