Table of Contents
MYTH_CGC_IndependentCardVariables is a plugin gives cards a new array of variables called Var, which can be accessed through code (for damage formulas and the like) and can also be used in place of numbers in other Card Actions.
Var can contain as many variables within it that you need. To access them in card actions, use Var(index)
where index
is any number. By default all variables inside Var are set to 0.
This plugin is currently Patreon Only.
Current Version: 1.1.0
Parameters
Reset Var after battle? | If set to ON, changes to a card's Var variables will be reset at the end of each battle. |
Prevent Negative Cost? | If set to ON, subtracting a Var from a skill's cost will never result in a value below 0. |
Card Passives
Var(X) init Y | This will set the initial value of Var(X) to the number specified in Y. All values initialize at 0 by default, and this overrides that behavior for this Var index of all cards belonging to this skill. When Var values are reset, either through the “Reset Var after battle?” plugin parameter or through functions listed below, they return to their initial values. |
Card Actions
Var(X) set Y | This sets the specified Var of this card to the value supplied in Y. Replace X with the Var index Replace Y with the value you wish the Var index to contain |
Var(X) mod [+/-]Y | Modifies the specified Var of this card by the value of Y. Adds or subtracts Y to/from Var. Replace X with the Var index Replace [+/-]Y with a positive or negative number |
All Skill [skillID] Var(X) set Y All Skill [skillID] Var(X) mod [+/-]Y | These Card Actions modify the Var of all cards belonging to that actor of the specified Skill ID. |
All Skill [skillID] Var(X) set Y in [zoneName] All Skill [skillID] Var(X) mod [+/-]Y in [zoneName] | These Card Actions modify the Var of all cards belonging to that actor's specific zone. Replace [zoneName] with “Deck”, “Discard” or “Hand”. |
Selected Var(X) set Y Selected Var(X) mod [+/-]Y | Requires Card Action Pack 1 plugin to use. These Card Actions act on all Selected cards instead of the card containing the Card Actions. |
Getting the Value of a Var
In Card Actions you can use: Var(index)
where index
is the number of the index you want.
In Damage Formulas you can use: a.cardVar(index)
where index
is the number of the index you want.
In Skill Descriptions you can use: \Var[n]
where n
is the number of the index you want.
By default, these will all return 0 if no value was found at that index of Var.
Note: Because If and Eval statements are technically Card Actions, you can still use Var(index)
in place of code in their expressions.
e.g.If Var(0) < 4
will work as expected.
Modifying Card Cost
Use the following notetag: <[MP/TP/HP] cost [+/-/=] var(X)>
This takes the current MP/TP/HP cost and adds/subtracts/sets equal to the variable of index X in Var. Examples:
<MP cost + var(0)>
This will cause the value of Var(0) of that card to be added onto the base skill cost
<TP cost - var(1)>
This will make the TP cost go down as Var(1) goes up.
<HP cost = var(1)>
This will override the base HP cost and replace it with the value of Var(1).
Note that the HP cost tag will only work if you are using plugins that support HP cost.
Advanced Functions
actor.cardVar(index) | This returns the value of the Var of the currently-being-used card. Useful for damage formulas. |
actor.modSkillVar(skillId, index, value, direction) | This function modifies the Var of all Cards of a given Skill ID belonging to this actor. direction should be -1, 0, or 1. When direction is -1, value is subtracted from the var. When direction is 1, value is added to the var. When direction is 0, the var is set to the value. |
actor.resetAllCardVars() | This function resets all Vars of all Cards of a given Skill ID belonging to this actor. |
card.getVar(index) | If you can get access to a specific Game Card you can use this function to grab the Var from that card. |
Version History
v1.1.0 - Changed plugin name - Updated for compatibility with 1.6.0 - Minor refactoring to improve compatibility with other expansion plugins. v1.0.4 - Fixed issue where Var(x) would be replaced incorrectly in If and Eval Card Actions, breaking their functionality. - Fixed issue where Card Descriptions would return only the last-input Var index for every index. v1.0.3 - Fixed All Skill Card Action adding numbers like strings instead of numbers. 1 + 1 now equals 2 instead of 11. - Init Var(x) can now supply a negative number. v1.0.2 - Init Var(x) now a Card Passive for consistency with CGC. - Cleaned up help file for improved readability. v1.0.1 - Changed syntax for Card Actions that modify Var to be a bit more intuitive. - Fixed Set Card Action not working properly - Added <init> notetag and fixed reset function to use initial values. v1.0.0 - Finished plugin