Custom Stats - massif-press/lancer-data GitHub Wiki
WARNING: EXPERIMENTAL
Overview
LCPs can define additional "canonical"/non-custom stats that will appear for all combat entities that contain anything (equipment, features, traits, etc) that reference the stat.
COMP/CON cannot track stat dependencies in LCPs at this time, so all new stats must be scoped to a single LCP. Cross-LCP stat definition, unlike eg. Tags, is not available at this time.
Definition
custom_stats.json
[
{
"key": string,
"title": string,
"trackable": boolean,
"default": number | string,
"icon": string,
"sort": number
}
]
StatController.RegisterCustomStat() is called when a pack is activated. The stat is applied to all entities via applyRegisteredCustomStats() during setStats().
Required Fields
key
Internal identifier. This must be globally unique. See Item ID Guidelines for more information.
Use letters and digits only. COMP/CON removes spaces, _ and - from stat keys when it reads or writes a stat, but registers a custom stat under the key exactly as written, so a key such as my_stat can never receive a bonus.
title
The display name of the stat
trackable
trackable determines if this is a max-only stat like Hull or Grit, or a current/max stat like HP or Heat. trackable = true furnishes a current property and a user-settable current value tracker in Active Mode.
default
The base value of the stat, before bonuses and modifications. This defaults to zero. It can be an integer or a string in the form of X/Y/Z where X, Y, and Z are integers that represent the default value at NPC tier 1/2/3.
icon
UI icon used to represent the stat. Can be any MDI Icon in the form mdi-ICON_ID
sort
Where this stat appears in stat block style UI. May be negative for guaranteed first position.