Sample:
Code: Select all
local foo = 5 * data.raw.recipe["iron-plate"].energy_required
data.raw.recipe["my-bar"].energy_required = foo + 16
The game errors on bootup stating that i cannot use arithmetic on a nil valued field.
Maybe I'm not quite understanding fully how the data loading works.