Override Existing (Vanilla) Object?
Posted: Wed May 11, 2016 11:03 am
Hi,
can someone explain me, how to modificate the max. distance of the normal underground belt with an new technology?
This is what I actual have:
But how to change the max_distance of the standard underground beld without creating an completly new ingame item, I want to override the vanilla one.
Can someone help me 
can someone explain me, how to modificate the max. distance of the normal underground belt with an new technology?
This is what I actual have:
Code: Select all
data:extends({
type = "technology",
name = "underground-belt-upgrad-MK1",
icon = "underground-beld-upgrades/graphics/technology/underground-belt-1.png",
effects =
{
{
type = "unlock-recipe",
recipe = "underground-belt-upgrad-MK2"
}
},
prerequisites = {"logistics-2", "automation-2"},
unit =
{
count = 250,
ingredients =
{
{"science-pack-1", 3},
{"science-pack-2", 2},
},
time = 15
},
order = "a-f-c",
},
type = "technology",
name = "underground-belt-upgrad-MK2",
icon = "underground-beld-upgrades/graphics/technology/underground-belt-2.png",
effects =
{
{
}
},
prerequisites = {"underground-belt-upgrad-MK1"},
unit =
{
count = 300,
ingredients =
{
{"science-pack-1", 3},
{"science-pack-2", 2},
{"science-pack-3", 1},
},
time = 20
},
order = "a-f-d",
},
})
Code: Select all
effects =
{
{
type = "unlock-recipe",
recipe = "underground-belt-upgrad-MK2"
______________________________________
first upgrade here eg.:
type = "basic-transport-belt-to-ground",
name = "--belt-tunnel",
max_distance = 10
But we know, this is the wrong syntax
______________________________________
}
