Help in fix my mod

Place to get help with not working mods / modding interface.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Help in fix my mod

Post by Airat9000 »

:(

:D
Attachments
bandicam 2016-06-29 16-10-19-570.jpg
bandicam 2016-06-29 16-10-19-570.jpg (68.19 KiB) Viewed 3141 times
natural-gas_0.8.5.zip
(45.49 KiB) Downloaded 73 times
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Help in fix my mod

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Help in fix my mod

Post by Airat9000 »

:( not in table search please help
xcompwiz
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri May 27, 2016 8:18 pm
Contact:

Re: Help in fix my mod

Post 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. :)
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Help in fix my mod

Post 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!
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Help in fix my mod

Post by prg »

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!
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Help in fix my mod

Post 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.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Help in fix my mod

Post 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.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Help in fix my mod

Post 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
  }
})
Attachments
bandicam 2016-07-02 23-49-27-663.jpg
bandicam 2016-07-02 23-49-27-663.jpg (47.89 KiB) Viewed 3035 times
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Help in fix my mod

Post 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)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Help in fix my mod

Post 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.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Help in fix my mod

Post 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 ;(
Post Reply

Return to “Modding help”