One of the values I want to alter is the power field, which are strings with something like "50kW". I need to be able to multiply that values, meaning I need to be able to separate it from the text part. How can I go about doing this?
I want to be able to quickly alter/overwrite some parts of a prototype, but not have to have a long string of alterations like this. Also, I don't want to just entirely overwrite the whole original prototype. Is it possible to only overwrite particular parts of it?
Code: Select all
data.raw["recipe"]["basic-bullet-magazine"].ingredients =
{
{"iron-plate", 2}, -- 2
{"copper-plate", 1},
{"coal", 1}
}
data.raw["recipe"]["basic-bullet-magazine"].energy_required = 2 -- 2
data.raw["recipe"]["basic-bullet-magazine"].result_count = 1