-
Notifications
You must be signed in to change notification settings - Fork 36
Actions
Base actions are supplied through actions.json, and can be expanded in LCP content as shown in the Actions section above.
Actions encompass any distinct move a player can make -- mostly this will be system activations, and also Reactions and Protocols granted from Systems, Traits, Talents, etc. This also includes Invasion options. These add to or modify player actions in the Active Mode, and also furnish various UI elements. Items that can take an actions field include: CORE Bonuses, Frame Traits, CORE Powers, Talent Ranks, Weapons, and Systems:
Actions should be used whenever the written rules document (eg. Lancer Core Rules or a supplement) assign an action type to a particular ability or effect. This includes Full, Quick, Tech, Protocol, Reactions, and Free Actions. Whenever a rule describes an ability that does not have an action type (but may have frequency, duration, damage, etc.), it should be implemented as an Active Effect.
IActionData is not differentiated in the code, but many action types have different required fields. The generic data object is as follows:
IActionData: {
"name": string,
"activation": ActivationType,
"detail": string,
"frequency"?: string,
"trigger"?: string,
"cost"?: number
"pilot"?: boolean,
"mech"?: boolean,
"hide_active"?: boolean,
"bonus_damage"?: string,
"damage"?: IDamageData,
"range"?: IRangeData,
"add_status"?: IStatusEffectData[],
"add_resist"?: IResistanceData[],
"add_special"?: ISpecialStatusData[],
"remove_special"?: string[],
"add_other"?: IOtherEffectData[],
"active_effects"?: IActiveEffectData[],
"save"?: ISaveData,
}Actions must have a name. The only exception being actions within top-level System arrays, which will be given the name of their parent system if omitted. Best practice is to always include a name.
Actions must have an activation type, which is one of the following strings (case-sensitive): Free, Protocol, Quick, Full, Invade, Quick Tech, Full Tech, Reaction.
Action-like rules that do not explicitly include an activation type should be implemented as a Active Effect.
Actions must have a detail field, which is a string of HTML-enabled content that describes the action. COMP/CON recommends the following conventions for action details:
- Prefer
<br>tags to separate distinct sentences or clauses, rather than multiple paragraphs - Use
<b>tags to highlight keywords or important phrases - Use
<i>tags for flavor text or non-mechanical information that is not essential to understanding the action - The
detailfield should not include activation cost, frequency, duration, or conditions. These should be handled by the relevant fields of the Active Effect object. - The
detailfield should always be written in the second person present tense ("You gain...", "Your mech...", "When you..."). - The
detailfield should be written in a way that makes sense when read in isolation, without context of the parent item or action, and should reflect the source text as closely as possible. - Origin of the effect (item name, action name, etc.) should not be included in the
detailfield, as this is automatically furnished by COMP/CON on object hydration.
How often the effect can be activated. This can be one of:
-
unlimited(default) 1/round1/turn1/scene-
1/encounter(alias for1/scene) 1/mission
if the effect can be activated multiple times per round, this field should be omitted or set to unlimited. Often this can be omitted on actions attached to mech equipment, as they will be limited by standard action economy rules.
A string of HTML-enabled content that describes the trigger condition for a Reaction action. This field is required for Reaction actions, but may be included on other action types. (Re)action triggers are not handled mechanically by COMP/CON, but are displayed in the UI.
cost is an integer value that will bed deduct the parent system's limited item uses, if it is a limited-tagged item. If cost is omitted and the item is limited, cost will be automatically set to 1
pilot is a boolean that, if true, will cause the action to only available in Active Mode when the character is UNMOUNTED. Defaults to false unless the item is a type of Pilot Gear/Pilot Armor/Pilot Weapon, in which case it will default to true.
mech is a boolean that, if true, will cause the action to only available in Active Mode when the character is MOUNTED. Defaults to false unless the item is a type of Mech Equipment/Mech Weapon, in which case it will default to true.
Hides this action and prevents player use in (and only in) Active Mode. This is used for reference text for general action economy (such as Move) and is not frequently used in LCP content.
A dice string of the form XdY+Z or XdY or Z, where:
-
Xis the number of dice (optional, defaults to 1) -
Yis the die type (4, 6, 8, 10, or 12) -
Zis a flat bonus (optional, defaults to 0)
This damage is added to any damage dealt by the action's origin item or action, and is subject to bonus damage rules.
An IDamageData object that defines damage dealt by the action. This should only be used to represent damage that is dealt by the action itself, not damage modified by the action or damage from its origin.
Including a damage object here will cause COMP/CON to display a "deal damage" interface within the Action modal.
An IRangeData object that defines the range of the action. This should only be used to represent range of the action itself, not range modified by the action or range from its origin.
COMP/CON does not track actor positions, so this is only included within the Action modal for player reference.
Actions can take nested Active Effects, which are applied when the action is used. This is an array of IActiveEffectData objects.
See Active Effect
Adds a status effect to a target or targets when the action is used. This is an array of IStatusEffectData objects.
See Active Effect for implementation details.
Adds a resistance, immunity, or vulnerable status to a target or targets when the action is used. This is an array of IResistanceData objects.
See Active Effect for implementation details.
Adds a special status/condition that is not mechanically tracked by COMP/CON. This is an array of ISpecialStatusData objects.
See Active Effect for implementation details.
Removes a special status/condition. This is an array of strings, each of which is the id of a special status/condition previously applied to the target.
See Active Effect for implementation details.
Adds a non-standard effect that is mechanically tracked by COMP/CON, such as Overshield. This is an array of IOtherEffectData objects.
See Active Effect for implementation details.
A top-level save object that defines a saving throw that must be made by a target when the action is used. This is an ISaveData object.
See Active Effect for implementation details.
from lancer-data/lib/systems.json
"actions": [
{
"name": "Turret Attack",
"activation": "Reaction",
"frequency": "1/round",
"trigger": "An allied character within Range 10 of a turret drone makes a successful attack.",
"detail": "The turret drone deals 3 Kinetic damage to their target, as long as it has line of sight to their target.",
"damage": [
{
"type": "Kinetic",
"val": 3
}
]
}
]from lancer-data/lib/talents.json
"actions": [
{
"name": "Shepherd Drone",
"activation": "Protocol",
"detail": "Move a drone you control up to 4 spaces if it is within Sensors."
}
]from lancer-data/lib/weapons.json
"actions": [
{
"name": "Snicker-Snack",
"activation": "Reaction",
"frequency": "1/round",
"trigger": "A hostile character within Range of the Vorpal Gun and line of sight deals damage to an allied character.",
"detail": "You may make an attack against the hostile character with the Vorpal Gun."
}
]from lancer-data/lib/actions.json
{
"id": "act_overwatch",
"name": "Overwatch",
"activation": "Reaction",
"terse": "Attack a close-by target attempting to move.",
"detail": "When you OVERWATCH, you control and defend the space around your mech from enemy incursion through pilot skill, reflexes, or finely tuned subsystems.<br>Unless specified otherwise, all weapons default to 1 THREAT.<br>Overwatch<br>Reaction, 1/round<br>Trigger: A hostile character starts any movement (including BOOST and other actions) inside one of your weapons’ THREAT.<br>Effect: Trigger OVERWATCH, immediately using that weapon to SKIRMISH against that character as a reaction, before they move.",
"pilot": true
}