Help in fix my mod
Help in fix my mod
- Attachments
-
- bandicam 2016-06-29 16-10-19-570.jpg (68.19 KiB) Viewed 3448 times
-
- natural-gas_0.8.5.zip
- (45.49 KiB) Downloaded 95 times
- bobingabout
- Smart Inserter

- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Help in fix my mod
I didn't look at the actual mod, but looking at the screenshot...
Your Comma is in the wrong place on those lines with a comment.
Change:
effects = {} --[[max]],
to
effects = {}, --[[max]]
Same with prerequisites
and so on.
Your Comma is in the wrong place on those lines with a comment.
Change:
effects = {} --[[max]],
to
effects = {}, --[[max]]
Same with prerequisites
and so on.
Re: Help in fix my mod
Re: Help in fix my mod
I'm pretty certain your error is a misplaced bracket in your technology\natural-gas.lua file
Change
To
I don't have the time to check for certain, unfortunately. Let us know if that works. 
Change
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"
})
Re: Help in fix my mod
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" })
Re: Help in fix my mod
You need to put the whole prototype definition into another set of curly braces. data:extend() takes a table of tables.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Help in fix my mod
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.
Re: Help in fix my mod
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
})Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Help in fix my mod
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
}
})
- Attachments
-
- bandicam 2016-07-02 23-49-27-663.jpg (47.89 KiB) Viewed 3342 times
Re: Help in fix my mod
Yeah, that recipe is not part of the base game and it's not defined by the mod so far. This is something the author of the mod would need to make up. But... what would you need it for? If you just want to pump gas out of the ground with a pumpjack, it already works without the recipe (once you remove the require("defines") from control.lua)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Help in fix my mod
yes it is, I just want to rock the machine oil, but it would be desirable that it was technology, but I think I will come down and simple version, just put the machine to download and share.
do not tell me how ??
1) during the first resource appears on the map and set up as a resource.
do not tell me how ??
1) during the first resource appears on the map and set up as a resource.
Re: Help in fix my mod
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 })

