

Code: Select all
data:extend(
{
type = "technology",
name = "natural-gas-2",
icon = "__base__/graphics/technology/oil-gathering.png",
prerequisites = {"steel-processing"},
effects =
{
{
type = "unlock-recipe",
recipe = "natural-gas"
},
unit =
{
count = 60000,
ingredients =
{
{"science-pack-1", 8},
{"science-pack-2", 6},
{"science-pack-3", 4},
},
time = 10
},
order = "e-f-a"
},
})
Code: Select all
data:extend(
{
type = "technology",
name = "natural-gas-2",
icon = "__base__/graphics/technology/oil-gathering.png",
prerequisites = {"steel-processing"},
effects =
{
{
type = "unlock-recipe",
recipe = "natural-gas"
},
},
unit =
{
count = 60000,
ingredients =
{
{"science-pack-1", 8},
{"science-pack-2", 6},
{"science-pack-3", 4},
},
time = 10
},
order = "e-f-a"
})
xcompwiz wrote:I'm pretty certain your error is a misplaced bracket in your technology\natural-gas.lua file
ChangeToCode: Select all
data:extend( { type = "technology", name = "natural-gas-2", icon = "__base__/graphics/technology/oil-gathering.png", prerequisites = {"steel-processing"}, effects = { { type = "unlock-recipe", recipe = "natural-gas" }, unit = { count = 60000, ingredients = { {"science-pack-1", 8}, {"science-pack-2", 6}, {"science-pack-3", 4}, }, time = 10 }, order = "e-f-a" }, })
I don't have the time to check for certain, unfortunately. Let us know if that works.Code: Select all
data:extend( { type = "technology", name = "natural-gas-2", icon = "__base__/graphics/technology/oil-gathering.png", prerequisites = {"steel-processing"}, effects = { { type = "unlock-recipe", recipe = "natural-gas" }, }, unit = { count = 60000, ingredients = { {"science-pack-1", 8}, {"science-pack-2", 6}, {"science-pack-3", 4}, }, time = 10 }, order = "e-f-a" })
please example or in help and full code.prg wrote:You need to put the whole prototype definition into another set of curly braces. data:extend() takes a table of tables.
Code: Select all
data:extend({ -- <--- add brace here
{
type = "technology",
name = "natural-gas-2",
icon = "__base__/graphics/technology/oil-gathering.png",
prerequisites = {"steel-processing"},
effects =
{
{
type = "unlock-recipe",
recipe = "natural-gas"
},
},
unit =
{
count = 60000,
ingredients =
{
{"science-pack-1", 8},
{"science-pack-2", 6},
{"science-pack-3", 4},
},
time = 10
},
order = "e-f-a"
} -- <--- add brace here
})
thanks new bugprg wrote:Then the problem becomes that you're trying to unlock a recipe that doesn't exist. The mod indeed does not define any recipes so far.Code: Select all
data:extend({ -- <--- add brace here { type = "technology", name = "natural-gas-2", icon = "__base__/graphics/technology/oil-gathering.png", prerequisites = {"steel-processing"}, effects = { { type = "unlock-recipe", recipe = "natural-gas" }, }, unit = { count = 60000, ingredients = { {"science-pack-1", 8}, {"science-pack-2", 6}, {"science-pack-3", 4}, }, time = 10 }, order = "e-f-a" } -- <--- add brace here })
Code: Select all
data:extend(
{
{
type = "autoplace-control",
name = "natural-gas",
richness = true,
order = "a-c-c"
},
{
type = "noise-layer",
name = "natural-gas"
},
{
type = "resource",
name = "natural-gas",
icon = "__base__/graphics/icons/fluid/petroleum-gas.png",
flags = {"placeable-neutral"},
category = "basic-fluid",
order="a-c-c",
infinite = false,
minimum = 75000,
normal = 75000,
minable =
{
hardness = 1,
mining_time = 3.1,
results =
{
{
type = "fluid",
name = "petroleum-gas",
amount_min = 12.5,
amount_max = 12.5,
probability = 1
}
}
},
collision_box = {{ -1.4, -1.4}, {1.4, 1.4}},
selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
autoplace =
{
control = "natural-gas",
sharpness = 0.80,
max_probability = 0.03,
richness_multiplier = 35000000,
richness_base = 35000000,
size_control_multiplier = 0.1,
peaks =
{
{
influence = 0.1
},
{
influence = 0.075,
starting_area_weight_optimal = 0.4,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
{
influence = 0.54,
noise_layer = "natural-gas",
noise_octaves_difference = -2.7,
noise_persistence = 0.3
}
}
},
stage_counts = {0},
stages =
{
sheet =
{
filename = "__natural-gas__/graphics/entity/natural-gas/natural-gas.png",
priority = "extra-high",
width = 75,
height = 61,
frame_count = 4,
variation_count = 1
}
},
map_color = {r=0.5, g=0.8, b=0.9},
map_grid = false
}
})
prg wrote:Then the problem becomes that you're trying to unlock a recipe that doesn't exist. The mod indeed does not define any recipes so far.Code: Select all
data:extend({ -- <--- add brace here { type = "technology", name = "natural-gas-2", icon = "__base__/graphics/technology/oil-gathering.png", prerequisites = {"steel-processing"}, effects = { { type = "unlock-recipe", recipe = "natural-gas" }, }, unit = { count = 60000, ingredients = { {"science-pack-1", 8}, {"science-pack-2", 6}, {"science-pack-3", 4}, }, time = 10 }, order = "e-f-a" } -- <--- add brace here })