limoka / DSP-Mods

An example how to add a custom model with your mesh and animations
MIT License
32 stars 10 forks source link

[BUG] - GameTick Error After Achievements Update with Advanced Miner #16

Closed Hiestaa closed 2 years ago

Hiestaa commented 2 years ago

Describe the bug

To Reproduce Load this save: https://mega.nz/file/NUl1VaJI#3AmzWqk1_9QgaZf_yaV5f72dPp2B9NVcnmYOPneuehU - note that it requires the mod Compress Save and MegaSystems to load successfully - using the most recent game version and the Advanced Miner mod.

Expected behavior The game should not throw an exception due to existing miner MK2 entities, on every game tick, as soon as the save loads

Log files Doesn't appear to contain any relevant information, but here it is:

[Message:   BepInEx] BepInEx 5.4.15.0 - DSPGAME (2/6/2021 5:29:10 PM)
[Info   :   BepInEx] Running under Unity v2018.4.12.5889476
[Info   :   BepInEx] CLR runtime version: 4.0.30319.17020
[Info   :   BepInEx] Supports SRE: False
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.15.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 0 plugins to load
[Message:   BepInEx] Chainloader startup complete

Screenshot image

Additional context

limoka commented 2 years ago

Thanks for reporting. I just spent an hour trying to figure out the cause of this issue without success. I will check later if your save will allow me to reproduce, as so far I was unable to reproduce it.

Hiestaa commented 2 years ago

No problem, it's very consistent on my save, everytime I load it I get the issue, with no other mods than CompressSave, AdvancedMiner (and LDBTool and Bepinex required as dependencies) and MegaSystems.

I forgot to mention the mod https://dsp.thunderstore.io/package/pthcon/MegaSystems/ in my bug report (updated and fixed). I don't think it is the cause of the issue, but it's required for the save file to load properly.

I hope it gives you a path to resolve the issue!

To anybody else experiencing this issue, please note there is a way to fix the issue without replacing all the miners manually:

  1. Remove the mod from the game
  2. Load the save, which will remove the miners MK2 from your worlds but only temporarily, and will fix the error happening on every game tick
  3. Create a new save immediately with the mod removed.
  4. Quit the game
  5. Re-enable the mod
  6. Reload your save, you should not see the error anymore, and the miners MK2 should be back!
limoka commented 2 years ago

Ok. In your particular case this error is not actually caused by this mod. Its caused by Smelter mk2 mod, that you later removed, but its id was left in the data. Apparently my mod somehow causes for the error to happen. Anyway, i have decided to suppress this error. Should now be fixed.

Hiestaa commented 2 years ago

You're a gem!! Thank you so much, and sorry for mis-identifying the issue, but if that makes it possible to get your mod a little more robust then all the better!

Again, thank you for your work!