• 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.

String Table Desync

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
Will the game desync if the string table is off? i dont mean like a couple values are different but like ~100 values are different for each player
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Yes it will desynchronize a multiplayer session. All players need to have identical string tables.

That can't be true, can it? 100% identical? the Preload native, when used properly, pretty much as a 100% chance to desynchronize the string table.

E/ so why doesnt this desync

JASS:
library Desync initializer InitBlizzar
    function bb takes nothing returns nothing
        local integer i = 0
        
        loop
            call BJDebugMsg(GetPlayerName(GetLocalPlayer()) + I2S(i))
            set i =i + 1
            exitwhen i > 600
        endloop
        
        call BJDebugMsg("===================")
        call BJDebugMsg(GetPlayerName(Player(0)) + "525")
    endfunction

    function InitBlizzar takes nothing returns nothing
        call TimerStart(CreateTimer(), 1, false, function bb)
    endfunction
endlibrary
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
E/ so why doesnt this desync
Probably because it generates different strings in parallel. It could be something stupid that the number of string table entries is checked for synchronization yet the contents is not.

I am not making this up, a number of problems in the past related to desynchronization were solved with the conclusion that the strings cannot be generated locally.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
JASS:
library Desync initializer InitBlizzar
    function bb takes nothing returns nothing
        local integer i = 0
        if GetLocalPlayer() == Player(0) then
            loop
                call BJDebugMsg(GetPlayerName(GetLocalPlayer()) + I2S(i))
                set i =i + 1
                exitwhen i > 600
            endloop
        endif
        
        call BJDebugMsg("===================")
        call BJDebugMsg(GetPlayerName(Player(0)) + "525")
    endfunction

    function InitBlizzar takes nothing returns nothing
        call TimerStart(CreateTimer(), 1, false, function bb)
    endfunction
endlibrary

still doesnt desync. my system is stil pretty desync-y and im just trying to look at everything that might desync
 

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
JASS:
library Desync initializer InitBlizzar
    function bb takes nothing returns nothing
        local integer i = 0
        if GetLocalPlayer() == Player(0) then
            loop
                call BJDebugMsg(GetPlayerName(GetLocalPlayer()) + I2S(i))
                set i =i + 1
                exitwhen i > 600
            endloop
        endif
        
        call BJDebugMsg("===================")
        call BJDebugMsg(GetPlayerName(Player(0)) + "525")
    endfunction

    function InitBlizzar takes nothing returns nothing
        call TimerStart(CreateTimer(), 1, false, function bb)
    endfunction
endlibrary

still doesnt desync. my system is stil pretty desync-y and im just trying to look at everything that might desync

Guess that's because you don't change anything to the string library
 
As far as I know, it was a rumor that was perpetuated in the past (even I spread it a little, based off a post I read), but I never saw a case where desynchronized strings were the cause behind a disconnection. Theoretically, it might be able to cause a disconnect, but since I haven't seen such a case, I'm guessing it is something else that is causing the issue.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
It could easily have come from the very old days where handlevars and other type casting based systems were used. Converting a string to integer returned its table entry number which could be used for anything integer related (who know why).

There could also be some operations which do use the table deterministically (say it passes a string pointer through the internet).
 
Status
Not open for further replies.
Top