modded-factorio / SeaBlock

Factorio mod pack Sea Block
https://mods.factorio.com/mod/SeaBlock
MIT License
21 stars 18 forks source link

Seablock changes the beacon balance incorrectly if "beacon-overhaul" is present. #249

Open nicolas-lang opened 2 years ago

nicolas-lang commented 2 years ago

Affected mods

Introduction

There is a mod called beacon overhaul which changes the way beacons behave (similiar to the way beacons work in space-exploration): Beacons become more powerful, but each target entity can only be affected by a single beacon.

Related Code

In the seablock compatibility scripting (SeaBlock/SeaBlock/data-final-fixes/logistics.lua) you are overwriting the module count for bob's additional beacons. https://github.com/KiwiHawk/SeaBlock/blob/5bc577f6eb9089f3fbfd7ae6eaeff98d0138d23e/SeaBlock/data-final-fixes/logistics.lua#L38 https://github.com/KiwiHawk/SeaBlock/blob/5bc577f6eb9089f3fbfd7ae6eaeff98d0138d23e/SeaBlock/data-final-fixes/logistics.lua#L43

Specific Problem

By overwriting the module count for the tier 2 and tier 3 beacons with a constant, you are preventing them from being improved to account for the beacon-interference-nerf.

I would agree that a nerf of the tier 2 and 3 beacons is reasonable, but this change affects tier1, tier 2 and tier3 in a way that tier 1 is now much better than tier 2 or 3.

Conclusion

I would suggest to either change the beacon nerf's to be based on a factor like math.max(1,math.floor(slot_count * 0.8 + 0.5)) or to use a different constant if one of the beacon-interference mods is present.

Another quick fix would be to at least add the number of modules of the t1 beacon as lower bound, to prevent them from being worse.

local lower_bound = data.raw.beacon['beacon'].module_specification.module_slots or 2
data.raw.beacon['beacon-2'].module_specification.module_slots = math.max(lower_bound,2)

Attachments

image image

P.S. I hope I got that right, To find out which mod is affecting things is kind of a mess, especially with beacon-overhaul and bob's since the entity/tech naming is not consistent..

KiwiHawk commented 2 years ago

Sounds similar to https://mods.factorio.com/mod/wret-beacon-rebalance-mod

Check compatibility at same time