octgn
[[action_tags]]
Last edit on May 29, 2010 8:56 PM by Anonymous
The wiki 'dg1hdc3kdl' does not exist or has been closed.

Action Tags

Add and remove markers

The 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 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 , except the id attribute is not optional.
This tag may remove less markers than qty, if there aren't enough markers on the card. To find out how many were actually removed use the outVar attribute.
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.)
  • outVar (A variable (starts with a dollar $), which will be set to the number of markers actually removed.)

Count

The tag counts the cards inside a group and stored the value inside a variable.
You have to specify either the group attribute, or put a card selector inside the tag.
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 $.)

Create new cards

The pops up a dialog to select a new card type, which will be created an added to the game. This tag contains a single tag, which filters the cards type amongst which the user can choose.
If it is inside a card action, a nested tag may be used instead of . In that case the dialog is not shown and a copy of the selected card is created.
Note: this tag only works on the table.
Attributes:
  • 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.)

Decrement

The 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. Can be another variable. Defaults to 1 if not specified.)

Get/Set counter value

The 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 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 $.)

Highlight

The 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.)

If-then-else

The tag provides the if-then-else control structure. It must contain one of the boolean tags and the tag specifying the actions to execute if the boolean condition evaluates to true. It may additionally contain an tag as well to specify the actions to execute if the boolean condition evaluates to false. The and 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>

Increment

The 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. Can be another variable. Defaults to 1 if not specified.)

====Move
The 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.)

====Mute
The 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.)

Print

The 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.)
  • {} (The value of a variable.)
  • {this} (The name of the card or group the action is executed on.)

Question

Example:
<question text="Draw how many cards?" default="7" var="$n" answer="positiveInt" />

Random

The 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 $.)

Set Rotation

The 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 tag rotates a card to a specified angle.
Attributes:
  • orientation (The orientation the card should be rotated to. Can be 0 or 90.)

The tag rotates a card to a specified angle.
Attributes:
  • orientation (The orientation the card should be rotated to. Can be 0 or 180.)

Set variable value

The 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.)

Shuffle

The tag is used to shuffle the contents of a group.
Attributes:
  • group (The identifier of the group to shuffle.)

====Stop
The tag is probably used to prematurely end a execution of an action.

Turn (face up / face down)

The 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.)

Toggle Rotation

The tag is used to automatically toggle between 0° and 90° rotation of a card.

The tag is used to automatically toggle between 0° and 180° rotation of a card.

While-do

The tag provides the while-do control structure. It must contain one of the boolean tags and the tag specifying the actions to execute as long as the boolean condition results to true. The 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>