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!

Bug Ressource numbers way off in the HUD

ceemosp

New Member
Messages
29
The ressource numbers are way off in the HUD. The totals don't show the summed up numbers of the individual ressources in the respective categories.
So the question is: Which numbers are correct or are any correct at all ;)
ressources_fail.jpg
 
I am finding that I can get things out of the negative. And with plot costs turned on it is helping deplete VS resources so new ones can fill up. It's taken me a good 2 24 hr+ jam seasons but I think I have my For The Minutemen city plans working right. Again it's because I actually took the time to sit and see what was getting eaten by what plots in each settlement and then make sure the network was making enough to handle daily needs and create enough surplus to allow cps to still level.
I also did notice this morning that the storages self corrected their phantom values after the game restarted and i idled in the root cellar for a bit, however the past few days i have been experimenting with scrap levels , using the scrap setting everything will run perfectly fine but the backend that still tracks the components will still fail, Switching to categories it tells me that it is using categories but and that each category has materials yet plots shut down because they lacked materials.

I did the test using 5 settlements, they all produced 1 resource category each and these are my findings
A Building materials
B Organics
C Mechanical
D Rare materials
E Overflow storage containers

Building up settlements in this way you can easily ensure that there will be production of each category, they will fill up their own storages and to my surprise they did not send materials into the overflow settlement, it just never happened.
Then i expanded the test by using the salvage beacon in Gorksi Cabin and Walden pond.
I Sent them to A and B to see what happened since i had a hunch which to my experiment turned out true, the huge spike in materials deposited into the those settlements filled the local stockpile beyond their capacity and effectively turned off local production.

This meant that Settlement A was no longer able to produce Building materials since it was choked up by resources that were not of the type it made.
it had to pull building materials from the network until it had consumed the other material types so there was actual room to store output.
This meant it could only get building materials for upkeep from B which is not a producer and that supply dwindled quickly.
It was the exact same story for B only it was with organic compounds.
Long story short the network choked and died due to an overabundance of the wrong resource and none of the overflow wound up in E, What i learned from this was to have a settlement that simply does not have any resource production yet have storage for salvage parties, this overflow will compensate anything that is in low supply elsewhere. for gameplay i suggest you use those ''Dumps'' for food and water production.


But it has a severe drawback if you are playing on 31 scrap categories, eventually it will fill up with materials that are rarely used such as circuitry leather cloth rubber cork concrete glass and fiber glass.
But resources that are in HUGE demand such as steel wood which was my primary desire to salvage would get used up so quickly it did not make a dent in the stockpile numbers.

Clearly i needed to find alternative ways to supplement said materials and that would be through the conversion industry plots.
early on you get the lumber mill for wood and kiln for fertilizer so you have a good chance at stabilizing wood ''early'' that is when you have 7 base industries at level 3 which is not easy when you have raging supply problems.

This is not working out.
Steel and wood is the material in heaviest demand by far and thus the conversion industries for them needs to be accessable much earlier, preferably once the buildingmaterial industry plot reaches level 2.
I have included a picturer how the supply situation looks like on my playthrough after the negative storage numbers refreshed.

But how does this affect the hud and wrong numbers?
I would say it depends on what level of complexity for scrap you run the resource system can get confused and dig its supplies into deeper holes,
The Hud is merely telling us that it is messing up somewhere.
I was at some point -16k steel in sanctuary so i dare say if you run with 1 or 4 scrap categories the game picks one resource and essentially uses only that to pay the upkeep, if the resource then is in the neative to start it will just put it further into the negative without pulling from the other resources.
I was hoping that going from 31 components to 1 it would eat up excess mechanical and organics and allow steel to catch back up but all it did was put steel further into the negatives.

So where did the negative values come from?
I used cityplans and in the MCM there are options to pay for everything the cityplan uses with resources but the city building script does not respect material shortages on the level 0 build phase which is where i assume it puts the stockpiles into the negative.
also during this stage the settlement tends to not have a supply line so it has nowhere else to draw resources from other than itself.
 

