[Dominik] [0.16] Rounding glitch for recipes with fractional ingredien

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

[Dominik] [0.16] Rounding glitch for recipes with fractional ingredien

Post by staviq »

Recipes with fractional ingidiends sometime show as craftable ( meaning all the ingredients are in the inventory ), when in reality they are not.

Note the "1" next to the green wire recipe:

Image

What is happening: A 0.5 rubber is required for this recipe, i have none in the inventory, but the recipe shows as craftable.
What should happen: Recipe should not show as craftable with a "1". Instead, it should only appear craftable if a full item is in the inventory, and then go from insuficient ingredients ( faded color ), to craftable with a "2", and update in the increments of 2.

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [0.16] Rounding glitch for recipes with fractional ingredien

Post by Dominik »

Does it only show as craftable, or you can actually craft it?

staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [0.16] Rounding glitch for recipes with fractional ingredien

Post by staviq »

Dominik wrote:Does it only show as craftable, or you can actually craft it?
It shows as craftable, but you can not craft it, you can see the "Not enough ingredients" in the chat/log text thingy

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [0.16] Rounding glitch for recipes with fractional ingredien

Post by Dominik »

I will try to do something about it. What is some small mod that uses it?
How does it work anyway? You have 1 rubber, craft the thing that cost 0.5, what are you left with?
It seems to me that using fractions of ingredients must lead to many problems.

credomane
Filter Inserter
Filter Inserter
Posts: 278
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: [Dominik] [0.16] Rounding glitch for recipes with fractional ingredien

Post by credomane »

It isn't using actually using fractional ingredients. Everything is a whole ingredient just when Factorio goes to compute the total raw ingredients it looks fractional after it works backwards through the recipes to the raw ingredients. Hovering over unmodded vanilla green circuits will show copper plates as a fractional value in the "total raw" too. Since you need 2 copper wires but they are crafted in 3's from 1 copper plates this results in 0.7 of a copper plate in the total raw.

In Bob's mods (which from what this screenshot was taken):

1 green wire needs 1 insulated wire.
Insulated wire is made in quantities of 2 and needs 1 rubber and 2 tinned wire.
Tinned wire is made in 3's. Requires 1 tin plate and 3 copper wire.
copper wire is a vanilla recipe 1 copper place for 3 copper wire.

Factorio total raw isn't showing this part but:
rubber is made from resin in a 1 to 1 ratio.
resin is made from 1 wood or with research 10 heavy oil.

[edit]
I doubt the issue has anything thing to do with the fractional values appearing in total raw. My guess since there are multiple recipes to craft rubber the games sees that you can craft it using one recipe but when you click to craft it actually tries and fails to craft it using a different recipe. That has been an issue plaguing bob's mods for a long long time. Reminds me of the old wood vs synthetic wood (made from oil products) issue of old. Bob managed to work around it somehow but I don't know what he did. Rubber might require the same fix on Bob's end.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Dominik] [0.16] Rounding glitch for recipes with fractional ingredien

Post by Rseding91 »

Can you upload a set of mods and a small save file that reproduce the problem described here?
If you want to get ahold of me I'm almost always on Discord.

staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [Dominik] [0.16] Rounding glitch for recipes with fractional ingredien

Post by staviq »

Rseding91 wrote:Can you upload a set of mods and a small save file that reproduce the problem described here?
I think i just found a way to reproduce it, by accident.

Additionally it seems to be a gui glitch of some sort, because the craftable item count changes after i close and reopen players inventory, without changing craft queue.

Steps to reproduce with the provided game save file:

1. Steps must be done before the crafting queue clears ( is should be busy crating gears )
2. Open players inventory
3. Slowly, at the rate of about one click per second, one at the time, add "Green wire" to the crafting queue ( for some reason the bug does not happen for me if I click too fast )
4. After several "Green wire"s are added to the queue, players inventory will show there is one more craftable, but on the ingredients list the "Rubber" is in red and the game properly refuses to add the "Green wire" to the crafting queue.
5. As long as you don't close the player's inventory and the crafting queue is busy making gears, "Green wire" will show as craftable with the small "1"
6. Close the player's inventory and reopen it, "Green wire" is correctly, no longer craftable.

7. If you manage to do all this before crafting queue empties, you can cancel the green wire from the queue, close and reopen players inventory and repeat from the step 2, the bug will happen again.

This is the result i get:
Image
Attachments
mod-settings.json
(41.38 KiB) Downloaded 69 times
BBB_4.zip
(8.77 MiB) Downloaded 63 times

Post Reply

Return to “Pending”