Malcolm-Q / LC-LateGameUpgrades

Repo for the LateGameUpgrades Lethal Company Mod.
MIT License
12 stars 9 forks source link

Upgrade sales reset on save reload #439

Closed ZachHaber closed 5 months ago

ZachHaber commented 5 months ago

I have a save file where every time I load the save, the LGU store resets the sales to what they were at

Attached is 2 saves from my current game - One is from day 9, the other at day 14. I've had the same sales show up every time I re-host the game.

Even after the sales change, if I load the save file, the sales seem to reset back to "Bargain - 19%", "Climbing - 32%", "Efficient - 17%", "Sick Beats - 37%". (While double checking things, one time the save loaded with no sales at all - I exited and re-hosted the save and it went back to the same sales).

LCSaveFiles.zip Profile: 018ee506-a3f3-16fc-cb09-a47631f42e61

WhiteSpike commented 5 months ago

image image

The sales seem to differ between the saves. So you're saying that you're seeing exactly the same sales on both saves?

ZachHaber commented 5 months ago

The first screenshot is what I saw before I stopped playing. The second is what I saw after I hosted the save file again. - we restarted the server multiple times while actively playing, and each time it reset to those sales.

Today, I started up the files, and now neither of the files show any sales in the LGU store.

WhiteSpike commented 5 months ago

The sales not loading's probably due the implementation's amount of tries of acquiring what it needs to sync up the saves not sufficient and loads it under a default value.

And the sales only change after a quota is met. (I cannot tell from the saves alone this fact happened)

So either three things are happening with the sales:

So I would need you (if possible obviously, otherwise it would be after I'm done with my stuff to start testing this again) to try do the steps of generating the sales, leave and come back and see the results. After this, post the logs of this session so that I can have a look at what's going on.

ZachHaber commented 5 months ago

Okay, the bug re-triggered this time. The days I'm tallying here might not be the correct numbers. But this time it actually loaded the first time with the sales in the LGU that didn't load this morning when I responded. This is the LCSaveFile2 from the first zip folder but landing on experimentation 3 times and then reaching the quota.

Day 10: Sales changed (LGU didn't) - Walkie 30% => radar-booster 20% Day 11: Sales changed (LGU no) - Walkie 20%/extension 50%/radar 50%/spray-paint 10% Day 12 (After quota ended): Sales unchanged - LGU changed: Better Scanner 16%/Locksmith 27%/Protein 12%/ Sick Beats 33%

Day 12: after loading: Bargain 19%/ Climbing 32%/ Efficient 17%/ Sick Beats 37%

Lines 1287-1290 show the initial sales loaded

[Info   :More Ship Upgrades] [LguStore] Loading SteamID: 76561198041076472
[Info   :More Ship Upgrades] [LguStore] Successfully loaded save data for ID: 76561198041076472
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.8088145 for Bargain Connections.
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.6842617 for Climbing Gloves.
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.8285989 for Efficient Engines.
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.6277798 for Sick Beats.

Lines 4063-4130 in the log shows the new LGU sales, then after I quit and re-loaded the same file,

4063-4130 ```log [Info :More Ship Upgrades] [LguStore] Generating sales with seed: 259081 on this client... [Info :More Ship Upgrades] [LguStore] Set sale percentage to: 0.6710415 for Aluminium Coils. [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Set sale percentage to: 0.7355092 for Fast Encryption. [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Received and updated save info for client: 76561198041076472 [Info :GeneralImprovements] Applying surplus quota to fulfilled: $1798 [Info :More Ship Upgrades] [LguStore] Generating sales with seed: 905470 on this client... [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Set sale percentage to: 0.843331 for Better Scanner. [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Set sale percentage to: 0.7315573 for Locksmith. [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Set sale percentage to: 0.8811426 for Protein Powder. [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Set sale percentage to: 0.6675756 for Sick Beats. [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Saving node into save [Info :More Ship Upgrades] [LguStore] Received and updated save info for client: 76561198041076472 ```

lines 5012-5017 show the sales loaded are the ones that existed when I first loaded the save!

[Info   :More Ship Upgrades] [LguStore] Loading SteamID: 76561198041076472
[Info   :More Ship Upgrades] [LguStore] Successfully loaded save data for ID: 76561198041076472
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.8088145 for Bargain Connections.
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.6842617 for Climbing Gloves.
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.8285989 for Efficient Engines.
[Info   :More Ship Upgrades] [UpgradeBus] Loaded sale of 0.6277798 for Sick Beats.
[Info   :More Ship Upgrades] [LguStore] Applying loaded upgrades...

LGU Save issues.zip

ZachHaber commented 5 months ago

In addition, just to double check on loading straight from game-load: The log shows that the sales loaded (the old ones, not what it should be here - this is the Day 12 file after the quota), but the UI shows no sales at all when I go to the LGU store (and the base store sales don't exist either). image bepinex.log

Hope this helps you figure out what's going wrong!