Files

Palladium Rifts by Grinning Gecko

Checkout

If you just want to work on this sheet without cloning the entire repo, do the following:

mkdir roll20-character-sheets
cd roll20-character-sheets
git init
git remote add origin git@github.com:Roll20/roll20-character-sheets.git # or git@github.com:ggutenberg/roll20-rifts-imports.git if you're making pull requests for me to review.
git config core.sparseCheckout true
echo "--no-cone" >> .git/info/sparse-checkout
echo "/Palladium Rifts by Grinning Gecko" >> .git/info/sparse-checkout
git pull origin master

If you want to update your local copy, run git pull origin master again.

Build

This sheet makes use of the following:

Use npm i to install required NPM packages.

Use npm run watch to automatically build the dist/ folder when editing an HTML or JS file. Note that only rifts.scss is monitored, so if you edit one of the other scss files you'll need to save that one too to trigger a build.

Useful Macros

Humanoid Knockdown Table

&{template:skill} {{title=Humanoid Knockdown}} {{roll=[[d100]]}} ?{Damage|
    1-10,{{target=[[0]]}}|
    11-20,{{target=[[20]]}}|
    21-30,{{target=[[30]]}}|
    31-40,{{target=[[50]]}}|
    41-50,{{target=[[70]]}}|
    51-60,{{target=[[90]]}}|
    61+,{{target=[[100]]}} {{successtext=Knocked off feet and stunned!}} }

Bots, Borgs, & Supernatural Knockdown Table

&{template:skill} {{title=Bots, Borgs, & Supernatural Knockdown}} {{roll=[[d100]]}} ?{Damage|
    1-30,{{target=[[0]]}}|
    31-50,{{target=[[10]]}}|
    51-70,{{target=[[20]]}}|
    71-100,{{target=[[40]]}}|
    101-150,{{target=[[60]]}}|
    151-200,{{target=[[80]]}}|
    201+,{{target=[[100]]}} {{successtext=Knocked off feet and stunned!}} }

Apply Damage to Character

This macro requires API access.

Add the ChatSetAttr script from the Script Library.

For each character in the party (or any NPCs you may want to use this on), copy everything after, and including, {{Character Name. Then replace each instance of Character Name in each section with the names of your characters. Running the macro will prompt for damage, then put a table in chat where you can click the damage value to set it on that particular characters' sheet, then click Apply to trigger the Apply Damage action button.

&{template:custom} {{title=Armor}} {{Character Name (@{Character Name|active_armor_mdc})=[?{Damage?|0}](!
!setattr --nocreate --name Character Name --armordamage|?{Damage?|0}) [Apply](~Character Name|armorapplydamage)}}

Show Player MDC

For each character in the party (or any NPCs you may want to use this on), copy everything after, and including, {{Character Name. Then replace each instance of Character Name in each section with the names of your characters.

&{template:custom} {{title=Armor}} {{Character Name=@{Character Name|active_armor_mdc}}}

API Scripts

dup-turn

Add this script if you want to use the TT button in the Active Profile. Having your token selected and clicking this button will roll intiative and add your attacks to the Turn Tracker, Palladium style.

on("ready", () => {
  const multiplyTurn = (token_id, count) => {
    let to = JSON.parse(Campaign().get("turnorder") || "[]");
    let turn = { pr: -10000 };
    to = to.filter((o) => {
      if (o.id !== token_id) {
        return true;
      }
      if (o.id === token_id) {
        if (o.pr > turn.pr) {
          turn = o;
        }
      }
      return false;
    });
    if (turn.id) {
      [...Array(parseInt(count)).keys()].forEach((n) => {
        to.push(Object.assign({}, turn, { pr: parseInt(turn.pr) - 100 * n }));
      });
    }
    Campaign().set({
      turnorder: JSON.stringify(
        to.sort((a, b) => parseFloat(b.pr) - parseFloat(a.pr))
      ),
    });
  };

  on("chat:message", (msg) => {
    if ("api" === msg.type && /^!dup-turn/.test(msg.content)) {
      let args = msg.content.split(/\s+/);
      let count = args[1] || 2;

      msg.selected.forEach((m) => multiplyTurn(m._id, count));
    }
  });
});