greeny / SatisfactoryTools

Satisfactory Tools for planning and building the perfect base.
https://www.satisfactorytools.com/
MIT License
268 stars 57 forks source link

An option to show splitting fractions #55

Open aldanor opened 3 years ago

aldanor commented 3 years ago

When designing perfect splitting, often ratios pop up like 7/15 and 8/15 etc, which is very hard to figure from numbers like 124.44/min and 142.22/min.

It would be nice if it could be displayed like this:

--> 124.44/min (7/15) --> 142.22/min (8/15)

greeny commented 3 years ago

Hi, not sure about fractions, but I think I can show percentages, if that's enough? Fractions are sometimes hard/impossible to calculate.

aldanor commented 3 years ago

Fractions are much better when designing splitters, percentages don't tell you much quite often.

E.g. how do you split 53.33% off?.. Well, if you know that it's 7:8 (i.e., 7/15 and 8/15), you can do this:

(The example above is not even so bad, what about 77.14285714285715%? Well, it's 27/35 in fact, so it's a 27:8 split ratio)

Using fractions is generally better than using floats for computations like this because it's completely lossless and there's no rounding errors (you can always show a fraction as a decimal, but you can't do the inverse). IIRC there's some JS libraries like Fractions.js that are pretty good at this, too, which provides drop-in replacements for the built-in Number.

If this app supported proper fractions, it would surely be a step ahead compared to all other calculators, I think :)

greeny commented 3 years ago

I'm gonna have a look at it, thanks. Although I never had any issues like that since I usually don't care about splitting ratios, manifolds (overflow method) work the same eventually, so I'm saving myself the pain of designing splitters and I just connect everything and it works :)

aldanor commented 3 years ago

Agreed, manifolds are great within factories, it's more for cases of splitting some raw resources at the very-very start before they flow into production. Anyways, it's not that critical :)

Another thing I've noted - it takes a while to figure how much each node produces since you have to add it all up yourself, e.g. you have a constructor producing iron plates and then it splits into three nodes - you have numbers for all those arrows but not for the constructor node itself.

greeny commented 3 years ago

Thanks for the suggestion! There are plans to improve on displaying the info, so I'll definitely consider adding some extra QOL.