DivOresity

by Mylon

Ores are all mixed up! Adds a small logistical challenge dealing with impure ores. AKA "Diversity".

Content
7 months ago
0.16 - 1.1
1.32K
Mining

b vanilla resource settings are ignored !?

5 years ago
(updated 5 years ago)

on a map with almost default settings but modified sizes
(trees NONE, coal NONE, and oil NONE),
i get lots of coal when using this mod.

btw: if someone wants to do a pure vanilla map without coal, he'll still get coal from mining big rocks :-)

ps: the description in the mod settings confused me a little: Stone Byproduct Ratio is 0.3 by default and has a tooltip "chance that ore is stone", does that mean that 30% of the field are stone ? on the other hand, the Diversity Quota is 0.2 by default and has a tooltip "Percent of ores that get replaced". does that mean that the chance for ore replacements is 0.002 ? and when taken together, does this mean that half an ore field (20%+30%) consists of different ores, or only 0.5% (only 1 ore in 200 mined ores) ? 50% seems a bit high to me and 0.5% a bit too low. using a mod i checked the min and max values of mod settings and diversity is in the range 0.01 to 1.00 while stone ratio is in the range 0.15 to 0.75, with the restriction that the stone ratio has to be bigger than the ore ratio. thus (when using the stone option at all) the ore diversity can not exceed 74% and i can get up to 75% yield of stone ?! and since coal size NONE is ignored (size is the only setting that allows to select NONE), will other weighted resources (eg richness very low, very high, etc) be considered for calculating the chances ?
it would be nice to have a bit more info about those percentages so that in a long game (maybe with several additional ore types too) i will not be surprised by what i get from huge fields in the late game ...

to check the results myself, i have started a map with standard settings, except sizes (trees NONE, coal NONE, oil NONE), and with an additional mod that gives ice ore. the result (with standard settings on this mod 0.2 and 0.3) :
total ores in one patch 126k, stone 9% (almost 10%; is that the difference between 0.2 and 0.3? edit:NO), main type is iron 78% (is this almost 80% = 100% minus ore diversity 0.2 ? edit:NO), next is coal with 3% (instead of NONE), the other ore types 4% and 2% and no uranium ... other ore fields gave similar results, eg 195k total, stone 9%, coal 4%, others 80%, 2%, 3%, no uranium; or 7.8M total, 14% stone, 4% coal, 75/2/2/0% for the rest, and finally an uranium field: total 2M, stone 10%, uranium 74%, and all others (including coal!) 3%

to find out about the setting of 0.74/0.75, i did other attempts with ore 0.74 and stone 0.75 and different sizes and richnesses, and found that one main ore type always gives around 40% while the other four types give around 15% (including stone and coal! and apparently completely ignoring size and richness). now i am confused even more ...

5 years ago

Stone byproduct is a bit weird. For each ore, a random number is generated. If the number is below divOresity quota, it's a random ore (which could be stone!). If it's between divOresity and Stone Byproduct, then it's stone. The reason Stone Byproduct is limited is because as you noted, if it's 75%, you're going to have a massive surplus of stone. The main feature of Stone Byproduct is that it deletes native stone patches.

I haven't thought to add checking if ores are disabled. I'm not really sure why you'd want to do that as you can't make plastic without coal in vanilla.

5 years ago

Stone byproduct is a bit weird.

no, not at all, but the (missing) description how it is calculated makes it look wierd :-)
maybe it would be more clear to specify the ranges separately, eg divoresity quota 0 to x%, stone quota 0 to y%, and vanilla quota 0 to z%, with a hint that x+y+z=100; or you simply scale up/down the sum of x+y+z to 100 ...

The reason Stone Byproduct is limited is because as you noted, if it's 75%, you're going to have a massive surplus of stone.

if divoresity is 74% and stone is 75%, there is no big surplus of stone, but the two limitations (to divoresity<stone and to stone <=75%) cause at least 25% of the ore to be the original ore type. with these limitations it's eg not possible to have all ore be random with some small surplus of stone: eg 10 ore types with divoresity 100% would give an average of 10% each, and with an additional stone quota it could be 90% divoresity (9% each) and 10% stone (total of 9%+10%=only 19% stone and no big surplus)

The main feature of Stone Byproduct is that it deletes native stone patches.

why not do the same for coal ? :-) :-)

I haven't thought to add checking if ores are disabled. I'm not really sure why you'd want to do that as you can't make plastic without coal in vanilla.

you also can't make plastic without oil in vanilla ...
and yet vanilla settings allow to disable any ore type and resource, including copp/iron, and trees, and coal and oil ...

