Weapons - massif-press/lancer-data GitHub Wiki
Overview
Weapons are essentially mounted systems that furnish the "Skirmish" and "Barrage" actions. They can take damage and range data, and must take MountType and WeaponType properties. Weapons added as "integrated" weapons from anywhere (including other weapons) are assigned unmodifiable Integrated Mounts.
Definition
weapons.json
{
"id": string,
"name": string,
"source": string,
"license": string,
"license_id": string,
"license_level": number,
"effect": string,
"mount": MountType,
"type": WeaponType | WeaponType[],
"ammo"?: IAmmoData[],
"cost"?: number
"barrage"?: boolean,
"skirmish"?: boolean,
"no_attack"?: boolean,
"no_mods"?: boolean,
"no_core_bonus"?: boolean,
"damage"?: IDamageData[],
"range"?: IRangeData[],
"tags"?: ITagData[],
"sp"?: number,
"description": string,
"effect"?: string | ActiveEffect,
"on_attack"?: string | ActiveEffect,
"on_hit"?: string | ActiveEffect,
"on_crit"?: string | ActiveEffect,
"on_miss"?: string | ActiveEffect,
"active_effects"?: IActiveEffects[],
"actions"?: IActionData[],
"bonuses"?: IBonusData[]
"no_bonus"?: boolean
"synergies"?: ISynergyData[],
"no_synergy"?: boolean,
"deployables"?: IDeployableData[],
"counters"?: ICounterData[],
"integrated"?: string[]
"special_equipment"?: string[]
"profiles"?: IWeaponProfile[] //see note below
}
Required Fields
id
Internal identifier. This must be globally unique. See Item ID Guidelines for more information.
name
The display name of the item
source
The source field must match a Manufacturer ID. This field is not required if the item is included in a License Collection.
license
The license field is the display name of the item's containing license. Usually this is the name of the Frame in the license. This field is not required if the item is included in a License Collection.
license_id
The license_id field must match a Frame ID. This field is not required if the item is included in a License Collection.
license_level
The license_level represents the license level of at which the equipment is unlocked for use. This is a value from 0-3, with 0 being available to all PCs at LL0.
effect
Rules text. HTML syntax is allowed.
description
Flavor text for Compendium and expanded item cards. HTML syntax is allowed.
mount
mount is the required mount size for this weapon. The valid weapon mount strings are: "Main" | "Heavy" | "Aux" | "Superheavy"
type
Must be a single string or array of the following values: "Rifle" | "Cannon" | "Launcher" | "CQB" | "Nexus" | "Melee"
Optional Fields
ammo
IAmmoData
Currently used only for Walking Armory in the LANCER Core Book, it's genericised for use in homebrew LCPs. Ammo arrays populate a list of ammunition selections on every equipped weapon of the specified type
"name": string,
"description": string,
"cost"?: number,
"allowed_types"?: WeaponType[], // weapon types the ammo CAN be applied to
"allowed_sizes"?: WeaponSize[], // weapon sizes the ammo CAN be applied to
"restricted_types"?: WeaponType[], // weapon types the ammo CAN NOT be applied to
"restricted_sizes"?: WeaponSize[], // weapon sizes the ammo CAN NOT be applied to
Like mods, omitting an allowed value will apply the ammo element to all weapons of that type/size. Restrictions overrule allowances.
if cost is omitted the value is automatically set to 1.
cost refers to the usage cost per attack with this weapon. It defaults to 1.
barrage denotes that this weapon can be fired as part of a barrage, and skirmish denotes that this weapon can be fired as part of a skirmish. If neither of these flags are set, barrage will be set to true by default for all weapons, and skirmish will be set to true by default for all non-Superheavy weapons.
no_attack suppresses creation of Skirmish/Barrage actions for this weapon, intended for use with special or weapon-mounted systems (eg. the Goblin's Autopod)
no_bonus and no_synergy inhibit the collection and display of Bonuses and Synergies respectively (eg. the Pegasus Autogun)
no_mods inhibits the addition of mods to this weapon (eg. Pegasus Mimic Gun)
no_core_bonus inhibits the display of mount-sensitive core bonuses, when making attacks with this weapon (eg. Pegasus Mimic Gun)
cost
Usage cost of the item, only required if the item has the "limited" tag. Defaults to 1.
barrage
Only allows this weapon to be used as a Barrage action. Defaults to false, and overrides skirmish.
skirmish
Only allows this weapon to be used as a Skirmish action. Defaults to false, and overrides barrage.
no_attack
Suppresses creation of Skirmish/Barrage actions for this weapon, intended for use with special or weapon-mounted systems (eg. the Goblin's Autopod)
no_mods
Suppresses the addition of mods to this weapon (eg. Pegasus Mimic Gun)
no_core_bonus
Prevents any bonuses or modifications mount-sensitive core bonuses.
damage
See ItemDamageData
range
See ItemRangeData
tags
See Tags
sp
System Point cost of the item. Must be an integer. Defaults to 0.
effect
A rules string (HTML syntax is allowed).
on_attack
Rules or effects that apply if the player makes an attack action with this weapon. Applies prior to any Hit or Damage rolls/calculations. This is used for things like "on attack" effects, or other effects that are triggered when the weapon is used. This may be an ActiveEffect or string (HTML syntax is allowed).
on_hit
Rules or effects that apply if the player makes a successful attack with this weapon. Applies after any Hit rolls but before Damage rolls/calculations. This is used for things like "on hit" effects, or other effects that are triggered when the weapon successfully hits. This may be an ActiveEffect or string (HTML syntax is allowed).
on_crit
Rules or effects that apply if the player makes a critical hit with this weapon. These apply only on critical hit attack rolls. This is used for things like "on crit" effects, or other effects that are triggered when the weapon successfully crits. This may be an ActiveEffect or string (HTML syntax is allowed).
on_miss
Rules or effects that apply if the player makes a miss with this weapon. Applies after any Hit rolls but before Damage rolls/calculations (such as Reliable). This is used for things like "on miss" effects, or other effects that are triggered when the weapon successfully misses. This may be an ActiveEffect or string (HTML syntax is allowed).
active_effects
See Effect Objects
actions
See ItemActionData
bonuses
See ItemBonusData
no_bonus
Prevent this weapon from registering or being affected by Bonuses. This defaults to false.
synergies
See ItemSynergyData
no_synergy
Prevent this weapon from being marked by, or contributing to, Synergies. This defaults to false.
deployables
counters
See ItemCounterData
integrated
An array of integrated An array of integrated Mech Equipment IDs.
NB: COMP/CON does not sanity check the integrated equipment against the parent item. Things like recursively referencing an integrated weapon will not be caught and will crash the app.
NB: COMP/CON does not sanity check the integrated weapons against the parent item. Things like recursively referencing an integrated weapon will not be caught and will crash the app.
special_equipment
An array of An array of integrated Mech Equipment IDs.
Unlike integrated items, these are not automatically installed to the frame when their parent item is equipped. Instead, they are made available in the Mech Equipment selector when the parent item is equipped.
profiles
Weapon profiles are stored as an array of abbreviated IWeaponData data as an optional property of a weapon. C/C won't look for or render profile data within profiles, so it's not possible to nest a profile more than one deep.
Actions, Effects, and Synergies will only be available to the player while the profile is active.
For a weapon with multiple profiles, the default profile will be the first (index 0) item in the profile array, and will be used for things like damage sorting.
IWeaponProfile
"name": string,
"effect"?: string,
"skirmish"?: boolean,
"barrage"?: boolean,
"cost"?: number,
"on_miss"?: string | ActiveEffect,
"on_attack"?: string | ActiveEffect,
"on_hit"?: string | ActiveEffect,
"on_crit"?: string | ActiveEffect,
"active_effects"?: IActiveEffects[],
"damage"?: IDamageData[],
"range"?: IRangeData[],
"actions"?: IActionData[],
"bonuses"?: IBonusData[],
"synergies"?: ISynergyData[],
"deployables"?: IDeployableData[],
"counters"?: ICounterData[],
"integrated"?: string[],
"special_equipment"?: string[]
All Weapon Profile fields are equivalent to their base Weapon representations.
Note that, aside from the name field, all fields on a profile are optional. If a field is not provided, a Weapon Profile will fall back to whatever is in container weapon data.
Example
{
"id": "mw_smartgun",
"name": "Smartgun",
"mount": "Main",
"type": "Rifle",
"damage": [
{
"type": "Kinetic",
"val": 4
}
],
"range": [
{
"type": "Range",
"val": 15
}
],
"tags": [
{
"id": "tg_accurate"
},
{
"id": "tg_seeking"
},
{
"id": "tg_smart"
}
],
"source": "HORUS",
"license": "Pegasus",
"license_level": 1,
"description": "“Smart weapon” is a broad term that describes any and all weapons capable of interacting with onboard systems in order to boost their combat efficacy. Smartguns are weapons that come pre-loaded with companion software and the necessary hardware in order to interact with targeting systems and host NHPs. A popular addition to many HORUS mechs, smart weapons make for reliable kinetic delivery systems.",
"sp": 2,
"license_id": "mf_pegasus"
},