Register

Oliver's Dark Heresy 2E Extras

An Add-on Module for Foundry Virtual Tabletop

Author: Oliver Marshall Project Source: Project URL Versions 0.7.9+ (Verified 0.7.9) Last Updated 2 years, 10 months ago

Oliver's Dark Heresy 2 Extras

An extention to moo-man's excellent DarkHeresy2E-FoundryVTT.

This module only optionally depends on the DH2 System and about-time. If they're not installed then the functions simply won't be loaded.

This module adds some extra functionality to the Actor and DarkHeresyActor classes enabling you do do cool things like:

 

// Let's say that you've ruled that Takedown can only be done once per day
// Otherwise your character get's dizzy

// We need some status effect to indicate that the character is dizzy
// Or at least I like to so that it's visible on the token
const dizzyStatusEffect = "stun";
async main() {
    const actor = game.user.character;

    // You can only use Takedown if you have the talent
    if (actor.hasTalent("Takedown")) {
        if (actor.hasStatusEffect(dizzyStatusEffect)) {
            ui.notification.warn("This character can't perform a Takedown twice in one day");
            // You could use actor.timeUntilStatusEffectExpiry(dizzyStatusEffect)
            // to display how long until they can use Takedown again
        } else {
            // Do stuff for the takedown

            actor.enableStatusEffectFor(dizzyStatusEffect, {hours: 1});
        }
    } else {
        ui.notification.warn("This character can't perform a Takedown");
        ui.notification.warn("You'll need to invest in the talent first");
    }
}

main();

 

The docs have more examples and more functions, take a look :)

Documentation

API Docs

Categories

Available Versions

  1. Version 0.1.1

    2 years, 10 months ago
    Foundry Version 0.7.9+ (Verified 0.7.9) Manifest URL Read Notes
  2. Version 0.1.0

    Foundry Version 0.7.9+ (Verified 0.7.9) Manifest URL Read Notes