Extensions: Frequency

Section 4.A.14.B

These extensions add extra utility to the Trigger Key it's attached to by allowing you to alter when they may trigger, and/or how often. These extensions can be combined with the extensions listed in the "Extensions: User" subsection to add an extra layer of customization to each key. However, not every key is compatible with these extensions, although most are. Since these extensions are used to alter the frequency of a key triggering, any keys that can only ever be triggered once per battle are not compatible with these extensions.

For example, the "BeforeItemUse" key is compatible with these extensions since it's possible that multiple items may be used in a battle, so it makes sense that you would want to add extensions to repeat or randomize when this key may be triggered. However, the "BattleEnd" key is not compatible with these extensions, since each battle obviously only ends once, so it makes no sense to randomize or repeat when that key could trigger.

As a rule of thumb, all of the keys in the subsections "Triggers: End of Battle" and "Triggers: Choices" are not compatible with these extensions.

With all of that out of the way, here are all of the possible frequency extensions that can be used:

"_repeat"

Add this extension to a key so that it will continuously repeat indefinitely. Normally, each trigger in a midbattle hash will only trigger once. With this extension however, it will continuously trigger for the entire battle. For example, "TargetTookDamage_foe" would only trigger the first time an opponent's Pokemon took damage from an attack, and then never again for that battle. While "TargetTookDamage_foe_repeat" would continuously trigger each time any of the opponent's Pokemon took damage during this battle.

"_random"

Add this extension to a key so that it will randomly trigger instead of being guaranteed to trigger. For example, "UserDealtDamage_player" is guaranteed to trigger upon one of the player's Pokemon dealing damage to a target with an attack, but "UserDealtDamage_player_random" would only randomly have a chance to trigger when one of the player's Pokemon deals damage. You can extend this even further by adding another underscore followed by a number to specify the odds of this occurring. For example, "UserDealtDamage_player_random_25" would have a 25% chance to randomly trigger when the player's Pokemon deals damage. If no number is added to this extension, this rate defaults to 50%.

"_repeat_random"

This extension is a combo of both the "_repeat" and "_random" extensions above. Add this extension to a key so that it will continuously repeat, but at randomized intervals. For example, "TurnEnd_player_repeat" would continuously trigger at the end of every turn for the player's Pokemon, while "TurnEnd_player_random" would randomly trigger once at the end of their turn. However, "TurnEnd_player_repeat_random" would continuously trigger at the end of their every turn, but it would only have a random chance of triggering each time. Like with the regular "_random" extension, you can specify the rate at which this random chance occurs by attaching an additional underscore, followed by a number. For example, "TurnEnd_player_repeat_random_75" would continuously trigger at the end of their every turn with a 75% success rate. If no number is added to this extension, this rate defaults to 50%.


Turn Count Extensions These frequency extensions are special in that they can only apply to the keys listed in the "Triggers: Round Phases", "Triggers: Battler Turns" and "Triggers: Variable" subsections. This is because these extensions determine when they trigger based on the number value that a Trigger Key keeps track of, such as the battle turn count, an individual battler's turn count, or the value of a variable.

"_repeat_odd"

Add this extension to a key so that it will continuously repeat in battle, but only when the value that the key is tracking is an odd number. For example, "RoundStartCommand_foe_repeat" would trigger at the start of the Command Phase of every turn, while "RoundStartCommand_foe_repeat_odd" would repeatedly trigger only on odd-numbered turns.

"_repeat_even"

Add this extension to a key so that it will continuously repeat in battle, but only when the value that the key is tracking is an even number. For example, "VariableUp" would trigger whenever the midbattle variable is increased, while "VariableUp_repeat_even" would repeatedly trigger only when the value of the variable is increased to an even number.

"_repeat_every_#"

Add this extension to a key so that it will continuously repeat in battle, but only when the value that the key is tracking is divisible by the number entered where # is. For example, "RoundEnd_player_repeat" would trigger at the end of each round, while "RoundEnd_player_repeat_every_3" would repeatedly trigger only on turns that are divisible by 3. This means turns 3, 6, 9, etc. will trigger this key, while all other turns will not.

Last updated