Noob lua question: accessing research times, how?
Posted: Sun Apr 03, 2016 1:30 am
This is a basic programming question, if i look for example at the game's files:
So I try the following:
But the game complains there is no such node, called bullet-damage-1. Anyone can explain me what's going wrong, because it seems to me, I'm basically doing just the same like (which works fine):
Code: Select all
type = "technology",
name = "bullet-damage-1",
icon = "__base__/graphics/technology/bullet-damage.png",
effects =
{
{
type = "ammo-damage",
ammo_category = "bullet",
modifier = "0.1"
}
},
prerequisites = {"military"},
unit =
{
count = 50,
ingredients =
{
{"science-pack-1", 1}
},
time = 30
},
upgrade = true,
order = "e-l-a"
Code: Select all
data.raw.technology["bullet-damage-1"].effects = {
{
{
type = "ammo-damage",
ammo_category = "bullet",
modifier = "0.1"
}
},
prerequisites = {"military"},
unit =
{
count = 50,
ingredients =
{
{"science-pack-1", 1}
},
time = 60 -- doubled for example
}}
Code: Select all
data.raw.recipe["steel-chest"].energy_required = 6
data.raw.recipe["steel-chest"].ingredients = {{"steel-plate", 10}}