Baron Sludge

by wasmoo

Baron Sludge adds a small tech tree and optional processing steps around natural materials.

Content
11 months ago
0.18 - 1.1
490
Manufacturing
Owner:
wasmoo
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
4 years ago
Latest Version:
1.1.15 (11 months ago)
Factorio version:
0.18 - 1.1
Downloaded by:
490 users

Baron Sludge adds a small tech tree and optional processing steps around natural materials.

Natural materials can be "purified" into higher quality materials that produce more when processed. For example, stone can be "purified" into clay; smelted clay yields 150% more stone bricks than stone alone.

Purification also creates "sludge" which can processed back into water, and occassionally (10%) produces another material.

When Baron Sludge is used with Baron Factions, each faction gains exclusive access to one of the purification and sludge processing trees.

Resource Table

Resource Cleaned Product Sludge Sludge Product [Faction]
Stone Clay Stone Sludge Crude Oil Burner
Coal Coke Coal Sludge Uranium Ore Burner
Copper Ore Cuprite Copper Sludge Iron Ore Electric
Iron Ore Magnetite Iron Sludge Stone Heat
Uranium Ore Yellowcake Uranium Sludge Copper Ore Heat
Crude Oil Sweet Crude Oil Oil Sludge Coal Steam
Wood Coke Wood Sludge Sawdust Steam

 

Modding

This mod adds baronSludge as a global library.

How to create a new purification and sludge process.

For basic mods, only steps 1-4 are needed.

  1. Create a new "pure" item or fluid (OPTIONAL) - baronSludge.createPureItem finds and creates a modified copy of an existing item or fluid. The resulting item will be called "purified-[item]". The item or fluid may alternatively be created without calling baronSludge.
    data:extend{
      util.merge{baronSludge.createPureItem("stone"), {
        icon = "__baron-sludge__/graphics/icons/purified-stone.png",
        icon_size = 64,
        order="s[sludge]-a",
      }}
    }
  1. Create a new "sluge" fluid (OPTIONAL) - baronSludge.createSludge creates a new sludge using the icon of an existing item or fluid. The resulting fluid will be called "[item]-sludge". The sludge may alternatively be created without calling baronSludge.
    data:extend{
      util.merge{
        baronSludge.createSludge("stone"), {
          order="s[sludge]-a"
      }}
    }
  1. Create purification recipe - baronSludge.createPurification creates a new purification recipe (category purifier). By default, this recipe is also enabled for all modules and added to the "purifier" technology. If the new technology is used, it will also be gated on technologies for smelting the original material (this is to prevent advanced materials from becoming available too early.)
    data:extend{
      baronSludge.createPurification{
        orig="stone",           -- The name (or proto) of the input item/fluid
        pure="purified-stone",  -- The name (or proto) of the output item/fluid main_product
        sludge="stone-sludge",  -- The name (or proto) of the sludge fluid byproduct (can be "water")
        amount=1,               -- [OPTIONAL] the amount of input and output per cycle
        hidden=false,           -- [OPTIONAL] set to true to hide recipe (as if via settings)
        new_technology=false,   -- [OPTIONAL] also create a new gating technology for purification
      }
    }
  1. Create sludge processing recipe - baronSludge.createSludgeProcessing creates a new sludge processing recipe (category purifier). By default, this recipe is also enabled for all modules and added to the "sludge" technology.
    data:extend{
      baronSludge.createSludgeProcessing{
        sludge="stone-sludge",  -- The name (or proto) of the sludge fluid to use
        product="crude-oil",    -- The name (or proto) of the sludge procesing result (can be same as original material)
        probability=0.1,        -- [OPTIONAL] The probabilty of creating the product amount
        product_amount=1,       -- [OPTIONAL] The amount of product created
        hidden=false,           -- [OPTIONAL] set to true to hide recipe (as if via settings)
        new_technology=false,   -- [OPTIONAL] also create a new technology for sludge processing
      }
    }
  1. Add purification configuration (OPTIONAL) - baronSludge.addPureConfig defines how recipes will be converted with the new "pure" materials. If omitted, this will be derived from the purifier recipes and defaults will be used.
    baronSludge.addPureConfig{
      orig = data.raw.item["coal"],           -- The _proto_ of the raw item
      pure = data.raw.item["purified-coal"],  -- The _proto_ of the pure item
      ingredient_multiplier = 2,              -- Multiplier for the ingredients of recipe
      result_multiplier = 3,                  -- Multiplier for the results of recipe
      hidden=false,                           -- [OPTIONAL] set to true to hide recipe (as if via settings)
      new_smelting_technology = true,         -- [OPTIONAL] also create a new technology for each recipe affected by this config
    },
  1. Manually add upgrade recipes (OPTIONAL) - baronSludge.createUpgradedRecipe will create the recipe for a pure resource, which will be named "[pure-name]-[recipe-name]". The recipe can then be freely modified. The recipe is also added to the same modules and appropriate technologies. If omitted, baronSludge will automatically call this for all appropriate recipes during the data and data-final-fixes stages.
    data:extend{
      baronSludge.createUpgradedRecipe("advanced-oil-processing")
    }