StrangeLoopGames / EcoIssues

131 stars 21 forks source link

Food consumption values capped when using ALT to add labor #24005

Closed LocoTheDM closed 1 year ago

LocoTheDM commented 1 year ago

Ember Eco Server currently operating on 9.7.13

Reported by one of my players, I am unable to verify because I'm at the hospital with my wife.

Checking your stomach calories before and after each step, if adding labor to a work order by clicking on the button in a crafting table: Clicking adds 100 calories to the job, burns 50 calories at level 7. (Normal) Holding control adds 500 calories to a job, burns 250. (Normal) Edit 2: Holding alt to add labor adds Stomach Capacity / (1 - labor reduction ) to the job, but subtracts only 2000 calories from the stomach. This means jobs over 4000 labor do not function as expected for costs.

Tested on: Mortar at campfires Milling rice Cloth at tailoring table Cellulose fiber at tailoring table Iron plates at screw press

Players involved in testing: Stan KhisanthMagus Rod Waltup369er

LocoTheDM commented 1 year ago

Follow-up from a player: "i tested on a clean local server. max calories with self improvement: 4500. Logging level 7, so 50% reduction in labor on job. 1000 hewn logs: 15000 calorie job. Alt clicked: applied 8000ish calories. Cost 2000 calories."

So even without mods it's not WAI

StanreGit commented 1 year ago

TEST 1 Tailoring Stomach content before laboring image The job being labored image Cals added using alt image Stomach content after image

TEST 2 Milling Stomach content before laboring image The job being labored image Cals added using alt image Content in stomach after image

KhisanthMagus commented 1 year ago

2 tests on a clean local server: Test 1: 1000 campfires on a campsite, no skills Initial calories: 20230829183447_1 Calories applied with alt+click: 20230829183458_1 Remaining calories: 20230829183502_1 Result: 2,999 calories applied with alt+click, 2,000 calories deducted from stomach. This is a ~33% reduction in calorie cost with no skills.

Test 2: 1000 boards on carpentry bench, Carpentry level 7 Self Improvement level 7 Initial Calories: 20230829182507_1 Calories applied with alt+click = 8,499 20230829182524_1 Calories remaining 2499: 20230829182528_1 Result: 8,499 calories applied with alt+click, 2000 calories deducted from stomach. This is a ~75% reduction in calorie cost.

KhisanthMagus commented 1 year ago

After many rounds of testing, this is the best I can determine: It uses your skill level discount and the calories in your stomach to determine how much labor to apply with alt+click. This is working correctly. However, it caps the amount of calories that can be deducted at 2000, regardless of how much is applied.

LocoTheDM commented 1 year ago

So, it's a bug on a normal server, which is going to be a problem for large jobs (crushing, hewn logs, smelting, etc) - 4500 capacity means 9000 labor for 2000 calories.

But on a server with extra stomach capacity it is absolutely crippling. 15000 size means 30000 labor for 2000 calories cost. I'm going to have to remove my mod until this is fixed, or prevent ALT usage with a law.

LocoTheDM commented 1 year ago

Looking into the code with devtier access... I have no clue what's causing stomach calories to only drop by 2000 on an alt click. WorkOrder.Labor feeds into Stomach.BurnCalories, and it looks like it should dump stomach contents to 0 with an ALT trigger. Something is hard capping Calorie change to 2000 on a clock, but I don't see it.

Hobbyist programmer has no clue, good luck with a trace I guess?

LocoTheDM commented 1 year ago

Well, the reason I could not find what the problem was, was because I was looking at /playtest. The issue was BurnCalories, and it has been fixed already, but, it's still a major issue in /release.

D3nnis3n commented 1 year ago

We do not plan to release another update for release aside of a last one for migration fixes shortly before release of Update 10, but I made staff aware they can accept your PR for that one in case it passes review. Technically this bug is already adressed though, hence I'm closing this issue.