If I Had A Nickel


Adds nickel ore and plates, invar alloy, and some mechanical components.

Content
3 months ago
1.1
10.8K
Mining Manufacturing

i RSO Compatibility

2 years ago

Hello!

When I start a new game with this mod and RSO both enabled, I get a line in chat that says "The resource nickel-ore is not configured in RSO. It won't be spawned!"

Would it be possible to add compatibility with RSO to this mod?

I'm excited to try it out, along with Brass Tacks!

1 year, 11 months ago
(updated 1 year, 11 months ago)

This is a bit old, so sorry if you figured it out yourself.

This has to be handled on RSO's end, and so far RSO doesn't include this ore. But! You can add it to your local copy in the meantime if you want. Extract the rso-mod_(version number) file to your main factorio mod directory. Then in the ResourceConfigs folder, add a new file named IfNickel.lua and put the following in it:

function fillIfNickelConfig(config)

config["nickel-ore"] = {
    type="resource-ore",

    allotment=80,
    spawns_per_region={min=1, max=1},
    richness=14000,
    size={min=20, max=29},
    min_amount=300,

    starting={richness=5000, size=25, probability=1},

    multi_resource_chance=0.20,
    multi_resource={
        ["iron-ore"] = 4,
        ['copper-ore'] = 4,
        ['nickel-ore'] = 2,
        ["coal"] = 4,
        ["stone"] = 4,
    }
}

end

In the same file, add this line

require("resourceconfigs.IfNickel")

to the area of the file with a lot of other lines that look like that. Then add these lines

if game.active_mods["IfNickel"] then
    fillIfNickelConfig(config)
end

to the area with a bunch of lines that look like THAT.

That will add Nickel as a spawning ore with the same spawn density as bzlead (which is where I copied those first values from. If you want to make it spawn more or less, adjust allotment up or down. For reference iron is 100). Note that you'll have to do this every time RSO updates until this ore is added to RSO.

New response