• 🏆 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!

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 63
Joined
Jan 18, 2005
Messages
27,178
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 33
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 63
Joined
Jan 18, 2005
Messages
27,178
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