Mod-settings.dat Format in 0.17

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
salbris
Inserter
Inserter
Posts: 43
Joined: Sun May 24, 2015 4:50 am
Contact:

Mod-settings.dat Format in 0.17

Post by salbris »

Hey,

I'm maintaining a tool that needs to pull in mods and mod settings. Since 0.17 release my tool has been failing to parse the mod-settings.dat file correctly. I didn't originally write this code so excuse my ignorance but it seems there is an extra null byte before the first type?

For example the first 32 bytes of my mod-settings.dat are:

Code: Select all

00 00 11 00 11 00 02 00  00 05 00 03 00 00 00 00
07 73 74 61 72 74 75 70  05 00 7D 00 00 00 00 15
Our tool says "5" is a dictionary but the first byte after the 8 bytes from the version is 00.
This link mentions nothing that would indicate it changed in 0.17: https://wiki.factorio.com/Mod_settings_file_format

What am I doing wrong or should change?

Thanks for any help!

salbris
Inserter
Inserter
Posts: 43
Joined: Sun May 24, 2015 4:50 am
Contact:

Re: Mod-settings.dat Format in 0.17

Post by salbris »

Update: On a whim I tried skipping that byte and now the file gets parsed correctly.

Until I hear back I'll have to create an exception for 0.17 because of this.

Post Reply

Return to “Modding discussion”