NPC Features - massif-press/lancer-data GitHub Wiki
Overview
NPC Features are broken into Reactions, Weapons, Systems, Tech, and Traits. They can either be included in a library file called npc_features structured like so:
npc_features.json
[
// array of NPC feature data objects
];
or in collection style, which must be included alongside an NPC Class or Template. For more information, see NPC Classes and Templates
NPC Traits
Definition
INpcFeatureData: {
"id": string;
"name": string;
"type": "reaction" | "system" | "tech" | "weapon" | "trait";
"origin"?: string;
"base"?: boolean;
"deprecated"?: boolean;
"effect"?: string;
"hide_active"?: boolean;
"build_feature"?: boolean;
"mod"?: string;
"tags"?: ITagData[];
"actions"?: IActionData[];
"bonuses"?: IBonusData[];
"synergies"?: ISynergyData[];
"deployables"?: IDeployableData[];
"active_effects"?: IActiveEffects[];
}
Required Fields
id
Internal identifier. This must be globally unique. See Item ID Guidelines for more information.
name
The display name of the item
type
Sets which type of feature this item is and what additional fields it will have access to. May be one of:
"reaction" | "system" | "tech" | "weapon" | "trait"
Case-sensitive, defaults to 'trait'
Optional Fields
origin
The id of the NPC Class or Template from which this feature originates. If the feature is from an origin that resides in a Library structure and does NOT include the feature under its base_features or optional_features, the origin field will allow the feature to populate the origin's features. This field is unnecessary if the feature is part of a Collection structure or if the origin includes the feature in its base_features or optional_features.
If the field is omitted, the LCP will still load successfully, but will not be tied to the correct origin in the specific scenario above.
base
if base is marked as true this feature is regarded as a Base Feature, which means that it will be automatically assigned to an NPC as a function of their class or template selection. This field defaults to false, an Optional Feature.
deprecated
See deprecated items
effect
See Effect Objects
hide_active
Allows this item to be hidden in condensed and active mode views in COMP/CON. Used for passive traits that are automated in COMP/CON via bonuses, synergies, etc.
build_feature
These features have no effect in an encounter and are only related to the construction of NPCs, and any special rules related to the NPC building process. These are always hidden in active mode(s), regardless of user in-app visibility settings.
mod
mod is a new COMP/CON feature in v3, where NPC Features that modify another feature (eg. the Aegis' Adaptive Shielding) are collected in the UI. If a Feature modifies another Feature, it takes a mod property of the target Feature's id.
The properties of the data are added to the target Feature's effect, bonus array, tag array, and deployable array.
tags
See Tags
actions
See ItemActionData
NPCs will not use the following properties:
// unused properties
cost: number
pilot: boolean
synergy_locations: string[]
tech_attack: boolean
log: string[]
bonuses
See ItemBonusData
synergies
See ItemSynergyData
deployables
NPCs will not use the following properties:
"deactivation"?: ActivationType,
"recall"?: ActivationType,
"redeploy"?: ActivationType,
"instances"?: number,
"cost"?: number
"mech"?: boolean,
"synergies"?: ISynergyData[],
"counters"?: ICounterData[],
Additionally, for any Deployable stat integer (armor, evasion, hp, etc), NPC Deployables may take an array of three integers, correlated to NPC Tier.
Systems
Systems are structurally identical to Traits but are set and organized separately in the COMP/CON UI. To designate a Trait as a System, the type tag must equal system (case-sensitive)
Reaction
NPC Reaction Features have the type of "reaction" (case-sensitive) and all of the fields of Traits, and also take the following additional fields:
{
type?: "reaction",
// reaction-specific
trigger?: string;
}
Tech
NPC Tech Features have the type of "tech" (case-sensitive) and all of the fields of Traits, and also take the following additional fields:
{
...,
type: "tech",
attack_bonus?: number[];
accuracy?: number[];
}
Optional Fields
attack_bonus
attack bonus is an integer or array of three integers (one per NPC tier) that adds a flat bonus to attack rolls made for this trait
accuracy
attack bonus is an integer or array of three integers (one per NPC tier) that adds accuracy dice for attack rolls made for this trait. These values can be negative for difficulty dice
Weapon
NPC Weapon Features have the type of "weapon" (case-sensitive) and all of the fields of Traits, and also take the following additional fields:
{
// NPC Feature fields
type: "weapon",
weapon_type: string,
damage: INpcDamageData[],
range: IRangeData[],
attacks: number | number[],
attack_bonus?: number[],
accuracy?: number[],
on_attack?: ActiveEffect,
on_hit?: ActiveEffect,
on_crit?: ActiveEffect,
on_miss?: ActiveEffect,
}
Required Fields
weapon_type
weapon_type is a string of the format {Size} {Type}, following PC conventions (eg. "Superheavy Rifle", "Main Launcher", "Auxiliary Melee", etc.). Currently this is only used for UI furnishing but should maintain the conventions in case they are used for mechanical selection in the future (eg. Feature bonuses that operate over weapon sizes)
damage
INpcDamageData
NPC Damage follows the PC IDamageData structure with the exception that the damage property must be an array of three integers (eg. [2,2,4]). Unlike PC damage data, damage cannot contain dice strings.
range
IRangeData
IRangeData takes a type of Threat | Range | Burst | Blast | Cone | Line and a "val" of an integer or dice string (XdN + Y)
attacks
The number of attacks per feature use this item is allowed to take. May be a single integer or an array of three integers (one per tier)
Optional Fields
attack_bonus
attack bonus is an integer or array of three integers (one per NPC tier) that adds a flat bonus to attack rolls made for this trait
accuracy
attack bonus is an integer or array of three integers (one per NPC tier) that adds accuracy dice for attack rolls made for this trait. These values can be negative for difficulty dice
on_attack
Effect applied on item attack action. See Effect Objects
on_hit
Effect applied on successful item hit. See Effect Objects
on_crit
Effect applied on item crit. See Effect Objects
on_miss
Effect applied on item miss. See Effect Objects