• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

W3MMD Desync Problem

Status
Not open for further replies.
Level 1
Joined
Jun 26, 2014
Messages
6
Hello,

i did read much Threads about Desync and W3MMD and know, there can be some problems.

My Problem is after game start, some ppl get dc.
Code:
(00:00 / All) justGG.: Shortest load by player [achjakomdochher] was 48.71 seconds.
(00:00 / All) justGG.: Longest load by player [diVision] was 237.64 seconds.
(00:00 / All) justGG.: This game is hosted by GhostPlay.
(00:00 / All) justGG.: Good Luck and Have Fun
(00:01 / All) justGG.: Warning! Desync detected!
(00:01 / All) justGG.: Players in game state #1: x-Heisenberg-x
(00:01 / All) justGG.: Players in game state #2: justGG., achjakomdochher, forby51, OiMeL, VIDIOT, diVision
(00:01 / All) justGG.: Players in game state #3: fuunky, guillemarc
(00:01 / All) justGG.: x-Heisenberg-x was dropped due to desync.
(00:01 / All) justGG.: guillemarc was dropped due to desync.
(00:01 / All) justGG.: fuunky was dropped due to desync.

i have 4 triggers for check win and if all players from one team left:
1 Trigger:
JASS:
function Team_1_Win_Local takes nothing returns nothing
    if ( GetPlayerSlotState(Player(0)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(0), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(1)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(1), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(2)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(2), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(3)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(3), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(4)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(4), MMD_FLAG_WINNER)
    endif
    call MMD_FlagPlayer(Player(5), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(6), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(7), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(8), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(9), MMD_FLAG_LOSER)
endfunction

//===========================================================================
function InitTrig_Team_1_Win_Local takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterUnitEvent( t, gg_unit_ofrt_0020, EVENT_UNIT_DEATH )
    call TriggerAddAction( t, function Team_1_Win_Local )
endfunction

2 Trigger:
JASS:
function Team_1_Leave_Local_Conditions takes nothing returns boolean
    if ( not GetBooleanOr( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_EMPTY, GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_LEFT ) ) then
        return false
    endif
    if ( not GetBooleanOr( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_EMPTY, GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_LEFT ) ) then
        return false
    endif
    if ( not GetBooleanOr( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_EMPTY, GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_LEFT ) ) then
        return false
    endif
    if ( not GetBooleanOr( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_EMPTY, GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_LEFT ) ) then
        return false
    endif
    if ( not GetBooleanOr( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_EMPTY, GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_LEFT ) ) then
        return false
    endif
    return true
endfunction

function Team_1_Leave_Local_Actions takes nothing returns nothing
    if ( GetPlayerSlotState(Player(5)) != PLAYER_SLOT_STATE_PLAYING) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(5), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(6)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(6), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(7)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(7), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(8)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(8), MMD_FLAG_WINNER)
    endif
    if ( GetPlayerSlotState(Player(9)) != PLAYER_SLOT_STATE_PLAYING ) then
        call DoNothing(  )
    else
        call MMD_FlagPlayer(Player(9), MMD_FLAG_WINNER)
    endif
    call MMD_FlagPlayer(Player(0), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(1), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(2), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(3), MMD_FLAG_LOSER)
    call MMD_FlagPlayer(Player(4), MMD_FLAG_LOSER)
endfunction

//===========================================================================
function InitTrig_team_1_leave_Local takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( t, 15.00 )
    call TriggerAddCondition( t, Condition( function Team_1_Leave_Local_Conditions ) )
    call TriggerAddAction( t, function Team_1_Leave_Local_Actions )
endfunction
Other 2 Triggers looks like this too only with other player numbers.

I did pub only w3mmd library in the map and use only win/lose, nothing more.

Can someone help me?

Thx you

(sorry for my bad english)
 
Since it seems like you know JASS but don't know efficient codon you should look at my tutorial converting GUI to efficient JASS. Link is in my sig. You should also look at things you should know when using triggers / GUI.

Also checking for players lot state playing will not accurately check for players that are playing. You need to check if the player is also a user.

You can also put most of this in a simple loop to make it more efficient.
 
Level 1
Joined
Jun 26, 2014
Messages
6
Greet thx for your answers.
But can it really help with my Desync problem.

If someone have finished triggers for w3mmd (2 Teams) and can send me it, it will be really nice.

Ofc as next step i try follow your suggestions.

Thx again.
 
Last edited:
Level 1
Joined
Jun 26, 2014
Messages
6
I am thinking about this JassNewGenPack 5d, i used it for putting stats into map. But map was created with newer Version of world editor. Before i open map in this JassNewGenPack 5d worldeditor say me, that it was created with newer version.
Now a question, can it be possible that last save of map was made with older version?
 
Level 1
Joined
Jun 26, 2014
Messages
6
i have news,
i checked the replay with dota replay manager and saw that (look attachment)

can you help me with it?


Thx
 

Attachments

  • SyncStoredInteger.PNG
    SyncStoredInteger.PNG
    48.9 KB · Views: 128
Level 1
Joined
Jun 26, 2014
Messages
6
so....
i tryed to disable w3mmd and it still desync.
hm...
i am not map creator i am only who try implement stats in to the map.
In next days i should get older map, where no desync and i try to put it there to check, maybe it really all right.

Thx Guys for so much Help.

If i get map and did test it, i would post here.
 
Level 1
Joined
Jun 26, 2014
Messages
6
i did tested it and that was not w3mmd stats who did provocate desync, so topic can be closed.

thx a lot for your answers
 
Status
Not open for further replies.
Top