Awesome sink

by Quezler

Feed items inside and get a higher quality item every X items without random chance.

Content
a month ago
2.0
2.07K
Factorio: Space Age Icon Space Age Mod
Mining Manufacturing Cheats

g Question about rounding

a month ago

Hey, I'm just wondering how the logic in the mod handles rounding. I see that it basically takes 100/X number of items, where X is the total % quality loaded into the sink. How does this work when the number isn't round?

For instance, if you had 4 legendary Quality Module 3s in there (20% quality) you'll get an upcycled item every 5 inputs. But at 18.8% it's something like 5.32. Does that mean it'll ignore the fraction and just put out an upcycled part every 6?

a month ago

behind the scene it actually uses 1000, so 2.5 quality just becomes 25, and for every 1000 "points" it spits out an item, and quality can only have one decimal

a month ago

Okay, so just to clarify my understanding. With your example, it would take 40 parts to get one upcycled part?

Those are still round numbers. I guess my main question is if I load 4 epic qual 3 modules into the sink (18.8% since each module is 4.7%), that equates to an upcycle every 5.319 (I guess every 5.3 parts). Is this functionally different from using 3 rare and 1 epic module (16.7% total), which equates to 5.98 parts.

Since I can't load a fraction of a part into the system, what does it do with the fraction? Whether it's 100 or 1000 shouldn't matter here. The points are still fractional.

a month ago

place an assembler and put your modules in, and then run this command whilst your cursor is over it:
/c game.print(serpent.line(game.player.selected.effects))
the game reports that as 1.8799999

and with this command you can see how many points my mod things its worth: (188)
/c game.print(math.floor((game.player.selected.effects["quality"] or 0) * 100 + 0.5))

and with just a single epic quality 3 modules the numbers from the above commands are 0.46999 & 47

a month ago

188 * 5 = 940
188 * 6 = 1128

this mod will just pay out for every 1000 points, basically the delay between them can vary when they take turns in jumping high or low above 1000, but the game just does not care about module effects defined past 2 decimals (quality is actually defined with 2, what you see in the gui already has it moved by one)

a month ago
(updated a month ago)

I think I'm still confused, sorry. Do 3 rare + 1 epic module in the sink produce an upcycled part every 5 parts or every 6 parts? Or every 5 parts, and the 0.3 leftover is saved and spits out an extra part when that fraction equals 1?

Edit: I posted before seeing your last comment. So the mod stores the extra fraction then and just delays the output?
Edit2: So if I understand, After 5 parts the counter will be at 940. The 6th part loaded in will spit out an upcycled part, and the remaining 128 points just sit there. The next 5 parts loaded in (940 points worth) then spit out another upcycle, leaving 68 points left. The cycle after that leaves 8 points, etc. So it will alternate between outputting a part every few cycles since that fraction is irrational (and I don't feel like doing the math on the series to see how it repeats lol).

a month ago

yes

New response