Skip to content

Instantly share code, notes, and snippets.

View morepurplemorebetter's full-sized avatar

morepurplemorebetter morepurplemorebetter

View GitHub Profile
@morepurplemorebetter
morepurplemorebetter / PF_swap_ability_score+mod.js
Created April 30, 2018 13:09
Swap the display of the ability score and the ability modifier for MPMB's Character Record Sheet (Printer Friendly)
/*
>>> WHAT DOES IT DO? <<<
This script offers a way to swap the displayed numbers in the ability score and ability modifier fields for MPMB's Character Record Sheet (Printer Friendly).
*/
/*
>>> HOW DO YOU USE IT? <<<
1) Open the JavaScript console (a.k.a. JavaScript debugger). This can be done from any of the 'Import' dialogs in the sheet.
@morepurplemorebetter
morepurplemorebetter / gestaltMPMB.js
Last active September 24, 2021 14:31
Change MPMB's character record sheet to a gestalt ruling
// Re-define the way the experience points are matched to a level, so that each experience point total is matched to double the level
ExperiencePointsList = ["", "", 300, 300, 900, 900, 2700, 2700, 6500, 6500, 14000, 14000, 23000, 23000, 34000, 34000, 48000, 48000, 64000, 64000, 85000, 85000, 100000, 100000, 120000, 120000, 140000, 140000, 165000, 165000, 195000, 195000, 225000, 225000, 265000, 265000, 305000, 305000, 355000, 355000, 1000000000, 1000000000];
// Make it so that the Level field shows only half the level
tDoc.getField("Character Level").setAction("Format", "event.value = event.value ? Math.floor(event.value/2) : '';");
// Make the proficiency bonus that which it would be for half the level
if (tDoc.info.SheetVersion < 13) {
eval(ProfBonus.toString().replace("function ProfBonus", "ProfBonus = function"). replace('var lvl = What(QI === true ? "Character Level" : QI + "Comp.Use.HD.Level");', 'var charLvl = What("Character Level"); var lvl = QI === true ? (charLvl ? charLvl/2 : 0) : What(QI + "Co