Page 1 of 1

Unable to set custom resource richness to 1

Posted: Wed Jul 24, 2024 5:15 pm
by dusher
Hi,

When prototyping a new resource, using the most basic possible richness_expression of a literal number of 1 (and a probability expression meaning the resource should be basically everywhere), the resource does not appear on the map whatsoever.

The moment I increase that number to 2, the resource appears completely blanketing the whole map, all with a richness of 2.

Is there a reason a richness of 1 seems not to be permitted? Is there something I'm doing wrong that could be disallowing it to happen?

Thanks,
dusher.

Re: Unable to set custom resource richness to 1

Posted: Wed Jul 24, 2024 5:39 pm
by Koub
Searching into the API docs, I see that :

Code: Select all

richness_expression :: NoiseExpression optional 
(https://lua-api.factorio.com/latest/typ ... expression)

And the link to noise expression says https://lua-api.factorio.com/latest/typ ... ssion.html

I don't see anywhere that 1 is a valid value.

Bear in mind I have never ever tried to mod anything, so I might be wrong.

Re: Unable to set custom resource richness to 1

Posted: Wed Jul 24, 2024 6:19 pm
by Bilka
dusher wrote: Wed Jul 24, 2024 5:15 pm The moment I increase that number to 2, the resource appears completely blanketing the whole map, all with a richness of 2.

Is there a reason a richness of 1 seems not to be permitted? Is there something I'm doing wrong that could be disallowing it to happen?
Resource entities with exactly 1 richness aren't spawned by the game. This is a bug that is fixed in 2.0. See also viewtopic.php?p=599920#p599920.