Warzone2100 / warzone2100

Command the forces of The Project in a battle to rebuild the world after mankind has been nearly destroyed by nuclear missiles. A 100% free and open source real-time strategy game for Windows, macOS, Linux, BSD+
https://wz2100.net
GNU General Public License v2.0
3.24k stars 534 forks source link

Replay falling into desync due to mods not loading (but present in downloads folder) #3251

Open maxsupermanhd opened 1 year ago

maxsupermanhd commented 1 year ago

Describe the bug When Warzone 2100 is being started with command line argument --loadreplay it does not load the mod and proceeds playing replay with a desync. Replay file was recorded with a mod loaded and information about loaded mod is present in it. If mod is not present in downloads directory it will fail to load replay, but if it is here and present with correct hash it will not fail but not load it!

To Reproduce Steps to reproduce the behavior:

  1. Join Autohoster to download autoMasterBalance mod (updated daily)
  2. Fetch replay dating same day as mod that you just downloaded from Autohoster website (https://wz2100-autohost.net/games)
  3. Put it into replays directory
  4. Launch replay with CLI argument or via menu
  5. Observe mod not being loaded and following desync on 1st frame and when game reaches potential difference between modded and vanilla balance

Expected behavior Either defined hard fail or correct loading of the mod.

Your System:

Additional context Logs indicate that mod was found: [restoreOptions:8517] Downloaded mod found: mods/downloads/a4efa4f8d0e4a774e277ca1d7aa458e143c6ae0275f32deb73b8ba76e9a9b5e0

maxsupermanhd commented 1 year ago

JSON diff of replays from host and spectator: (minus is autohoster, plus is spec)

@ ["gameOptions","ingame","side"]
- true
+ false
@ ["gameOptions","multistats",2,"losses"]
- 0
+ 44
@ ["gameOptions","multistats",2,"played"]
- 0
+ 306
@ ["gameOptions","multistats",2,"totalKills"]
- 0
+ 145039
@ ["gameOptions","multistats",2,"totalScore"]
- 0
+ 524014915
@ ["gameOptions","multistats",2,"wins"]
- 0
+ 262
@ ["gameOptions","netplay.players",17,"ready"]
- false
+ true
@ ["gameOptions","netplay.players",16,"ready"]
- false
+ true
@ ["gameOptions","netplay.players",15,"ready"]
- false
+ true
@ ["gameOptions","netplay.players",14,"ready"]
- false
+ true
@ ["gameOptions","netplay.players",1,"ready"]
- false
+ true
@ ["gameOptions","netplay.players",0,"ready"]
- false
+ true
@ ["gameOptions","selectedPlayer"]
- 13
+ 17

I wonder if "side" has something to do with the mods loading