Skip to content

FileFormats MagicFile

htmlcoderexe edited this page Jul 17, 2020 · 2 revisions

MagicFiles store heavily structurised game data, such as various abilities characters can use, templates for character classes, item templates, crafting recipes and loot tables.

The current implementation is not using any form of named tags, values are just read in a particular order assumed correct. Minor error handling is currently present, but currently the assumption is that the files are well-formed.

Data is serialised and deserialised using .NET's BinaryWriter - anything that has a working implementation should be able to handle the files by simply calling the appropriate ReadXXX/Write(XXX) functions of BinaryWriter, however there are a few custom datatypes built from the primitives.

For the sake of interoperability with anything else, see notes on BinaryWriter.

The datatypes currently used:

Dictionary<string, float>, used by multiple file types. It is written as follows:

int Number of entries

followed by that number of

string Key then float Value

Clone this wiki locally