1. This forum is archived for reference. For support & bug reports visit the help section of forums.stardewvalley.net

Bug/Issue Slot machine predictable

Discussion in 'Support' started by sleepysquish, Jan 7, 2018.

  1. sleepysquish

    sleepysquish Space Spelunker

    This is on PC v1.2.33.

    I was noticing a weird pattern of wins and losses and the slot machine, so I spend a few hours with a dissembler.
    The internal RNG gets reinitialized with a seed thats 1 greater than the seed before it every time you click (onLeftclick) to play the Slots minigame.
    This results in a predictable high-low pattern with small variance between seeds, due to the way the .Net Random-class is initialized and calculates its first value.
    How to reproduce:
    Create a loop that increments a variable, create a new Random within the loop and get the Next value (and print it, the range of the random number does not matter for this, as it is just a scaled double internally).

    I am not sure whether this is intended or not, but posting it just to be sure.

    Have a nice day :)
     

    Share This Page