Vindicta-Team / FileXT

Arma 3 addon to store data in files
9 stars 4 forks source link

File format, editability, and visualization #5

Closed MatthiasKunnen closed 3 years ago

MatthiasKunnen commented 3 years ago

Just a few questions, is this a common file format or a custom one? Is there a specification of the file's structure? Which tools do you use to inspect/edit the file, if any?

Sparker95 commented 3 years ago

Hi! Yes it's a custom file format. I didn't write a specification for it but you can see how it's organized if you check the source code. It's just a binary file header followed by key-value pairs. Key and value are always strings, so you can open it up in a text editor and read the values or even modify them. Keys,values, and key-value pairs are separated with null-characters, so make sure you don't delete them.

Sparker95 commented 3 years ago

There is some explanation here: https://github.com/Vindicta-Team/FileXT/wiki

That's the header format: https://github.com/Vindicta-Team/FileXT/blob/757cf11b0f4cd0653e8194877c3a08c90cf8bdf4/filemgr.h#L24-L34

That's how key-value pairs are written out: https://github.com/Vindicta-Team/FileXT/blob/757cf11b0f4cd0653e8194877c3a08c90cf8bdf4/filemgr.cpp#L184-L194

So, pretty basic overall. :)