Update
This commit is contained in:
parent
153ed863ac
commit
68e16f6b9b
19 changed files with 2367659 additions and 46479 deletions
202
README.org
202
README.org
|
@ -1,11 +1,61 @@
|
||||||
#+title: Factorio Recipe Analyzer
|
#+title: Factorio Recipe Analyzer
|
||||||
#+author: Phil Bajsicki
|
#+author: Phil Bajsicki
|
||||||
#+PROPERTY: header-args :tangle fra.py
|
#+PROPERTY: header-args :tangle no
|
||||||
* Intro
|
* Intro
|
||||||
This is a simple script which generates an analysis of each recipe into its component parts, and delivers insight into the balance and progression of a mod.
|
This is, ideally, a script which:
|
||||||
|
1. Generates an analysis of each recipe into its component parts, and delivers insight into the balance and progression of a mod.
|
||||||
|
2. Allows for easy editing of item, recipe, building, technology properties.
|
||||||
|
3. Allows those edits to be easily exported into lua files, creating compatibility between various mods. Or at least assisting in making that compatibility happen.
|
||||||
|
|
||||||
The .csv files used as input are generated in Factorio, by loading a new game with only ~base~ and your chosen mod enabled, and running the following Lua code:
|
Of course, that's a long shot.
|
||||||
|
|
||||||
|
* On this file.
|
||||||
|
|
||||||
|
This is a literate script. The source code is embedded in these code blocks, and tangled into the script using org-babel. This allows me to write a description of what I want to do, and comment on it without resorting to ~// /* */~ ugly comments.
|
||||||
|
|
||||||
|
If you open this org file raw (e.g. by clicking [[https://git.bajsicki.com/phil/factorio-recipe-analyzer/raw/branch/main/README.org][here]]), you will see that there are a number of different blocks.
|
||||||
|
|
||||||
|
There is a rough overview of the structure:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
,#+name: Name of the following source block.
|
||||||
|
,#+begin_src lang :tangle file.name
|
||||||
|
[code goes here]
|
||||||
|
,#+end_src
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
~:tangle~ defines the file into which the code block will be passed to ~org-babel-tangle~. To disable, pass ~no~.
|
||||||
|
|
||||||
|
In the begging of the file, we can set global (in the scope of the file) properties, such as the default target for ~:tangle~:
|
||||||
|
|
||||||
|
~#+PROPERTY: header-args :tangle no~
|
||||||
|
|
||||||
|
The easiest way to generate outputs from here is to open this file in Emacs, and run ~M-x org-babel-tangle~. If you're using [[https://github.com/doomemacs/doomemacs][Doom Emacs]], the default key binding is ~C-c C-v C-t~.
|
||||||
|
|
||||||
|
*Important note:* the files in ~./data~ are working files. They're not intrinsic parts of the script. Everything you need should ideally be contained within this one single .org file.
|
||||||
|
|
||||||
|
However, inevitably, since we're dealing with external data, there are some...
|
||||||
|
** Dependencies
|
||||||
|
1. Hard dependenciens:
|
||||||
|
1. Factorio. Obviously. You need version at least 1.1.87, since that added the ~--dump-data~ argument, which we use.
|
||||||
|
2. Perl > 5.14, for JSON::PP and Data::Dumper.
|
||||||
|
2. Soft (useful) dependencies:
|
||||||
|
1. Emacs, org-mode, org-babel. These make the workflow much easier, however you don't need these; they only save time.
|
||||||
|
2. sh so you can execute the following from within Emacs.
|
||||||
|
3. GNU coreutils (cp, mv). These aren't hard depends, since you can move the files manually. This is so you can just ~C-c C-c~ over the code blocks.
|
||||||
|
|
||||||
|
* License
|
||||||
|
I don't own the source csv files generated by Factorio, nor the mods the script is pulling from. This script itself is GPLv3, with the exception of third-party libraries licensed otherwise.
|
||||||
|
***** TODO: include GPLv3 in the repo
|
||||||
|
** Credits:
|
||||||
|
The following are mods from which .csv files have been generated. The recipe .csv files are included in the ~data~ directory.
|
||||||
|
- Bobingabout's mods: https://github.com/modded-factorio/bobsmods
|
||||||
|
- Angel's mods: https://github.com/Arch666Angel/mods
|
||||||
|
|
||||||
|
* Lua scripts
|
||||||
|
The .csv files used as input are generated in Factorio, by loading a new game with only ~base~ and your chosen mod enabled, and running one of the following Lua scripts from the console:
|
||||||
|
|
||||||
|
** Export all recipes and ingredients that match whitelist
|
||||||
#+name: Lua code generating a .csv file containing all recipes using the items in the whitelist.
|
#+name: Lua code generating a .csv file containing all recipes using the items in the whitelist.
|
||||||
#+begin_src lua :tangle no
|
#+begin_src lua :tangle no
|
||||||
/c
|
/c
|
||||||
|
@ -39,7 +89,9 @@ end
|
||||||
game.write_file("recipes.csv", table.concat(parts, "\n"), false)
|
game.write_file("recipes.csv", table.concat(parts, "\n"), false)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
On the other hand, this script outputs ALL available recipes in an org-readable format, for easy overview, sorting, and insight.
|
** Export all recipes (including products and ingredients)into an org-mode file, categorized by theis recipe subgroup.
|
||||||
|
This script outputs ALL available recipes in an org-readable format, for easy overview, sorting, and insight.
|
||||||
|
Note the entire tree is included for each recipe.
|
||||||
|
|
||||||
#+name: lua-to-org: Lua script generating an org-mode file containing all available recipes.
|
#+name: lua-to-org: Lua script generating an org-mode file containing all available recipes.
|
||||||
#+begin_src lua :tangle no
|
#+begin_src lua :tangle no
|
||||||
|
@ -74,50 +126,18 @@ The output of this is an org-mode file in the following pattern:
|
||||||
- ingredient2
|
- ingredient2
|
||||||
- ...
|
- ...
|
||||||
#+end_example
|
#+end_example
|
||||||
|
**
|
||||||
|
|
||||||
|
|
||||||
* On the script
|
* Approach 1: passing through org-mode.
|
||||||
|
|
||||||
This is a literate script. The source code is embedded in these code blocks, and tangled into the script using org-babel. This allows me to write a description of what I want to do, and comment on it without resorting to ~// /* */~ ugly comments.
|
|
||||||
|
|
||||||
Better yet, I can include [[Lua code generating a .csv file containing all recipes using the items in the whitelist.][links directly to places within the file]] and easily cross-reference what I'm doing with the documentation/ design.
|
|
||||||
|
|
||||||
If you open this org file raw (e.g. by clicking [[https://git.bajsicki.com/phil/factorio-recipe-analyzer/raw/branch/main/README.org][here]]), you will see that there are a number of different blocks.
|
|
||||||
|
|
||||||
There is a rough overview of the structure:
|
|
||||||
|
|
||||||
#+begin_example
|
|
||||||
,#+name: Name of the following source block.
|
|
||||||
,#+begin_src lang :tangle file.name
|
|
||||||
[code goes here]
|
|
||||||
,#+end_src
|
|
||||||
#+end_example
|
|
||||||
|
|
||||||
~:tangle~ defines the file into which the code block will be passed to ~org-babel-tangle~. To disable, pass ~no~.
|
|
||||||
|
|
||||||
In the begging of the file, we can set global (in the scope of the file) properties, such as the default target for ~:tangle~:
|
|
||||||
|
|
||||||
~#+PROPERTY: header-args :tangle fra.py~
|
|
||||||
|
|
||||||
The easiest way to generate outputs from here is to open this file in Emacs, and run ~M-x org-babel-tangle~. If you're using [[https://github.com/doomemacs/doomemacs][Doom Emacs]], the default key binding is ~C-c C-v C-t~.
|
|
||||||
|
|
||||||
*Important note:* the files in ~./mod-recipes~ are working files. They're not intrinsic parts of the software - they're there primarily for testing and development.
|
|
||||||
|
|
||||||
* License
|
|
||||||
I don't own the source csv files generated by Factorio, nor the mods the script is pulling from. This script itself is GPLv3, with the exception of third-party libraries licensed otherwise.
|
|
||||||
** TODO: include GPLv3 in the repo
|
|
||||||
** Credits:
|
|
||||||
The following are mods from which .csv files have been generated. The recipe .csv files are included in the ~mod-recipes~ directory.
|
|
||||||
|
|
||||||
* The Code1
|
|
||||||
** Idea:
|
** Idea:
|
||||||
Create an org-mode file with all the calculations included, and complete, for a clear overview of recipe progression, subgroups, item inputs and outputs, and total cost.
|
Create an org-mode file with all the calculations included, and complete, for a clear overview of recipe progression, subgroups, item inputs and outputs, and total cost.
|
||||||
** Setup
|
** Setup
|
||||||
** Open csv file
|
** Open csv file
|
||||||
** Open (create if needed) output csv
|
** Open (create if needed) output csv
|
||||||
pseudocode is in Lisp./
|
|
||||||
|
|
||||||
For this, we'll likely want to include some metadata, like creation date, mod name, number of ingredients, maybe the total amount of raw mats needed to make one of everything?
|
For this, we'll likely want to include some metadata, like creation date, mod name, number of ingredients, maybe the total amount of raw mats needed to make one of everything?
|
||||||
|
|
||||||
** Make a list of products
|
** Make a list of products
|
||||||
That's the first column in the .csv file.
|
That's the first column in the .csv file.
|
||||||
Read first column of the csv file and insert it into the .org (output) file.
|
Read first column of the csv file and insert it into the .org (output) file.
|
||||||
|
@ -171,12 +191,12 @@ For each line:
|
||||||
1. Add new number we just got to the existing number.
|
1. Add new number we just got to the existing number.
|
||||||
3. Else: write new raw ingredient line and number in this section.
|
3. Else: write new raw ingredient line and number in this section.
|
||||||
|
|
||||||
* The Code 2
|
* Approach 2: working directly in the csv files
|
||||||
** Idea/ outline
|
** Idea/ outline
|
||||||
This is not for analysis as much as helping Galdoc out with creating compat layers for [[https://github.com/Orion351/galdocs_manufacturing][Galdoc's Manufacturing.]]
|
This is not for analysis as much as helping Galdoc out with creating compat layers for [[https://github.com/Orion351/galdocs_manufacturing][Galdoc's Manufacturing.]]
|
||||||
|
|
||||||
Take above csv data dump from Factorio, then:
|
Take above csv data dump from Factorio, then:
|
||||||
1. Figure out appropriate categories. This is the starting point we have:
|
1. Figure out appropriate categories. This is the starting point:
|
||||||
- Telescoping, (inserters, belts, things that reach)
|
- Telescoping, (inserters, belts, things that reach)
|
||||||
- Metalworking,
|
- Metalworking,
|
||||||
- Plastic,
|
- Plastic,
|
||||||
|
@ -193,7 +213,7 @@ Take above csv data dump from Factorio, then:
|
||||||
This has to be done manually. The csv file already includes an empty first column, which lets us manually go over it and add the tags to each item.
|
This has to be done manually. The csv file already includes an empty first column, which lets us manually go over it and add the tags to each item.
|
||||||
|
|
||||||
2. Then pull the output template CSV file, which should have the following structure:
|
2. Then pull the output template CSV file, which should have the following structure:
|
||||||
#+name: Example csv template for code-2
|
#+name: Example csv template
|
||||||
#+begin_src csv :tangle no
|
#+begin_src csv :tangle no
|
||||||
item-category, item-name, amt1, catitem1, amt2, catitem2, amt3, catitem3, amt4, catitem4, ...
|
item-category, item-name, amt1, catitem1, amt2, catitem2, amt3, catitem3, amt4, catitem4, ...
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -212,7 +232,7 @@ This structure allows for unambiguous selection of the relevant data from the cs
|
||||||
2. These cannot be confused with the amounts themselves, because the column names include [a-zA-Z] characters.
|
2. These cannot be confused with the amounts themselves, because the column names include [a-zA-Z] characters.
|
||||||
3. The first column makes it easy to find whether an item belongs to a particular column or not.
|
3. The first column makes it easy to find whether an item belongs to a particular column or not.
|
||||||
4. Additionally, this way we can automate creating the output .csv template, since we can check what number of columns we need for each ingredient category.
|
4. Additionally, this way we can automate creating the output .csv template, since we can check what number of columns we need for each ingredient category.
|
||||||
** Testing process 1:
|
** Testing 1:
|
||||||
*** Get csv from Factorio
|
*** Get csv from Factorio
|
||||||
This needs to be run manually rn, will figure out an automatic way later? Maybe?
|
This needs to be run manually rn, will figure out an automatic way later? Maybe?
|
||||||
|
|
||||||
|
@ -270,38 +290,34 @@ prod1>amt1+prod2>amt2, recipe.name, recipe.subgroup, ingr1<amt1+ingr2<amt2...
|
||||||
|
|
||||||
*** Move csv to the right directory
|
*** Move csv to the right directory
|
||||||
/Note:/ If you have this open in Emacs, move your cursor into the code block and hit ~C-c C-c~ to execute the code. It's very handy if you have commands that you use often.
|
/Note:/ If you have this open in Emacs, move your cursor into the code block and hit ~C-c C-c~ to execute the code. It's very handy if you have commands that you use often.
|
||||||
#+name: move the output from the above command to the mod-recipes directory for easy access.
|
#+name: move the output from the above command to the data directory for easy access.
|
||||||
#+begin_src sh :results none
|
#+begin_src sh :results none
|
||||||
mv ~/.factorio/script-output/products-all.csv ./mod-recipes
|
mv ~/.factorio/script-output/products-all.csv ./data
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Sort for easier human readability
|
*** Sort for easier human readability
|
||||||
**** Sort the csv file by recipe subgroups
|
**** Sort the csv file by recipe subgroups
|
||||||
This allows us to find groups of related processes easier.
|
This allows us to find groups of related processes easier.
|
||||||
#+begin_src sh :results none
|
#+begin_src sh :results none
|
||||||
cat ./mod-recipes/recipes-all.csv | sort -k3 -t, | column --table -s, -o, > ./mod-recipes/recipes-all-sorted-subgroups.csv
|
cat ./data/recipes-all.csv | sort -k3 -t, | column --table -s, -o, > ./data/recipes-all-sorted-subgroups.csv
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
**** Sort the csv file by product name
|
**** Sort the csv file by product name
|
||||||
This allows us to find similarly named items easier
|
This allows us to find similarly named items easier
|
||||||
#+begin_src sh :results none
|
#+begin_src sh :results none
|
||||||
cat ./mod-recipes/products-all.csv | sort -k2 -t, | column --table -s, -o, > ./mod-recipes/recipes-all-sorted-product.csv
|
cat ./data/products-all.csv | sort -k2 -t, | column --table -s, -o, > ./data/recipes-all-sorted-product.csv
|
||||||
|
cp ./data/recipes-all-sorted-product.csv ./data/intermediate.csv
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
This is the file we'll be using for further testing, because it groups up a lot of items by material, which is what we want.
|
~intermediate.csv~ is the file we'll be using for further testing, because it groups up a lot of items by material, which is what we want.
|
||||||
|
|
||||||
For this reason, let's make ourselves a working copy;
|
|
||||||
|
|
||||||
#+begin_src sh :results none
|
|
||||||
cp ./mod-recipes/recipes-all-sorted-product.csv ./mod-recipes/intermediate.csv
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
From here on, all changes will take place on the basis of the ~intermediate.csv~ file, and outputs will be directed to ~output.csv~. This will prevent time loss in case of a mistyped command.
|
From here on, all changes will take place on the basis of the ~intermediate.csv~ file, and outputs will be directed to ~output.csv~. This will prevent time loss in case of a mistyped command.
|
||||||
|
|
||||||
*** Parse the intermetiate.csv file, filling it out recursively
|
*** Parse the intermetiate.csv file, filling it out recursively
|
||||||
|
|
||||||
|
|
||||||
#+begin_src perl :tangle raw.pl
|
#+begin_src perl :tangle no
|
||||||
open(my $in, "<", "./mod-recipes/intermediate.csv") or die "Can't open intermediates.csv";
|
open(my $in, "<", "./data/intermediate.csv") or die "Can't open intermediates.csv";
|
||||||
open(my $out, ">", "./mod-recipes/raw.csv") or die "Can't open raw.csv";
|
open(my $out, ">", "./data/raw.csv") or die "Can't open raw.csv";
|
||||||
local $| = 1;
|
local $| = 1;
|
||||||
raw_ingredients();
|
raw_ingredients();
|
||||||
|
|
||||||
|
@ -347,7 +363,7 @@ For this reason, it is important that we first cover the base materials.
|
||||||
**** Temp code:
|
**** Temp code:
|
||||||
|
|
||||||
|
|
||||||
#+begin_src perl :tangle fra.pl
|
#+begin_src perl :tangle no
|
||||||
|
|
||||||
our @patterns = (
|
our @patterns = (
|
||||||
|
|
||||||
|
@ -390,8 +406,8 @@ our @patterns = (
|
||||||
(limestone|stone|slag|concrete|sand)
|
(limestone|stone|slag|concrete|sand)
|
||||||
[\-?,?\s*]/");
|
[\-?,?\s*]/");
|
||||||
|
|
||||||
open(my $in, "<", "./mod-recipes/intermediate.csv") or die "Can't open intermediates.csv";
|
open(my $in, "<", "./data/intermediate.csv") or die "Can't open intermediates.csv";
|
||||||
open(my $out, ">", "./mod-recipes/output.csv") or die "Can't open output.csv";
|
open(my $out, ">", "./data/output.csv") or die "Can't open output.csv";
|
||||||
|
|
||||||
|
|
||||||
while (<$in>) {
|
while (<$in>) {
|
||||||
|
@ -428,11 +444,15 @@ close $out or die "$out: $!";
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
|
|
||||||
* New Idea (parsing lua files directly):
|
* New Idea to be given thought
|
||||||
https://wiki.factorio.com/Console#Access_a_mod's_data
|
https://wiki.factorio.com/Console#Access_a_mod's_data
|
||||||
|
|
||||||
- It may be possible to access lua directly and pull data from there.
|
- It may be possible to access lua directly and pull data from there.
|
||||||
- It may be more effective and accurate than pulling data from an exported CSV.
|
|
||||||
|
- Even if not, it is possible to run Factorio with the ~--data-dump~ argument, which makes it output all the data the game has into a json file.
|
||||||
|
- This is actually really convenient, because doing calculations on json files is rather.
|
||||||
|
|
||||||
|
- It may be more effective, faster and accurate than pulling data from an exported CSV.
|
||||||
- Further investigation needed.
|
- Further investigation needed.
|
||||||
- *The key problem:* it would be very challenging for a human/ person to make modifications to this export as-is. It's then necessary to create another layer of processing to make the output human-readable.
|
- *The key problem:* it would be very challenging for a human/ person to make modifications to this export as-is. It's then necessary to create another layer of processing to make the output human-readable.
|
||||||
- ON the other hand, we don't yet have a system for importing recipes, items, and tech levels from a csv into Factorio mods...
|
- ON the other hand, we don't yet have a system for importing recipes, items, and tech levels from a csv into Factorio mods...
|
||||||
|
@ -451,3 +471,61 @@ https://wiki.factorio.com/Console#Access_a_mod's_data
|
||||||
2. The script would have to dynamically generate a lot of lua code, or at least wrap the contents of the CSV in lua code. This may create licensing issues? Maybe?
|
2. The script would have to dynamically generate a lot of lua code, or at least wrap the contents of the CSV in lua code. This may create licensing issues? Maybe?
|
||||||
3. The item descriptions could be generated (partially) automatically, but they would still require someone to write large parts of them.
|
3. The item descriptions could be generated (partially) automatically, but they would still require someone to write large parts of them.
|
||||||
4. Localization; it may be possible to also do with the script (eg hooking into google translate, deepl or sth), at least for the item names.
|
4. Localization; it may be possible to also do with the script (eg hooking into google translate, deepl or sth), at least for the item names.
|
||||||
|
** Elaboration:
|
||||||
|
The way I see this working is:
|
||||||
|
1. Parse mod lua files externally, independent from Factorio.
|
||||||
|
2. This creates a csv file including *everything* in a format that is both human-readable, *and* reversible back into Lua code.
|
||||||
|
* Approach 3: pulling from Factorio data dump json
|
||||||
|
** Get files into working area
|
||||||
|
- Get data dump from Factorio
|
||||||
|
- Copy data dump over to our working directory.
|
||||||
|
#+begin_src sh :tangle no :results none
|
||||||
|
factorio --data-dump
|
||||||
|
cp ~/.factorio/script-output/data-raw-dump.json ./data/
|
||||||
|
#+end_src
|
||||||
|
** Testing: Perl script parsing JSON into
|
||||||
|
|
||||||
|
*** Init:
|
||||||
|
#+begin_src perl :tangle fra-json-test.pl
|
||||||
|
use utf8;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use JSON;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
my $in;
|
||||||
|
{
|
||||||
|
open(my $file, "<", "./data/data-raw-dump.json") or die "Can't open data-raw-dump.json";
|
||||||
|
local $/;
|
||||||
|
$in = <$file>;
|
||||||
|
close $file;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $data = decode_json($in);
|
||||||
|
|
||||||
|
# my $data = @($data_raw->(data)(children));
|
||||||
|
|
||||||
|
print Dumper($data);
|
||||||
|
|
||||||
|
my @list = ($data);
|
||||||
|
|
||||||
|
print "$data";
|
||||||
|
|
||||||
|
# foreach my $values (@list){
|
||||||
|
# foreach my $value (@$values) {
|
||||||
|
# print "Value =\t\tValue:\t" "$value->{?}->{'subgroup'}" "\n";
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
# open(my $out, ">", "./data/out-json-test.json") or die "Can't open out-json-test.json";
|
||||||
|
# close $out or die "$out: $!";
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
*** Run the script:
|
||||||
|
#+begin_src sh
|
||||||
|
perl fra-json-test.pl
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
|
2367486
data/data-raw-dump.json
Normal file
2367486
data/data-raw-dump.json
Normal file
File diff suppressed because one or more lines are too long
33
fra-json-test.pl
Normal file
33
fra-json-test.pl
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
use utf8;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use JSON;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
my $in;
|
||||||
|
{
|
||||||
|
open(my $file, "<", "./data/data-raw-dump.json") or die "Can't open data-raw-dump.json";
|
||||||
|
local $/;
|
||||||
|
$in = <$file>;
|
||||||
|
close $file;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $data = decode_json($in);
|
||||||
|
|
||||||
|
# my $data = @($data_raw->(data)(children));
|
||||||
|
|
||||||
|
print Dumper($data);
|
||||||
|
|
||||||
|
my @list = ($data);
|
||||||
|
|
||||||
|
print "$data";
|
||||||
|
|
||||||
|
# foreach my $values (@list){
|
||||||
|
# foreach my $value (@$values) {
|
||||||
|
# print "Value =\t\tValue:\t" "$value->{?}->{'subgroup'}" "\n";
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
# open(my $out, ">", "./data/out-json-test.json") or die "Can't open out-json-test.json";
|
||||||
|
# close $out or die "$out: $!";
|
75
fra.pl
75
fra.pl
|
@ -1,75 +0,0 @@
|
||||||
our @patterns = (
|
|
||||||
|
|
||||||
# 0 metal
|
|
||||||
|
|
||||||
"m/[\-?,?s*]
|
|
||||||
(bronze|iron|steel|copper|
|
|
||||||
zinc|lithium|tungsten|titanium|tin|
|
|
||||||
nickel|silver|platinum|manganese|
|
|
||||||
lead|gold|aluminium|aluminum)
|
|
||||||
[\-?,?\s*]/",
|
|
||||||
|
|
||||||
# 1 wood
|
|
||||||
|
|
||||||
"m/[\-?,?s*]
|
|
||||||
(seedlings|wood|wooden)
|
|
||||||
[\-?,?\s*]/",
|
|
||||||
|
|
||||||
# 2 plastic
|
|
||||||
|
|
||||||
"m/[\-?,?s*]
|
|
||||||
(plastic)
|
|
||||||
[\-?,?\s*]/",
|
|
||||||
|
|
||||||
# 3 electronics
|
|
||||||
|
|
||||||
"m/[\-?,?s*]
|
|
||||||
(electronic)
|
|
||||||
[\-?,?\s*]/",
|
|
||||||
|
|
||||||
# 4 glass
|
|
||||||
|
|
||||||
"m/[\-?,?s*]
|
|
||||||
(glass)
|
|
||||||
[\-?,?\s*]/",
|
|
||||||
|
|
||||||
# 5 stone
|
|
||||||
|
|
||||||
"m/[\-?,?s*]
|
|
||||||
(limestone|stone|slag|concrete|sand)
|
|
||||||
[\-?,?\s*]/");
|
|
||||||
|
|
||||||
open(my $in, "<", "./mod-recipes/intermediate.csv") or die "Can't open intermediates.csv";
|
|
||||||
open(my $out, ">", "./mod-recipes/output.csv") or die "Can't open output.csv";
|
|
||||||
|
|
||||||
|
|
||||||
while (<$in>) {
|
|
||||||
my @line = split(",", $_);
|
|
||||||
|
|
||||||
if ($line[1] =~ "$patterns[0]") {
|
|
||||||
print $out "metal @line";
|
|
||||||
print "$patterns[0]";
|
|
||||||
print "metal @line";
|
|
||||||
}
|
|
||||||
elsif ($line[1] =~ "$patterns[1]") {
|
|
||||||
print $out "wood @line";
|
|
||||||
}
|
|
||||||
elsif ($line[1] =~ "$patterns[2]") {
|
|
||||||
print $out "plastic @line";
|
|
||||||
}
|
|
||||||
elsif ($line[1] =~ "$patterns[3]") {
|
|
||||||
print $out "electronics @line";
|
|
||||||
}
|
|
||||||
elsif ($line[1] =~ "$patterns[4]") {
|
|
||||||
print $out "glass @line";
|
|
||||||
}
|
|
||||||
elsif ($line[1] =~ "$patterns[5]") {
|
|
||||||
print $out "stone @line";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print $out "@line";
|
|
||||||
print "@line";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close $in or die "$in: $!";
|
|
||||||
close $out or die "$out: $!";
|
|
7
fra.py
7
fra.py
|
@ -1,7 +0,0 @@
|
||||||
mv ~/.factorio/script-output/products-all.csv ./mod-recipes
|
|
||||||
|
|
||||||
cat ./mod-recipes/recipes-all.csv | sort -k3 -t, | column --table -s, -o, > ./mod-recipes/recipes-all-sorted-subgroups.csv
|
|
||||||
|
|
||||||
cat ./mod-recipes/products-all.csv | sort -k2 -t, | column --table -s, -o, > ./mod-recipes/recipes-all-sorted-product.csv
|
|
||||||
|
|
||||||
cp ./mod-recipes/recipes-all-sorted-product.csv ./mod-recipes/intermediate.csv
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,99 +0,0 @@
|
||||||
,accumulator ,angels-power-accumulator ,2 ,iron-plate ,10 ,battery ,2 ,electronic-circuit , , , ,
|
|
||||||
,artillery-turret ,angels-artillery-a ,60 ,concrete ,60 ,steel-plate ,40 ,iron-gear-wheel ,20 ,advanced-circuit , ,
|
|
||||||
,artillery-wagon ,angels-artillery ,40 ,invar-alloy ,64 ,engine-unit ,10 ,iron-gear-wheel ,20 ,advanced-circuit ,16,pipe
|
|
||||||
,assembling-machine-1 ,bob-assembly-machine ,9 ,iron-plate ,5 ,iron-gear-wheel ,3 ,basic-circuit-board , , , ,
|
|
||||||
,assembling-machine-2 ,bob-assembly-machine ,1 ,assembling-machine-1,2 ,steel-plate ,5 ,iron-gear-wheel ,3 ,electronic-circuit , ,
|
|
||||||
,assembling-machine-3 ,bob-assembly-machine ,1 ,assembling-machine-2,9 ,steel-plate ,5 ,steel-gear-wheel ,3 ,advanced-circuit , ,
|
|
||||||
,automation-science-pack ,science-pack ,1 ,copper-plate ,1 ,iron-gear-wheel , , , , , ,
|
|
||||||
,battery-equipment ,angels-personal-equipment-power-c ,10 ,steel-plate ,5 ,battery , , , , , ,
|
|
||||||
,beacon ,module-beacon ,10 ,copper-cable ,10 ,steel-plate ,20 ,electronic-circuit ,20 ,advanced-circuit ,1 ,crystal-splinter-harmonic
|
|
||||||
,belt-immunity-equipment ,angels-personal-equipment-power-d ,10 ,steel-plate ,5 ,advanced-circuit , , , , , ,
|
|
||||||
,big-electric-pole ,angels-big-power-poles ,5 ,copper-plate ,5 ,steel-plate ,8 ,iron-stick , , , ,
|
|
||||||
,boiler ,angels-power-steam-boiler ,1 ,stone-furnace ,4 ,pipe , , , , , ,
|
|
||||||
,burner-inserter ,bob-logistic-tier-0 ,1 ,iron-plate ,1 ,iron-gear-wheel , , , , , ,
|
|
||||||
,burner-mining-drill ,extraction-machine ,1 ,stone-furnace ,3 ,iron-plate ,3 ,iron-gear-wheel , , , ,
|
|
||||||
,cannon-shell ,angels-exploration-tank-a ,2 ,steel-plate ,2 ,plastic-bar ,1 ,explosives , , , ,
|
|
||||||
,car ,angels-vehicle-car ,20 ,iron-plate ,5 ,steel-plate ,8 ,engine-unit , , , ,
|
|
||||||
,cargo-wagon ,bob-cargo-wagon ,20 ,iron-plate ,20 ,steel-plate ,10 ,iron-gear-wheel , , , ,
|
|
||||||
,centrifuge ,production-machine ,100,concrete ,50 ,steel-plate ,100,iron-gear-wheel ,100,advanced-circuit , ,
|
|
||||||
,chemical-plant ,petrochem-buildings-chemical-plant ,5 ,steel-plate ,5 ,iron-gear-wheel ,5 ,electronic-circuit ,5 ,pipe , ,
|
|
||||||
,cluster-grenade ,angels-capsules-a ,5 ,steel-plate ,5 ,explosives ,7 ,grenade , , , ,
|
|
||||||
,combat-shotgun ,angels-physical-ba ,15 ,steel-plate ,5 ,wood ,1 ,shotgun , , , ,
|
|
||||||
,copper-cable ,angels-copper-casting ,1 ,copper-plate , , , , , , , ,
|
|
||||||
,discharge-defense-equipment ,angels-personal-equipment-combat-c ,20 ,steel-plate ,5 ,processing-unit ,10 ,laser-turret , , , ,
|
|
||||||
,electric-energy-interface ,other ,2 ,iron-plate ,5 ,electronic-circuit , , , , , ,
|
|
||||||
,electric-furnace ,smelting-machine ,10 ,stone-brick ,10 ,steel-plate ,5 ,advanced-circuit , , , ,
|
|
||||||
,electric-mining-drill ,extraction-machine ,10 ,iron-plate ,5 ,iron-gear-wheel ,3 ,basic-circuit-board , , , ,
|
|
||||||
,empty-barrel ,angels-fluid-control ,1 ,steel-plate , , , , , , , ,
|
|
||||||
,energy-shield-equipment ,angels-personal-equipment-combat-a ,10 ,steel-plate ,5 ,advanced-circuit , , , , , ,
|
|
||||||
,engine-unit ,angels-basic-intermediate ,1 ,steel-plate ,1 ,iron-gear-wheel ,2 ,pipe , , , ,
|
|
||||||
,exoskeleton-equipment ,angels-personal-equipment-combat-c ,20 ,steel-plate ,30 ,electric-engine-unit,10 ,advanced-circuit , , , ,
|
|
||||||
,explosive-cannon-shell ,angels-exploration-tank-a ,2 ,steel-plate ,2 ,plastic-bar ,2 ,explosives , , , ,
|
|
||||||
,firearm-magazine ,angels-physical-aa ,4 ,iron-plate , , , , , , , ,
|
|
||||||
,flamethrower-ammo ,angels-fire ,5 ,steel-plate ,50 ,liquid-fuel-oil ,50 ,liquid-naphtha , , , ,
|
|
||||||
,flamethrower ,angels-fire ,5 ,steel-plate ,5 ,iron-gear-wheel ,1 ,submachine-gun , , , ,
|
|
||||||
,flamethrower-turret ,angels-fire ,20 ,steel-plate ,5 ,engine-unit ,1 ,flamethrower ,10 ,pipe , ,
|
|
||||||
,fluid-wagon ,bob-fluid-wagon ,16 ,steel-plate ,1 ,storage-tank ,10 ,iron-gear-wheel ,8 ,pipe , ,
|
|
||||||
,flying-robot-frame ,angels-robot-a ,1 ,steel-plate ,1 ,electric-engine-unit,2 ,battery ,3 ,electronic-circuit , ,
|
|
||||||
,gate ,angels-exploration-walls ,2 ,steel-plate ,2 ,electronic-circuit ,1 ,stone-wall , , , ,
|
|
||||||
,grenade ,angels-capsules-a ,5 ,iron-plate ,10 ,coal , , , , , ,
|
|
||||||
,gun-turret ,angels-physical-aa ,5 ,copper-plate ,10 ,iron-plate ,1 ,submachine-gun , , , ,
|
|
||||||
,heat-pipe ,angels-power-nuclear-heat-pipe ,10 ,copper-plate ,5 ,steel-plate , , , , , ,
|
|
||||||
,heavy-armor ,angels-personal-equipment-armor ,100,copper-plate ,50 ,steel-plate , , , , , ,
|
|
||||||
,inserter ,bob-logistic-tier-1 ,1 ,iron-plate ,1 ,iron-gear-wheel ,1 ,basic-circuit-board , , , ,
|
|
||||||
,iron-chest ,angels-chests-small-a ,8 ,iron-plate , , , , , , , ,
|
|
||||||
,iron-gear-wheel ,bob-gears ,2 ,iron-plate , , , , , , , ,
|
|
||||||
,iron-stick ,angels-basic-intermediate ,1 ,iron-plate , , , , , , , ,
|
|
||||||
,lab ,production-machine ,10 ,iron-gear-wheel ,10 ,basic-circuit-board ,4 ,basic-transport-belt , , , ,
|
|
||||||
,land-mine ,angels-capsules-a ,1 ,steel-plate ,2 ,explosives , , , , , ,
|
|
||||||
,laser-turret ,angels-electric-a ,20 ,steel-plate ,12 ,battery ,20 ,electronic-circuit , , , ,
|
|
||||||
,light-armor ,angels-personal-equipment-armor ,40 ,iron-plate , , , , , , , ,
|
|
||||||
,loader ,belt ,5 ,iron-plate ,5 ,iron-gear-wheel ,5 ,electronic-circuit ,5 ,transport-belt ,5 ,inserter
|
|
||||||
,locomotive ,bob-locomotive ,30 ,steel-plate ,20 ,engine-unit ,10 ,electronic-circuit , , , ,
|
|
||||||
,medium-electric-pole ,angels-medium-power-poles ,2 ,copper-plate ,2 ,steel-plate ,4 ,iron-stick , , , ,
|
|
||||||
,modular-armor ,angels-personal-equipment-armor ,50 ,steel-plate ,30 ,advanced-circuit , , , , , ,
|
|
||||||
,night-vision-equipment ,angels-personal-equipment-power-d ,10 ,steel-plate ,5 ,advanced-circuit , , , , , ,
|
|
||||||
,nuclear-reactor ,angels-power-nuclear-reactor-b ,500,concrete ,250,steel-plate ,500,advanced-circuit ,25 ,heat-pipe-2 , ,
|
|
||||||
,offshore-pump ,washing-building ,1 ,iron-gear-wheel ,2 ,basic-circuit-board ,1 ,pipe , , , ,
|
|
||||||
,oil-refinery ,petrochem-buildings-oil-refinery ,6 ,steel-plate ,12 ,steel-gear-wheel ,4 ,electronic-circuit ,36 ,steel-pipe , ,
|
|
||||||
,personal-laser-defense-equipment,angels-personal-equipment-combat-b ,5 ,steel-plate ,3 ,battery ,5 ,electronic-circuit , , , ,
|
|
||||||
,personal-roboport-equipment ,angels-personal-equipment-robot-d ,5 ,steel-plate ,2 ,roboport-antenna-1 ,1 ,roboport-door-1 ,2 ,roboport-chargepad-1, ,
|
|
||||||
,piercing-rounds-magazine ,angels-physical-aa ,5 ,copper-plate ,1 ,steel-plate ,1 ,firearm-magazine , , , ,
|
|
||||||
,piercing-shotgun-shell ,angels-physical-ba ,5 ,copper-plate ,2 ,steel-plate ,2 ,shotgun-shell , , , ,
|
|
||||||
,pipe ,pipe ,1 ,iron-plate , , , , , , , ,
|
|
||||||
,pipe-to-ground ,pipe-to-ground ,5 ,iron-plate ,10 ,pipe , , , , , ,
|
|
||||||
,pistol ,angels-physical-aa ,5 ,copper-plate ,5 ,iron-plate , , , , , ,
|
|
||||||
,poison-capsule ,angels-capsules-a ,3 ,steel-plate ,10 ,coal ,3 ,electronic-circuit , , , ,
|
|
||||||
,power-armor ,angels-personal-equipment-armor ,40 ,steel-plate ,20 ,electric-engine-unit,40 ,processing-unit , , , ,
|
|
||||||
,power-switch ,circuit-network ,5 ,copper-cable ,5 ,iron-plate ,2 ,electronic-circuit , , , ,
|
|
||||||
,programmable-speaker ,circuit-network ,5 ,copper-cable ,3 ,iron-plate ,4 ,iron-stick ,4 ,electronic-circuit , ,
|
|
||||||
,pump ,angels-fluid-control ,1 ,steel-plate ,1 ,engine-unit ,1 ,copper-pipe , , , ,
|
|
||||||
,pumpjack ,extraction-machine ,5 ,steel-plate ,10 ,iron-gear-wheel ,5 ,electronic-circuit ,10 ,pipe , ,
|
|
||||||
,radar ,angels-artillery-a ,10 ,iron-plate ,5 ,iron-gear-wheel ,5 ,basic-circuit-board , , , ,
|
|
||||||
,rail-chain-signal ,train-transport ,5 ,iron-plate ,1 ,electronic-circuit , , , , , ,
|
|
||||||
,rail-signal ,train-transport ,5 ,iron-plate ,1 ,electronic-circuit , , , , , ,
|
|
||||||
,rail ,train-transport ,1 ,stone ,1 ,steel-plate ,1 ,iron-stick , , , ,
|
|
||||||
,refined-concrete ,angels-stone-casting ,20 ,concrete ,1 ,steel-plate ,8 ,iron-stick ,100,water , ,
|
|
||||||
,repair-pack ,angels-chests-small-a ,2 ,iron-gear-wheel ,2 ,basic-circuit-board , , , , , ,
|
|
||||||
,roboport ,angels-roboport-a ,15 ,steel-plate ,5 ,roboport-antenna-1 ,1 ,roboport-door-1 ,4 ,roboport-chargepad-1, ,
|
|
||||||
,rocket-launcher ,angels-explosion-a ,5 ,steel-plate ,5 ,electronic-circuit ,2 ,shotgun , , , ,
|
|
||||||
,shotgun ,angels-physical-ba ,5 ,iron-plate ,5 ,wood ,5 ,iron-gear-wheel ,2 ,pistol , ,
|
|
||||||
,shotgun-shell ,angels-physical-ba ,2 ,copper-plate ,2 ,iron-plate , , , , , ,
|
|
||||||
,slowdown-capsule ,angels-capsules-a ,2 ,steel-plate ,5 ,coal ,2 ,electronic-circuit , , , ,
|
|
||||||
,small-lamp ,circuit-network ,3 ,copper-cable ,1 ,iron-plate ,1 ,basic-circuit-board , , , ,
|
|
||||||
,solar-panel ,angels-power-solar-panel ,4 ,copper-plate ,4 ,steel-plate ,14 ,electronic-circuit , , , ,
|
|
||||||
,solar-panel-equipment ,angels-personal-equipment-power-a ,4 ,copper-cable ,2 ,steel-plate ,5 ,electronic-circuit , , , ,
|
|
||||||
,splitter ,bob-logistic-tier-1 ,8 ,tin-plate ,14 ,iron-gear-wheel ,5 ,basic-circuit-board ,1 ,basic-splitter , ,
|
|
||||||
,steam-engine ,angels-power-steam-generator ,10 ,iron-plate ,8 ,iron-gear-wheel ,5 ,pipe , , , ,
|
|
||||||
,steel-chest ,angels-chests-small-b ,8 ,steel-plate , , , , , , , ,
|
|
||||||
,steel-furnace ,smelting-machine ,10 ,stone-brick ,6 ,steel-plate , , , , , ,
|
|
||||||
,steel-plate ,angels-steel-casting ,2 ,iron-plate ,10 ,gas-oxygen , , , , , ,
|
|
||||||
,storage-tank ,angels-fluid-tanks ,20 ,iron-plate ,5 ,steel-plate ,1 ,bob-small-inline-storage-tank, , , ,
|
|
||||||
,submachine-gun ,angels-physical-aa ,5 ,iron-plate ,10 ,iron-gear-wheel ,1 ,pistol , , , ,
|
|
||||||
,substation ,angels-sub-power-poles ,5 ,copper-plate ,10 ,steel-plate ,5 ,advanced-circuit , , , ,
|
|
||||||
,sulfuric-acid ,angels-fluid-converter-petrochem-sulfer-fluids,1 ,iron-plate ,5 ,sulfur ,100,water-purified , , , ,
|
|
||||||
,tank ,angels-exploration-tank-a ,50 ,steel-plate ,32 ,engine-unit ,15 ,iron-gear-wheel ,10 ,advanced-circuit , ,
|
|
||||||
,train-stop ,train-transport ,6 ,iron-plate ,3 ,steel-plate ,6 ,iron-stick ,5 ,electronic-circuit , ,
|
|
||||||
,transport-belt ,bob-logistic-tier-1 ,2 ,tin-plate ,2 ,iron-gear-wheel ,1 ,basic-transport-belt , , , ,
|
|
||||||
,underground-belt ,bob-logistic-tier-1 ,14 ,tin-plate ,20 ,iron-gear-wheel ,2 ,basic-underground-belt , , , ,
|
|
||||||
,uranium-fuel-cell ,angels-power-nuclear-fuel-cell ,15 ,iron-plate ,1 ,uranium-235 ,29 ,uranium-238 , , , ,
|
|
|
|
@ -1,99 +0,0 @@
|
||||||
,artillery-wagon ,angels-artillery ,40 ,invar-alloy ,64 ,engine-unit ,10 ,iron-gear-wheel ,20 ,advanced-circuit ,16,pipe
|
|
||||||
,radar ,angels-artillery-a ,10 ,iron-plate ,5 ,iron-gear-wheel ,5 ,basic-circuit-board , , , ,
|
|
||||||
,artillery-turret ,angels-artillery-a ,60 ,concrete ,60 ,steel-plate ,40 ,iron-gear-wheel ,20 ,advanced-circuit , ,
|
|
||||||
,iron-stick ,angels-basic-intermediate ,1 ,iron-plate , , , , , , , ,
|
|
||||||
,engine-unit ,angels-basic-intermediate ,1 ,steel-plate ,1 ,iron-gear-wheel ,2 ,pipe , , , ,
|
|
||||||
,big-electric-pole ,angels-big-power-poles ,5 ,copper-plate ,5 ,steel-plate ,8 ,iron-stick , , , ,
|
|
||||||
,land-mine ,angels-capsules-a ,1 ,steel-plate ,2 ,explosives , , , , , ,
|
|
||||||
,slowdown-capsule ,angels-capsules-a ,2 ,steel-plate ,5 ,coal ,2 ,electronic-circuit , , , ,
|
|
||||||
,poison-capsule ,angels-capsules-a ,3 ,steel-plate ,10 ,coal ,3 ,electronic-circuit , , , ,
|
|
||||||
,grenade ,angels-capsules-a ,5 ,iron-plate ,10 ,coal , , , , , ,
|
|
||||||
,cluster-grenade ,angels-capsules-a ,5 ,steel-plate ,5 ,explosives ,7 ,grenade , , , ,
|
|
||||||
,repair-pack ,angels-chests-small-a ,2 ,iron-gear-wheel ,2 ,basic-circuit-board , , , , , ,
|
|
||||||
,iron-chest ,angels-chests-small-a ,8 ,iron-plate , , , , , , , ,
|
|
||||||
,steel-chest ,angels-chests-small-b ,8 ,steel-plate , , , , , , , ,
|
|
||||||
,copper-cable ,angels-copper-casting ,1 ,copper-plate , , , , , , , ,
|
|
||||||
,laser-turret ,angels-electric-a ,20 ,steel-plate ,12 ,battery ,20 ,electronic-circuit , , , ,
|
|
||||||
,cannon-shell ,angels-exploration-tank-a ,2 ,steel-plate ,2 ,plastic-bar ,1 ,explosives , , , ,
|
|
||||||
,explosive-cannon-shell ,angels-exploration-tank-a ,2 ,steel-plate ,2 ,plastic-bar ,2 ,explosives , , , ,
|
|
||||||
,tank ,angels-exploration-tank-a ,50 ,steel-plate ,32 ,engine-unit ,15 ,iron-gear-wheel ,10 ,advanced-circuit , ,
|
|
||||||
,gate ,angels-exploration-walls ,2 ,steel-plate ,2 ,electronic-circuit ,1 ,stone-wall , , , ,
|
|
||||||
,rocket-launcher ,angels-explosion-a ,5 ,steel-plate ,5 ,electronic-circuit ,2 ,shotgun , , , ,
|
|
||||||
,flamethrower-turret ,angels-fire ,20 ,steel-plate ,5 ,engine-unit ,1 ,flamethrower ,10 ,pipe , ,
|
|
||||||
,flamethrower-ammo ,angels-fire ,5 ,steel-plate ,50 ,liquid-fuel-oil ,50 ,liquid-naphtha , , , ,
|
|
||||||
,flamethrower ,angels-fire ,5 ,steel-plate ,5 ,iron-gear-wheel ,1 ,submachine-gun , , , ,
|
|
||||||
,empty-barrel ,angels-fluid-control ,1 ,steel-plate , , , , , , , ,
|
|
||||||
,pump ,angels-fluid-control ,1 ,steel-plate ,1 ,engine-unit ,1 ,copper-pipe , , , ,
|
|
||||||
,sulfuric-acid ,angels-fluid-converter-petrochem-sulfer-fluids,1 ,iron-plate ,5 ,sulfur ,100,water-purified , , , ,
|
|
||||||
,storage-tank ,angels-fluid-tanks ,20 ,iron-plate ,5 ,steel-plate ,1 ,bob-small-inline-storage-tank, , , ,
|
|
||||||
,medium-electric-pole ,angels-medium-power-poles ,2 ,copper-plate ,2 ,steel-plate ,4 ,iron-stick , , , ,
|
|
||||||
,heavy-armor ,angels-personal-equipment-armor ,100,copper-plate ,50 ,steel-plate , , , , , ,
|
|
||||||
,light-armor ,angels-personal-equipment-armor ,40 ,iron-plate , , , , , , , ,
|
|
||||||
,power-armor ,angels-personal-equipment-armor ,40 ,steel-plate ,20 ,electric-engine-unit,40 ,processing-unit , , , ,
|
|
||||||
,modular-armor ,angels-personal-equipment-armor ,50 ,steel-plate ,30 ,advanced-circuit , , , , , ,
|
|
||||||
,energy-shield-equipment ,angels-personal-equipment-combat-a ,10 ,steel-plate ,5 ,advanced-circuit , , , , , ,
|
|
||||||
,personal-laser-defense-equipment,angels-personal-equipment-combat-b ,5 ,steel-plate ,3 ,battery ,5 ,electronic-circuit , , , ,
|
|
||||||
,exoskeleton-equipment ,angels-personal-equipment-combat-c ,20 ,steel-plate ,30 ,electric-engine-unit,10 ,advanced-circuit , , , ,
|
|
||||||
,discharge-defense-equipment ,angels-personal-equipment-combat-c ,20 ,steel-plate ,5 ,processing-unit ,10 ,laser-turret , , , ,
|
|
||||||
,solar-panel-equipment ,angels-personal-equipment-power-a ,4 ,copper-cable ,2 ,steel-plate ,5 ,electronic-circuit , , , ,
|
|
||||||
,battery-equipment ,angels-personal-equipment-power-c ,10 ,steel-plate ,5 ,battery , , , , , ,
|
|
||||||
,belt-immunity-equipment ,angels-personal-equipment-power-d ,10 ,steel-plate ,5 ,advanced-circuit , , , , , ,
|
|
||||||
,night-vision-equipment ,angels-personal-equipment-power-d ,10 ,steel-plate ,5 ,advanced-circuit , , , , , ,
|
|
||||||
,personal-roboport-equipment ,angels-personal-equipment-robot-d ,5 ,steel-plate ,2 ,roboport-antenna-1 ,1 ,roboport-door-1 ,2 ,roboport-chargepad-1, ,
|
|
||||||
,firearm-magazine ,angels-physical-aa ,4 ,iron-plate , , , , , , , ,
|
|
||||||
,gun-turret ,angels-physical-aa ,5 ,copper-plate ,10 ,iron-plate ,1 ,submachine-gun , , , ,
|
|
||||||
,piercing-rounds-magazine ,angels-physical-aa ,5 ,copper-plate ,1 ,steel-plate ,1 ,firearm-magazine , , , ,
|
|
||||||
,pistol ,angels-physical-aa ,5 ,copper-plate ,5 ,iron-plate , , , , , ,
|
|
||||||
,submachine-gun ,angels-physical-aa ,5 ,iron-plate ,10 ,iron-gear-wheel ,1 ,pistol , , , ,
|
|
||||||
,combat-shotgun ,angels-physical-ba ,15 ,steel-plate ,5 ,wood ,1 ,shotgun , , , ,
|
|
||||||
,shotgun-shell ,angels-physical-ba ,2 ,copper-plate ,2 ,iron-plate , , , , , ,
|
|
||||||
,piercing-shotgun-shell ,angels-physical-ba ,5 ,copper-plate ,2 ,steel-plate ,2 ,shotgun-shell , , , ,
|
|
||||||
,shotgun ,angels-physical-ba ,5 ,iron-plate ,5 ,wood ,5 ,iron-gear-wheel ,2 ,pistol , ,
|
|
||||||
,accumulator ,angels-power-accumulator ,2 ,iron-plate ,10 ,battery ,2 ,electronic-circuit , , , ,
|
|
||||||
,uranium-fuel-cell ,angels-power-nuclear-fuel-cell ,15 ,iron-plate ,1 ,uranium-235 ,29 ,uranium-238 , , , ,
|
|
||||||
,heat-pipe ,angels-power-nuclear-heat-pipe ,10 ,copper-plate ,5 ,steel-plate , , , , , ,
|
|
||||||
,nuclear-reactor ,angels-power-nuclear-reactor-b ,500,concrete ,250,steel-plate ,500,advanced-circuit ,25 ,heat-pipe-2 , ,
|
|
||||||
,solar-panel ,angels-power-solar-panel ,4 ,copper-plate ,4 ,steel-plate ,14 ,electronic-circuit , , , ,
|
|
||||||
,boiler ,angels-power-steam-boiler ,1 ,stone-furnace ,4 ,pipe , , , , , ,
|
|
||||||
,steam-engine ,angels-power-steam-generator ,10 ,iron-plate ,8 ,iron-gear-wheel ,5 ,pipe , , , ,
|
|
||||||
,roboport ,angels-roboport-a ,15 ,steel-plate ,5 ,roboport-antenna-1 ,1 ,roboport-door-1 ,4 ,roboport-chargepad-1, ,
|
|
||||||
,flying-robot-frame ,angels-robot-a ,1 ,steel-plate ,1 ,electric-engine-unit,2 ,battery ,3 ,electronic-circuit , ,
|
|
||||||
,steel-plate ,angels-steel-casting ,2 ,iron-plate ,10 ,gas-oxygen , , , , , ,
|
|
||||||
,refined-concrete ,angels-stone-casting ,20 ,concrete ,1 ,steel-plate ,8 ,iron-stick ,100,water , ,
|
|
||||||
,substation ,angels-sub-power-poles ,5 ,copper-plate ,10 ,steel-plate ,5 ,advanced-circuit , , , ,
|
|
||||||
,car ,angels-vehicle-car ,20 ,iron-plate ,5 ,steel-plate ,8 ,engine-unit , , , ,
|
|
||||||
,loader ,belt ,5 ,iron-plate ,5 ,iron-gear-wheel ,5 ,electronic-circuit ,5 ,transport-belt ,5 ,inserter
|
|
||||||
,assembling-machine-2 ,bob-assembly-machine ,1 ,assembling-machine-1,2 ,steel-plate ,5 ,iron-gear-wheel ,3 ,electronic-circuit , ,
|
|
||||||
,assembling-machine-3 ,bob-assembly-machine ,1 ,assembling-machine-2,9 ,steel-plate ,5 ,steel-gear-wheel ,3 ,advanced-circuit , ,
|
|
||||||
,assembling-machine-1 ,bob-assembly-machine ,9 ,iron-plate ,5 ,iron-gear-wheel ,3 ,basic-circuit-board , , , ,
|
|
||||||
,cargo-wagon ,bob-cargo-wagon ,20 ,iron-plate ,20 ,steel-plate ,10 ,iron-gear-wheel , , , ,
|
|
||||||
,fluid-wagon ,bob-fluid-wagon ,16 ,steel-plate ,1 ,storage-tank ,10 ,iron-gear-wheel ,8 ,pipe , ,
|
|
||||||
,iron-gear-wheel ,bob-gears ,2 ,iron-plate , , , , , , , ,
|
|
||||||
,locomotive ,bob-locomotive ,30 ,steel-plate ,20 ,engine-unit ,10 ,electronic-circuit , , , ,
|
|
||||||
,burner-inserter ,bob-logistic-tier-0 ,1 ,iron-plate ,1 ,iron-gear-wheel , , , , , ,
|
|
||||||
,underground-belt ,bob-logistic-tier-1 ,14 ,tin-plate ,20 ,iron-gear-wheel ,2 ,basic-underground-belt , , , ,
|
|
||||||
,inserter ,bob-logistic-tier-1 ,1 ,iron-plate ,1 ,iron-gear-wheel ,1 ,basic-circuit-board , , , ,
|
|
||||||
,transport-belt ,bob-logistic-tier-1 ,2 ,tin-plate ,2 ,iron-gear-wheel ,1 ,basic-transport-belt , , , ,
|
|
||||||
,splitter ,bob-logistic-tier-1 ,8 ,tin-plate ,14 ,iron-gear-wheel ,5 ,basic-circuit-board ,1 ,basic-splitter , ,
|
|
||||||
,small-lamp ,circuit-network ,3 ,copper-cable ,1 ,iron-plate ,1 ,basic-circuit-board , , , ,
|
|
||||||
,programmable-speaker ,circuit-network ,5 ,copper-cable ,3 ,iron-plate ,4 ,iron-stick ,4 ,electronic-circuit , ,
|
|
||||||
,power-switch ,circuit-network ,5 ,copper-cable ,5 ,iron-plate ,2 ,electronic-circuit , , , ,
|
|
||||||
,electric-mining-drill ,extraction-machine ,10 ,iron-plate ,5 ,iron-gear-wheel ,3 ,basic-circuit-board , , , ,
|
|
||||||
,burner-mining-drill ,extraction-machine ,1 ,stone-furnace ,3 ,iron-plate ,3 ,iron-gear-wheel , , , ,
|
|
||||||
,pumpjack ,extraction-machine ,5 ,steel-plate ,10 ,iron-gear-wheel ,5 ,electronic-circuit ,10 ,pipe , ,
|
|
||||||
,beacon ,module-beacon ,10 ,copper-cable ,10 ,steel-plate ,20 ,electronic-circuit ,20 ,advanced-circuit ,1 ,crystal-splinter-harmonic
|
|
||||||
,electric-energy-interface ,other ,2 ,iron-plate ,5 ,electronic-circuit , , , , , ,
|
|
||||||
,chemical-plant ,petrochem-buildings-chemical-plant ,5 ,steel-plate ,5 ,iron-gear-wheel ,5 ,electronic-circuit ,5 ,pipe , ,
|
|
||||||
,oil-refinery ,petrochem-buildings-oil-refinery ,6 ,steel-plate ,12 ,steel-gear-wheel ,4 ,electronic-circuit ,36 ,steel-pipe , ,
|
|
||||||
,pipe ,pipe ,1 ,iron-plate , , , , , , , ,
|
|
||||||
,pipe-to-ground ,pipe-to-ground ,5 ,iron-plate ,10 ,pipe , , , , , ,
|
|
||||||
,centrifuge ,production-machine ,100,concrete ,50 ,steel-plate ,100,iron-gear-wheel ,100,advanced-circuit , ,
|
|
||||||
,lab ,production-machine ,10 ,iron-gear-wheel ,10 ,basic-circuit-board ,4 ,basic-transport-belt , , , ,
|
|
||||||
,automation-science-pack ,science-pack ,1 ,copper-plate ,1 ,iron-gear-wheel , , , , , ,
|
|
||||||
,electric-furnace ,smelting-machine ,10 ,stone-brick ,10 ,steel-plate ,5 ,advanced-circuit , , , ,
|
|
||||||
,steel-furnace ,smelting-machine ,10 ,stone-brick ,6 ,steel-plate , , , , , ,
|
|
||||||
,rail ,train-transport ,1 ,stone ,1 ,steel-plate ,1 ,iron-stick , , , ,
|
|
||||||
,rail-chain-signal ,train-transport ,5 ,iron-plate ,1 ,electronic-circuit , , , , , ,
|
|
||||||
,rail-signal ,train-transport ,5 ,iron-plate ,1 ,electronic-circuit , , , , , ,
|
|
||||||
,train-stop ,train-transport ,6 ,iron-plate ,3 ,steel-plate ,6 ,iron-stick ,5 ,electronic-circuit , ,
|
|
||||||
,offshore-pump ,washing-building ,1 ,iron-gear-wheel ,2 ,basic-circuit-board ,1 ,pipe , , , ,
|
|
|
|
@ -1,99 +0,0 @@
|
||||||
,artillery-wagon,angels-artillery,40,invar-alloy,64,engine-unit,10,iron-gear-wheel,20,advanced-circuit,16,pipe
|
|
||||||
,battery-equipment,angels-personal-equipment-power-c,10,steel-plate,5,battery
|
|
||||||
,big-electric-pole,angels-big-power-poles,5,copper-plate,5,steel-plate,8,iron-stick
|
|
||||||
,energy-shield-equipment,angels-personal-equipment-combat-a,10,steel-plate,5,advanced-circuit
|
|
||||||
,exoskeleton-equipment,angels-personal-equipment-combat-c,20,steel-plate,30,electric-engine-unit,10,advanced-circuit
|
|
||||||
,heat-pipe,angels-power-nuclear-heat-pipe,10,copper-plate,5,steel-plate
|
|
||||||
,medium-electric-pole,angels-medium-power-poles,2,copper-plate,2,steel-plate,4,iron-stick
|
|
||||||
,night-vision-equipment,angels-personal-equipment-power-d,10,steel-plate,5,advanced-circuit
|
|
||||||
,nuclear-reactor,angels-power-nuclear-reactor-b,500,concrete,250,steel-plate,500,advanced-circuit,25,heat-pipe-2
|
|
||||||
,personal-laser-defense-equipment,angels-personal-equipment-combat-b,5,steel-plate,3,battery,5,electronic-circuit
|
|
||||||
,personal-roboport-equipment,angels-personal-equipment-robot-d,5,steel-plate,2,roboport-antenna-1,1,roboport-door-1,2,roboport-chargepad-1
|
|
||||||
,solar-panel-equipment,angels-personal-equipment-power-a,4,copper-cable,2,steel-plate,5,electronic-circuit
|
|
||||||
,steam-engine,angels-power-steam-generator,10,iron-plate,8,iron-gear-wheel,5,pipe
|
|
||||||
,steel-chest,angels-chests-small-b,8,steel-plate
|
|
||||||
,substation,angels-sub-power-poles,5,copper-plate,10,steel-plate,5,advanced-circuit
|
|
||||||
,light-armor,angels-personal-equipment-armor,40,iron-plate
|
|
||||||
,heavy-armor,angels-personal-equipment-armor,100,copper-plate,50,steel-plate
|
|
||||||
,assembling-machine-1,bob-assembly-machine,9,iron-plate,5,iron-gear-wheel,3,basic-circuit-board
|
|
||||||
,automation-science-pack,science-pack,1,copper-plate,1,iron-gear-wheel
|
|
||||||
,iron-stick,angels-basic-intermediate,1,iron-plate
|
|
||||||
,beacon,module-beacon,10,copper-cable,10,steel-plate,20,electronic-circuit,20,advanced-circuit,1,crystal-splinter-harmonic
|
|
||||||
,accumulator,angels-power-accumulator,2,iron-plate,10,battery,2,electronic-circuit
|
|
||||||
,car,angels-vehicle-car,20,iron-plate,5,steel-plate,8,engine-unit
|
|
||||||
,iron-chest,angels-chests-small-a,8,iron-plate
|
|
||||||
,electric-energy-interface,other,2,iron-plate,5,electronic-circuit
|
|
||||||
,flying-robot-frame,angels-robot-a,1,steel-plate,1,electric-engine-unit,2,battery,3,electronic-circuit
|
|
||||||
,shotgun,angels-physical-ba,5,iron-plate,5,wood,5,iron-gear-wheel,2,pistol
|
|
||||||
,flamethrower,angels-fire,5,steel-plate,5,iron-gear-wheel,1,submachine-gun
|
|
||||||
,rocket-launcher,angels-explosion-a,5,steel-plate,5,electronic-circuit,2,shotgun
|
|
||||||
,pistol,angels-physical-aa,5,copper-plate,5,iron-plate
|
|
||||||
,combat-shotgun,angels-physical-ba,15,steel-plate,5,wood,1,shotgun
|
|
||||||
,submachine-gun,angels-physical-aa,5,iron-plate,10,iron-gear-wheel,1,pistol
|
|
||||||
,iron-gear-wheel,bob-gears,2,iron-plate
|
|
||||||
,burner-mining-drill,extraction-machine,1,stone-furnace,3,iron-plate,3,iron-gear-wheel
|
|
||||||
,electric-mining-drill,extraction-machine,10,iron-plate,5,iron-gear-wheel,3,basic-circuit-board
|
|
||||||
,small-lamp,circuit-network,3,copper-cable,1,iron-plate,1,basic-circuit-board
|
|
||||||
,land-mine,angels-capsules-a,1,steel-plate,2,explosives
|
|
||||||
,pipe,pipe,1,iron-plate
|
|
||||||
,pipe-to-ground,pipe-to-ground,5,iron-plate,10,pipe
|
|
||||||
,chemical-plant,petrochem-buildings-chemical-plant,5,steel-plate,5,iron-gear-wheel,5,electronic-circuit,5,pipe
|
|
||||||
,solar-panel,angels-power-solar-panel,4,copper-plate,4,steel-plate,14,electronic-circuit
|
|
||||||
,tank,angels-exploration-tank-a,50,steel-plate,32,engine-unit,15,iron-gear-wheel,10,advanced-circuit
|
|
||||||
,rail,train-transport,1,stone,1,steel-plate,1,iron-stick
|
|
||||||
,train-stop,train-transport,6,iron-plate,3,steel-plate,6,iron-stick,5,electronic-circuit
|
|
||||||
,rail-signal,train-transport,5,iron-plate,1,electronic-circuit
|
|
||||||
,locomotive,bob-locomotive,30,steel-plate,20,engine-unit,10,electronic-circuit
|
|
||||||
,rail-chain-signal,train-transport,5,iron-plate,1,electronic-circuit
|
|
||||||
,cargo-wagon,bob-cargo-wagon,20,iron-plate,20,steel-plate,10,iron-gear-wheel
|
|
||||||
,fluid-wagon,bob-fluid-wagon,16,steel-plate,1,storage-tank,10,iron-gear-wheel,8,pipe
|
|
||||||
,transport-belt,bob-logistic-tier-1,2,tin-plate,2,iron-gear-wheel,1,basic-transport-belt
|
|
||||||
,uranium-fuel-cell,angels-power-nuclear-fuel-cell,15,iron-plate,1,uranium-235,29,uranium-238
|
|
||||||
,boiler,angels-power-steam-boiler,1,stone-furnace,4,pipe
|
|
||||||
,modular-armor,angels-personal-equipment-armor,50,steel-plate,30,advanced-circuit
|
|
||||||
,power-armor,angels-personal-equipment-armor,40,steel-plate,20,electric-engine-unit,40,processing-unit
|
|
||||||
,assembling-machine-2,bob-assembly-machine,1,assembling-machine-1,2,steel-plate,5,iron-gear-wheel,3,electronic-circuit
|
|
||||||
,pumpjack,extraction-machine,5,steel-plate,10,iron-gear-wheel,5,electronic-circuit,10,pipe
|
|
||||||
,grenade,angels-capsules-a,5,iron-plate,10,coal
|
|
||||||
,cluster-grenade,angels-capsules-a,5,steel-plate,5,explosives,7,grenade
|
|
||||||
,storage-tank,angels-fluid-tanks,20,iron-plate,5,steel-plate,1,bob-small-inline-storage-tank
|
|
||||||
,engine-unit,angels-basic-intermediate,1,steel-plate,1,iron-gear-wheel,2,pipe
|
|
||||||
,oil-refinery,petrochem-buildings-oil-refinery,6,steel-plate,12,steel-gear-wheel,4,electronic-circuit,36,steel-pipe
|
|
||||||
,roboport,angels-roboport-a,15,steel-plate,5,roboport-antenna-1,1,roboport-door-1,4,roboport-chargepad-1
|
|
||||||
,pump,angels-fluid-control,1,steel-plate,1,engine-unit,1,copper-pipe
|
|
||||||
,gate,angels-exploration-walls,2,steel-plate,2,electronic-circuit,1,stone-wall
|
|
||||||
,repair-pack,angels-chests-small-a,2,iron-gear-wheel,2,basic-circuit-board
|
|
||||||
,steel-furnace,smelting-machine,10,stone-brick,6,steel-plate
|
|
||||||
,artillery-turret,angels-artillery-a,60,concrete,60,steel-plate,40,iron-gear-wheel,20,advanced-circuit
|
|
||||||
,flamethrower-turret,angels-fire,20,steel-plate,5,engine-unit,1,flamethrower,10,pipe
|
|
||||||
,gun-turret,angels-physical-aa,5,copper-plate,10,iron-plate,1,submachine-gun
|
|
||||||
,laser-turret,angels-electric-a,20,steel-plate,12,battery,20,electronic-circuit
|
|
||||||
,underground-belt,bob-logistic-tier-1,14,tin-plate,20,iron-gear-wheel,2,basic-underground-belt
|
|
||||||
,cannon-shell,angels-exploration-tank-a,2,steel-plate,2,plastic-bar,1,explosives
|
|
||||||
,flamethrower-ammo,angels-fire,5,steel-plate,50,liquid-fuel-oil,50,liquid-naphtha
|
|
||||||
,firearm-magazine,angels-physical-aa,4,iron-plate
|
|
||||||
,shotgun-shell,angels-physical-ba,2,copper-plate,2,iron-plate
|
|
||||||
,explosive-cannon-shell,angels-exploration-tank-a,2,steel-plate,2,plastic-bar,2,explosives
|
|
||||||
,piercing-rounds-magazine,angels-physical-aa,5,copper-plate,1,steel-plate,1,firearm-magazine
|
|
||||||
,piercing-shotgun-shell,angels-physical-ba,5,copper-plate,2,steel-plate,2,shotgun-shell
|
|
||||||
,assembling-machine-3,bob-assembly-machine,1,assembling-machine-2,9,steel-plate,5,steel-gear-wheel,3,advanced-circuit
|
|
||||||
,poison-capsule,angels-capsules-a,3,steel-plate,10,coal,3,electronic-circuit
|
|
||||||
,slowdown-capsule,angels-capsules-a,2,steel-plate,5,coal,2,electronic-circuit
|
|
||||||
,electric-furnace,smelting-machine,10,stone-brick,10,steel-plate,5,advanced-circuit
|
|
||||||
,splitter,bob-logistic-tier-1,8,tin-plate,14,iron-gear-wheel,5,basic-circuit-board,1,basic-splitter
|
|
||||||
,sulfuric-acid,angels-fluid-converter-petrochem-sulfer-fluids,1,iron-plate,5,sulfur,100,water-purified
|
|
||||||
,belt-immunity-equipment,angels-personal-equipment-power-d,10,steel-plate,5,advanced-circuit
|
|
||||||
,offshore-pump,washing-building,1,iron-gear-wheel,2,basic-circuit-board,1,pipe
|
|
||||||
,loader,belt,5,iron-plate,5,iron-gear-wheel,5,electronic-circuit,5,transport-belt,5,inserter
|
|
||||||
,power-switch,circuit-network,5,copper-cable,5,iron-plate,2,electronic-circuit
|
|
||||||
,programmable-speaker,circuit-network,5,copper-cable,3,iron-plate,4,iron-stick,4,electronic-circuit
|
|
||||||
,radar,angels-artillery-a,10,iron-plate,5,iron-gear-wheel,5,basic-circuit-board
|
|
||||||
,discharge-defense-equipment,angels-personal-equipment-combat-c,20,steel-plate,5,processing-unit,10,laser-turret
|
|
||||||
,burner-inserter,bob-logistic-tier-0,1,iron-plate,1,iron-gear-wheel
|
|
||||||
,inserter,bob-logistic-tier-1,1,iron-plate,1,iron-gear-wheel,1,basic-circuit-board
|
|
||||||
,centrifuge,production-machine,100,concrete,50,steel-plate,100,iron-gear-wheel,100,advanced-circuit
|
|
||||||
,lab,production-machine,10,iron-gear-wheel,10,basic-circuit-board,4,basic-transport-belt
|
|
||||||
,empty-barrel,angels-fluid-control,1,steel-plate
|
|
||||||
,refined-concrete,angels-stone-casting,20,concrete,1,steel-plate,8,iron-stick,100,water
|
|
||||||
,copper-cable,angels-copper-casting,1,copper-plate
|
|
||||||
,steel-plate,angels-steel-casting,2,iron-plate,10,gas-oxygen
|
|
|
25312
mod-recipes/recipes.org
25312
mod-recipes/recipes.org
File diff suppressed because it is too large
Load diff
24
raw.pl
24
raw.pl
|
@ -1,24 +0,0 @@
|
||||||
open(my $in, "<", "./mod-recipes/intermediate.csv") or die "Can't open intermediates.csv";
|
|
||||||
open(my $out, ">", "./mod-recipes/raw.csv") or die "Can't open raw.csv";
|
|
||||||
|
|
||||||
raw_ingredients();
|
|
||||||
|
|
||||||
sub raw_ingredients () {
|
|
||||||
$product = $ARGV[1];
|
|
||||||
while (<$in>){
|
|
||||||
@line = split(",", $_);
|
|
||||||
if ($line[1] == $product) {
|
|
||||||
print "ingredients $line[4]\n";
|
|
||||||
@ingredients = split(/\+/, $line[4]);
|
|
||||||
print "\t\@ingredients: @ingredients \n";
|
|
||||||
foreach my $ingredient (@ingredients) {
|
|
||||||
print "\t\t\$ingredient: $ingredient\n";
|
|
||||||
raw_ingredients($ingredient);
|
|
||||||
print "\t\t\trecurring! \$ingredient = $ingredient\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue