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!

Question Wonky Food Production

TwoByteKitty

New Member
Messages
1
Hello!

I have noticed that since installing WSFW the number of settlers reported on my map is wrong (i.e., it will say 49 population when in fact the pop. is 16).

More importantly, farmers are claiming way more crops than they should. Two settlers assigned to farming will generate 29 food, for example. Whether or not I can assign new settlers to farming seems to be inconsistent.

WSFW was the most recent addition to my mod loadout when the problem started. I have also been experiencing random crashes when in the workshop build menu, but I am not sure that has anything to do with WSFW.

I'm fairly new to modding and FO4, so please let me know if there is any other info I should provide or this post belongs elsewhere.

Thanks for your time!
 
I'm sad that no one has replied to your thread. I am also having the issue with food production. I have 1 settler at the moment in Sanctuary and have been building Sanctuary. At first I gave her enough plants for the 6 food (vanilla base) but then I planned to go pick up the survivors at the museum and started planting corn. I looked at stats and had 13 food! Piper had assigned herself to ALL of the plants in the settlement.

I am not currently using Sim Settlements (though I LOVE that mod, King is King).

I am using a bunch of mods, mostly textures, npc replacers and item mods (ie: snappy, creative clutter, etc.)

Hoping to get some answers for both myself and TwoByteKitty.
 
If you guys can put some screenshots up, showing the behavior, that would be very helpful. A copy of your loadorder would be good too.

Once we have those, we might have something for KG to sink his teeth into.
 
Thank you for the reply. I loaded up my game last night, removed all my crops and attempted to reproduce the bug so I could get the most accurate screenshots and awkwardly.. the bug did not reproduce and Framework seemed to be working as intended.

If I come across the problem again, I will provide screenshots and a complete list/order of mods I am using.

So sorry to be a bother and a great big thank you to the wonderful team of Sim Settlements and King Gath!
 
Intermittent problems are the worst ROFL

Hopefully it never comes back. :)
 
Does not appear that the framework is honoring the setting in the MCM menu. I have seen the issue with settlers producing more food that 6 as well. And the weird reporting in the pip-boy workshops as well as on the map where it will say something like 25 settlers when it is a new settlement and only has 2 settlers. Also seen on a new settlement periodically were you assign a settler where you have 6 food planted and the only pick up one "plant". Usually have to manually assign the other plants that make the 6 one at a time.
I can correct the issue as well by using the vault tech population management system to remove the settler from the farm job. While a few minutes then assign them manually.
Seem that the vault tech population management system and Workshop Frame work does not get along. As assignment settlers in the Vault Tech system is somewhat hit or miss. But the remove from job function does work correctly.
I love workshop framework and work plus especially! It does seem to self correct sometimes.
 
Last edited:
Try toggling the options a few times.

If still a problem - please provide some screenshots.
 
Whisper is right, screenies would be very helpfull. One thing to remember is that if you are using vanilla farm plots, YOU will have to micromanage them. And once you start using SS farm plots, you will have to remove the vanilla plants. Otherwise settlers will tend those instead of the ones in SS. AFAIK, that behavior is coded into the engine.
 
I have attached a screenshot showing the settler to food count being off. I believe my save file corruption issue is unrelated to this thread. And is a separate issue with a different cause.

Delete previous post since they were getting off topic.
 

Attachments

  • Fallout4ScreenShot4.png
    Fallout4ScreenShot4.png
    2.3 MB · Views: 16
Last edited:
Here's two more screenshots showing very incorrect settler count at Abernathy farm. Only the Abernathy's are there at this time. Also include wonky food counts at that location as well. They should not be able to produce more than 18 food. if I add crops they would keep getting add to the food total.
 

Attachments

  • Fallout4ScreenShot5.png
    Fallout4ScreenShot5.png
    1.3 MB · Views: 12
  • Fallout4ScreenShot7.png
    Fallout4ScreenShot7.png
    3.2 MB · Views: 11
My contribution, I started a new playthrough yesterday with stripped down mod list (only 40 or so plugins rather than the usual 300). Using latest WSFW and WS+ but no SimSettlements.

I've built a basic settlement at Sanctuary Hills (2 settlers), unlocked the Red Rocket (0 settlers), retreived the locket from the Olivia station for the Abernathy's and ran all the way to the east to County Crossing (2 settlers) to unlock it.
After unlocking County Crossing the 2 settlers were producing 15 food (from 15 mutfruit) enb2020_7_1_19_21_42.jpg , when I added 6 more plants the total output went up by 3 (0.5 per plant) within a minute or so. enb2020_7_1_19_23_18.jpg
(The new Item Tracking feature is handy for seeing which settlers are farming which plants.)

After fast travelling to Sanctuary Hills I checked the map for the count of settlers at County Crossing and it was showing 7. enb2020_7_1_19_38_31.jpg

when I fast travelled back to County Crossing the count was corrected back to 2. (In my previous playthrough I found that returning to a settlement would permanently fix the settler count.) enb2020_7_1_19_40_03.jpg

Meanwhile at Sanctuary the one settler who is doing the farming is producing 10 food. enb2020_7_1_19_34_52.jpg
There are 20 plants in total each producing 0.5 food. (I 'borrowed' some tatos from the Abernathy's as part payment for retreiving the locket for them.) The other settler is a guard and I haven't been to Concord as yet (So no Preston and crew).

The next part of my playthrough is to return the locket to the Abernathy's and see how much food they are producing.

PS. The date/time on the attached files are Australian Eastern Standard Time.
 

Attachments

  • plugins - Copy 2020-07-01.7z
    856 bytes · Views: 2
Had to reinstall the game due to unrelated issues. Do you guys want a save upload with only unofficial patch, WSFW, Workshop Plus, showing this issue?
 
@Wesley Clark that’s a very interesting screenshot there.

If you and @Lone_Wolf are able to strip the loadorder down to just WSFW (-edit- and WS+ doh!) and show the same behavior that would be really good. I’ll try to find my latest testing game and see what that shows as well.

--edit--
I have found my test game and confirmed the issue. Thanks guys.
 
Last edited:
Do you want me to strip out Canary and UFO4P 2.1.1a, as well? I am still rebuilding my base game so it will be real easy right now for me to do this.
Looks like you don’t need to. Many thanks!
 
For what it's worth about the settler population thing, I was experimenting with this a few weeks ago with the following code (irrelevant parts removed):
Code:
Function ForceUpdateAllWorkshopStats(var ref)
    ObjectReference strt = GetStation(ref).parentPlot
    for int i = 0 to LogisticsStations.Length - 1
        PlayerRef.MoveTo(LogisticsStations[i].parentPlot)
 
        Debug.Notification("Teleported to station " + (i+1) + "/" + LogisticsStations.Length + "...")
        Utility.wait(10)
        LogisticsStations[i].parentSettlement.RecalculateResources()
        Utility.wait(0.5)
    endfor
 
    ILS_AllowRedist.SetValue(redist)
    PlayerRef.MoveTo(strt)
EndFunction
The code is obviously dead simple, what it does is teleport me to every logistics station in my save in sequence, and for each of them, waits a bit for stuff to load in and OnLoad/OnCellAttach scripts to finish, calls the native RecalculateResources() function on the workshop, waits a moment for that to run as well, and moves onto the next station.

Should be easy enough to adapt for the native Workshops array, would also want to check that the settlement is owned first to avoid wasting time.

Anyway, what I (and cbrgamer3, who tried this too) noticed was that more often than not, this would inflate visited settlements' population numbers. The other resource values, like food and water, tended to record correctly.

Since this shouldn't even be running any WSFW code directly, and we can be almost 100% sure that resources are correct at the point in time where we leave the settlement, the only plausible explanation is that there's some OnUnload/OnCellDetach/OnLocationChange event handling going on upon leaving the settlement.

My first guess is that something about WorkshopResourceManager's handling of the last event is wonky. Since this does actually run a function called FixSettlerCount() when it catches that event, which directly meddles with the settler count AV, I'd verify that that does actually work as expected, particularly when fast-travelling or teleporting directly from one settlement to another. I strongly suspect that something's up with that function, but without delving deeper myself (i.e. tweak/compile/reload/test "iteration"), I can't offer any insight into specifics.

Edit: Okay, that's weird. I just tried experimenting with this again and found that if you immediately open your pip-boy after being teleported away from a settlement and mouse over the old one, you can actually watch the settlement's population tick up in the UI. Like, I just watched three settlements in a row go from e.g. 11 -> 12 -> 13 -> [...] -> 19, a few seconds after loading into the next settlements. This should absolve WSFW—at least the part I mentioned—of potential wrongdoing, because its handling of the population AV is done in one chunk, not incrementally like that.

Maybe try sticking something like this into WorkshopScript
Code:
Function SetValue(ActorValue akAV, float afValue)
    if (akAV == WorkshopParent.WorkshopRatings[WorkshopParent.WorkshopRatingPopulation].resourceValue)
        Debug.TraceStack(self + " setting Population value to " + afValue, 0)
    endif
    parent.SetValue(akAV, afValue)
EndFunction
Worst-case scenario, that it's the engine doing it and nothing shows up in the log, you'd have to find some way to delay FixSettlerCount() for a few seconds, so it runs after the anomalous AV meddling. Best case and you'll see exactly what's corrupting the AV.

I'd do it myself, but WSFW has so many hidden compile-time dependencies (bunch of places where a CastAs and/or CallFunction should be used for HUDFrameWork, WSFWIdentifier etc) that getting WorkshopScript to compile is nigh on impossible.

Oh, I saw this note, "We can't use CallFunction here because it is unable to return an array", but I don't understand it because this works just fine for me:
Code:
string[] Function ArrTest()
    string[] r = new string[3]
    r[0] = "a"
    r[1] = "b"
    r[2] = "c"
    return r
EndFunction

; cqf ILS_LogisticsParent GetArrTest
Function GetArrTest()
    var r = self.CallFunction("ArrTest", new var[0])
    string[] arr = r as string[]
    Util.Trace("Printing CallFunction'd string[]: " + arr)
EndFunction

logs:

Code:
[07/08/2020 - 02:57:33AM] Printing CallFunction'd string[]: ["A", "B", "C"]
Maybe it's just another instance of Caprica being better than the official compiler, though.
 
Last edited:
Top