Details...you asked for it
You can easily change starting resources, every record of "resource-ore" or "resource-liquid" can have starting field:
Code: Select all
The generator tries to make sure that at least (richness * size) amount of ore or (richness/2) amount of liquid is generated at start loc.
"richness_distance_factor" increases amount of resources by multiplying any generated pile of resources by (richness_distance_factor ^ distance_in_regions_from_starting_location), as comments in config explain, by default it is 3% per region, so if resource is generated 20 regions away from the starting location then the resource multiplier for that resource would be 1.03 ^ 20 = ~1,8, in other words 80% increase.
multi_resource is a bit overkill right now, it works like that:
1. If resource is rolled in a region (lets call it primary), we then check if it has multi_resource_chance/multi_resource properties, if it has:
2. Roll for multi_resource_chance and if we lucky roll one of resources from "multi_resource" table, based on allotment.
^ 4 - is an allotment value, the higher the value the more common resource is. If there are two resources, first having allotment of 4 and second having allotment of 1, than first will be rolled 80% of time, if we add another resource with allotment value of 5, than first resource would show up only 40% of time, second - 10% and 3rd - 50%.
3. Find a chunk neighboring to the rolled primary and queue it there with size and richness multi_resource_size_factor and multiplied by multi_resource_richness_factor.
Size and richness come from "main" record for rolled multi resource.
4. Now funny thing happens, we roll for "multi_resource_chance" again, but this time it multiplied by "multi_resource_chance_diminish"^1, i.e. reduced.
5. We do 2. and 3. again, but this time size and richness are multi_resource_size_factor^2
6. Steps 4-5 continue until roll fails, every successful roll the chance for the next roll is reduced as well as size and richness
Rahjital wrote:is it possible to generate resource fields large enough to cover several chunks?
Mod already trying to do so, the current limits in script are 2x2 chunks, possible 3x3 is the limit with existing script, not exactly sure. It seems that engine sends event about chunk generation only when neighboring chunks are already created.
In any case size limit can be increased if resource generation is delayed until all neighboring chunks in certain radius are created by the game engine.