Wube staff - wube/factorio-data github adjustment

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
mtfreitasf
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Apr 27, 2019 12:38 pm
Contact:

Wube staff - wube/factorio-data github adjustment

Post by mtfreitasf »

Dear all,

I am updating my excel calculator for Space Age. I used a lua script with all the recipes, but this is not working anymore for space age. I found the github repository made by wube named factorio-data.

I downloaded it and found the recipe.lua files and I am trying to make a python code to extract all the recipes. One thing that I believe is a quirk and would appreciate if someone at Wube would adjust (if possible) is to name all the recipe files as recipe.lua. This is the case with the base, quality and space-age but not with elevated-rails. In the elevated-rails folder, the recipes are in a file called elevated-rails.lua in the recipe folder.

I am adapting the code for this quirk but would appreciate if this could be corrected for the next releases / commits.

I didn't post an issue in github as it is disabled for this repository.

Best regards,

Marcos
Muche
Filter Inserter
Filter Inserter
Posts: 782
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Wube staff - wube/factorio-data github adjustment

Post by Muche »

An issue with limiting your processing to only some files is that it will miss changes to the recipes, which are done via executing data-updates.lua and data-final-fixes.lua of all mods.

You may have easier time running "factorio --dump-data" and processing the resulting file "script-output/data-raw-dump.json", which contains (among other things) the final versions of all recipes.
mtfreitasf
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Apr 27, 2019 12:38 pm
Contact:

Re: Wube staff - wube/factorio-data github adjustment

Post by mtfreitasf »

Muche,

Thank you for your reply. I will try with the dump data process. But for the sake of following one structure, I believe that changing the name in the elevated-rails folder to recipe.lua would be neat (if possible).

Best regards,

Marcos
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3476
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Wube staff - wube/factorio-data github adjustment

Post by boskid »

There are no rules about structure of data files other than mods having to provide data.lua/data-updates.lua/data-final-fixes.lua if they want to partifcipate at a specific point in time of game loading. I see no reason to make something that you seem to recognize as a pattern but i see as an implementation detail to become a rule. Mods are allowed to define prototypes however they like, also they are allowed to provide partial prototypes there and fill the gaps later as long it does not interfere with other mods. The only well defined point to get access to the prototypes is using the dump data process so i am rejecting your request.
mtfreitasf
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Apr 27, 2019 12:38 pm
Contact:

Re: Wube staff - wube/factorio-data github adjustment

Post by mtfreitasf »

Boskid,

Thank you for your reply.

I am just trying to get all the recipes for the vanilla space age to improve my 1.0 calculator. I got from the forums a lua script to create a csv file with them. It doesn’t work anymore.

I’ll try Muche’s idea combined with a Python script to get the recipes.

I am not a modder and don’t want to create new rules.

Best regards,

Marcos
Post Reply

Return to “Cheatsheets / Calculators / Viewers”