The <addmarker> tag pops up a dialog to select a new marker type, which will be added to cards. This tag contains a card selector child tag, which selects the cards to which the markers are added.
If the id attribute is specified, no dialog is displayed and information from attributes id, name and qty are used instead.
Attributes:
- id (The GUID of the marker to add. Optional, if this attribute is not specified a dialog box is displayed so that the user can choose which marker should be created.)
- name (If the id attribute is set and is a default marker (GUID 1 to 7), this attribute contains the name to give to the new marker. Otherwise this attribute is ignored.)
- qty (If the id attribute is set, this indicates how many markers to add to the card. Default value is 1 when not explicitely specified. If there is no id attribute, qty is ignored.)
The <removemarker id='markerId' qty='1'> tag removes markers from cards. This tag contains a card selector child tag, which selects the cards from which markers are removed.
This tag works the same way as <addmarker>, except the id attribute is not optional.
Attributes:
- id (The GUID of the marker to remove.)
- name (If id is a default marker (GUID 1 to 7), this attribute contains the name to give to the new marker. Otherwise this attribute is ignored.)
- qty (How many markers to remove from the card. Default value is 1 when not explicitely specified.)
The <count> tag counts the cards inside a group and stored the value inside a variable.
Attributes:
- group (The identifier of the group to be counted.)
- var (The name of the variable to store the card count. Variable names start with a dollar $.)
The <newcard persist="false"> pops up a dialog to select a new card type, which will be created an added to the game. This tag contains a single <property> tag, which filters the cards type amongst which the user can choose.
Attirbutes:
- persist (When false, the created cards are destroyed if they leave the group they are created in, i.e. the table. Defaults to false if not specified.)
The <dec> tag decrements a variable by a given amount.
Attributes:
- var (The name of the variable to decrement. Variable names start with a dollar $.)
- amount (The amount to subtract from the variable. Defaults to 1 if not specified.)
The <getcounter> tag reads the value of a player's counter into a variable.
Attributes:
- counter (The counter name, as defined inside the game definition).
- var (The name of the variable into which the value is read. Variable names start with a dollar $.)
The <setcounter> tag changes the value of a player's counter.
Attributes:
- counter (The counter name, as defined inside the game definition).
- value (The new counter value. This may be either an integer constant or a variable. Variable names start with a dollar $.)
The <highlight> tag is used to create colored borders around cards. The border persists until it is changed again. It contains a card selector tag to specify the targets of the action.
Attributes:
- color (A color name or 'none' to reset the border.)
The <if> tag provides the if-then-else control structure. It must contain one of the boolean tags and the <then> tag specifying the actions to execute if the boolean condition evaluates to true. It may additionally contain an <else> tag as well to specify the actions to execute if the boolean condition evaluates to false. The <then> and <else> tags may hold the same contents as the action tags. Nested if's are therefore possible.
Example:
<if>
<eq left="$n" right="1" />
<then>
<print text="{me} flips heads" />
</then>
<else>
<print text="{me} flips tails" />
</else>
</if>
The <inc> tag increments a variable by a given amount.
Attributes:
- var (The name of the variable to increment. Variable names starts with a dollar $.)
- amount (The amount to add to the variable. Defaults to 1 if not specified.)
The <move> tag is used to move cards to another group. It contains a card selector tag to specify the targets of the action.
Attributes:
- to (The identifier of the destination group.)
The <mute> tag is used to mute and un-mute something. But what?
Attributes:
- muted (True to mute, false to unmute. Defaults to true if not specified.)
The <print> tag is used to echo a message in the chat.
Attributes:
- text (The text to be displayed.)
The text may contain placeholders. Known placeholders are:
- {me} (The name of the player who executes the action.)
- {<var>} (The value of a variable.)
- {this} (The name of the card or group the action is executed on.)
Example:
<question text="Draw how many cards?" default="7" var="$n" answer="positiveInt" />
The <rnd> tag creates a random number between an upper and lower bound (both inclusive) and assigns it to a variable.
Attributes:
- min(The minimum value that can be returned.)
- max(The maximum value that can be returned.)
- var(The name of the variable to store the number in. Variable names must start with a dollar $.)
The <setrot> tag rotates a card to a specified angle.
Attributes:
- orientation (The orientation the card should be rotated to. Can be 0, 90, 180 or 270.)
The <setrot90> tag rotates a card to a specified angle.
Attributes:
- orientation (The orientation the card should be rotated to. Can be 0 or 90.)
The <setrot180> tag rotates a card to a specified angle.
Attributes:
- orientation (The orientation the card should be rotated to. Can be 0 or 180.)
The <set /> tag defines a new variable and sets it to a constant value.
Attributes:
- var (The new or existing variable to define. Variable names start with a dollar $.)
- value (The integer value to set the variable to.)
The <shuffle> tag is used to shuffle the contents of a group.
Attributes:
- group (The identifier of the group to shuffle.)
The <stop> tag is probably used to prematurely end a execution of an action.
The <turn face="up"> tag is used to toggle cards between face up and face down. It contains a card selector tag to specify the targets of the action.
Attributes:
- face (If "up" (resp. "down") cards are turned face up (resp. down). Otherwise the card face up/down state is toggled.)
The <togglerot90> tag is used to automatically toggle between 0° and 90° rotation of a card.
The <togglerot180> tag is used to automatically toggle between 0° and 180° rotation of a card.
The <while> tag provides the while-do control structure. It must contain one of the boolean tags and the <do> tag specifying the actions to execute as long as the boolean condition results to true. The <do> tag may hold the same contents as the action tags. Nested while's are therefore possible.
Example:
<while>
<and>
<lt left="$n" right="6" />
<lt left="0" right="$m" />
</and>
<do>
<inc var="$n" />
<dec var="$m" />
<move to="me.hand">
<top pile="this" />
</move>
</do>
</while>
action_tags, Rev. 6, Last changed on 2010-03-14 19:43, 726 page hits