the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

I would like to see my network's numbers and how much is being used on a daily basis

Fast travel from one settlement to the next heading straight for the terminal once I see the SS2 needs bars have updated.
You might as well just look at the Papyrus log then, you'll see the same numbers with a small fraction of the effort.
 
Just a thought @AtomicWedgie, do you have the linked settlements share resources option turned off in workshop framework? I don't know if that option actually adjusts the values or just lets other settlements consume items that are actually in the workshop, but it's probably best to have it off.
Also, run the update redistribution from the terminal in any settlement, then post your IDEKsLogisticsStation.0.Log here.
 
@EyeDeck is there any way to match up the settlement food water info with the Station deltas in that log file? If not, would it be possible to show them all in one line? (ie, food and water adjusted requirements, current food and water and the deltas)
 
Alright, well, here's a quick Python script to reformat the log more usefully:
Code:
workshops = {
'00019956': 'Bunker Hill',
'0001D0E2': 'Starlight Drive-In',
'00024A26': 'Outpost Zimonja',
'000250FE': 'Sanctuary',
'00054BAE': 'Red Rocket',
'00066EB6': 'The Castle',
'0006F5C5': 'Abernathy Farm',
'0009B18F': 'Graygarden',
'0009B197': 'The Slog',
'0009B19D': 'Finch Farm',
'0009B1A5': 'Warwick Homestead',
'0009B1AC': 'Tenpines Bluff',
'0009B1BE': 'Nordhagen Beach',
'0009B1D1': 'Oberland Station',
'0009B1DB': 'County Crossing',
'0009B1F1': 'Greentop Nursery',
'000E0505': 'Covenant',
'00135A90': 'Taffington Boathouse',
'00161F4B': 'Spectacle Island',
'00164321': 'Egret Tours Marina',
'001654B8': 'Kingsport Lighthouse',
'001654BD': 'Croup Manor',
'001654CF': 'Jamaica Plain',
'001654D5': 'Sunshine Tidings Co-op',
'00168945': 'Coastal Cottage',
'0016D28E': 'Murkwater Construction Site',
'001E81EA': 'Somerville Place',
'001F0711': 'Hangman\'s Alley',
}

with open('IDEKsLogisticsStation2.0.log') as logfile:
    lines = logfile.readlines()
    for k,v in workshops.items():
        print('\n', v)
        for line in lines:
            if k in line:
                print(line.replace(k, v).strip())
You can either save that to a .py file and run it, or just pasting it directly into the python interpreter works provided you've run the interpreter while in a directory with an "IDEKsLogisticsStation2.0.log" file in it. Anyway, here's the output for that log:
I notice that the numbers barely change over the course of the run time. In fact, basically the only thing of note that happens at any point is that Taffington Boathouse loses 17 points of water production at some point for whatever reason, presumably the base value got corrupted. I assume my resource monitor system is turned off, otherwise it would've noticed that and triggered on it.
Also, in a lot of settlements, the calculated food/water reqs are basically exactly equal with the base production counts, which I presume is WSFW or SS2 or whatever it is that has a system vaguely similar to my redistribution code built in passively that's doing that, pulling in resources from other settlements that my code doesn't (and can't) know about.

Dunno what to say, it looks like it's working as intended. The only questionable thing is that some the calculated requirements I'm getting back from (my equivalent of) the GetFoodNeeds() and GetWaterNeeds() functions might be high?
Code:
float[] Function AdjustSS2Needs(WorkshopScript ws, float adjPop, ObjectReference dataStore) global
    ActorValue ExtraFoodNeedsAV = Game.GetFormFromFile(29423, "WorkshopFramework.esm") as ActorValue
    ActorValue ExtraWaterNeedsAV = Game.GetFormFromFile(29424, "WorkshopFramework.esm") as ActorValue

    float fExtraFoodNeeds = ws.GetValue(ExtraFoodNeedsAV)
    float fExtraWaterNeeds = ws.GetValue(ExtraWaterNeedsAV)
   
    float fTotalFoodNeeds = adjPop + fExtraFoodNeeds
    float fTotalWaterNeeds = adjPop + fExtraWaterNeeds

    WorkshopFramework:Library:DataStructures:ActorValueMap[] modifiers = (dataStore as SimSettlementsV2:ObjectReferences:SettlementData).NeedsPercentageModifiers
    if (modifiers != None)
        int i = modifiers.FindStruct("ActorValueForm", ExtraFoodNeedsAV, 0)
        if (i >= 0)
            fTotalFoodNeeds += fTotalFoodNeeds * modifiers[i].fValue
        endif
        i = modifiers.FindStruct("ActorValueForm", ExtraWaterNeedsAV, 0)
        if (i >= 0)
            fTotalWaterNeeds += fTotalWaterNeeds * modifiers[i].fValue
        endif
    endif
   
    float[] returns = new float[2]
    returns[0] = fTotalFoodNeeds
    returns[1] = fTotalWaterNeeds
    return returns
EndFunction
It's basically GetFoodNeeds() and GetWaterNeeds() rolled into one, with the part that gets the workshop data store object(s) pre-calculated and passed into the function to greatly improve execution speed (otherwise we spend an enormous amount of time hammering SS2's Settlement Manager script to get the same data over and over again for no reason).
 
Last edited:
@EyeDeck is there any way to reset everything (set all deltas to 0 and refresh workshop numbers back to original) to reboot the process?
 
So, I've been trying to track down a way to keep tabs on resource usage, and the spreadsheet is a great starting point for me. (I also tend to make spreadsheets for other complex stuff, like workflows in Satisfactory)

I noticed that for the "Rebalance Simulator" sheet, the Surplus part of the table has the daily values added up with the NonPlot values included twice. For Day 1 Building Mats, the surplus table has this: (Indirect("$"&$P$1&"$5")+$N$5)*(ROW()-2) which boils down to O5 + N5, but cell O5 already includes N5 with its formula: SUM(K5:N5)

So the reason for the Indirect formula is to allow the user to call out specifically to which section of the results they want to look at a bit closer (Totals for the various levels of buildings), but if we just want to see the overall totals for everything, then it's a bit misleading.
 
Top