[Suggestion] Add SetSeed PRPL function

Started by kajacx, December 31, 2016, 08:23:53 AM

Previous topic - Next topic

kajacx

I'm working with random permutations now and it would be nice to have some reproducable results. Sure, I could create one permutation and cache it (and I will probably do just that), but SetSeed for random generator would be much better.
Why do work yourself, when you can write a program that will do the work for you.

GoodMorning

The RNG state is part of the save file (or was in CW3).
A narrative is a lightly-marked path to another reality.

kajacx

Sorry for late response, forgot to turn notifications on.

Well saving the RNG state is better than nothing, but if I have one PRPL function that uses random numbers and I need to debug that, the only way to reproduce results is to: 1) save your game file 2) run your function once 3) see if it works 4) return to step 2. It woud still be waaaay better to just set the seed before calling the function, and them just hit recompile in level editor.
Why do work yourself, when you can write a program that will do the work for you.