Proper lcf format documentation?

Is there any proper, full documentation of the lcf file formats? I really can not understand what the liblcf code is doing and the wiki has abysmal documentation of it, not describing the binary layout of the data and linking to pages that do not exist. At least I’d like to know how I’m supposed to understand the liblcf code and its weird csv and template stuff so I have an idea of how the format works.

Hm yeah it is not well documented.

Basically the LCF format is a Borland Delphi Object Dump (“Serialisation” in newer terminology)

The format is mostly:

  • Chunk ID
  • Chunk Length

Almost all numbers are stored as dynamic length integers (BER). This means when the number fits in 7 Bit it only needs 1 byte. When the number needs 8 bit then the “MSB” is set and the 8th bit of the number is Bit 0 of the 2nd byte etc.

How to read the CSV: The CSV describes a tree structure (just not very elegant because a table cannot nicely model a tree)

A LDB (LcfDataBase) begins with the Database field. Here multiple chunks can follow, e.g. actors (0x0B). Right after the 0x0B is the size of the entire chunk. Actors is an Array of Actor. So here you find multiple Actor entries again consisting of ID/Length format.

That’s the basic idea.

1 Like