Creating New Statuses - StarWarsFoundryVTT/StarWarsFFG GitHub Wiki

The system currently supports three duration options: forever, which remains until manually removed, "once", which is removed after the next skill check, and "combat", which is removed after the next combat is ended..

Forever

To add a forever status, simply add a status. It can look like this:

CONFIG.statusEffects.push({
  id: "starwarsffg-boost-once",
  img: "systems/starwarsffg/images/dice/starwars/blue.png",
  name: "SWFFG.Status.Boost.Next",
  changes: [{
    key: "system.skills.Astrogation.boost",
    mode: CONST.ACTIVE_EFFECT_MODES.ADD,
    value: 1,
  }],
});

Once

To add a one-time boost (or detriment), you can use this:

CONFIG.statusEffects.push({
  id: "starwarsffg-boost-once",
  img: "systems/starwarsffg/images/dice/starwars/blue.png",
  name: "SWFFG.Status.Boost.Next",
  changes: [{
    key: "system.skills.Astrogation.boost",
    mode: CONST.ACTIVE_EFFECT_MODES.ADD,
    value: 1,
  }],
  system: {
    duration: "once",
  },
});

Combat

To add a boost (or detriment) for an entire combat duration, you can use this:

CONFIG.statusEffects.push({
  id: "starwarsffg-boost-combat",
  img: "systems/starwarsffg/images/dice/starwars/blue.png",
  name: "SWFFG.Status.Boost.Combat",
  changes: [{
    key: "system.skills.Astrogation.boost",
    mode: CONST.ACTIVE_EFFECT_MODES.ADD,
    value: 1,
  }],
  system: {
    duration: "combat",
  },
});

Adding to the system

These can be added to the system via the settings (under combat). Note that the settings method expects a single-line string, e.g.:

[{"id": "starwarsffg-success-combat-2","img": "icons/containers/barrels/barrel-chestnut-tan.webp","name": "SWFFG.Status.Success.Combat","changes": [{"key": "system.skills.Astrogation.boost","mode": 2,"value": 1}],"system": {"duration": "combat"}}]