Allow limited data transfer between save files

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Moterius
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jun 07, 2023 7:39 am
Contact:

Allow limited data transfer between save files

Post by Moterius »

I'm making a mod that has a mechanic based in knowledge, and would like to transfer the data of already having seen something (and maybe how well they did it) so players dont save, load their old save, check that info, and go back. The problem I'm facing is that this requires some sort of manual player input, I was thinking a startup setting, jarg said RCON (didn't elaborate on the how though).

Therefore my API request would be to add a global object similar to... well, global, to the VM the mods run in, which gets RW on save/load from <the currently active mods folder>/savemetadata/<modname without version>.json or similarly, a way to read/save a table transcending save files. (I'm aware of the security concerns of allowing rw to arbitrary files, but if you're smart in indexing that table you wont need more than one and having the engine decide where to save/read that file from should be fine)

Alternatively, I would request that you allow to read which achivements a player has, and add achivements that are not shown to the player and also do not pop up when unlocked. This would only allow transfer of binary data, but IIRC mod achivements are also something that carries over between save files.

Post Reply

Return to “Modding interface requests”