Skip to content

Instantly share code, notes, and snippets.

@morepurplemorebetter
Last active September 24, 2021 14:31
Show Gist options
  • Save morepurplemorebetter/3c64c19d371c1d3f4688a58441315404 to your computer and use it in GitHub Desktop.
Save morepurplemorebetter/3c64c19d371c1d3f4688a58441315404 to your computer and use it in GitHub Desktop.
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 + "Comp.Use.HD.Level");'));
} else {
ProficiencyBonusList = [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6];
}
// Change the cantrip damage die so that it only goes up at the double level
cantripDie = [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4];
@morepurplemorebetter
Copy link
Author

This little script doesn't change anything about how classes work. It only halves the scaling of some things. When the cantrip dice, experience points, and proficiency bonus increase will now happen only every other level, instead of every level.

The script also changes the display of the total level field to show only half the level (rounded down). You'll still see the total level when you click on the field, just when the field is not active, it'll display half that, so you can print it like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment