Page 1 of 1

2 new recipe suggestions

Posted: Mon Oct 14, 2019 10:10 pm
by milkyman
Can someone make these recipes for my own personal use?

1. coal compression

unlocked by default on map start

2 coal = 1 stone

0.5 crafting time
----------------------------------------------------
2. Advanced coal compression

unlocked by advanced material processing

4 coal + 2 stone = 4 stone + 1 coal

1 crafting time

Re: 2 new recipe suggestions

Posted: Tue Oct 15, 2019 7:12 am
by darkfrei
milkyman wrote: Mon Oct 14, 2019 10:10 pm 2 coal + 1 stone = 2 stone + 0.5 coal

0.5 crafting time
Why not 4c+2s => 4s+1c for one second? The half of item looks as too few.

Re: 2 new recipe suggestions

Posted: Tue Oct 15, 2019 8:12 am
by milkyman
darkfrei wrote: Tue Oct 15, 2019 7:12 am
milkyman wrote: Mon Oct 14, 2019 10:10 pm 2 coal + 1 stone = 2 stone + 0.5 coal

0.5 crafting time
Why not 4c+2s => 4s+1c for one second? The half of item looks as too few.
That’s actually not a bad idea, I’m gonna update it

Re: 2 new recipe suggestions

Posted: Wed Oct 16, 2019 7:06 am
by darkfrei
milkyman wrote: Tue Oct 15, 2019 8:12 am That’s actually not a bad idea, I’m gonna update it
The first recipe is really easy, just copy the info.json from any mod to the new folder and change it, then put this code to the data.lua (use Notepad++ for it):

Code: Select all

date:extend({
  {
    type="recipe",
    name="coal-to-ore-compression",
    ingredients={{"coal", 2}},
    result="stone"
  }
})
Default time is 0.5, default icon is icon from result item. The recipe has default locale from result item locale, here the recipe names as "Stone".

Re: 2 new recipe suggestions

Posted: Wed Oct 16, 2019 7:17 pm
by darkfrei
milkyman wrote: Mon Oct 14, 2019 10:10 pm Can someone make these recipes for my own personal use?
The code of asked mod:

Code: Select all

data:extend ({
  {
    type = "recipe",
    name = "coal-to-stone-compression",
    icons = {
      {icon = "__core__/graphics/editor-selection.png", icon_size = 32}, -- why I cant without it?
      {icon = "__base__/graphics/icons/coal.png",  scale = 0.6, shift = {-8,  0}, icon_size = 32},
      {icon = "__base__/graphics/icons/stone.png", scale = 0.6, shift = { 8,  0}, icon_size = 32}
      },
    -- icon_size = 32,
    subgroup = "raw-material",
    order = "c-c-a",
    category = "advanced-crafting", -- in the assembling machine only, not for player crafting
    enabled = true,
    energy_required = 0.5, -- it's time in seconds
    ingredients = {{"coal", 2}},
    result = "stone"
  },
  
  {
    type = "recipe",
    name = "advanced-coal-to-stone-compression",
    icons = {
      {icon = "__core__/graphics/editor-selection.png", icon_size = 32}, -- why I cant without it?
      {icon = "__base__/graphics/icons/coal.png",  scale = 0.6, shift = {-8,  0}, icon_size = 32},
      {icon = "__base__/graphics/icons/stone.png", scale = 0.6, shift = { 8, -8}, icon_size = 32},
      {icon = "__base__/graphics/icons/stone.png", scale = 0.6, shift = { 8,  8}, icon_size = 32},
      },
    
    subgroup = "raw-material",
    order = "c-c-b",
    category = "advanced-crafting",
    enabled = false, -- needs technology if false
    energy_required = 1, -- it's time in seconds
    ingredients = {{"coal", 4}, {"stone", 2}},
    results = {{"coal", 1}, {"stone", 4}}
  }
})
    
table.insert(data.raw.technology["advanced-material-processing"].effects, {type = "unlock-recipe", recipe = "advanced-coal-to-stone-compression"})

Re: 2 new recipe suggestions

Posted: Wed Oct 16, 2019 7:29 pm
by milkyman
thank you so much for this i can't believe you actually made it!