mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-18 06:43:32 -07:00
Refactoring the data extraction for factorio
Extracted more information with a modified version of Archipelago extractor. Matching PR for the extractor on its respective github.
This commit is contained in:
@@ -1 +1 @@
|
||||
["fluid-unknown","water","crude-oil","steam","heavy-oil","light-oil","petroleum-gas","sulfuric-acid","lubricant"]
|
||||
{"fluid-unknown":{"default_temperature":0,"max_temperature":0,"heat_capacity":1000},"water":{"default_temperature":15,"max_temperature":100,"heat_capacity":200},"crude-oil":{"default_temperature":25,"max_temperature":25,"heat_capacity":100},"steam":{"default_temperature":15,"max_temperature":1000,"heat_capacity":200},"heavy-oil":{"default_temperature":25,"max_temperature":25,"heat_capacity":100},"light-oil":{"default_temperature":25,"max_temperature":25,"heat_capacity":100},"petroleum-gas":{"default_temperature":25,"max_temperature":25,"heat_capacity":100},"sulfuric-acid":{"default_temperature":25,"max_temperature":25,"heat_capacity":100},"lubricant":{"default_temperature":25,"max_temperature":25,"heat_capacity":100}}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1,221 @@
|
||||
{"stone-furnace":{"smelting":true},"steel-furnace":{"smelting":true},"electric-furnace":{"smelting":true},"assembling-machine-1":{"crafting":true,"basic-crafting":true,"advanced-crafting":true},"assembling-machine-2":{"basic-crafting":true,"crafting":true,"advanced-crafting":true,"crafting-with-fluid":true},"assembling-machine-3":{"basic-crafting":true,"crafting":true,"advanced-crafting":true,"crafting-with-fluid":true},"oil-refinery":{"oil-processing":true},"chemical-plant":{"chemistry":true},"centrifuge":{"centrifuging":true},"rocket-silo":{"rocket-building":true},"character":{"crafting":true}}
|
||||
{
|
||||
"boiler":{
|
||||
"boiler":{
|
||||
"type":"boiler",
|
||||
"input_fluid":"water",
|
||||
"output_fluid":"steam",
|
||||
"target_temperature":165,
|
||||
"energy_usage":30000
|
||||
}
|
||||
},
|
||||
"nuclear-reactor":{
|
||||
"fuel_burner":{
|
||||
"type":"reactor",
|
||||
"categories":{
|
||||
"nuclear":true
|
||||
},
|
||||
"energy_usage":666666.666666666627861559391021728515625
|
||||
}
|
||||
},
|
||||
"heat-exchanger":{
|
||||
"boiler":{
|
||||
"type":"boiler",
|
||||
"input_fluid":"water",
|
||||
"output_fluid":"steam",
|
||||
"target_temperature":500,
|
||||
"energy_usage":166666.66666666665696538984775543212890625
|
||||
}
|
||||
},
|
||||
"burner-mining-drill":{
|
||||
"mining":{
|
||||
"type":"mining-drill",
|
||||
"categories":{
|
||||
"basic-solid":true
|
||||
},
|
||||
"speed":0.25,
|
||||
"input_fluid_box":false,
|
||||
"output_fluid_box":false
|
||||
}
|
||||
},
|
||||
"electric-mining-drill":{
|
||||
"mining":{
|
||||
"type":"mining-drill",
|
||||
"categories":{
|
||||
"basic-solid":true
|
||||
},
|
||||
"speed":0.5,
|
||||
"input_fluid_box":true,
|
||||
"output_fluid_box":false
|
||||
}
|
||||
},
|
||||
"offshore-pump":{
|
||||
"offshore-pump":{
|
||||
"type":"offshore-pump",
|
||||
"fluid":"water",
|
||||
"speed":20
|
||||
}
|
||||
},
|
||||
"pumpjack":{
|
||||
"mining":{
|
||||
"type":"mining-drill",
|
||||
"categories":{
|
||||
"basic-fluid":true
|
||||
},
|
||||
"speed":1,
|
||||
"input_fluid_box":false,
|
||||
"output_fluid_box":true
|
||||
}
|
||||
},
|
||||
"stone-furnace":{
|
||||
"crafting":{
|
||||
"type":"furnace",
|
||||
"speed":1,
|
||||
"categories":{
|
||||
"smelting":true
|
||||
},
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
}
|
||||
},
|
||||
"steel-furnace":{
|
||||
"crafting":{
|
||||
"type":"furnace",
|
||||
"speed":2,
|
||||
"categories":{
|
||||
"smelting":true
|
||||
},
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
}
|
||||
},
|
||||
"electric-furnace":{
|
||||
"crafting":{
|
||||
"type":"furnace",
|
||||
"speed":2,
|
||||
"categories":{
|
||||
"smelting":true
|
||||
},
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
}
|
||||
},
|
||||
"assembling-machine-1":{
|
||||
"crafting":{
|
||||
"type":"assembling-machine",
|
||||
"speed":0.5,
|
||||
"categories":{
|
||||
"crafting":true,
|
||||
"basic-crafting":true,
|
||||
"advanced-crafting":true
|
||||
},
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
}
|
||||
},
|
||||
"assembling-machine-2":{
|
||||
"crafting":{
|
||||
"type":"assembling-machine",
|
||||
"speed":0.75,
|
||||
"categories":{
|
||||
"basic-crafting":true,
|
||||
"crafting":true,
|
||||
"advanced-crafting":true,
|
||||
"crafting-with-fluid":true
|
||||
},
|
||||
"input_fluid_box":1,
|
||||
"output_fluid_box":1
|
||||
}
|
||||
},
|
||||
"assembling-machine-3":{
|
||||
"crafting":{
|
||||
"type":"assembling-machine",
|
||||
"speed":1.25,
|
||||
"categories":{
|
||||
"basic-crafting":true,
|
||||
"crafting":true,
|
||||
"advanced-crafting":true,
|
||||
"crafting-with-fluid":true
|
||||
},
|
||||
"input_fluid_box":1,
|
||||
"output_fluid_box":1
|
||||
}
|
||||
},
|
||||
"oil-refinery":{
|
||||
"crafting":{
|
||||
"type":"assembling-machine",
|
||||
"speed":1,
|
||||
"categories":{
|
||||
"oil-processing":true
|
||||
},
|
||||
"input_fluid_box":2,
|
||||
"output_fluid_box":3
|
||||
}
|
||||
},
|
||||
"chemical-plant":{
|
||||
"crafting":{
|
||||
"type":"assembling-machine",
|
||||
"speed":1,
|
||||
"categories":{
|
||||
"chemistry":true
|
||||
},
|
||||
"input_fluid_box":2,
|
||||
"output_fluid_box":2
|
||||
}
|
||||
},
|
||||
"centrifuge":{
|
||||
"crafting":{
|
||||
"type":"assembling-machine",
|
||||
"speed":1,
|
||||
"categories":{
|
||||
"centrifuging":true
|
||||
},
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
}
|
||||
},
|
||||
"lab":{
|
||||
"lab":{
|
||||
"inputs":[
|
||||
"automation-science-pack",
|
||||
"logistic-science-pack",
|
||||
"military-science-pack",
|
||||
"chemical-science-pack",
|
||||
"production-science-pack",
|
||||
"utility-science-pack",
|
||||
"space-science-pack"
|
||||
]
|
||||
}
|
||||
},
|
||||
"rocket-silo":{
|
||||
"crafting":{
|
||||
"type":"rocket-silo",
|
||||
"speed":1,
|
||||
"categories":{
|
||||
"rocket-building":true
|
||||
},
|
||||
"fixed_recipe":"rocket-part",
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
}
|
||||
},
|
||||
"character":{
|
||||
"crafting":{
|
||||
"type":"character",
|
||||
"speed":1,
|
||||
"categories":{
|
||||
"crafting":true
|
||||
},
|
||||
"input_fluid_box":0,
|
||||
"output_fluid_box":0
|
||||
},
|
||||
"mining":{
|
||||
"type":"character",
|
||||
"categories":{
|
||||
"basic-solid":true
|
||||
},
|
||||
"speed":0.5,
|
||||
"input_fluid_box":false,
|
||||
"output_fluid_box":false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
"factorio_version": "1.1",
|
||||
"dependencies": [
|
||||
"base >= 1.1.0",
|
||||
"? science-not-invited"
|
||||
"? science-not-invited",
|
||||
"! archipelago-extractor"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -141,6 +141,9 @@ end
|
||||
{# This got complex, but seems to be required to hit all corner cases #}
|
||||
function adjust_energy(recipe_name, factor)
|
||||
local recipe = data.raw.recipe[recipe_name]
|
||||
if recipe == nil then
|
||||
error("Some mod that is installed has removed recipe \"" .. recipe_name .. "\"")
|
||||
end
|
||||
local energy = recipe.energy_required
|
||||
|
||||
if (recipe.normal ~= nil) then
|
||||
@@ -168,6 +171,9 @@ end
|
||||
|
||||
function set_energy(recipe_name, energy)
|
||||
local recipe = data.raw.recipe[recipe_name]
|
||||
if recipe == nil then
|
||||
error("Some mod that is installed has removed recipe \"" .. recipe_name .. "\"")
|
||||
end
|
||||
|
||||
if (recipe.normal ~= nil) then
|
||||
recipe.normal.energy_required = energy
|
||||
@@ -188,6 +194,9 @@ data.raw["ammo"]["artillery-shell"].stack_size = 10
|
||||
{# each randomized tech gets set to be invisible, with new nodes added that trigger those #}
|
||||
{%- for original_tech_name, item_name, receiving_player, advancement in locations %}
|
||||
original_tech = technologies["{{original_tech_name}}"]
|
||||
if original_tech == nil then
|
||||
error("Some mod that is installed has removed tech \"{{original_tech_name}}\"")
|
||||
end
|
||||
{#- the tech researched by the local player #}
|
||||
new_tree_copy = table.deepcopy(template_tech)
|
||||
new_tree_copy.name = "ap-{{ tech_table[original_tech_name] }}-"{# use AP ID #}
|
||||
@@ -220,13 +229,13 @@ data:extend{new_tree_copy}
|
||||
{% endfor %}
|
||||
{% if recipe_time_scale %}
|
||||
{%- for recipe_name, recipe in recipes.items() %}
|
||||
{%- if recipe.category not in ("basic-solid", "basic-fluid") %}
|
||||
{%- if not recipe.mining %}
|
||||
adjust_energy("{{ recipe_name }}", {{ flop_random(*recipe_time_scale) }})
|
||||
{%- endif %}
|
||||
{%- endfor -%}
|
||||
{% elif recipe_time_range %}
|
||||
{%- for recipe_name, recipe in recipes.items() %}
|
||||
{%- if recipe.category not in ("basic-solid", "basic-fluid") %}
|
||||
{%- if not recipe.mining %}
|
||||
set_energy("{{ recipe_name }}", {{ flop_random(*recipe_time_range) }})
|
||||
{%- endif %}
|
||||
{%- endfor -%}
|
||||
|
||||
1
worlds/factorio/data/mods.json
Normal file
1
worlds/factorio/data/mods.json
Normal file
@@ -0,0 +1 @@
|
||||
{"base":"1.1.69","archipelago-extractor":"1.1.1"}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user