Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • 1 18996468-Dulst-Community-TEST
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kaoru Aoi
  • 18996468-Dulst-Community-TEST
  • Wiki
  • Custom Action

Last edited by Kaoru Aoi Apr 08, 2020
Page history

Custom Action

Custom actions give your game a lot more power and flexibility. Once set up, a custom action can let you do many things with just a one line effect.

What are actions

Actions are on the second column of the effect builder.

If you think of an effect as a sentence, actions are the verb of the sentence.

actions

Custom Action Settings

There are a handful of possible custom action settings you may put into the Custom Card Properties field.

displayName

Instead of showing the title of the card in the effect builder, set a displayName instead.

reqType

Prevent the custom action from showing up in any types other than the type requested.

excludeType

Prevent the custom action from showing up in the type requested.

Working with custom actions

Letting the card designer control the action

While many custom actions are pretty simple, letting card designers to just select it and go, some will want the designer to select options.

The targeting column selections the card designer makes when using the custom action is known by the custom action. You can access the selections with variables.

$_targetCards

References the selected cards if applicable.

$_target

References the overall target. If a player's property is selected, this can be the player property. If no property is selected, this can return just the string "player1" or "player2". This can be "game" or the game's property. This can be selected cards, same as _targetCards.

$_targetCount

References the number of cards field.

$_targetProperty

References any property selected, works with cardProperty, playerProperty, or gameProperty.

$_targetValue

References the value selected.

$_targetInstructions

References instructions given to players when selecting cards.

To give card designers the ability to make choices in the action column use the action parameters under rule card triggers to let card designers have the same access to option fields in your custom action as you would have in base actions.

These custom actions can be later referenced by the field name. Examples: $_magnitude, $_player, $_location.

Setting defaults

Defaults can be set in the custom card properties. When a card uses a custom action, it will overwrite the default if there is an argument passed on a card. If there is not, then the default will be used.

In this example, which is the "add card to hand" custom action Rule card from Animal Kingdom, the number of cards is set by the variable $_targetCount.

_targetCount is set as 1 on the card itself.

This makes 1 the default for this action instead of undefined, allowing the card designer to not put anything in this field if they wish.

Custom Parameters

Custom parameters can be defined on the custom card properties section of the card editor. They require these settings:

param_id
param_[paramID]_label
param_[paramID]_tooltip

If no options are set, then this will produce a regular text field. You can access the param with $[_paramID]

param_[paramID]_radio

Radio property makes it so that only 1 option may be selected at a time. Don't set this property to allow unlimited selections.

You may also choose to to show some options:

param_[paramID]_option_id
param_[paramID]_option_[optionID]_label
param_[paramID]_option_[optionID]_tooltip

Clone repository
  • AI Config
  • Achievements
  • Advanced Effect Building
  • Animal Kingdom
  • Animated Cards
  • Card Rarity
  • Copying Cards and Effects
  • Custom Action
  • Custom Actions
  • Dedicated Servers
  • Editing Cards
  • Effect Building
    • Basic Effect Building
    • Effect Triggers
  • Game Development Service
  • Game Making
    • Beginning Game Customization
View All Pages