Closed SirLich closed 1 year ago
I actually found another work-around. I essentially modify the number of sapiens rather than the number of orders: https://github.com/SirLich/sapiens-vanilla-tweaks/blob/main/scripts/server/planManager.lua
I've changed it to not cache that value in b21 anyway, thanks
In
planManager.lua
you have this line:local allowedPlansPerFollower = gameConstants.allowedPlansPerFollower
.It would be very nice if instead of caching this line, you could just call the
gameConstants.allowedPlansPerFollower
each time. This allows mods to dynamically edit this value, rather than requiring it to be set statically (hard coded in agameConstants
shadow).So the idea is instead of having multiple mods that hard-code particular game constant values, instead my 'Vanilla Tweaks' mod would let them do it dynamically, in game. This kind requires the data not to be cached though.
Potential Workaround: The potential workaround is to build some kind of data storage system (json file on disk?) that actually can be accessed "as early as possible", and therefor can be called from a gameConstants shadow.