Attachments

  • Photo87.png
    Photo87.png
    436.2 KB · Views: 11
Last edited:
Additional findings, this time non plot COSTS (big costs)...
OK i know that you cannot turn them off right now due to a bug.

But did you know that all powered! non plot costs are doubled?
You can see this at a settlement without generating machine parts. The daily changes are negative here and correspond to the costs.

eg the beloved water purifier. non plot costs of 2 antiseptic, 2 gears, 4 screws, 3 springs

build it and do NOT power it -> daily change corresponds correctly (unfortunately no water will be produced)

power it -> daily change doubles to 4 antiseptic, 4 gears, 8 screws, 6 springs

This seems to happen only for powered items NOT for power generators and not for unpowered items like the small turrets.

I could test it positive for water purifiers and powered turrets (and these costs are expensive).

More to go... income from residential plots seem wrong too... it says 12 caps per plot (lvl 1 unpowered at the info box) and this dont match at all with the daily cap changes, it is twice as much as it really is (correct value within asam menue production)

So right now it looks like:

material production is SHOWN (info box) higher than it is, the basic production part is doubled, the str based part is correct (see my previous post)
monetary production of residential plots seem to have the same problem (doubled base income shown but no stats based additional income so its easy to see)
plot costs seem to be ok, powered or unpowered.

non plot costs for powered items are doubled and THAT kills your settlement.
 
Last edited:
Additional findings, this time non plot COSTS (big costs)...
OK i know that you cannot turn them off right now due to a bug.

But did you know that all powered! non plot costs are doubled?
You can see this at a settlement without generating machine parts. The daily changes are negative here and correspond to the costs.

eg the beloved water purifier. non plot costs of 2 antiseptic, 2 gears, 4 screws, 3 springs

build it and do NOT power it -> daily change corresponds correctly (unfortunately no water will be produced)

power it -> daily change doubles to 4 antiseptic, 4 gears, 8 screws, 6 springs

This seems to happen only for powered items NOT for power generators and not for unpowered items like the small turrets.

I could test it positive for water purifiers and powered turrets (and these costs are expensive).

More to go... income from residential plots seem wrong too... it says 12 caps per plot (lvl 1 unpowered at the info box) and this dont match at all with the daily cap changes, it is twice as much as it really is (correct value within asam menue production)

So right now it looks like:

material production is SHOWN (info box) higher than it is, the basic production part is doubled, the str based part is correct (see my previous post)
monetary production of residential plots seem to have the same problem (doubled base income shown but no stats based additional income so its easy to see)
plot costs seem to be ok, powered or unpowered.

non plot costs for powered items are doubled and THAT kills your settlement.
Strange some off these do not add up on my end.
for me i always build purifiers in the start because the water municipal plots cannot keep up with the demand until you have Advanced variants,
once i got ADV waterplants i shut the manual purifers off and store in the workshop for a rainy day.

But just turning them off seemed to have them not use any components at all nor caps, same for the nonplot generators.

when it comes to housing plots i only get 6 caps per settler living there in a t1 home powered or not accorrding to the sensor and the hud. but settlements that register in the negative for caps tend to accumulate caps regardless.
 
Strange some off these do not add up on my end.
for me i always build purifiers in the start because the water municipal plots cannot keep up with the demand until you have Advanced variants,
once i got ADV waterplants i shut the manual purifers off and store in the workshop for a rainy day.

But just turning them off seemed to have them not use any components at all nor caps, same for the nonplot generators.

when it comes to housing plots i only get 6 caps per settler living there in a t1 home powered or not accorrding to the sensor and the hud. but settlements that register in the negative for caps tend to accumulate caps regardless.
What version of Sim Settlements 2? Did you start a new game with the latest version of SS2? (i did the test that way)
Did you build the purifier after the firsts quest (when the farm and industry plot are already here) or before you even start SS2 questline?
Another thing i found out is, that if you disable non plot costs, the daily cost of these non plot items are shown in daily changes totals but not in the single scrap values.
And if you enable non plot costs afterwards, they are added correctly to the scrap values but the totals of these non plot costs are kind of frozen into the daily total counts.
 
non plot costs for powered items are doubled and THAT kills your settlement.
Thanks for the detailed reply. That gives me a good idea what to look at in the code. Hopefully I can find something to report to the SS2 team.
 
Thanks for the detailed reply. That gives me a good idea what to look at in the code. Hopefully I can find something to report to the SS2 team.
Hello there,
i have done further testing and before i go into some detailed numbers i have a question.
Do non plot costs exist outside of generators, water purifiers, turret and defense?
Like for chairs, crafting stations, building parts (floors, walls, or prefabs)?
 
Hello there,
i have done further testing and before i go into some detailed numbers i have a question.
Do non plot costs exist outside of generators, water purifiers, turret and defense?
Like for chairs, crafting stations, building parts (floors, walls, or prefabs)?

Only if it produces some resource or is defined in a special list, see spoiler in linked post for actual costs/calculations.
 
Hello there,
i did some tests around the virtual resources and their sums.

latest version of sim settlements 2, new game with that version, scrap level (detailed) and never switched to a less detailed setting.
plot costs and non plot costs active

2 building material sheds with old paul and mama murphy (19 str?? dont mess with her)
i went through all plots and non plots and summed up the plot costs (for building material) and the production of the to building material sheds.

production of scrap adds correctly to the scrap values in the virtual resources BUT it is counted twice in the category sums
scrap costs subtract (mostly) correctly from the scrap values in the virtual resources AND the sum.
so the sum goes up by (2x production - 1x cost)


what does the (mostly) mean:
In some values there is a difference of 1 between the calculated (manually by me) values and the numbers in the virtual resource tab.
I think this happens through rounding because it happens at scrap materials where the SPECIAL based production has multipliers with decimals and production adds changes every other day (eg. asbestos, one day adds 103 the other day 104).
EXCEPT... i am missing 6 steel (a day) and i didnt find a reason for (thats why i asked if there are other hidden non plot costs)

Again, the numbers for the materials are good, just the sums for then categories (eg. building materials) are wrong.
The complete sum is correct for the wrong category sums but not really correct because the category sums are wrong.

This leads to the overflow problem that you cannot gather more materials because the system thinks the storage is full although it is not.


Oh and forget the daily change values, they are mostly strange
eg.
i produce 205 steel a day with the 2 plots. my calculated plot costs are 58 steel a day.
i should get 147 steel a day, i GET 141 steel a day (thats the 6 missing steel), daily change say 121 which is completely strange.
Similar things happen to wood, asbestos, aluminum but with varying differences. glass, fiberglass and concrete on the other hand do match (daily change = calculated daily change). And the differences are too large to be a rounding problem.
 
Hello there,
i did some tests around the virtual resources and their sums.

latest version of sim settlements 2, new game with that version, scrap level (detailed) and never switched to a less detailed setting.
plot costs and non plot costs active

2 building material sheds with old paul and mama murphy (19 str?? dont mess with her)
i went through all plots and non plots and summed up the plot costs (for building material) and the production of the to building material sheds.

production of scrap adds correctly to the scrap values in the virtual resources BUT it is counted twice in the category sums
scrap costs subtract (mostly) correctly from the scrap values in the virtual resources AND the sum.
so the sum goes up by (2x production - 1x cost)


what does the (mostly) mean:
In some values there is a difference of 1 between the calculated (manually by me) values and the numbers in the virtual resource tab.
I think this happens through rounding because it happens at scrap materials where the SPECIAL based production has multipliers with decimals and production adds changes every other day (eg. asbestos, one day adds 103 the other day 104).
EXCEPT... i am missing 6 steel (a day) and i didnt find a reason for (thats why i asked if there are other hidden non plot costs)

