SetSeedUsingForm

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

Sets the randomizer seed (unsigned int) for the calling mod using the specified form's FormID, and resets any progress made with that seed.

If no valid form is passed, will set the seed to the default seed (value of 5489).

  • NOTE: since the default seed is constant, it will always generate the same sequence of random numbers.

For use with generating random numbers via RandSeeded / GetRandomPercentSeeded. Does not affect random number generation for any other function.

Syntax

[help]
anyReference.SetSeedUsingForm seedForm:anyForm 

Or:

anyReference.SetFormSeed seedForm:anyForm

Example

SunnyREF.SetRandomizerSeed

Sets the seed for whatever mod is calling this function to SunnyRef's FormID, and resets that mod's seed progress.
This means that the next sequence of random numbers will predictably generate the same numbers (assuming the min/max don't change in-between calls with RandSeeded).

See Also