The document-level code for v14.0.5-beta version of MPMB's Character Record Sheet.
Note that this repository only includes the SRD content (D&D 5e, 2014) and that these files alone are not enough to create the PDF character sheet.
Important
For D&D 5e (2014).
Code changes
Changelog
Importing Add-on Scripts
- Added a way to set an upper limit for allowed version number. This is the second parameter passed in the
RequiredSheetVersion()function. This way you can inform the user that an add-on script is not compatible with the 2024 version of the sheet. The user is still only given a warning and can still use the add-on script, unless it produces an error upon import.
Classes
- Setting an entry in the array of a
descriptionattribute for a class feature toundefinednow removes the class feature from the Class Features section at that level. N.B. when thedescriptionattribute of a class feature is an array, it is level-dependent, with each entry in the array reflecting a level in the (sub)class.
Creatures
- Removed
sensesas a required attribute. - Fixed bug with "[THIS]" not being properly replaced in descriptions.
- Fixed bug with creature attacks that have the
modifiersattribute not getting the ability modifier added to damage.
Notes
- Added the
useDescriptionFullattribute to thetoNotesPagecommon attribute. Setting this to true or a function makes the note add the full description of the parent to the notes page. See the documentation for more details. - Added the
originattribute to thetoNotesPagecommon attribute. Setting this will override the auto-generated origin. The origin is what is added to the first line of the generated note, the part before the source and page number.
Spell Sheets
- Complete overhaul of how the
spellcastingExtraspells are selectable (or not) in the spell selection dialog and how their first column is determined on the generated spell sheet, for the default and ‘nonconform’ ways. Now they should be consistent regardless of the type of spell sheet being generated (i.e. the radio buttons in the spell selection dialog). - Overhauled how
spellcastingExtracantrips are treated and making them work correctly when cantrips are set to be prepared. - Similarly overhauled how the
spellcastingBonuscantrips are treated so that they act more logically when preparing cantrips and generating a complete list of all spells and cantrips. As a result, it is no longer necessary to set thefirstColattribute to “atwill” for cantrips inside aspellcastingBonusattribute. However, it is no longer possible to duplicate spells on the spell sheet without setting afirstColattribute that is not “atwill” or a variant of “markedbox”.
Other Changes
- Improved error handling.