Loading desync for large RPG map

Hey guys,

I have a pretty big HD map War Quest World that you can DL and take a look, but when I play multiplayer it tends to desync 1 player on load right around where it prints out "..." but before the wait 7 seconds. Any ideas? Im wondering if I should just rewrite this trigger in JASS but I can't see what specifically would be wrong here. (this is triggered from a elapsed game time 0.00 seconds)
 
Last edited:

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,678

I'd increase the Elapsed Game time event to 1.00 second. Maybe that'll help.

Also, look for cases of GetLocalPlayer() and anything you're doing with frames. I imagine the desyncs would stop if you disabled all of the custom script in that trigger.
 
  • Begin
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Custom script: call StartWorld()
      • Environment - Set sky to Lordaeron Summer Sky
      • Game - Set the time of day to 9.00
      • Trigger - Run Start <gen> (checking conditions)
      • Wait 1.00 seconds
      • Trigger - Add to Update UI <gen> the event (Time - Every 1.00 seconds of game time)
      • Trigger - Add to Flags <gen> the event (Time - Every 2.00 seconds of game time)
      • Trigger - Add to Ships <gen> the event (Time - Every 2.00 seconds of game time)
      • Trigger - Add to Skirmishes <gen> the event (Time - Every 3.00 seconds of game time)
      • Trigger - Add to Lava <gen> the event (Time - Every 5.00 seconds of game time)
      • Trigger - Add to Drowning <gen> the event (Time - Every 5.00 seconds of game time)
      • Trigger - Add to Frostbite <gen> the event (Time - Every 10.00 seconds of game time)

vJASS:
function StartWorld takes nothing returns nothing
    set udg_World = InitHashtable()

    call StopSound(bj_dayAmbientSound, true, true)
    call StopSound(bj_nightAmbientSound, true, true)
endfunction

  • Start
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Name of Player 1 (Red)) Equal to WorldEdit
        • Then - Actions
          • Player - Make Player 22 (Snow) treat Player 1 (Red) as an Ally with shared vision and shared units
          • Hero - Create |cffffdeadOmega Orb and give it to Villager 0013 <gen>
        • Else - Actions
      • Set VariableSet MapHero[1] = Villager 0013 <gen>
      • Set VariableSet MapHero[2] = Villager 5676 <gen>
      • Set VariableSet MapHero[3] = Villager 5677 <gen>
      • Set VariableSet MapHero[4] = Villager 5678 <gen>
      • Set VariableSet MapHero[5] = Villager 1256 <gen>
      • Set VariableSet MapHero[6] = Villager 1257 <gen>
      • Set VariableSet MapHero[7] = Villager 1258 <gen>
      • Sound - Play SadMystery <gen>
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Custom script: call CreateCommandButtonEffectBJ( 'A000', "harvest" )
      • For each (Integer A) from 1 to 7, do (Actions)
        • Loop - Actions
          • Set VariableSet Portals[(Integer A)] = ((Position of Magistrate (Glenheim) 0141 <gen>) offset by 150.00 towards (Facing of Magistrate (Glenheim) 0141 <gen>) degrees.)
          • Player - Set (Player((Integer A))).Current gold to 25
          • Player - Set (Player((Integer A))).Current lumber to 1
          • Player - Disable Darksight (Spellbook) for (Player((Integer A)))
          • Custom script: call SetPlayerAbilityAvailableBJ( false, 'A01F', Player(GetForLoopIndexA()) )
          • Player - Disable Dodge (Spellbook) for (Player((Integer A)))
          • Custom script: call SetPlayerAbilityAvailableBJ( false, 'A02B', Player(GetForLoopIndexA()) )
          • Set VariableSet MapLocation[(Integer A)] = ((Position of Glenheim Village 0001 <gen>) offset by (100.00 + (Real((Integer A)))) towards 225.00 degrees.)
          • Unit - Create 1 Pack for (Player((Integer A))) at (Center of Packs <gen>) facing 315.00 degrees
          • Set VariableSet Pack[(Integer A)] = (Last created unit)
          • Unit - Create 1 |cffc3dbffBattle Standard for (Player((Integer A))) at MapLocation[(Integer A)] facing 270.00 degrees
          • Set VariableSet MapFlag[(Integer A)] = (Last created unit)
          • Selection - Select MapHero[(Integer A)] for (Player((Integer A)))
          • Camera - Lock camera target for (Player((Integer A))) to Imperial Cavern 0107 <gen>, offset by (0.00, 0.00) using Default rotation
          • Camera - Apply Opening From <gen> for (Player((Integer A))) over 0.00 seconds
          • Camera - Apply Opening To <gen> for (Player((Integer A))) over 15.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer A))) slot status) Equal to Is unused
                  • ((Player((Integer A))) slot status) Equal to Has left the game
            • Then - Actions
              • Unit - Hide MapHero[(Integer A)]
              • Unit - Hide MapFlag[(Integer A)]
              • Custom script: call BlzFrameSetVisible(BlzGetFrameByName("p"+I2S(GetForLoopIndexA()), 0), false)
            • Else - Actions
      • Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Game - Display to (All players) for 2.50 seconds the text: |cffffcc00War has b...
      • Game - Display to (All players) for 3.00 seconds the text: |cffffcc00The skies...
      • Wait 7.00 seconds
      • Custom script: call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 10.00, "war3mapImported\\titlefilter.tga", 100.00, 100.00, 100.00, 0 )
      • Wait 7.00 seconds
      • For each (Integer A) from 1 to 7, do (Actions)
        • Loop - Actions
          • Camera - Apply Town Glenheim <gen> for (Player((Integer A))) over 0.00 seconds
          • Camera - Lock camera target for (Player((Integer A))) to MapHero[(Integer A)], offset by (0.00, 0.00) using Default rotation
          • Camera - Set (Player((Integer A)))'s camera Distance to target to 1500.00 over 0.00 seconds
          • Trigger - Add to Cursors <gen> the event (Player - (Player((Integer A))) issues Mouse Move event)
      • Game - Display to (All players) for 15.00 seconds the text: |cffffcc00The wind ...
      • Environment - Set fog to style Linear, z-start 4000.00, z-end 6000.00, density 0.50 and color (46.00%, 66.00%, 0.85%)
      • Countdown Timer - Start BattleTimer as a One-shot timer that will expire in 300.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title The Battle of Glenh...
      • Trigger - Run Countdown Glenhill <gen> (checking conditions)
      • Custom script: call PlayerLoad()
 
did some play testing just now.

A player joined 3 games and desynced in all 3 in a row. Other players consistently did not desync, but he did. We even tried him in a few different slots, but there was something sticky about his desyncing.

The desync always would occur right around the time the title CinematicFadeBJ call happens and the desyncing player would see the cinematic finish and his hero in town for 1 second before getting kicked to the score screen. However, we the other players would see the player Desynced warning earlier during the opening cinematic.

I later hosted games with 3-4 players and no one desynced. What could be causing only certain players to reliably desync? map size being too large in RAM on their PC or something?
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,678
BJ functions aren't always safe to use.
 
Top