Editing Workshop Formulas - kinggath/WorkshopFramework GitHub Wiki
Editing Workshop Formulas
By rewriting many of the core Workshop Scripts, I was able to expose almost everything that makes up the Workshop formulas to control settlement operations.
You have three ways to alter any value, in order of simplicity:
Global - Default value that anyone can make an esp to edit that value and release as a mod with WorkshopFramework as a parent. Your change will then take effect across all settlements. See New Global Setting page. (Easy mode!)
Workshop Resource - You can create a workshop object that provides an addition or subtraction to the value. That way players can build your object to gain new bonuses (or penalties). If you've never built a workshop object, a basic explanation is included in the New Resources section.
Settlement Level Option - Most of the options can be overwritten at the settlement level which requires a very simple script. You essentially set the variable to whatever you want on the workshopRef, and then make a second call to turn off the equivalent bUseGlobal property.
For example, let's say you want to change the max amount of water a settlement can store, you'd get your workshop reference and do:
int iMyNewMaxWaterBase = 10 workshopRef.maxStoredWaterBase = iMyNewMaxWaterBase workshopRef.bUseGlobalmaxStoredWaterBase = false
For each value, the global flag has the exact same name but prefixed with "maxStoredWaterBase".