This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
>>> 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |