Jump to content

Settlements erroneously reporting food/water shortages


tbarrie

Recommended Posts

Settlements which don't produce enough food/water, but have ample available through supply lines, will sometimes erroneously show the "warning" next to the food/water line in the Workshops subtab of the Data tab on your pipboy. If you go to the settlement, the settlers there will voice dialogue suggesting they are in fact short on the given resource. If you enter workshop mode while at the workshop, the values for food/water will appear in green, not red, and the two issues mentioned above stop. Sleeping the night (not necessarily at the affected settlement) also seems to fix it.

I don't know specifically what triggers the bug, but I think it's always a settlement I've visited recently when I notice it.

Sometimes coincides with the bug where the Workshops subtab erroneously displays zero instead of the correct value, but I believe it's a separate issue.

This is on XBox One, either with no mods installed or just the Unofficial Patch.

Edited by tbarrie
Link to comment
Share on other sites

  • 1 month later...

This problem is present in my newest game too (Fallout 4, 10.0.26, UFO4P 2.01, no mods).

At this point I have only Sanctuary and Red Rocket as settlements. Sanctuary has 6 settlers, the original settlers from Concord, including Preston, and 'Jack' from Diamond City ('Give me a Nuka Cola..'), whom I hired and sent to Sanctuary.

Red Rocket is empty, I use it as a base with one bed, one turret, no water or food and no settlers.

I always fast travel to Concord, and walk into Red Rocket, to avoid the bug. This works, but if I save in Red Rocket, and later reload this game, the bed count in Sanctuary (7 beds) is set to zero.

The beds are in the protagonists old house and in a house beside it. Somehow this is unclear, because the plants for food are nearer to Red Rocket than the beds. And I always enter or leave Red Rocket walking, not via fast travel. If I fast travel to Sanctuary directly, all seems to work.

The problem is not new, it happened so since the game came out. It is probably connected to the fact, that the two settlements are very near to each other.

Concerning the runtime of the workshop scripts: In Red Rocket there are no resource installations (no water, no food, one bed, no settlers) and in Sanctuary are 6 food, 6 water, and one garbage collector bench, which all have assigned settlers. Jun is assigned guard duty (2 stations), two turrets, amounts to 14 defense, Marcy does farming (12 plants), and Jack does garbage collection. The rest is idle.

This should not tax the workshop script too much. The problem must be the loading/unloading of parts of the settlement.

Link to comment
Share on other sites

On 16.9.2017 at 2:17 AM, tbarrie said:

Settlements which don't produce enough food/water [...] If you enter workshop mode while at the workshop, the values for food/water will appear in green [...]

Not possible. Either there is a shortage at the workshop and the related resource values will display in red, or there isn't and they will display in green.

If the pip-boy reports a shortage but the resource values are displayed in green, the pip-boy values are wrong. This is the 'settlement stats bug' (i.e. the pip-boy reports wrong values for the workshop resources - at times, they are displayed as zero, but they may in fact have any erroneous value).

The wrong values are corrected by the workshop scripts themselves, but this is not possible if the affected workshop location is not loaded (recalculating the resource values is done by counting the workshop objects and adding up their contributions to the individual resource types; if the location is not loaded, no objects would be found and everything would become zero). Therefore, you have to travel to the location (so that the cells are loaded), and once you arrive, a householding function will start running in the background. It is that function that does the corrections (among other stuff). Going into workshop mode is not necessary for this to happen [NB: workshop mode does always display the correct values, so the code apparently does a resource recalculation as soon as it starts running. Note that workshop mode is a largely separate module that runs at engine level; thus, how it works and what it exactly does is unknown to us. Modifying it is not possible either.]

Main reason for this bug were threading issues, but all of them have been resolved a long time ago (the last remaining fixes went live with UFO4P 2.0.0).

