The LSM File Format

All LionSnake versions prior to 1.6 used a binary format that was not human-readable (unless the human in question is used to reading hex dumps). I decided to change that for versions 1.6 and following, because I wanted it to be easier for me to debug the file saving operations.

All LSM files are now simple text files. Each line contains an entry for a single object within the model.

Some entries refer to other entries. All of these references use zero-based indices; a value of -1 means that the field refers to a null object. All items are indexed by their position in the file, relative to other items of the same type.

All alphabetical data is type-sensitive.

String data is always contained in double quotes (so that the names of Bones, Layers, and Textures can have spaces in them).

As of version 1.7 there are eight different entry types, which can be distinguished by the start of the entry.

Version 1.6

Version 1.6 was pretty much like v1.7.

Dependency caveat

If you plan to write or edit your own files in this format, ensure that all entries that are dependent on other entries follow after the entries upon which they are dependent. In other words, put root Bones before dependent Bones, Vertices before the Edges and Faces that use them, and so on. If you simply group them all together, and put them in the order Bones, UV points, Textures, Vertices, Edges, and Faces, there should be no problems.

The specifics of dependencies are as follows: