https://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&feed=atom&action=historyScripting:Design Note - Revision history2024-03-29T09:16:07ZRevision history for this page on the wikiMediaWiki 1.39.6https://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=936&oldid=prevThe Watcher at 16:37, 19 June 20202020-06-19T16:37:17Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:37, 19 June 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l13">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The value you can specify for any given parameter depends on its ''type''. The documentation for each parameter says what type of value it expects you to give it, and it may require any of the following:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The value you can specify for any given parameter depends on its ''type''. The documentation for each parameter says what type of value it expects you to give it, and it may require any of the following:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>float</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="float"</ins>>float</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: the value should be a real number, that is a number that can include a fractional part, like <code>3.1415</code>. Negative numbers are specified using <code>-</code>, eg: <code>-2.54</code>. Note that, in some cases, negatives can produce unexpected or undesirable behaviours if the script doesn't expect you to use them.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: the value should be a real number, that is a number that can include a fractional part, like <code>3.1415</code>. Negative numbers are specified using <code>-</code>, eg: <code>-2.54</code>. Note that, in some cases, negatives can produce unexpected or undesirable behaviours if the script doesn't expect you to use them.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>float vector</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="floatvec"</ins>>float vector</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: three <code>float</code> values, separated by commas. You may place whitespace between the <code>float</code> values and the commas, but '''do not''' use quotes around each value, ie: <code>SomeParam=0 , 1.2, 5;</code> is fine, as is <code>SomeParam="1.2, 3.4,5.6";</code>, but <code>SomeParam="0","1.2","3";</code> '''is not''' valid. I generally recommend avoid using quotes when specifying the values for <code>float vector</code> types. Unless otherwise indicated in the documentation, the first value corresponds to the <code>x</code> component of the vector, the second to the <code>y</code> component, and the third to the <code>z</code>. Any components you do not specify a value for will be set to <code>0.0</code>. For example, the value <code>6,,10.5</code> will set <code>x</code> to <code>6.0</code>, <code>y</code> to <code>0.0</code>, and <code>z</code> to <code>10.5</code>. Similarly, <code>1,0.5</code> will set <code>x</code> to <code>1.0</code>, <code>y</code> to <code>0.5</code>, and <code>z</code> (which has been omitted entirely from the example here!) will be set to <code>0.0</code>.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: three <code>float</code> values, separated by commas. You may place whitespace between the <code>float</code> values and the commas, but '''do not''' use quotes around each value, ie: <code>SomeParam=0 , 1.2, 5;</code> is fine, as is <code>SomeParam="1.2, 3.4,5.6";</code>, but <code>SomeParam="0","1.2","3";</code> '''is not''' valid. I generally recommend avoid using quotes when specifying the values for <code>float vector</code> types. Unless otherwise indicated in the documentation, the first value corresponds to the <code>x</code> component of the vector, the second to the <code>y</code> component, and the third to the <code>z</code>. Any components you do not specify a value for will be set to <code>0.0</code>. For example, the value <code>6,,10.5</code> will set <code>x</code> to <code>6.0</code>, <code>y</code> to <code>0.0</code>, and <code>z</code> to <code>10.5</code>. Similarly, <code>1,0.5</code> will set <code>x</code> to <code>1.0</code>, <code>y</code> to <code>0.5</code>, and <code>z</code> (which has been omitted entirely from the example here!) will be set to <code>0.0</code>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>integer</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="int"</ins>>integer</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a 'whole number', one without any decimal part, eg: <code>3</code>. Negative numbers can be specified using <code>-</code>, eg: <code>-42</code>.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a 'whole number', one without any decimal part, eg: <code>3</code>. Negative numbers can be specified using <code>-</code>, eg: <code>-42</code>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>boolean</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="bool"</ins>>boolean</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a true or false value. The following are considered to be 'true' values: Any word starting 't', 'T', 'y' or 'Y'; Any non-zero integer value. Any words that do not start as described, or the number <code>0</code>, are considered to be false.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a true or false value. The following are considered to be 'true' values: Any word starting 't', 'T', 'y' or 'Y'; Any non-zero integer value. Any words that do not start as described, or the number <code>0</code>, are considered to be false.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>time</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="time"</ins>>time</code></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>: an <del style="font-weight: bold; text-decoration: none;">integer </del>that represents a period of time. Without any modifier, the the value is interpreted as a number of milliseconds, if you append <code>s</code> to the number (eg: <code>10s</code>) the value is interpreted as a number of seconds. If you place <code>m</code> after the number, it is interpreted as a number of minutes. When using <code>s</code> and <code>m</code> you can use decimal values. For example, <code>0.5s</code> is parsed as 500 milliseconds. If using a qvar instead of a literal time value here (see below for more on this), you ''can not'' specify the <code>s</code> or <code>m</code> modifiers: the value in the qvar must be the time in milliseconds.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: an <ins style="font-weight: bold; text-decoration: none;">value </ins>that represents a period of time. Without any modifier, the the value is interpreted as a number of milliseconds, if you append <code>s</code> to the number (eg: <code>10s</code>) the value is interpreted as a number of seconds. If you place <code>m</code> after the number, it is interpreted as a number of minutes. When using <code>s</code> and <code>m</code> you can use decimal values. For example, <code>0.5s</code> is parsed as 500 milliseconds. If using a qvar instead of a literal time value here (see below for more on this), you ''can not'' specify the <code>s</code> or <code>m</code> modifiers: the value in the qvar must be the time in milliseconds.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>object</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="obj"</ins>>object</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a Dromed object name, or object ID.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a Dromed object name, or object ID.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>string</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="string"</ins>>string</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: any text, no special meaning is attached to it. Note that, if the string needs to contain a semicolon (;) you *must* enclose the string in single or double quotes, <code>'like this'</code> or <code>"like this"</code>. If you need to include a single quote in a single-quoted string, you can do so by prefixing the <code>'</code> with <code>\</code>, ie: <code>\'</code>. Similarly, to include a double quote in a double-quoted string, prefix it with a backslash, <code>\"</code>. If you need to include a backslash in a quoted string, you should generally prefix it with another, eg: <code>\\</code>.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: any text, no special meaning is attached to it. Note that, if the string needs to contain a semicolon (;) you *must* enclose the string in single or double quotes, <code>'like this'</code> or <code>"like this"</code>. If you need to include a single quote in a single-quoted string, you can do so by prefixing the <code>'</code> with <code>\</code>, ie: <code>\'</code>. Similarly, to include a double quote in a double-quoted string, prefix it with a backslash, <code>\"</code>. If you need to include a backslash in a quoted string, you should generally prefix it with another, eg: <code>\\</code>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; <code>target</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; <code <ins style="font-weight: bold; text-decoration: none;">id="target"</ins>>target</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a string describing how to choose a target object, objects, or links. The syntax that should be used when specifying values of this type is complicated, so for clarity it is described [[Scripting:Targeting|on its own page]].</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: a string describing how to choose a target object, objects, or links. The syntax that should be used when specifying values of this type is complicated, so for clarity it is described [[Scripting:Targeting|on its own page]].</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l60">Line 60:</td>
<td colspan="2" class="diff-lineno">Line 60:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="txt" style="bright">TWTrapSetSpeedSpeed=5;TWTrapSetSpeedDest='*TerrPt'</source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="txt" style="bright">TWTrapSetSpeedSpeed=5;TWTrapSetSpeedDest='*TerrPt'</source></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Scripting:Navbox}}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Scripting:Navbox}}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{:Site Navigation}}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{:Site Navigation}}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><references /></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><references /></div></td></tr>
</table>The Watcherhttps://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=908&oldid=prevThe Watcher at 21:47, 20 June 20142014-06-20T21:47:38Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:47, 20 June 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l35">Line 35:</td>
<td colspan="2" class="diff-lineno">Line 35:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>target</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>target</code></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>: a string describing how to choose a target object, objects, or links. The syntax that should be used when specifying values of this type is complicated, so for clarity it is described [[Scripting:<del style="font-weight: bold; text-decoration: none;">Targetting</del>|on its own page]].</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: a string describing how to choose a target object, objects, or links. The syntax that should be used when specifying values of this type is complicated, so for clarity it is described [[Scripting:<ins style="font-weight: bold; text-decoration: none;">Targeting</ins>|on its own page]].</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For the <code>integer</code>, <code>float</code>, <code>boolean</code>, and <code>time</code> types, you may also use a quest variable in place of a literal value. To do this, prepend the quest variable name with <code>$</code>. For example, this will use the value specified in the quest variable <code>platform_speed</code>:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For the <code>integer</code>, <code>float</code>, <code>boolean</code>, and <code>time</code> types, you may also use a quest variable in place of a literal value. To do this, prepend the quest variable name with <code>$</code>. For example, this will use the value specified in the quest variable <code>platform_speed</code>:</div></td></tr>
</table>The Watcherhttps://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=900&oldid=prevThe Watcher at 09:40, 20 June 20142014-06-20T09:40:39Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:40, 20 June 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l33">Line 33:</td>
<td colspan="2" class="diff-lineno">Line 33:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>string</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>string</code></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: any text, no special meaning is attached to it. Note that, if the string needs to contain a semicolon (;) you *must* enclose the string in single or double quotes, <code>'like this'</code> or <code>"like this"</code>. If you need to include a single quote in a single-quoted string, you can do so by prefixing the <code>'</code> with <code>\</code>, ie: <code>\'</code>. Similarly, to include a double quote in a double-quoted string, prefix it with a backslash, <code>\"</code>. If you need to include a backslash in a quoted string, you should generally prefix it with another, eg: <code>\\</code>.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: any text, no special meaning is attached to it. Note that, if the string needs to contain a semicolon (;) you *must* enclose the string in single or double quotes, <code>'like this'</code> or <code>"like this"</code>. If you need to include a single quote in a single-quoted string, you can do so by prefixing the <code>'</code> with <code>\</code>, ie: <code>\'</code>. Similarly, to include a double quote in a double-quoted string, prefix it with a backslash, <code>\"</code>. If you need to include a backslash in a quoted string, you should generally prefix it with another, eg: <code>\\</code>.</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">; <code>target</code></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">: a string describing how to choose a target object, objects, or links. The syntax that should be used when specifying values of this type is complicated, so for clarity it is described [[Scripting:Targetting|on its own page]].</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For the <code>integer</code>, <code>float</code>, <code>boolean</code>, and <code>time</code> types, you may also use a quest variable in place of a literal value. To do this, prepend the quest variable name with <code>$</code>. For example, this will use the value specified in the quest variable <code>platform_speed</code>:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For the <code>integer</code>, <code>float</code>, <code>boolean</code>, and <code>time</code> types, you may also use a quest variable in place of a literal value. To do this, prepend the quest variable name with <code>$</code>. For example, this will use the value specified in the quest variable <code>platform_speed</code>:</div></td></tr>
</table>The Watcherhttps://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=899&oldid=prevThe Watcher at 23:38, 19 June 20142014-06-19T23:38:29Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:38, 19 June 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l11">Line 11:</td>
<td colspan="2" class="diff-lineno">Line 11:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="txt" style="bright">TWTrapSetSpeedDest='SomeTerrPt'</source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="txt" style="bright">TWTrapSetSpeedDest='SomeTerrPt'</source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The value you can specify for any given parameter depends on its <del style="font-weight: bold; text-decoration: none;">*</del>type<del style="font-weight: bold; text-decoration: none;">*</del>. The documentation for each parameter says what type of value it expects you to give it, and it may require any of the following:</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The value you can specify for any given parameter depends on its <ins style="font-weight: bold; text-decoration: none;">''</ins>type<ins style="font-weight: bold; text-decoration: none;">''</ins>. The documentation for each parameter says what type of value it expects you to give it, and it may require any of the following:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>float</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>float</code></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l52">Line 52:</td>
<td colspan="2" class="diff-lineno">Line 52:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="txt" style="bright">TWTrapPhysStateCtrlLocation=$thingx, $thingy, $thingz;</source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="txt" style="bright">TWTrapPhysStateCtrlLocation=$thingx, $thingy, $thingz;</source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Values <del style="font-weight: bold; text-decoration: none;">*</del>may<del style="font-weight: bold; text-decoration: none;">* </del>be enclosed in quotes, either single quotes or double quotes, but this is not required <del style="font-weight: bold; text-decoration: none;">*</del>unless<del style="font-weight: bold; text-decoration: none;">* </del>you are specifying a string containing a semicolon, in which case you must quote the string.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Values <ins style="font-weight: bold; text-decoration: none;">''</ins>may<ins style="font-weight: bold; text-decoration: none;">'' </ins>be enclosed in quotes, either single quotes or double quotes, but this is not required <ins style="font-weight: bold; text-decoration: none;">''</ins>unless<ins style="font-weight: bold; text-decoration: none;">'' </ins>you are specifying a string containing a semicolon, in which case you <ins style="font-weight: bold; text-decoration: none;">'''</ins>must<ins style="font-weight: bold; text-decoration: none;">''' </ins>quote the string.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If more than one parameter is specified, semicolons are used to separate them, for example:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If more than one parameter is specified, semicolons are used to separate them, for example:</div></td></tr>
</table>The Watcherhttps://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=897&oldid=prevThe Watcher at 23:01, 19 June 20142014-06-19T23:01:16Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:01, 19 June 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l17">Line 17:</td>
<td colspan="2" class="diff-lineno">Line 17:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>float vector</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>float vector</code></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>: three <code>float</code> values, separated by commas. You may place whitespace between the <code>float</code> values and the commas, but '''do not''' use quotes around each value, ie: <code>SomeParam=0 , 1.2, 5;</code> is fine, as is <code>SomeParam="1.2, 3.4,5.6";</code>, but <code>SomeParam="0","1.2","3";</code> '''is not''' valid. I generally <del style="font-weight: bold; text-decoration: none;">recomment </del>avoid using quotes when specifying the values for <code>float vector</code> types. Unless otherwise indicated in the documentation, the first value corresponds to the <code>x</code> component of the vector, the second to the <code>y</code> component, and the third to the <code>z</code>. Any components you do not specify a value for will be set to <code>0.0</code>. For example, the value <code>6,,10.5</code> will set <code>x</code> to <code>6.0</code>, <code>y</code> to <code>0.0</code>, and <code>z</code> to <code>10.5</code>. Similarly, <code>1,0.5</code> will set <code>x</code> to <code>1.0</code>, <code>y</code> to <code>0.5</code>, and <code>z</code> (which has been omitted entirely from the example here!) will be set to <code>0.0</code>.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: three <code>float</code> values, separated by commas. You may place whitespace between the <code>float</code> values and the commas, but '''do not''' use quotes around each value, ie: <code>SomeParam=0 , 1.2, 5;</code> is fine, as is <code>SomeParam="1.2, 3.4,5.6";</code>, but <code>SomeParam="0","1.2","3";</code> '''is not''' valid. I generally <ins style="font-weight: bold; text-decoration: none;">recommend </ins>avoid using quotes when specifying the values for <code>float vector</code> types. Unless otherwise indicated in the documentation, the first value corresponds to the <code>x</code> component of the vector, the second to the <code>y</code> component, and the third to the <code>z</code>. Any components you do not specify a value for will be set to <code>0.0</code>. For example, the value <code>6,,10.5</code> will set <code>x</code> to <code>6.0</code>, <code>y</code> to <code>0.0</code>, and <code>z</code> to <code>10.5</code>. Similarly, <code>1,0.5</code> will set <code>x</code> to <code>1.0</code>, <code>y</code> to <code>0.5</code>, and <code>z</code> (which has been omitted entirely from the example here!) will be set to <code>0.0</code>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>integer</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>integer</code></div></td></tr>
</table>The Watcherhttps://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=896&oldid=prevThe Watcher at 23:00, 19 June 20142014-06-19T23:00:22Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:00, 19 June 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l26">Line 26:</td>
<td colspan="2" class="diff-lineno">Line 26:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>time</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>time</code></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>: an integer that represents a period of time. Without any modifier, the the value is interpreted as a number of milliseconds, if you append <code>s</code> to the number (eg: <code>10s</code>) the value is interpreted as a number of seconds. If you place <code>m</code> after the number, it is interpreted as a number of minutes.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: an integer that represents a period of time. Without any modifier, the the value is interpreted as a number of milliseconds, if you append <code>s</code> to the number (eg: <code>10s</code>) the value is interpreted as a number of seconds. If you place <code>m</code> after the number, it is interpreted as a number of minutes<ins style="font-weight: bold; text-decoration: none;">. When using <code>s</code> and <code>m</code> you can use decimal values. For example, <code>0.5s</code> is parsed as 500 milliseconds. If using a qvar instead of a literal time value here (see below for more on this), you ''can not'' specify the <code>s</code> or <code>m</code> modifiers: the value in the qvar must be the time in milliseconds</ins>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>object</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>; <code>object</code></div></td></tr>
</table>The Watcherhttps://thief.starforge.co.uk/index.php?title=Scripting:Design_Note&diff=895&oldid=prevThe Watcher: Created page with "The various scripts provided within the TWScript package use the <code>Editor -> Design Note</code> feature in Dromed to store the configuration information used to control th..."2014-06-19T20:39:00Z<p>Created page with "The various scripts provided within the TWScript package use the <code>Editor -> Design Note</code> feature in Dromed to store the configuration information used to control th..."</p>
<p><b>New page</b></p><div>The various scripts provided within the TWScript package use the <code>Editor -> Design Note</code> feature in Dromed to store the configuration information used to control the behaviour of the scripts. If you have used NVScript, tnhScript, or PublicScripts you will be familiar with this mechanism.<br />
<br />
For some scripts, the Design Note may be left empty: some scripts may use the values set in other object attributes for configuration, or they may not support any setup at all. However, in practice the Design Note will contain one or more configuration parameters. Each parameter consists of three parts:<br />
<br />
# a parameter name, something like <code>TWTrapSetSpeedDest</code><br />
# an equals sign (=)<br />
# a value to set for the parameter<br />
<br />
For example:<br />
<br />
<source lang="txt" style="bright">TWTrapSetSpeedDest='SomeTerrPt'</source><br />
<br />
The value you can specify for any given parameter depends on its *type*. The documentation for each parameter says what type of value it expects you to give it, and it may require any of the following:<br />
<br />
; <code>float</code><br />
: the value should be a real number, that is a number that can include a fractional part, like <code>3.1415</code>. Negative numbers are specified using <code>-</code>, eg: <code>-2.54</code>. Note that, in some cases, negatives can produce unexpected or undesirable behaviours if the script doesn't expect you to use them.<br />
<br />
; <code>float vector</code><br />
: three <code>float</code> values, separated by commas. You may place whitespace between the <code>float</code> values and the commas, but '''do not''' use quotes around each value, ie: <code>SomeParam=0 , 1.2, 5;</code> is fine, as is <code>SomeParam="1.2, 3.4,5.6";</code>, but <code>SomeParam="0","1.2","3";</code> '''is not''' valid. I generally recomment avoid using quotes when specifying the values for <code>float vector</code> types. Unless otherwise indicated in the documentation, the first value corresponds to the <code>x</code> component of the vector, the second to the <code>y</code> component, and the third to the <code>z</code>. Any components you do not specify a value for will be set to <code>0.0</code>. For example, the value <code>6,,10.5</code> will set <code>x</code> to <code>6.0</code>, <code>y</code> to <code>0.0</code>, and <code>z</code> to <code>10.5</code>. Similarly, <code>1,0.5</code> will set <code>x</code> to <code>1.0</code>, <code>y</code> to <code>0.5</code>, and <code>z</code> (which has been omitted entirely from the example here!) will be set to <code>0.0</code>.<br />
<br />
; <code>integer</code><br />
: a 'whole number', one without any decimal part, eg: <code>3</code>. Negative numbers can be specified using <code>-</code>, eg: <code>-42</code>.<br />
<br />
; <code>boolean</code><br />
: a true or false value. The following are considered to be 'true' values: Any word starting 't', 'T', 'y' or 'Y'; Any non-zero integer value. Any words that do not start as described, or the number <code>0</code>, are considered to be false.<br />
<br />
; <code>time</code><br />
: an integer that represents a period of time. Without any modifier, the the value is interpreted as a number of milliseconds, if you append <code>s</code> to the number (eg: <code>10s</code>) the value is interpreted as a number of seconds. If you place <code>m</code> after the number, it is interpreted as a number of minutes.<br />
<br />
; <code>object</code><br />
: a Dromed object name, or object ID.<br />
<br />
; <code>string</code><br />
: any text, no special meaning is attached to it. Note that, if the string needs to contain a semicolon (;) you *must* enclose the string in single or double quotes, <code>'like this'</code> or <code>"like this"</code>. If you need to include a single quote in a single-quoted string, you can do so by prefixing the <code>'</code> with <code>\</code>, ie: <code>\'</code>. Similarly, to include a double quote in a double-quoted string, prefix it with a backslash, <code>\"</code>. If you need to include a backslash in a quoted string, you should generally prefix it with another, eg: <code>\\</code>.<br />
<br />
For the <code>integer</code>, <code>float</code>, <code>boolean</code>, and <code>time</code> types, you may also use a quest variable in place of a literal value. To do this, prepend the quest variable name with <code>$</code>. For example, this will use the value specified in the quest variable <code>platform_speed</code>:<br />
<br />
<source lang="txt" style="bright">TWTrapSetSpeedSpeed=$platform_speed</source><br />
<br />
In addition, <code>integer</code> and <code>float</code> types can have simple mathematical operations included in the parameter value if the parameter starts with a quest variable. eg:<br />
<br />
<source lang="txt" style="bright"><br />
TWTrapSetSpeedSpeed=$platform_speed * $speed_mult<br />
TWTrapSetSpeedSpeed=$platform_speed / 10.0<br />
TWTrapSetSpeedSpeed=$platform_speed + $base_speed</source><br />
<br />
Supported operations are addition <code>+</code>, multiplication <code>*</code>, and division <code>/</code>.<br />
Subtraction is not directly supported, but you can add a negative number for the same effect.<br />
<br />
Note that, for <code>float vector</code> types, each value may be a quest variable:<br />
<br />
<source lang="txt" style="bright">TWTrapPhysStateCtrlLocation=$thingx, $thingy, $thingz;</source><br />
<br />
Values *may* be enclosed in quotes, either single quotes or double quotes, but this is not required *unless* you are specifying a string containing a semicolon, in which case you must quote the string.<br />
<br />
If more than one parameter is specified, semicolons are used to separate them, for example:<br />
<br />
<source lang="txt" style="bright">TWTrapSetSpeedSpeed=5;TWTrapSetSpeedDest='*TerrPt'</source><br />
<br />
<br />
{{Scripting:Navbox}}<br />
{{:Site Navigation}}<br />
<references /></div>The Watcher