Again, the numbers for the materials are good, just the sums for then categories (eg. building materials) are wrong.
The complete sum is correct for the wrong category sums but not really correct because the category sums are wrong.

This leads to the overflow problem that you cannot gather more materials because the system thinks the storage is full although it is not.


Oh and forget the daily change values, they are mostly strange
eg.
i produce 205 steel a day with the 2 plots. my calculated plot costs are 58 steel a day.
i should get 147 steel a day, i GET 141 steel a day (thats the 6 missing steel), daily change say 121 which is completely strange.
Similar things happen to wood, asbestos, aluminum but with varying differences. glass, fiberglass and concrete on the other hand do match (daily change = calculated daily change). And the differences are too large to be a rounding problem.
Well that explains why I am so far in the hole with steel. It seems steel and cloth are the two I have the most trouble keeping out of the red. I have been able to get steel down from - 58k to - 38k but it's taken a lot of work. If only I could get the Foundry plot to unlock.
 
It also seems that none of my City's will pull resources from the network to upgrade past level 2. They work fine until level 2 sometimes 1 and just stop. Totally enough resources both local and in network and enough happiness etc. And since these are MY city plans I'm testing I know right when they should upgrade. But they are not.
 
I spent few hours investigating this myself and would like to add my findings to what Qerewen and Glenthegrand found.

Background:
I noticed that something is fishy with scrap components after I switched to them after last kinggath video (patch 1.0.14). Because I specialized my settlements, my network died in barely few days. Due to scale of the problem I was unable to fix without dialing difficulty down to scrap categories.

So I started a new playthrough with scrap categories turn on from the start and I focused on a single settlement. I also disabled auto upgrade for the plots. This gave me better control and allow to limit the complexity of investigation.

Firstly some facts and observations:
1. Industry plots produce components. source
2. Every settlement have a limit of resources that is calculated based on no. of industry plots and storage containers. No. of components cannot go over this limit. source
3. Objects (plots and non-plots) have operating costs in various components.
4. Resource HUD displays a gross change for the settlement (ex. +100 steel, meaning my production minus operating costs should give me 100 steel a day).
5. However the code does not calculate the change using this gross value, but firstly detracts costs (every category separably - non-plot, plot, etc.) and later adds production.
6. Additionally calculations of costs and productions goes through 2 loops:
6a. firstly loops scrap categories;
6b. secondly loops goes through scrap components (nested loop).

Meaning: firstly code calculates costs for building materials, going through every material one by one, then it moves to organic materials and go through materials, and so on and so on.

Code:
int VirtualStorageLimit;

for(Costs) {
    for(ScrapCategories) {
        for(ScrapComponentsInCategory) {
            subtract()
        }
    }
}

for(Production) {
    for(ScrapCategories) {
        for(ScrapComponentsInCategory) {
            if(ResourceLimit > CurrentResources) {
                addUpToVirtualStorageLimit()
            }
        }
    }
}

Let's get practical.
Screen 1: before calculation
before.png
Screen 2: after calculation
after.png

PROBLEM: What will happen when the settlement accumulate components up to the Virtual Storage limit?
Pay attention to the Virtual Storage limit and wood. The wood value goes down, despite the fact that the settlement have surplus of 165 wood per day.
Why that happened? Because firstly we paid all the costs, what decreased all relevant values, including wood (-50). Secondly, the code started to add new production, material after material. But when it tried to add steel the virtual storage, limit was reached, so the steel have increased only by +87, not +119, as it should according to HUD. Subsequently the wood has stayed at 3, because there was no space. You may also see that every subsequent material (Organic, Machine Parts, Rare) has only paid costs and no production was added because of the lack of space.

The next day the settlement would run out of wood, what would stop all industrial production, electricity, water generation, and that would subsequently stop martial plots from working. Settlement would be practically dead.

Later today/tomorrow I will try to post some suggestions for possible fixes. I design tax reporting software for the living. For me this is fun. :)

