Essence20 on Foundry VTT FAQ - WookieeMatt/Essence20 GitHub Wiki

How does armor work for Power Rangers?

The way armor is handled for Power Rangers is slightly different from the other flavors of Essence20. Instead of equipping an Armor item onto a Ranger to increase their defenses, it is instead applied when they Morph. Here's what you need to do:

  1. Drop the It's Morphin Time! Perk from the compendium onto the Ranger sheet
  2. Go to the Effects tab of the Ranger sheet. Enable the effect of the armor type (by clicking the checkmark) that the Ranger is proficient in. An effect can be deactivated by clicking the X button. Even if the Ranger is proficient in multiple armor types, only one of these should be enabled at a time. Having more than one enabled will cause the armor effect to stack.
  3. Clicking the Morph button on the Skills tab should now apply the appropriate defensive bonuses. You can confirm this by hovering over any defense's value to see a breakdown of how its total is being calculated.

Example

Lan is a Level 1 Blue Ranger, which gives him Light and Medium armor proficiency. Lan's player has chosen to use Medium armor, so only that effect is enabled here:

image

Here are Lan's defenses while in non-Morphed form:

image

Once the Morph button is clicked, Lan's +2 Toughness armor takes effect:

image

How can I make a token change its image on the fly for morphing/transforming?

A common way to do this is via a macro. These instructions assume you're already acquainted with macros, but if not, read up on them here.

  1. Install the Sequencer module.
  2. Install the JB2A module. This is technically optional, as it just allows the macro to use a cool transformation animation, but the remainder of these instructions will assume it's been installed. Not having this installed will cause the macro script below to fail because it won't be able to find the animation file.
  3. Set up your token images to be contained in a single directory with filenames similar to morphed_billy_cranston.webp and unmorphed_billy_cranston.webp. In this example, the associated token's Actor name would be Billy Cranston. If you want to use a different image type or filename format you will have to modify the script accordingly.
  4. Create a Morph/Transform macro using the script below. It will require some slight modification (see // Comments within.)
  5. Selecting a token and triggering the macro should transform its image. If not, checking for errors in the developer's console (hit f12) will probably have helpful error messages. Feel free to stop by our support channel if you have any questions or issues.
main()

async function main() {
    // The basePath string below will need to be modified to match the URL/path for the directory your token images
    // reside in.
    // This example is hosting on The Forge, but if you're hosting locally it will just be the path within your
    // Data directory where the images reside, such as 'worlds/my_world/token_images'.
    let basePath = 'https://assets.forge-vtt.com/v40vOTA3KBkJL4eUhyxhZAcH/PowerRangers/Token';

    let morphedString = 'morphed';
    let unMorphedString = 'unmorphed';

    if (!token) {
        ui.notifications.error("Please select a Token first!");
        return;
    }
    let myTokenActorName = (actor.name).toLowerCase().replace(/ /g, "_");

    let morphed = basePath.concat('/', morphedString, '_', myTokenActorName, ".webp");
    let unMorphed = basePath.concat('/', unMorphedString, '_', myTokenActorName, ".webp");

    let img = token.document.texture.src === unMorphed ? morphed : unMorphed;

    new Sequence()
        .effect()
        // The file path string below can be replaced with any animation you'd like from here:
        // https://library.jb2a.com/
        .file("modules/JB2A_DnD5e/Library/Generic/Lightning/StaticElectricity_02_Regular_Blue_400x400.webm")
        .atLocation(token)
        .scaleToObject(1.5)
        .randomRotation()
        .wait(1500)
        .thenDo(() => {
            token.document.update({ "texture.src": img });
        })
        .play()
}