Resource Spawner Overhaul

by orzelek

Overhauls resource spawning system.

13 days ago
0.14 - 1.1
1678345

g Support for dualores

1 year, 4 months ago

Hello,

Can you add support for the 6 ores from my dualores mod?
Code below:

function fillDualOresConfig(config)
config["dual-ore1"] =
{
type="resource-ore",
allotment=10,
spawns_per_region={min=1, max=1},
richness=15000,
size={min=12, max=15},
min_amount = 150,
starting={richness=12000, size=20, probability=0},
}
config["dual-ore2"] =
{
type="resource-ore",
allotment=30,
spawns_per_region={min=1, max=1},
richness=15000,
size={min=15, max=20},
min_amount = 150,
starting={richness=12000, size=20, probability=0},
}
config["dual-ore3"] =
{
type="resource-ore",
allotment=30,
spawns_per_region={min=1, max=1},
richness=15000,
size={min=15, max=20},
min_amount = 150,
starting={richness=12000, size=20, probability=0},
}
config["dual-ore4"] =
{
type="resource-ore",
allotment=30,
spawns_per_region={min=1, max=1},
richness=12000,
size={min=15, max=20},
min_amount = 150,
starting={richness=12000, size=20, probability=0},
}
config["dual-ore5"] =
{
type="resource-ore",
allotment=30,
spawns_per_region={min=1, max=1},
richness=12000,
size={min=15, max=20},
min_amount = 150,
starting={richness=12000, size=20, probability=0},
}
config["dual-ore6"] =
{
type="resource-ore",
allotment=20,
spawns_per_region={min=1, max=1},
richness=12000,
size={min=15, max=20},
min_amount = 150,
starting={richness=12000, size=20, probability=0},
}
end

1 year, 4 months ago

Are you sure you want such low allotment values?
You are adding six different ores with low chance of spawning. If they are required for something finding a particular one might prove to be a challange.

1 year, 4 months ago

Also looking at mod screenshots you seem to be mixing the ores with each other.
Thats what RSO will specifically prevent - it preferes to spawn homogenous patches.

1 year, 4 months ago

Great questions

Low values should be fine. They are not required for anything. Instead they act as a buffer where the user can choose to convert them into whichever of the 2 base ores they have more need of. It’s a twist on the morphite mod, but by limiting the choice to binary for each ore the hope is the user does not have to deal with measuring the opportunity cost of a large number of potential uses for any individual ore.

I did some internal testing with the config provided. The config I copied from excluded from the starting region. I was able to find my ores a moderate distance away, don’t have a strong preference on if they get included at start so left it as is. If any of my users push for including in starting region I’m ok reconsidering the values.

The mixed patches shown in the screenshots are actually homogeneous within each patch. I did some tricks with the graphics of each dual ore so it looks like a mix of the two base ores.

Thanks for your consideration

1 year, 4 months ago

Added the config and released 6.2.4 with it.

New response