Export Technologies
Export Technologies
Does anyone know if there's a way to export a list of technologies along with cost/pre-reqs/allows using a script or something else? I'm interested in getting a list including all the additional technologies added by the mods I have installed, such as Bob's Mods.
Re: Export Technologies
Yes there is. During loading of data files you have access to all the tables and iirc you can create files in the script output folder. (And you can always redirect the output of lua print command.)
The prettyness of this is entirely dependent on you though.
The prettyness of this is entirely dependent on you though.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Export Technologies
I haven't found a good way to write to a file on loading stage. There is no direct file access available there since it's part of game object.Adil wrote:Yes there is. During loading of data files you have access to all the tables and iirc you can create files in the script output folder. (And you can always redirect the output of lua print command.)
The prettyness of this is entirely dependent on you though.
Re: Export Technologies
It's hardly ideal, but any string you pass to "error" ends up in the log. (It also makes the game quit, and if you pass a large string it pauses for a long time first). I exported a copy of the data.raw with all of Bob's mods that way just today, making a dummy mod whose data-final-fixes.lua was just
Code: Select all
error(serpent.block(data.raw))
Re: Export Technologies
Instead of error() ordinary print() may be used. It prints to stdout. Then the game output can be redirected to a file instead stdout.
Not really pretty, but yet not overly complicated for a one-time procedure.
Also, as far as knowing new stuff better is considered, I believe I've seen script generated production trees these days, might be worthwhile to first check relevant subforums and\or ask in communiies on internet for finished solutions.
Not really pretty, but yet not overly complicated for a one-time procedure.
Also, as far as knowing new stuff better is considered, I believe I've seen script generated production trees these days, might be worthwhile to first check relevant subforums and\or ask in communiies on internet for finished solutions.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.