Page 1 of 1

[boskid][2.0.43] expected resources (map/resource) inaccurate for probabilities

Posted: Wed Mar 26, 2025 6:13 pm
by Quezler
The expected results are floated down, resulting in way less or even 0 reporting under expected resources.

The expected behavior is that probabilities are shown/summed, possibly rounded to 2 decimals.

Throw this in a data-final-fixes.lua and create a new world, notice how on the starting ore plots the map says 0 and selecting a resource has no number at all:

Code: Select all

for _, resource in pairs(data.raw.resource) do
    if resource.minable and resource.minable.result then
        resource.minable.results = {
            {
                type = "item",
                name = resource.name,
                amount = 1,
            },
            {
                type = "item",
                name = "coin",
                amount = 1,
                probability = 0.0002
            }
        }
        resource.minable.result = nil
    end
end
https://discord.com/channels/1396775903 ... 8931297311

Re: [2.0.43] expected resources (map/resource) inaccurate for probabilities

Posted: Wed Mar 26, 2025 7:34 pm
by boskid
Quite minor, the expected amounts were rounded down for each resource entity. Decided to get rid of this rounding down as it does not affect base game at all. Fixed for 2.0.44.