I want to re-balance the existing Inserters in the game, so as to reduce the prevalence of Fast Inserter use. I used to unthinkingly just always use those myself, until I started using the Inserter Energy Rebalance mod. But I'm not entirely happy with that mod, I'd rather make my own (note also that I'm not touching Burner Inserters - those are scary weird, I'm worried about breaking something, and honestly I think they work fine as they are).
My approach is three-fold:
1. Increase the crafting time of higher-tier Inserters. Normal Inserters take 1s, not 0.5, Long ones take 2s, then 3s for Fast Inserters and 4s for Smart Inserters.
2. Add a fractional Steel cost to Long Inserters and Smart Inserters.
3. Increase the power use and the drain of Fast Inserters and Smart Inserters (and Long Inserters too).
I've accomplished items #1 and #2 above just fine, but #3 confounds me.
Here is the mode code that works:
Code: Select all
data.raw.recipe["basic-inserter"].energy_required = 1
data.raw.recipe["science-pack-2"].ingredients =
{
{"basic-inserter", 1},
{"basic-transport-belt", 2}
}
data.raw.recipe["science-pack-2"].energy_required = 12
data.raw.recipe["science-pack-2"].result_count =2
data.raw.recipe["long-handed-inserter"].energy_required = 10
data.raw.recipe["long-handed-inserter"].ingredients =
{
{"iron-gear-wheel", 5},
{"iron-plate", 4}, {"steel-plate",1},{"basic-inserter",5}
}
data.raw.recipe["long-handed-inserter"].result_count =5
data.raw.recipe["fast-inserter"].energy_required = 6
data.raw.recipe["fast-inserter"].ingredients =
{
{"iron-plate", 3}, {"steel-plate",1}, {"basic-inserter",2}, {"electronic-circuit", 4}
}
data.raw.recipe["fast-inserter"].result_count = 2
data.raw.recipe["smart-inserter"].energy_required = 4
data.raw.recipe["smart-inserter"].ingredients =
{
{"electronic-circuit", 4} ,{"fast-inserter",1}
}
data.raw.recipe["smart-inserter"].result_count = 1
data.raw.recipe["science-pack-3"].ingredients =
{
{"smart-inserter", 1},
{"steel-plate", 2}, {"battery", 3}, {"advanced-circuit", 3} }
data.raw.recipe["science-pack-3"].energy_required = 30
data.raw.recipe["science-pack-3"].result_count = 3
The problem is the energy usage.
I've tried to add more to the section on Fast Inserters, so that it reads like this:
Code: Select all
data.raw.recipe["fast-inserter"].energy_required = 6
data.raw.recipe["fast-inserter"].ingredients =
{
{"iron-plate", 3}, {"steel-plate",1}, {"basic-inserter",2}, {"electronic-circuit", 4}
}
data.raw.recipe["fast-inserter"].result_count = 2
data.raw.entity["long-handed-inserter"].energy_per_movement = 6000
data.raw.entity["long-handed-inserter"].energy_per_rotation = 6000
So, basically, I don't know what I'm doing. I suspect that it's wrong of me to use data.raw.entity, or perhaps it's wrong to use the energy_per_movement and energy_per_rotation and I should use something else instead. Or perhaps the problem is caused by me stating the energy in joules (or watts although that would be wrong physics) and the game expects me to state them in kilos (or even megas) instead, although I found the energy_per_movement/rotation thing in the game's data files and its "field value" or whatever it's called was expressed in thousands, thus presumably in joules.
My hunch is that the error is indeed the entity thing, but I have no clue what it should be instead of data.raw.entity["entity-name].*