Closed issuebotaudinowho[bot] closed 5 months ago
https://github.com/audinowho/DumpAsset/commit/2e3ad65d39c614337f890e19296092d628f6a939
The desync manifested as the tutor spawning code giving a random spawn despite all randoms being tied to the dungeon seed. The desync occurred on the Lua level, because iterating through lua tables has an INDETERMINATE ORDER. When possible moves were being iterated, they came in random order and thus a replay-independent random choice was made, even when the random index was replay-dependent.
Caution must be taken from here on to make sure natural dictionary iteration does not occur in any lua script that is called in dungeon, or bad things like this will happen!
We now have a COMMON.GetSortedKeys(dict)
method to ensure a consistent order of iteration for lua dictionaries.
Discord: 2tousent#0 <@712344233570205776>
RC: Another desync, found this after the quicksave messed things up: https://media.discordapp.net/attachments/759800392568668171/1204084962417057852/image.png?ex=65d37281&is=65c0fd81&hm=22427c9f77ae2d79a2fe0da95d23112bd5fe15061f183986f6137d95c9fb6c69&=&format=webp&quality=lossless&width=840&height=670 It happens somewhere arround this part, on b2f, but only sometimes: Sometimes the murkrow dissapears into the grass, and that's fine, but sometimes it approaches and causes the desync.