Skip to content

AddWeapon.js

kyleady edited this page Jan 31, 2017 · 3 revisions

Purpose

One step of Deathwatch campaigns that proved to be a roadblock to the usual momentum was players requisitioning items. I wanted players to have links to the weapons they chose on their character sheets and I wanted them to have Token Actions for use with TheAttack but that took time.

Usage

!Add Weapon <weapon phrase> [(<list of ammo phrases>)] [ [x <quantity>] ] (Players and GM)

  • weapon phrase is the phrase used to find the intended weapon. See MatchingObjs.js.
  • list of ammo phrases is a comma separated list of phrases to find special ammunition for the weapon. See MatchingObjs.js. If one of the phrases is an empty string it will interpret that as an option for the weapon not to use special ammunition. If this list is not included, the weapon will not use any special ammunition.
  • quantity is an option to overwrite the clip size. This is most useful when adding consumable items such as grenades. This allows TheAttack to keep track of the number of items used even though no max clip size is listed for grenades.

AddWeapon.js adds a link to the Weapon handout to the Weapons(Requisitioned) section of the character bio, if it exists. If Weapons(Standard Issue) exists while Weapons(Requisitioned) does not, it will create the Weapons(Requisitioned) section. If neither of those exist, but a Weapons section does, it will be placed there. If there was nowhere to insert the weapon, the GM will be warned.

AddWeapon.js will then create a Token Action for use with TheAttack that makes use of the INQWeapon.prototype.toAbility() function.

If the character already has a Token Action for that weapon and the weapon needs to keep track of ammo, it will be given the first available name for Weapon 2, Weapon 3, Weapon 4, etc. This way each weapon can keep track of their ammo separately.

If the character already has a Token Action for that weapon and the weapon has no ammo to keep track of, it will not be given a duplicate Token Action.

Examples

Using !addweapon Ast Frag Gren [x3] would give each selected character an Astartes Frag Grenade with a clip size of 3.

Using !addweapon Ast Heavy Bolt (Hell Fire Rounds) [x250] would give each selected character an Astartes Heavy Bolter that can only fire Hellfire Rounds with a backpack ammo supply of 250 shots.

Using !addweapon Ast Godwyn Bolt (Hell Fire Rounds,) would give each selected character an Astartes Godwyn Bolter that can optionally use Hellfire Rounds.

Requirements

Clone this wiki locally