After reading through all the prototypes around resources and map gen settings/autoplace settings, I can't see a way to make it only spawn one of the entity.
I want a fixed yield, with a fixed size and just one to appear anywhere the resource is "rolled". I can't see an easy way to do this. Is it to with the noise generation? Do I need a basically black/white noise distributed to roughly what I'm after?
How to add a mineable fluid resource that only spawns one entity per patch?
Re: How to add a mineable fluid resource that only spawns one entity per patch?
I don't remember exactly how it's done, but Krastorio does this for Immersite deposits. You could check the source code there for reference.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Re: How to add a mineable fluid resource that only spawns one entity per patch?
I was trying to think of all the mods that did this and rememebered some from my K2SE playthrough, then ruled it out as SE isn't 2.0 yet... Totally forgetting Immersite is from K2. Thank you, I will do just that.
Re: How to add a mineable fluid resource that only spawns one entity per patch?
Also pyrawores does that with e.g. aluminium rock. It's basically a very low spawning probability
Re: How to add a mineable fluid resource that only spawns one entity per patch?
In vanilla, we use EntityPrototype.map_generator_bounding_box to indirectly limit how much it can be created in a patch.