Any time Random() is used, things will be a bit different across play sessions, which can be a pain for testing or for establishing a consistent basis for certain kinds of competitive play - I'm talking less about the core Doom random things like combat damage, and more things like mods that randomize items.
In Python I'm used to being able to feed something into random.seed() if I want the same result on multiple runs. It would be nice if we could do this from ZScript with something like SetRandomSeed(int seedValue).
Again I'm aware that Doom's use of randomness is a bit different, and that random generators can produce seemingly different results depending on how many times they've been extracted from - it would be on zscript users to understand how to use this properly.
If this is better served by adding a different generator implementation, eg SeededRandom(), that would be fine. It's even possible a generator could be implemented in ZScript, though I don't see bit math in the documentation and that's useful for most generator algorithms.
Allow ZScript to set random seed
Moderator: GZDoom Developers
Re: Allow ZScript to set random seed
Looking at the code a bit, there's already a CCMD that does this, "rngseed get|set|clear", a "-rngseed" command line switch, and the general design of the system clearly fully supports a user-defined seed. So the work here mainly seems to come down to exposing it to ZScript in the proper way.