<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hard-light.org/index.php?action=history&amp;feed=atom&amp;title=Parsed_random_range</id>
	<title>Parsed random range - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hard-light.org/index.php?action=history&amp;feed=atom&amp;title=Parsed_random_range"/>
	<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Parsed_random_range&amp;action=history"/>
	<updated>2026-11-15T14:32:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Parsed_random_range&amp;diff=65843&amp;oldid=prev</id>
		<title>Kestrellius: Created page with &quot;{{SCP_table}}  The &#039;&#039;&#039;parsed random range&#039;&#039;&#039; syntax allows modders to specify random distributions for certain values.  {{Table242| As of 24.2, there are three types of distri...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Parsed_random_range&amp;diff=65843&amp;oldid=prev"/>
		<updated>2024-09-19T18:42:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{SCP_table}}  The &amp;#039;&amp;#039;&amp;#039;parsed random range&amp;#039;&amp;#039;&amp;#039; syntax allows modders to specify random distributions for certain values.  {{Table242| As of 24.2, there are three types of distri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{SCP_table}}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;parsed random range&amp;#039;&amp;#039;&amp;#039; syntax allows modders to specify random distributions for certain values.&lt;br /&gt;
&lt;br /&gt;
{{Table242|&lt;br /&gt;
As of 24.2, there are three types of distribution available: uniform, normal, and curve. Uniform is used by default if there is no string specifying type; normal and curve are accessed by prefacing the min and max values with the appropriate string. Details below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Uniform random range===&lt;br /&gt;
*This accepts 1 or 2 values. If one value is used then the random range always returns that value. If two values are specified then a uniformly distributed random value will be picked from the range, with the first value as minimum and the second as maximum.&lt;br /&gt;
*Prior to 24.2, this was the only type of random range available in tables.&lt;br /&gt;
*Syntax: &amp;#039;&amp;#039;&amp;#039;(Random values)&amp;#039;&amp;#039;&amp;#039;, a list of floating point values. Either one or two values. If only one value is specified then the parentheses are optional.&lt;br /&gt;
**Example: &amp;#039;&amp;#039;(4 20)&amp;#039;&amp;#039;&lt;br /&gt;
**Example: &amp;#039;&amp;#039;4&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{Table242|&lt;br /&gt;
===Normal distribution random range===&lt;br /&gt;
*This takes the string &amp;quot;NORMAL&amp;quot;, followed by 1 or 2 values. This random range generates values according to a [https://en.wikipedia.org/wiki/Normal_distribution normal distribution]. The first value specified the mean value of the distribution. The second value specifies the standard deviation of the distribution; this defaults to 1.&lt;br /&gt;
*Syntax: &amp;#039;&amp;#039;&amp;#039;NORMAL (Random values)&amp;#039;&amp;#039;&amp;#039;, a list of floating point values. Either one or two values.&lt;br /&gt;
**Example: &amp;#039;&amp;#039;NORMAL (4 20)&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Curve distribution random range===&lt;br /&gt;
*This takes the string &amp;quot;CURVE&amp;quot;, followed by a string matching the name of a curve from [[Curves.tbl]] (or one of the built-in curves), optionally followed by two values. This random range generates values by using the curve as a [https://en.wikipedia.org/wiki/Probability_density_function probability density function]. Curves which have a height of zero along the Y axis, or which dip below zero along the Y axis, are not allowed. If min and max values are provided, the generated values will be remapped into the range specified. Otherwise, the range of values generated will be determined by the smallest and largest X values of the curve&amp;#039;s keyframes.&lt;br /&gt;
*Note that while distributions based on curves with only two keyframes are quite cheap, curves with many keyframes can be significantly costly.&lt;br /&gt;
*Syntax: &amp;#039;&amp;#039;&amp;#039;CURVE curve_name (Random values)&amp;#039;&amp;#039;&amp;#039;, type string followed by curve name followed optionally by a list of floating point values. A single value will not do anything; you must specify neither or both.&lt;br /&gt;
**Example: &amp;#039;&amp;#039;CURVE CurvePolyDown2.0 (0 25)&amp;#039;&amp;#039;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kestrellius</name></author>
	</entry>
</feed>