UPDATE: well I will not be able to post any suggestions today after all. I decided to get to the bottom of this by inspecting the code and I see that I have a lot to learn about specifics of how Papyrus works with Creation Kit. I am climbing the learning curve right now.
 
Last edited:
I actually think the design of it is
1. Net production rates are tracked in each settlement for each component
2. If any settlement has a negative net production rate, it tries to take that production from the net production of other settlements in the network
3. If there is still a negative, it then tries to take that component from the virtual storage, first from this settlement, then from others
4. If there was not enough in the virtual storage to cover it, the deficit is registered and the penalties applied.

I've deduced this by having a quick look at the daily update function in the (decompiled) code of ResourceManager.pex, which I may or may not have understood properly.

So it looks like the design is okay, but maybe there are some bugs in the code causing the problems you described?
 
You may be right. I need to dive a little deeper into this code. Thankfully, I believe people smarter then me are also doing so. :)

At the moment I will only drop some bugs I noticed, symptoms of the problem:
1. Scrap categories does not respect the VirtualStorage limit. They can easily overtake the limit values, but the scrap and scrap components will respect the limit (although see the second bug). Therefore if limit is reached, we get crazy values for scrap categories, that are a lot larger then sum of scrap components.
2. Even if there is plenty of space in the storage, the values that are added to the scrap categories does not match the daily increase shown in HUD...
3. And the sum of daily increase for components shown in HUD, does not match with daily increase for respective categories shown in HUD.
4. When calculating total scrap stored and whether it is larger/smaller then Virtual Storage limit, the daily amount of scrap is added and then for every scrap component values are added again, up to the limit, to the scrap value. I believe intention here was to be able to limit the value the individual component can increase, so that it won't exceed the limit. But in such a case the scrap value should not be added in the first place.
5. (restating what I said in my previous post) the observation on how values change in the HUD shows that this is not a gross calculation, but rather costs and production are added separately. This will, inevitably, lead to a single resource overtaking all storage space in X no. of cycles, if the network virtual storage is not constantly expanded. This will lead to deficit in subsequent resources. In turn, that will result in complete economy collapse. Currently happens only on highest complexity level because: a. scrap level have only a single resource so this lvl is unaffected by definition, and b. scrap categories does not respect the VirtualStorage limit (bug 1).
 
The ressource numbers are way off in the HUD. The totals don't show the summed up numbers of the individual ressources in the respective categories.
So the question is: Which numbers are correct or are any correct at all
The ressource numbers are way off in the HUD. The totals don't show the summed up numbers of the individual ressources in the respective categories.
So the question is: Which numbers are correct or are any correct at all ;)
View attachment 12705
In my own game in the beginning, I have been able to reproduce when it happens. I have 8 houses, 3 farms, 1 industrial and 12 tatos. Initially, I have the following:
 
In my own game in the beginning, I have been able to reproduce when it happens. I have 8 houses, 3 farms, 1 industrial, 5 pumps and 12 tatos. Initially I have the following:
250$ Industrial 1st lvl: 8 17 57 10 32 245 181 = 550 all good Then the money drops to 242$, then 240$. Next, it jumps to 288$ and at the same time, only the total industrial lvl 1 jumps to 796 (didn't check overall total). Next, the industrial components update to 28 47 87 23 276 246 with a total of 1013.
So the total seems to add 246 when the houses add their money, then components add 216 but total adds 217.
PS sorry about goofs, 1st time
 

Version 1.0.15 - Back to the Holotape​


June 11, 2021
  • Maintenance costs will no longer be imposed on vanilla items if that option is turned off. Previously, the maintenance system was being enabled no matter what.
  • Changing the holotape or MCM setting for Non-plot maintenance costs will now correctly queue those up to be recalculated. Since loading all workshop items remotely isn’t possible, each settlement will fully update its costs the next time it loads into memory by the player visiting.
A lot of the reason the numbers were off so bad was due to this bug. Is it going to make every right again I have yet to be able to test.
 
Top