Page 1 of 1

Help in fix my mod

Posted: Wed Jun 29, 2016 1:17 pm
by Airat9000
:(

:D

Re: Help in fix my mod

Posted: Thu Jun 30, 2016 9:27 am
by bobingabout
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.

Re: Help in fix my mod

Posted: Fri Jul 01, 2016 7:05 pm
by Airat9000
:( not in table search please help

Re: Help in fix my mod

Posted: Fri Jul 01, 2016 7:15 pm
by xcompwiz
I'm pretty certain your error is a misplaced bracket in your technology\natural-gas.lua file

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"
  },
 
})
To

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"
})
I don't have the time to check for certain, unfortunately. Let us know if that works. :)

Re: Help in fix my mod

Posted: Sat Jul 02, 2016 3:51 pm
by Airat9000
xcompwiz wrote:I'm pretty certain your error is a misplaced bracket in your technology\natural-gas.lua file

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"
  },
 
})
To

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"
})
I don't have the time to check for certain, unfortunately. Let us know if that works. :)

:( not work!

Re: Help in fix my mod

Posted: Sat Jul 02, 2016 4:20 pm
by prg
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

Posted: Sat Jul 02, 2016 5:28 pm
by Airat9000
prg wrote:You need to put the whole prototype definition into another set of curly braces. data:extend() takes a table of tables.
please example or in help and full code.

Re: Help in fix my mod

Posted: Sat Jul 02, 2016 7:02 pm
by prg

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
    })
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.

Re: Help in fix my mod

Posted: Sat Jul 02, 2016 8:49 pm
by Airat9000
prg wrote:

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
    })
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.
thanks new bug

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
  }
})

Re: Help in fix my mod

Posted: Sat Jul 02, 2016 9:33 pm
by prg
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)

Re: Help in fix my mod

Posted: Sat Jul 02, 2016 11:37 pm
by Airat9000
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.

Re: Help in fix my mod

Posted: Sat Jul 23, 2016 1:27 am
by Airat9000
prg wrote:

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
    })
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.
:? not work ;(