NiHoel / Anno1800Calculator

Calculator for the production and consumption of goods in the computer game Anno 1800
MIT License
102 stars 28 forks source link

Negative Consumption from Skyscrapers #89

Closed JesterJ closed 1 year ago

JesterJ commented 1 year ago

If i change the per house number of investors from 605 to 300 and then write 200 in the building count then they will generate a negative consumption image

JesterJ commented 1 year ago

I investigated the issue a little further, and it seems to drop of as you set it to 430 max residents. Thats 175 lower than 605, which is the number that should be the baseline for max pop in investor skyscrapers level 5. After looking into the params.js, i could see that the influx of residents from lifestyle needs is increased by a factor equal to the skyscraper tier. If added together this results in the aforementioned max pop of 605 even though the "residentMax" value is 175. I'm not sure if its intentional that the resident influx should increase with the tier of the building and after correcting the numbers in the params.js file the issue seems to be solved and it correctly calculates the required goods.

NiHoel commented 1 year ago

It's correct that you get more residents from lifestyle needs with higher skyscraper levels. You can verify this in the game. The number entered in the "Per house" column is the maximum: basic needs + lifestyle needs - no matter how many residents currently live in the skyscraper The 605 is the minimum - you must not enter smaller values (I will fix that this is currently not enforced)

The reason for negative consumption is that I subtract the residents by lifestyle needs from the maximum. If you enter a number too small this gives a negative population.

NiHoel commented 1 year ago

correct-wrong-input

JesterJ commented 1 year ago

Ah okay, i haven't tried it that far yet with lifestyle needs, and it did not make sense when comparing it to the wiki, however the wiki does contain multiple errors in regards to lifestyle needs so im noty surprised. Nice that you make it enforce it, that will make it clear that it is intentional. Maybe you could also add a small explanation of it under the skyscraper description in the readme? Thank you very much for the explanation, i depend on your calculator as it is the only complete one out there so thanks so much :)