The document-level code for version 14.1.0 of MPMB's Character Record Sheet.
Note that this repository only includes the SRD content (v5.1, D&D 5e, 2014) and that these files alone are not enough to create the PDF character sheet.
Important
For D&D 5e (2014).
Get this PDF
Download the paid/extended versions by subscribing to MPMB's Patreon or Pay What You Want on MPMB's website.
Code changes
Changelog
Magic Items
- Improved
chooseGearhandling of names written with a comma for better sorting and added theremovePluralSattribute. - Improved
chooseGearto now look at thenameInvattribute of an ammo/armour/weapon for the magic item section, but still use thenamefor the first page. - Improved
chooseGear.excludeCheckwith a third variable that includes information about the weapon, like if it is melee, ranged, or natural, which makes it easier to write consistentexcludeCheckfunctions. - Fixed the in-line menu of magic items not showing which variant was currently active.
- Made Magic Item and Feat
descriptionanddescriptionLongaccept arrays. These arrays are joined with a carriage return (“\r”). This change is to make code with line breaks easier to read. - Made potions automatically add an action “Drink/Administer Potion” if no actions are defined in their MagicItemsList object.
- Made staves automatically add an entry in the attack drop-down box on the first page, of no weapon is defined in their MagicItemsList object. This entry is not automatically selected on the first page.
- Added the option not to change the description when using the
chooseGearattribute, by settingdescriptionChange: false. - Using the "Delete Item" menu command no longer causes items to jump from the overflow page to the third page, where there is less space for their descriptions.
Ability Scores
- Fixed ability score fields not having their tooltip reset when the reset button is pressed (thanks Smashman for reporting).
- Redesigned the ability score improvements processing from the ground up. The dialog looks identical, but the column names and purpose has changed:
- The “Magic Bonus” column has been replaced with the “Magic Items” column, which is for one-time additions by magic items.
- The previously non-editable “Magic Items” column has been replaced with the non-editable “Items up to Max X” column, which is automatically populated with magic item ability score bonus that are ongoing passive additions.
- The “Level Bonus” column has been renamed to “ASIs from Class”.
- The “Class Bonus” column is now optional; it will only be added when actual class features affect ability scores.
- Changed
scoresMaxLimitedattribute to accept an array instead of being a Boolean. When set, this array limits the increase fromscores. Use this for features that grant a one-time increase up to a specific maximum (e.g. “Strength increases by 1, up to a maximum of 30”). - Ability Score dialog now populates the “Score Base” column with the values on the sheet the first time it is opened, if applicable.
- When the Ability Score dialog is opened because the level field was filled after being empty before, the first row’s level value is set to this new value.
- Clicking an Ability Score modifier field (which is read-only) will now open the Ability Score dialog.
- Because of these changes, imports from previous versions will have the ability score dialog reset to only what the automation adds.
Spell Sheets
- Added “Once per Day” checkboxes to the spell sheet. These work the same as the once per short/long rest but are more applicable to magic items that don’t reset on rests. In JavaScript this is
firstCol: "onceday". - Allowed setting a die “dX” as the first column of a spell/caption on the spell sheet pages.
- Swapped buttons on a spell book dialog so that the “next dialog” button is highlighted by default.
- Fixed spells gained from magic items with the
spellChangesattribute not getting the information regarding not needing components. - Fixed spell sheets pushing level dividers to the next page once four headers are present on a page (thanks Smashman for reporting).
- Fixed spellcasting entry not being removed when having duplicates of an item with choices where each choice grants spells.
- Fixed “At Will” graphic not showing for
spellcastingBonusspells that define it specifically and are not part of a spellcasting object from a class. For classes, the sheet determines it automatically. - Added the
spellcastingNamecommon attribute. It allows you to override the text put in the header on the spell sheet page. - Fixed
allowUpcastingbeing set at the spell level totruenot overriding it being set at the caster level tofalse. - Made
genericSpellDmgEditrecognise the "x/charge" syntax in a spell's short description.
Units and Metric Conversion
- Improved the function for converting between imperial and metric units. Now it accepts common fractions (e.g. 1/2, 2/3, 3/4), convert weights below 0.5 lb to gram instead of 0.5 kg, can convert fluid ounces, pints, millilitres, and centilitres.
- Unit system conversion now also understands thousand separators. As a result of this, it is no longer possible to set the sheet to use the imperial system with a comma as a decimal separator.
- Improved the dialog for selecting the unit system and decimal separator with more concise language, and more examples of supported units.
- Improved handling of thousand separators on the Adventure Logsheet pages.
- Improved carried weight and weight allowance fields by adding thousand separators.
Other Changes
- Improved the function for transforming a string from second to first person.
- Improved
toNotesPageto not put an origin when it would be identical to the name of the note, thus avoiding weird looking duplication. - Clicking the class field now always opens the Class Selection dialog (before it only opened when holding SHIFT or when the class field was empty).
Other Bug Fixes
- Fixed non-standard recovery options not being displayed in the limited features sections at all (thanks Reading Toskr for reporting).
- Fixed
useDescriptionFullattribute of thetoNotesPageobject. - Added
passivePerceptionto theCreatureListdocumentation and use the attribute on the Companion page instead of only on the Wild Shape page. Also make it optional for Beasts (or anything used on the Wild Shape page). - Fixed notes added by automation (
toNotesPageattribute) not being converted to and from the metric system, which caused them not to be removed when the feature was removed if the unit system changed between adding and removing the feature. - Fixed the sheet always refreshing all the dropdowns at startup, which reduced how fast it loaded.
- Fixed
weaponsAdd.optionsnot working for multiple entries. - Fixed that the Adventure Logsheet pages weren’t updating when changing the decimal separator, and fixed that updating both the unit system and decimal separator at the same time didn’t affect the currency fields.
- Fixed
CreatureListentries not allowing anameThisthat is not part of the creature’s name.