ClaudeMetz / FactoryPlanner

A mod for Factorio. Allows you to plan out your production in detail.
https://mods.factorio.com/mod/factoryplanner
MIT License
97 stars 47 forks source link

Fractional Beacons #416

Closed Xevion closed 6 days ago

Xevion commented 6 days ago

Suggestion

Right now, it seems like Beacon affects can only be integers, so if you have a fractional number of Beacons (which in my oil refinery, is quite easy to do), you can't get an accurate reading. I might have 24 refineries with 8 beacons affecting them, and 6 refineries with 10 beacons affecting them.

The true number is 8.4 beacons per refinery, but of course you can't currently enter decimals, and fractions don't work either. So, that's my basic feature suggestion.

Also, be wary of #415, whatever handling this feature requires would need to coincide with the fixes required by that error.


Also, the 'Total' selection tool could totally expand this and make it super easy to plug-in the Amount without having to manually calculate it yourself - you scan the affected refineries, the beacons nearby are taken into account, and 8.4 is calculated by summing the beacons divided by the machines.

It'd work very well for machines on the edge of production lines that don't have extra beacons allocated for them.

Xevion commented 6 days ago

Here's an example of Factorio with uneven beacon application - the range is just not wide enough due to the width of the refinery & the offsets.

https://github.com/user-attachments/assets/9515eb16-e044-4ef8-a8a7-4eca9880fc9e

ClaudeMetz commented 6 days ago

Okay so, fractional beacons were a thing before 2.0, exactly for the reasons you outlined. But, with 2.0 beacons changed, where every integer number of beacons affecting a machine gets a specific distribution effectivity. These effects are not linear as you change the number of beacons. What this leads to is that it doesn't make sense to average out the beacons, since the specific numbers each and every machine is affected by determines the numbers, and an average wouldn't be correct.

I appreciate the suggestion, but it's not really compatible with how 2.0 works. Tying into your point about the beacon selection, one could use a tool like that to calculate the effects for a concrete setup of machines and beacons. This becomes quite involved though, and also isn't super appropriate in a planning tool, that's supposed to be useful before you actually lay things out. It would be a solution to the problem, but it's just too involved to be worth it atm I'm afraid.