I would like to be able to use functions like `write_file` in the data stage.
My use case: I would like to store the actual image url of some icons/signals for later external use (labels on factoriomaps).
Currently, since its not possible to access those after the data stage (that I know of), my options are:
- output everything in a log file, which is not ideal as I'm launching multiple instances of factorio in parallel and would also like to support steam versions of the game which does not allow me access to the console output of factorio.
- dump everything in a big string somehow and read it back later and there use `write_file`.
Access to file manipulation in data stage
Re: Access to file manipulation in data stage
+1, it's nice to make locale output or another lib generation for mod creating optimization.
Re: Access to file manipulation in data stage
This was added as LuaHelpers::write_file.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- protocol_1903
- Filter Inserter
- Posts: 325
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Access to file manipulation in data stage
They specified data stage, not control stage. +1
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Re: Access to file manipulation in data stage
The description says it's used in ALL stages - settings, prototypes (data), and runtime (control). The description of the for_player parameter explicitly lists the other stages.