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

Bugs which we just recently fixed in our development version and will reach you in the next release.
User avatar
Quezler
Fast Inserter
Fast Inserter
Posts: 160
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

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

Post 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
Attachments
Screenshot 2025-03-26 at 19.11.57.png
Screenshot 2025-03-26 at 19.11.57.png (78.27 KiB) Viewed 145 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3753
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

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

Post 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.
Post Reply

Return to “Resolved for the next release”