forbidden-memories-coding / fmscrambler

Yu-Gi-Oh! Forbidden Memories Randomizer Tool
MIT License
17 stars 8 forks source link

Scrambler attempts glitch fusions above 1023 #4

Closed GenericMadScientist closed 7 years ago

GenericMadScientist commented 7 years ago

FM does some bit-fiddling to save some memory for storing the fusion table, and so stores the card IDs in there in 10 bits. As a result, if the scrambler tries to write a fusion result above 1023 then instead the result will be taken modulo 1024. For example, with seed 0, only 000 fusions ticked, one line of the log reads => Hitotsu-me Giant (3) + Blast Juggler (416) = (!) GLITCHCARD (!) (1383).

Undoing the off-by-one errors already reported, the fusion this represents in the game code is Mystical Elf (2) + Blast Juggler (417) = ??? (1384). When this fusion is attempted, the result is Zera The Mant. Note that Zera's ID is 360, and 1384 % 1024 = 360. I suspect the same will occur with the second material, but I have not tested that.

duke1102 commented 7 years ago

Interesting, I have to look into this and experiment around a bit also.