There are still occasional reports on workshop stats issues though, and I know from my own game that there is at least one remaining bug (there's no way to be sure that it is only one issue). While running tests and packing up stuff for the current beta, I identified a potential culprit:

https://afktrack.afkmods.com/index.php?a=issues&i=23016

Right now though, I have no idea how to fix it because I see no way to tell whether the player left a workshop location (the vanilla OnLocationChanged event is bugged and records bogus leave events if the player opens an in-game menu that are impossible to discern from valid leave events).

Link to comment
Share on other sites

To make that clear: I was talking about the PipBoy display bug. As soon as I arrive in the boundary of Sanctuary Settlement, the PipBoy display corrects itself.

With one exception: Once it did not correct itself, it stayed this way while I was waiting. I waited around 2 minutes (real time) , but it did not correct itself, it stayed at zero beds. I went to the houses, the beds were there, one settler slept.

But opening the workshop immediately showed correct values, and afterwards the PipBoy display was also correct. But normally it is enough to enter the Sanctuary workshop area.

Link to comment
Share on other sites

It makes no difference whether you talk about the pip-boy stats or the workshop resource data. They are the same. The pip-boy just displays them, and if these values are wrong, it'is actually the workshop data being wrong. Getting close to a workshop is not sufficient for the auto-correction procedures to start running. You must be in the workshop location, and the workbench must have loaded. This may be the case if you get close enough but it is not necessarily always the case in that situation.

Might be worth mentioning here that the code that displays the data on the pip-boy runs at engine level. In addition to printing the data, it may add warning signs to individual stats. If these warnings are wrong for whatever reason (e.g. without the stats being actually wrong), you'll have to live with them as we cannot fix that.

I found a practicable fix for #20316 meanwhile, but even with that one fixed, I cannot promise that the issue is finally gone. It's even possible that there's an error in those parts of the workshop code that run at engine level, and this cannot be fixed anyway.

Link to comment
Share on other sites

Thank you for the explanation. The warning signs - I am used to them, they often pop up with 'Happiness' in a settlement, even when the happiness is rising, not falling.

The problem is - as you explained - that if some vital value, number of beds, food or water is set to zero and if this are the real values, happiness will drop sharply. Also, if the defense values drop, attacks will come. So you are forced to go to this settlement, and if you just on Far Harbour or mid quest, this is annoying.

But it is already better than before, without UFO4P it was sometimes much worse, and also much discussed on Beths forums - but never really fixed...

EDIT:

With the new 2.0.2a UFO4P this seems better again - I did have it one time (but after installing 2.0.2, without the hotfix!). This time it even said 'Build beds for the setllers 0%', the same it did during the tutorial quest at the beginning. There are 14 beds in Sanctuary, and 13 settlers in the meantime, and I was at the time in Red Rocket, not in Sanctuary. As usual there were zero beds displayed. So I went to Sanctuary, and the display corrected itself.

After the hotfix (2.0.2a) I did not see the issue again, the bed count seems stable now, or at least much more stable than before.

Also the two beds in Three Pines for the settlers there are now correctly marked 'used'. One cannot scrap them, but they seem to be taken into account by the settlers. They were counted always as beds, but happiness always took a hit in Three Pines, since the beds there had no 'users', despite being used. Probably they were not counted as sheltered.

 

Link to comment
Share on other sites

  • 3 weeks later...

Still sometimes wrong, even with patch 2.0.2a. No obvious reason, sometimes it looked that fast traveling near a settlement triggered it, but it also happens while the settlement is far away. Sometimes even two settlements (in my last case Sanctuary and Starlight Drive-In) have some values (mostly beds, but also food or water) set to zero.

In some cases it is not corrected in the PipBoy, even if you are in the settlement for several minutes. But it corrects itself immediately if you open the workshop. But the damage is already done, Happiness goes down.

Could this just be an overload for the script engine? I have a suspicion, that something changed in the graphic drivers management, which also leads to extreme loading times. Could it be that the time slice for scripts is now too short? Interestingly I still have occasional unnatural long loading times, but the issue was much worse at the start of this game. I started again without any mods, without modifications to the INI files - all is default for Ultra quality (PC, 32GB, i7 6850 @3.6Hz, GTX 1080 Ti). Works fine, performance wise. So the script engine should have its time slice nearly always. But somehow - with a progressing game - the hangs and extreme slow loading cases are becoming much better and rarer.

Should I just give the script engine more time, just to test it? What I mean:

fUpdateBudgetMS is at default at 1.2ms. How about giving it more? Say 1.6ms, because this is at the cost of the frame time (16.6ms at 60 fps), but since the graphics engine is much faster that at the time the game was developed, this should not hurt much.

Could this help? What do you think?

Link to comment
Share on other sites

On 23/10/2017 at 6:27 PM, Sclerocephalus said:

Not possible. Either there is a shortage at the workshop and the related resource values will display in red, or there isn't and they will display in green.

If the pip-boy reports a shortage but the resource values are displayed in green, the pip-boy values are wrong. This is the 'settlement stats bug' (i.e. the pip-boy reports wrong values for the workshop resources - at times, they are displayed as zero, but they may in fact have any erroneous value).

Possibly I wasn't clear. I'm getting the same numerical values in both the pip-boy and workshop mode. Eg, for a settlement that produces no food but has supply lines connecting it to settlements with an ample surplus, both will display zero, which is correct. But the pip-boy reports a shortage. Once I've travelled to the settlement, entered workshop mode, and then exited it, the shortage indicator disappears from the pip-boy - until the bug triggers again, of course. Presumably the recalculation you mentioned that occurs when you enter workshop mode is clearing the bug. Just travelling to the settlement doesn't clear it, but maybe if I waited long enough at the settlement the background process you mentioned would clear it as well - I haven't experimented with it too much.

Link to comment
Share on other sites

Well, the resources from linked workshops are never considered in the actual stats. Which makes sense because there is no practicable way to  take care of them:

Calculating them irequires a lengthy code that will not finish running within a fraction of a second, but takes a few seconds at least. Moreover, the linked resources are constantly changing since every workshop runs an update every game day where concumption is calculated and removed from the existing resources, and new resources are produced. With the maximum number of workshops player owned, this means that the values are changing every 2-3 minutes real time. Which in turn means that you cannot safely store the data in variables somewhere and print them on the screen if the Stats tab is clicked on the pip-boy. Instead, they would have to be recalculated every single time.

Not even the function that transfers resources from linked workshops does evaluate the resource counts before it starts running: it simply loops through the workshops and tries to find surplus resources that it can transfer to the workshop with the shortage. And if it finishes running, it may or may not have succeeded in doing the job.

Link to comment
Share on other sites

11 hours ago, Sclerocephalus said:

Well, the resources from linked workshops are never considered in the actual stats.

That much I did know. But they ARE considered when determining whether a specific settlement has "enough" food or water. Until this bug hits, then they're not - until you enter workshop mode at the affected settlement or sleep for the night. (And there may well be other ways to clear the bug; as I said, I haven't experimented widely.)

How the check for "enough" is actually implemented in the game's scripts, I have no idea. I don't own a Windows PC, so unless and until Bethesda has plans to have somebody port the game to Linux, I don't have much opportunity to delve into that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...