I figured I would start a thread to get input and ideas. I don't know well this scales, but as long as Factorio can deal with a large amount of recipes with somewhat long names it should work a-ok.
Here is an imgur album which explains how it works
I like the current way of selecting the recipe, but since smart inserters only allow 5 filters it doesn't scale all that well...
Obviously it would be a huge undertaking to create all the tanks and the recipes by hand, so I made a program to create the items and the recipes from the given parts. To give you an idea of how it works here is the config file I used to generate the imgur example. Only the tanks are generated though, the engines, chassis, and all the other parts are made by hand and then used as input for the program.
Code: Select all
[templates]
recipe = D:/LuaDev/TankMod/recipe.lua
entity = D:/LuaDev/TankMod/tank.lua
item = D:/LuaDev/TankMod/item.lua
[base]
graphics = "__TankMod__/graphics/items/"
format = ".png"
entityout = D:\Win8\Spel\Factorio\mods\TankMod_1.0.0\prototypes\entities\tanks.lua
recipeout = D:\Win8\Spel\Factorio\mods\TankMod_1.0.0\prototypes\recipes\tanks.lua
itemout = D:\Win8\Spel\Factorio\mods\TankMod_1.0.0\prototypes\items\tanks.lua
[preconvertsettings]
--$chassis name = 1$name
[exportsettings]
minable result = $name
[engine]
name = +"tmengine1"
weight = +1000
consumption = "100kW"
effectivity = 1.0
burner effectivity = 1.0
--fuel_inventory_size?
[engine]
name = +"tmengine2"
weight = +2000
consumption = "600kW"
effectivity = 1.0
burner effectivity = 1.0
[chassis]
$weaponcount = 1
name = +"tmchassis1"
weight = 1000
collision_box = {{-0.9, -1.3}, {0.9, 1.3}}
max_health = 1000
resistances =
{
{
type = "fire",
decrease = 100,
percent = 100
},
},
--fuel_inventory_size?
--inventory_size?
[chassis]
$weaponcount = 3
name = +"tmchassis2"
weight = 2000
collision_box = {{-0.9, -1.3}, {0.9, 1.3}}
max_health = 2000
[weapon]
name = +"tmminigun"
weight = +500
+guns =
{
"tmminigun"
}
[weapon]
name = +"tmcannon"
weight = +500
+guns =
{
"tmcannon"
}
What do you think? Worth working on?