This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:examples:config:random_values_in_config [2021/09/22 07:01 (4 years ago)] – created sausage | en:examples:config:random_values_in_config [2021/09/23 08:36 (4 years ago)] (current) – iarwain | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Random values in Config ====== | ====== Random values in Config ====== | ||
- | |||
===== Example ===== | ===== Example ===== | ||
+ | |||
+ | === From a list === | ||
< | < | ||
- | [MySection] | + | [Section] |
- | Min = 10 | + | Value = 1 # 2.5 # 10 |
- | Max = 100 | + | |
- | Value = % > @, > Get < Max, > @, > Get < Min, Random < < | + | |
</ | </ | ||
+ | === From a range (floats) === | ||
+ | |||
+ | < | ||
+ | [Section] | ||
+ | Value = 0 ~ 10 | ||
+ | </ | ||
+ | |||
+ | === From a range with steps/ | ||
+ | |||
+ | < | ||
+ | [Section] | ||
+ | Value = 0 ~ 2 ~ 10 ; All even numbers | ||
+ | </ | ||
+ | |||
+ | === From a range with dynamic boundaries (using a lazy command) === | ||
+ | |||
+ | < | ||
+ | [Section] | ||
+ | Min = 1 | ||
+ | Max = 10 | ||
+ | Value = % > @, > Get < Max, > @, > Get < Min, Random < < ; Min & Max can be modified at runtime | ||
+ | </ | ||