[kovarex] [0.17.43] Probabilistic catalysts not counted correctly in production statistics

This subforum contains all the issues which we already resolved.
Post Reply
alercah
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Sun Apr 07, 2019 5:19 am
Contact:

[kovarex] [0.17.43] Probabilistic catalysts not counted correctly in production statistics

Post by alercah »

Angel's Bioprocessing has a recipe for wood which requires 1 tree and a saw blade, and produces some random amount of wood between 6 and 8 along with returning the saw blade at probability 0.9. In production statistics, however, these saw blades are counted as consumed always, but never produced. The result is that consumption appears to far outstrip production.

To observer, open the attached save file (from my seablock game, so requires many mods listed in the file) and look at production statistics for saw blades (I recommend 10 minute view). There are only four wood assemblers in the game (I promise there are no others elsewhere), and they take 4 seconds each to execute the recipe. Thus, they will be completing the recipe approximately once per minute. In the consumption statistics, there is approximately 60 saw blades used per minute, which lines up with this. However, they ought to be producing 54 saw blades per minute (90%), but the game only seems to count the handful per minute coming from the left hand assembler (which is currently short on iron). The result is that it looks like saw blades are being consumed far, far faster than they are.

Ideally, the produced saw blades would cancel out and the statistics would only reflect the actual net production or consumption. But it would also be ok if the recipe counted for both production and consumption. Either way, counting the consumption but not production is wrong in this case.
Attachments
sawblades.zip
(4.38 MiB) Downloaded 25 times
factorio-current.log
(65.11 KiB) Downloaded 23 times

kovarex
Factorio Staff
Factorio Staff
Posts: 7430
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.43] Probabilistic catalysts not counted correctly in production statistics

Post by kovarex »

Hello, thanks for the bug report.

There are 2 bugs related to this:
  • Probabilistic recipe result that is also a catalyst didn't put itself into consumed statistics when the probability check failed and the item wasn't produced - bug in Factorio code fixed for the next release
  • The recipe in the mod (angelsbioprocessing_0.6.2), did mark the result as catalyst, but not the ingredient. - bug in the mod.

Code: Select all

{
    type = "recipe",
    name = "wood-sawing",
    category = "crafting",
    subgroup = "bio-arboretum",
    enabled = "false",
    energy_required = 2,
    ingredients ={
      {type="item", name="solid-tree", amount=1},
      {type="item", name="solid-saw", amount=1}, -- the error is here, there should also be: catalyst_amount=1 in here to match it up
    },
    results=
    {
      {type="item", name="wood", amount_min=6, amount_max=8},
      {type="item", name="solid-saw", amount=1, catalyst_amount=1, probability= 0.9},
    },
	main_product = "wood",
    icon_size = 32,
    order = "h",
  },
Obviously we could check that this matches on the startup, but maybe the mods could use it somehow to make it not match, and I don't want to break mod compatibility at this point as it doesn't break anything critical.
But in this case, it obviously should be there (the catalyst_count=1 in the ingredient, and maybe the mod author should be notified).

When I hand-changed the mod as in the proposition and loaded the save, the consumption and production both equalized at around 16/m

someone1337
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

Re: [kovarex] [0.17.43] Probabilistic catalysts not counted correctly in production statistics

Post by someone1337 »

Production stats ARE important! :3

I have written a mod that periodically dumps them preceisely as I dislike the standard inpreceise ones you get in "p" and like to analyse the stats in excel/libeoffice sheets :)

a mouse-over tooltip in "p" showing the preceise number would be awesome :)

kovarex
Factorio Staff
Factorio Staff
Posts: 7430
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.43] Probabilistic catalysts not counted correctly in production statistics

Post by kovarex »

someone1337 wrote:
Tue Jul 16, 2019 2:26 pm
Production stats ARE important! :3

I have written a mod that periodically dumps them preceisely as I dislike the standard inpreceise ones you get in "p" and like to analyse the stats in excel/libeoffice sheets :)

a mouse-over tooltip in "p" showing the preceise number would be awesome :)
Critical and important are different things :)


Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users