then you shouldn't force those excluded ore types and resources back on the user.

i was trying to setup a map on a really dry desert which has no water (but uses ice ore), and thus also no forest (trees, grass, etc all NONE), and thus also oil (which comes from rotten trees) set to none. there are several mods which allow having no trees (and one mod to give you 40 raw wood at the start to later start greenhouses), no coal (making coal from wood), no oil (making oil from wood and/or coal, or even make something directly from biomass etc).
the only two problems that i still have: power production uses up a lot of water in the early game and steam is consumed instead of being condensed back to water (thus i was running out of water and had to allow stone wells which make water for free, with the "self-restriction" to only use them for power plants; maybe some day someone will write a mod that modifies steam turbines to give back at least a bit of warm water :-) and that most oil generation mods convert fewoil+coal to moreoil, or fewheavy+wood to moreheavy (thus always requiring a few liters of oil or heavy to get the process started), or require sulfur to make fertilizer for some plastic that is made without oil (but first requires a little petrol to get the sulfur) ,etc.

what do you think of this algorithm for calculating the amounts:
size setting times richness setting gives 0-25 points (0-5 times 1-5) for each ore. all those points are added up and scaled to 100%. then the mod settings tell how much ore from vanilla should be untouched (v%), how much ore should be from divoresity (d%), and maybe a few additional specific ores can get percentages (eg c% coal, s% stone). v+d+c+s should sum up to 100%, or that again can be normalized/scaled to 100%.
using 100% divoresity then would take the settings from vanilla and mix them all up with different ratios.
using 50% vanilla, 40% divoresity, 9% stone and 1% coal would keep the vanilla feel of ore patch distibution while mixing up 40% of the field, and guaranteeing some stone and very little coal if those two values are set and coal/stone are set to none in vanilla settings.
ps: that was just an idea, and the mod and how you do it is completely up to you. to not mess up existing maps or annoy people who got used to the current way it is done, maybe you could do this in a new mod "prOrepOretional divOresity" ? :-)

5 years ago

Moin Mylon,

you are very good, that the frist what i must say!
But i have the same issue as Anson_AKB :-(

I have a modpack called: "ALFS Modpack" in this modpack is your Dirt Path mod and i love them !!
And now i see your DivOresity thats great because Ore Chaos have issues with Factorio Plus Plus mod but your mod not.
We play with no vanilla Coal, Stone, Uran and Oil so in the start konfigs resource settings I have set in size none, but unfortunately by your mod are coal again, stone etc in the ore fields.
This is bad for my modpack because it is characterized by this difficulty.

So please can you please please see if you get it fixed?

We can also talk directly with each other, for example. over
Discord: https://discord.gg/PxWu2kB
Facebook: https://www.facebook.com/groups/298377737648775/
or
Facebook: https://www.facebook.com/Aprisus

I hope I get some feedback from you because your DivOresity mod would complete the ALFS modpack!

In this sense
Until then, then
  Aprisus :-)

5 years ago

Okay, I'll look to see if ores are disabled and remove them from the potential list of replacement candidates.

5 years ago
(updated 5 years ago)

after a short look at the source, you seem to build a table with one entry per ore type and then randomly select one element of that table if some ore shall be replaced. what do you think of using a weighted table, simply adding 0 to 5 entries for each ore (0 for size=none, 1 for size=verysmall, ..., 5 for size=verybig) and then randomly select one entry from that table (just like you do now)? result would be to not generate ores that are set to NONE, but also having more of those ores that have a bigger size and less chance for ores that have a smaller size ... using only the size might be good enough for a first version, and if you want it more complicated eg the sum or the product of size and richness (resulting in 0 to 10 or in 0 to 25 entries per ore in that table; optionally any other formula), maybe even with the third frequency parameter, could be used for balancing.

the above method would allow easily to completely eliminate some ore (eg stone or coal) from a map and also not get them randomly as "replacement-ore" in some other ore fields. but by specifying some size for those ores and setting a checkmark in the mod settings (for stone, for coal, or for both, just like it is done for stone now) you could prohibit stone/coal fields from being generated at all as fields of their own (caused by that checkmark) and still get those ore types as "replacement-ores" in other ore fields (with a probability that is given by the size and/or richness parameters in the "new game" screen of factorio; and by using those probabilities there would even be no need to specify some extra parameters for their probability in the mod settings).

5 years ago

I updated the mod to support disabling some resources. It's also no longer completely random what the replaced resource is and depends on resource coverage and resource frequency.

5 years ago

Cool THANK YOU :-)
sorry for late thank you ...

Bis denn, dann
Aprisus

New response