mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
add scoped var macro to macro help
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div><small>Local variables = unique to the current chat</small></div>
|
<div><small>Local variables = unique to the current chat</small></div>
|
||||||
<div><small>Global variables = works in any chat for any character</small></div>
|
<div><small>Global variables = works in any chat for any character</small></div>
|
||||||
|
<div><small>Scoped variables = works in STscript</small></div>
|
||||||
<ul>
|
<ul>
|
||||||
<li><tt>{{getvar::name}}</tt> – replaced with the value of the local variable "name"</li>
|
<li><tt>{{getvar::name}}</tt> – replaced with the value of the local variable "name"</li>
|
||||||
<li><tt>{{setvar::name::value}}</tt> – replaced with empty string, sets the local variable "name" to "value"</li>
|
<li><tt>{{setvar::name::value}}</tt> – replaced with empty string, sets the local variable "name" to "value"</li>
|
||||||
@@ -83,4 +84,6 @@
|
|||||||
<li><tt>{{addglobalvar::name::value}}</tt> – replaced with empty string, adds a numeric value of "increment" to the global variable "name"</li>
|
<li><tt>{{addglobalvar::name::value}}</tt> – replaced with empty string, adds a numeric value of "increment" to the global variable "name"</li>
|
||||||
<li><tt>{{incglobalvar::name}}</tt> – replaced with the result of the increment of value of the global variable "name" by 1</li>
|
<li><tt>{{incglobalvar::name}}</tt> – replaced with the result of the increment of value of the global variable "name" by 1</li>
|
||||||
<li><tt>{{decglobalvar::name}}</tt> – replaced with the result of the decrement of value of the global variable "name" by 1</li>
|
<li><tt>{{decglobalvar::name}}</tt> – replaced with the result of the decrement of value of the global variable "name" by 1</li>
|
||||||
|
<li><tt>{{var::name}}</tt> – replaced with the value of the scoped variable "name"</li>
|
||||||
|
<li><tt>{{var::name::index}}</tt> – replaced with the value of item at index (for arrays / lists or objects / dictionaries) of the scoped variable "name"</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Reference in New Issue
Block a user