Skip to content
Seijax edited this page May 10, 2024 · 18 revisions

>rangedAttacks and triggerModes

If you don't know what those are, or how they work, first read this primer.

Using this framework:

To add functionalities introduced by Trigger Mode Control to your gun, you'll just have to add the relative tag/s to its record. This can be done by any viable means, meaning mainly TweakXL or Cyber Engine Tweaks. For the sake of brevity, this guide will use TweakXL's yaml syntax for its examples.

> ManualTriggerSwap

The ManualTriggerSwap tag will prevent the weapon from automatically switching trigger types when changing aiming state, and will instead give manual control of them to the player (through the keybind dedicated to this mod). Any weapon with multiple triggermodes can use this, be it like the Osprey (swapping between fullauto and burst) or any Tech weapon swapping between their primary and their charge secondary.

Items.Weapon_Record:
  tags:
  - !append ManualTriggerSwap

Example of use: if your gun is defined as having a fullauto primary trigger shooting standard bullets, and a secondary semiauto trigger shotting explosive bullets, adding this tag to it will result in 4 possible player-selectable behaviours:

  1. fullauto standard hipfire
  2. fullauto explosive aimedfire
  3. semiauto standard hipfire
  4. semiauto explosive aimedfire

> TriggerBoundAttacks

The TriggerBoundAttacks tag will tie the attacks to their relative trigger modes, according to their primary/secondary definitions.

Items.Weapon_Record:
  tags:
  - !append ManualTriggerSwap
  - !append TriggerBoundAttacks

Example of use: taking the gun of the previous examples, adding this second tag together with the first will result in the fullauto mode always shooting standard bullets and the semiauto mode always shooting exploding bullets; regardless of if the player was aiming or not when firing them.