• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Desync Errors

Status
Not open for further replies.
Level 4
Joined
Mar 7, 2009
Messages
41
Hey everyone,

I'm working on a map and run into desync errors from time to time.
It's very weird to find them and very time consuming. At this point the desyncs only occur if I play with more than 2 players. All of them desync within 2 minutes. But the last 2 players never desync.

Do you have any approaches or lists of problematic triggers?
I do not use any custom models, effects or similar things.

This is very frustrating for me, hopefully someone can help me :)

I tried disabling them one after another, then testing the map. But even then, after a few tests a new trigger seems to be a problem.
 

Attachments

  • MultiRTS.w3x
    116.4 KB · Views: 10
Level 12
Joined
Mar 13, 2020
Messages
421
it was made with reforged versions. But no one played with reforged graphics

wait you say it was made by with reforged? And no one played with reforged graphics...

try to start the game in classic and you will find the problem I’m sure...

that’s why i do all of my work in SD graphics and Play it on reforged...

i will look into the Map tomorrow and throw a eye on it
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
Alright, so first thing I see is Custom UI which if used incorrectly can cause desyncs.

Second, I see you're checking Player Status during Map Initialization. This is another desync issue since some players could still be loading while others are already in the game.

You'd want to separate the PlayerGroup stuff in this initialization trigger:
  • SpielerPosiGeldBounty
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet SpawnPunktStart[1] = (Center of Spawn1 <gen>)
      • Set VariableSet SpawnPunktStart[2] = (Center of Spawn2 <gen>)
      • Set VariableSet SpawnPunktStart[3] = (Center of Spawn3 <gen>)
      • Set VariableSet SpawnPunktStart[4] = (Center of Spawn4 <gen>)
      • Set VariableSet SpawnPunktStart[5] = (Center of Spawn5 <gen>)
      • Set VariableSet SpawnPunktStart[6] = (Center of Spawn6 <gen>)
      • Set VariableSet SpawnPunktStart[7] = (Center of Spawn7 <gen>)
      • Set VariableSet SpawnPunktStart[8] = (Center of Spawn8 <gen>)
      • Set VariableSet PlayerNumber = 1
      • Player Group - Add Player 1 (Red) to IncomePlayerGroupA
      • Player Group - Add Player 2 (Blue) to IncomePlayerGroupA
      • Player Group - Add Player 3 (Teal) to IncomePlayerGroupA
      • Player Group - Add Player 4 (Purple) to IncomePlayerGroupA
      • Player Group - Add Player 5 (Yellow) to IncomePlayerGroupB
      • Player Group - Add Player 6 (Orange) to IncomePlayerGroupB
      • Player Group - Add Player 7 (Green) to IncomePlayerGroupB
      • Player Group - Add Player 8 (Pink) to IncomePlayerGroupB
      • Player Group - Pick every player in IncomePlayerGroupA and do (Actions)
        • Loop - Actions
          • Player - Turn Gives bounty On for (Picked player)
      • Player Group - Pick every player in IncomePlayerGroupB and do (Actions)
        • Loop - Actions
          • Player - Turn Gives bounty On for (Picked player)
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player(PlayerNumber)) slot status) Equal to Is playing
            • Then - Actions
              • Set VariableSet RealPlayer[PlayerNumber] = True
              • Player - Add 500 to (Player(PlayerNumber)).Current gold
              • Unit - Create 1 PickRace for (Player(PlayerNumber)) at SpawnPunktStart[PlayerNumber] facing Default building facing degrees
              • Set VariableSet Haupthaus[PlayerNumber] = (Last created unit)
              • Camera - Set a spacebar-point for (Player(PlayerNumber)) at SpawnPunktStart[PlayerNumber]
            • Else - Actions
          • Set VariableSet PlayerNumber = (PlayerNumber + 1)
And move it to a trigger with a Time Elapsed Event. You'll also see I added a new Player Group, ActivePlayers, which will contain ALL human players to make things easier for you:
  • Setup Players
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Player Group - Add (Picked player) to ActivePlayers
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Team number of (Picked player)) Equal to 1
                • Then - Actions
                  • -------- Team 1 --------
                  • Player Group - Add (Picked player) to IncomePlayerGroupA
                • Else - Actions
                  • -------- Team 2 --------
                  • Player Group - Add (Picked player) to IncomePlayerGroupB
            • Else - Actions
      • -------- --------
      • Player Group - Pick every player in ActivePlayers and do (Actions)
        • Loop - Actions
          • Set VariableSet PlayerNumber = (Player number of (Picked player))
          • Player - Turn Gives bounty On for (Picked player)
          • Player - Add 500 to (Picked player).Current gold
          • Unit - Create 1 PickRace for (Picked player) at SpawnPunktStart[PlayerNumber] facing Default building facing degrees
          • Set VariableSet Haupthaus[PlayerNumber] = (Last created unit)
          • Camera - Set a spacebar-point for (Picked player) at SpawnPunktStart[PlayerNumber]
So as you can see I'm only setting up players that are actually playing. I think it's important that you design your map around this concept. You shouldn't be running code for players that don't exist.


Also, I see some Leaks here and there, where you tried to fix the leak but put the Custom script in the wrong spot:
  • GoldminenSetPosi
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet GoldmineEinheitPunkt[1] = (Position of Control Point 0000 <gen>)
      • Set VariableSet GoldmineEinheitPunkt[2] = (Position of Control Point 0001 <gen>)
      • Set VariableSet GoldmineEinheitPunkt[3] = (Position of Control Point 0002 <gen>)
      • Set VariableSet MineFlagge[1] = Control Point 0000 <gen>
      • Set VariableSet MineFlagge[2] = Control Point 0001 <gen>
      • Set VariableSet MineFlagge[3] = Control Point 0002 <gen>
      • Set VariableSet GoldmineEinheitSpawn = 1
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 DummyMineKreisReichweite for Neutral Hostile at GoldmineEinheitPunkt[GoldmineEinheitSpawn] facing Default building facing degrees
          • Animation - Change (Last created unit)'s animation speed to 0.00% of its original speed
          • Set VariableSet GoldmineEinheitLeben[GoldmineEinheitSpawn] = (Integer((Life of MineFlagge[GoldmineEinheitSpawn])))
          • Set VariableSet GoldmineEinheitSpawn = (GoldmineEinheitSpawn + 1)
      • Custom script: call RemoveLocation(udg_GoldmineEinheitPunkt[udg_GoldmineEinheitSpawn])
You need to move your Custom script to inside of the For Loop so it's positioned above "GoldmineEinheitSpawn + 1". Also, that For Loop could be simplified, instead of using Integer A, just use GoldmineEinheitSpawn as your Loop Integer. Then you wouldn't have to increase GoldmineEinheitSpawn by 1 as the Loop would do that for you.

This one has a similar problem, the Custom Script is outside of the For Loop. Also, the If Then Else in it does nothing:
  • SelectArmee
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Set VariableSet EinheitenGruppe_Select[(Integer A)] = (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Player((Integer A))))) and ((Max life of (Matching unit)) Not equal to 6666.00
              • Selection - Select EinheitenGruppe_Select[(Integer A)] for (Player((Integer A)))
              • Camera - Pan camera for (Player((Integer A))) to SpawnPunktStart[(Integer A)] over 0.00 seconds
            • Else - Actions
      • Custom script: call DestroyGroup(udg_EinheitenGruppe_Select[bj_forLoopAIndex])
      • Trigger - Turn off (This trigger)
I would try disabling the Custom UI to see if the desyncs still happen. The Player Loading desync I mentioned wouldn't happen 2 minutes into the game, so I don't think it's the exact issue you're having, but it's still a good thing to fix.
 
Last edited:
Level 4
Joined
Mar 7, 2009
Messages
41
No im not making the map with the actual reforged graphic. I was mentioning that Im working on the updated version of the editor. Not a old one.

@Uncle. Thank you so much! I will check out all of the things you've mentioned.
Do you see any problems with the custom UI so far?
As you've mentioned, the desyncs happen only later in the game.

Still one weird thing: why do all players expect for 1 desync?
 
Status
Not open for further replies.
Top