Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Next
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
Twitch
YouTube
Facebook (EN Publishing)
Facebook (EN World)
Twitter
Instagram
TikTok
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
The
VOIDRUNNER'S CODEX
is coming! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!
Community
General Tabletop Discussion
*Dungeons & Dragons
MPMB's D&D 5e Character Tools
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Yunru" data-source="post: 7325998" data-attributes="member: 6780961"><p>So for some reason my race keeps returning an error. I'm completely lost. JSConsole says it's on line 80, but that's just before "features":</p><p></p><p>[sblock][code]</p><p>/* -WHAT IS THIS?-</p><p> The script featured here is an explanation of how to make your own custom addition to MPMB's D&D 5e Character Tools.</p><p> To add your own content to the Character Sheet, use the syntax below and save it in a file. You can then import this file directly to the sheet using the "Import" button and "Import/Export" bookmark.</p><p> There you can either import the file as a whole or just copy the text into a dialogue.</p><p></p><p> -KEEP IN MIND-</p><p> Note that you can add as many custom codes as you want, either by importing consecutive files or pasting the scripts into the dialogue.</p><p> It is recommended to enter the code in a freshly downloaded or reset sheet before adding any other information so that there won't be any conflicts.</p><p>*/</p><p></p><p>/* -INFORMATION-</p><p> Subject: Class</p><p> Effect: This is the syntax for adding a new race to the sheet</p><p> Note that you will need to define the race once for every sub-race (i.e. there is a separate entry for High Elf, Wood Elf, and Dark Elf)</p><p> For races that have variants, like the human, you can define a variant using the RaceSubList. Any variant defined like that will only be selectable through the "Racial Options" button</p><p> Sheet: v12.999 (2017-12-19)</p><p>*/</p><p></p><p>var iFileName = "Homebrew Race - Moonfolk.js"; // Optional; This is how the file will be named in the sheet if you import it as a file and not copy-paste its content. Only the first occurrence of this variable will be used</p><p>RequiredSheetVersion(12.998); // Optional; This is the minimum required version number of the sheet for the script to work. If the sheet being used to import the script is of an earlier version, the user will be warned</p><p></p><p>RaceList["moonfolk"] = { //Object name; Note the use of only lower case! Also note the absence of the word "var" and the use of brackets []</p><p></p><p> regExpSearch : /^(?=.*moonfolk).*$/i, //required; regular expression of what to look for (i.e. now it looks for any entry that has both the words "something" and "catlike" in it, disregarding capitalization). If this looks to complicated, just write: /something catlike/i</p><p> </p><p> name : "Moonfolk", //required; the name to use for the race</p><p> </p><p> sortname : "Moonfolk", //optional; this is the name used to fill the drop-down boxes. If you don't include this, the 'name' will used instead</p><p> </p><p> source : ["HB", 0], //required; the source and the page number. "HB" stands for homebrew. See the "Complete SourceList" for an overview of sources that are already defined. Or define a new source using the "Homebrew Syntax - SourceList.js". // This can be an array of arrays to indicate the things appears in multiple sources. For example, if something appears on page 7 of the Elemental Evil Player's Companion and on page 115 of the Sword Coast Adventure Guide, use the following: [["E", 7], ["S", 115]]</p><p> </p><p> plural : "Moonfolk", //required; the name to use for the race when the plural form is used</p><p> </p><p> size : 3, //required; the size of the race (Gargantuan = 0, Huge = 1, Large = 2, Medium = 3, Small = 4, Tiny = 5)</p><p></p><p> speed : { //required; This sets a value for one or more speed modes, and/or a value to be added to a specific speed mode or to all speed modes // the attributes of this object can be "walk", "borrow", "climb", "fly", "swim", and "allModes"</p><p> </p><p> // all of the following attributes are optional and you can add more ("borrow" isn't part of this example!)</p><p> </p><p> walk : { spd : 30, enc : 20 } // the objects "walk", "borrow", "climb", "fly", "swim" are all the same, they are an object with two attributes, 'spd' for the speed in feet, and 'enc' for the encumbered speed in feet.</p><p> },</p><p> </p><p>/* SYNTAX CHANGE v12.998 >> old syntax for 'tools' and 'languages' are no longer supported!! */</p><p> languageProfs : [[1, "Moonspeak"], [1, "Common"]], // optional; this is an array of the language proficiencies gained. An entry can either be 1) a string that represents the language learned or 2) a number which is the number of language gained that can be chosen by the player</p><p> </p><p> vision : ["Darkvision", 60], //optional; An array of arrays that each have a length of 2; This adds the first value of each array to the Senses field. The second value is the range in feet. If no range is needed, put a 0 there. You can also add a modifier like "+30" or "*2" to have the appropriate calculation done with the range of sense</p><p> </p><p> savetxt : { // Optional; this attribute defines entries to add to the field for "Saving Throw Advantages / Disadvantages"</p><p> </p><p> text : ["Magic can't put me to sleep"], // Optional; this is an array of strings, and each of those strings is added to the field exactly as presented here</p><p> </p><p> adv_vs : ["charmed"] // Optional; this is an array of things that the character has advantage on saves against. This is put in the field after the text "Adv. on saves vs. ", so in this example it would result in "Adv. on saves vs. traps and charmed"</p><p> },</p><p> </p><p> skills : ["Arcana"], //optional; Skill proficiencies the race has. This line can be deleted if you don't have anything to put here. If the race doesn't give fixed proficiencies, but instead gives a choice, delete this line and use the line below, "skillstxt"</p><p> </p><p> age : " reach adulthood when they master a field, typically around 100", //optional; the age tooltip/mouseover text (will be displayed in combination with the "plural" entry)</p><p> </p><p> height : " range from 5 to over 6 feet tall (4'9" + 2d8")", //optional; the height tooltip/mouseover text (will be displayed in combination with the "plural" entry)</p><p> </p><p> improvements : "Moonfolk: +2 Intelligence, +1 Wisdom;", //required; the text that is displayed when listing all the ability score improvements</p><p> </p><p> scores : [0, 0, 0, 2, 1, 0], //required; the ability score improvements as used by the Ability Score dialog. The syntax is: [Str, Dex, Con, Int, Wis, Cha]</p><p> </p><p> trait : "Moonfolk (+2 Intelligence, +1 Wisdom)\nLunar Magic:\n I know the Dancing Lights cantrip.\n Once I reach 3rd level, I can cast the Faerie Fire spell once per long rest.\n Once I reach 5th level, I can cast the Moonbeam spell once per long rest.\n Intelligence is my casting stat for these spells.", //required; the racial trait as it will be put in the Racial Trait field on the second page (note that "\n" is a line break).</p><p> </p><p> spellcastingAbility : 4, //required for a spellcaster; the ability score to use for spellcasting. Remove this line if your race has no spellcasting. (Str=1, Dex=2, Con=3, Int=4, Wis=5, Cha=6)</p><p> </p><p> spellcastingBonus : { //optional; an object that adds something to the "Bonus Spells" section of the spell selection dialog //this object can have all the same attributes as the "spellcastingList" object as defined in the ClassList, but must also have a "name" defined //the other things that can be defined in this that are not in the "spellcastingList" object, are the "selection", "times" and "prepared" values</p><p> </p><p> name : "Lunar Magic (level 1)", //required; this is used to identify the object, so must be an unique name</p><p> </p><p> spells : ["dancing lights"], //Optional, but required if not including the "class" entry; If a "spells" array is present, all other objects will be ignored and only this list of spells will populate the list of available spells. each entry has to match the name of the spell in the SpellsList</p><p> </p><p> selection : ["dancing lights"], //optional if "spells" is defined; this is the default selection for the array specified in "spells"</p><p> </p><p> prepared : true,</p><p> </p><p> atwill : true, //optional; if set to 'true', this makes the spell selected for this/these bonus spells to get "At Will" in the first column</p><p> },</p><p> </p><p> features : { //optional; the racial features. Each works the same way, so only a couple of example are given. You can add as many as you want. If the race has no level-dependent or limited features, you can just delete the whole feature entry all together</p><p> </p><p> "faerie fire" : { //note the use of lower case characters</p><p> </p><p> name : "Faerie Fire", //required; the name of the racial feature</p><p> minlevel : 3, //required; the level at which the feature is gained</p><p> </p><p> usages : 1, //optional; number of times it can be used. This can be one value, but can also be an array of 20 values, one for each level</p><p> </p><p> recovery : "long rest", //required if "usages" is defined; way of getting the limited feature recharged. If you define either "long rest" or "short rest" (note the lower case), than the feature is also added to the limited features</p><p> </p><p> tooltip : " (Lunar Magic)", //optional; the tooltip added to the entry in the Limited Feature section, this example will read "Lesser Restoration is gainged from Something Catlike (Celestial Legacy)"</p><p> </p><p> action : ["action", ""],</p><p> </p><p> spellcastingBonus : { //optional; works just like the "spellcastingBonus" object defined above</p><p> name : "Lunar Magic (level 3)",</p><p> spells : ["faerie fire"],</p><p> selection : ["faerie fire"],</p><p> oncelr : true,</p><p> },</p><p> </p><p> "moonbeam" : { //note the use of lower case characters</p><p> </p><p> name : "Moonbeam", //required; the name of the racial feature</p><p> minlevel : 5, //required; the level at which the feature is gained</p><p> </p><p> usages : 1, //optional; number of times it can be used. This can be one value, but can also be an array of 20 values, one for each level</p><p> </p><p> recovery : "long rest", //required if "usages" is defined; way of getting the limited feature recharged. If you define either "long rest" or "short rest" (note the lower case), than the feature is also added to the limited features</p><p> </p><p> tooltip : " (Lunar Magic)", //optional; the tooltip added to the entry in the Limited Feature section, this example will read "Lesser Restoration is gainged from Something Catlike (Celestial Legacy)"</p><p> </p><p> action : ["action", ""],</p><p> </p><p> spellcastingBonus : { //optional; works just like the "spellcastingBonus" object defined above</p><p> name : "Lunar Magic (level 5)",</p><p> spells : ["moonbeam"],</p><p> selection : ["moonbeam"],</p><p> oncelr : true,</p><p> },</p><p> </p><p> },</p><p> </p><p> }</p><p> </p><p>};</p><p>[/code][/sblock]</p></blockquote><p></p>
[QUOTE="Yunru, post: 7325998, member: 6780961"] So for some reason my race keeps returning an error. I'm completely lost. JSConsole says it's on line 80, but that's just before "features": [sblock][code] /* -WHAT IS THIS?- The script featured here is an explanation of how to make your own custom addition to MPMB's D&D 5e Character Tools. To add your own content to the Character Sheet, use the syntax below and save it in a file. You can then import this file directly to the sheet using the "Import" button and "Import/Export" bookmark. There you can either import the file as a whole or just copy the text into a dialogue. -KEEP IN MIND- Note that you can add as many custom codes as you want, either by importing consecutive files or pasting the scripts into the dialogue. It is recommended to enter the code in a freshly downloaded or reset sheet before adding any other information so that there won't be any conflicts. */ /* -INFORMATION- Subject: Class Effect: This is the syntax for adding a new race to the sheet Note that you will need to define the race once for every sub-race (i.e. there is a separate entry for High Elf, Wood Elf, and Dark Elf) For races that have variants, like the human, you can define a variant using the RaceSubList. Any variant defined like that will only be selectable through the "Racial Options" button Sheet: v12.999 (2017-12-19) */ var iFileName = "Homebrew Race - Moonfolk.js"; // Optional; This is how the file will be named in the sheet if you import it as a file and not copy-paste its content. Only the first occurrence of this variable will be used RequiredSheetVersion(12.998); // Optional; This is the minimum required version number of the sheet for the script to work. If the sheet being used to import the script is of an earlier version, the user will be warned RaceList["moonfolk"] = { //Object name; Note the use of only lower case! Also note the absence of the word "var" and the use of brackets [] regExpSearch : /^(?=.*moonfolk).*$/i, //required; regular expression of what to look for (i.e. now it looks for any entry that has both the words "something" and "catlike" in it, disregarding capitalization). If this looks to complicated, just write: /something catlike/i name : "Moonfolk", //required; the name to use for the race sortname : "Moonfolk", //optional; this is the name used to fill the drop-down boxes. If you don't include this, the 'name' will used instead source : ["HB", 0], //required; the source and the page number. "HB" stands for homebrew. See the "Complete SourceList" for an overview of sources that are already defined. Or define a new source using the "Homebrew Syntax - SourceList.js". // This can be an array of arrays to indicate the things appears in multiple sources. For example, if something appears on page 7 of the Elemental Evil Player's Companion and on page 115 of the Sword Coast Adventure Guide, use the following: [["E", 7], ["S", 115]] plural : "Moonfolk", //required; the name to use for the race when the plural form is used size : 3, //required; the size of the race (Gargantuan = 0, Huge = 1, Large = 2, Medium = 3, Small = 4, Tiny = 5) speed : { //required; This sets a value for one or more speed modes, and/or a value to be added to a specific speed mode or to all speed modes // the attributes of this object can be "walk", "borrow", "climb", "fly", "swim", and "allModes" // all of the following attributes are optional and you can add more ("borrow" isn't part of this example!) walk : { spd : 30, enc : 20 } // the objects "walk", "borrow", "climb", "fly", "swim" are all the same, they are an object with two attributes, 'spd' for the speed in feet, and 'enc' for the encumbered speed in feet. }, /* SYNTAX CHANGE v12.998 >> old syntax for 'tools' and 'languages' are no longer supported!! */ languageProfs : [[1, "Moonspeak"], [1, "Common"]], // optional; this is an array of the language proficiencies gained. An entry can either be 1) a string that represents the language learned or 2) a number which is the number of language gained that can be chosen by the player vision : ["Darkvision", 60], //optional; An array of arrays that each have a length of 2; This adds the first value of each array to the Senses field. The second value is the range in feet. If no range is needed, put a 0 there. You can also add a modifier like "+30" or "*2" to have the appropriate calculation done with the range of sense savetxt : { // Optional; this attribute defines entries to add to the field for "Saving Throw Advantages / Disadvantages" text : ["Magic can't put me to sleep"], // Optional; this is an array of strings, and each of those strings is added to the field exactly as presented here adv_vs : ["charmed"] // Optional; this is an array of things that the character has advantage on saves against. This is put in the field after the text "Adv. on saves vs. ", so in this example it would result in "Adv. on saves vs. traps and charmed" }, skills : ["Arcana"], //optional; Skill proficiencies the race has. This line can be deleted if you don't have anything to put here. If the race doesn't give fixed proficiencies, but instead gives a choice, delete this line and use the line below, "skillstxt" age : " reach adulthood when they master a field, typically around 100", //optional; the age tooltip/mouseover text (will be displayed in combination with the "plural" entry) height : " range from 5 to over 6 feet tall (4'9" + 2d8")", //optional; the height tooltip/mouseover text (will be displayed in combination with the "plural" entry) improvements : "Moonfolk: +2 Intelligence, +1 Wisdom;", //required; the text that is displayed when listing all the ability score improvements scores : [0, 0, 0, 2, 1, 0], //required; the ability score improvements as used by the Ability Score dialog. The syntax is: [Str, Dex, Con, Int, Wis, Cha] trait : "Moonfolk (+2 Intelligence, +1 Wisdom)\nLunar Magic:\n I know the Dancing Lights cantrip.\n Once I reach 3rd level, I can cast the Faerie Fire spell once per long rest.\n Once I reach 5th level, I can cast the Moonbeam spell once per long rest.\n Intelligence is my casting stat for these spells.", //required; the racial trait as it will be put in the Racial Trait field on the second page (note that "\n" is a line break). spellcastingAbility : 4, //required for a spellcaster; the ability score to use for spellcasting. Remove this line if your race has no spellcasting. (Str=1, Dex=2, Con=3, Int=4, Wis=5, Cha=6) spellcastingBonus : { //optional; an object that adds something to the "Bonus Spells" section of the spell selection dialog //this object can have all the same attributes as the "spellcastingList" object as defined in the ClassList, but must also have a "name" defined //the other things that can be defined in this that are not in the "spellcastingList" object, are the "selection", "times" and "prepared" values name : "Lunar Magic (level 1)", //required; this is used to identify the object, so must be an unique name spells : ["dancing lights"], //Optional, but required if not including the "class" entry; If a "spells" array is present, all other objects will be ignored and only this list of spells will populate the list of available spells. each entry has to match the name of the spell in the SpellsList selection : ["dancing lights"], //optional if "spells" is defined; this is the default selection for the array specified in "spells" prepared : true, atwill : true, //optional; if set to 'true', this makes the spell selected for this/these bonus spells to get "At Will" in the first column }, features : { //optional; the racial features. Each works the same way, so only a couple of example are given. You can add as many as you want. If the race has no level-dependent or limited features, you can just delete the whole feature entry all together "faerie fire" : { //note the use of lower case characters name : "Faerie Fire", //required; the name of the racial feature minlevel : 3, //required; the level at which the feature is gained usages : 1, //optional; number of times it can be used. This can be one value, but can also be an array of 20 values, one for each level recovery : "long rest", //required if "usages" is defined; way of getting the limited feature recharged. If you define either "long rest" or "short rest" (note the lower case), than the feature is also added to the limited features tooltip : " (Lunar Magic)", //optional; the tooltip added to the entry in the Limited Feature section, this example will read "Lesser Restoration is gainged from Something Catlike (Celestial Legacy)" action : ["action", ""], spellcastingBonus : { //optional; works just like the "spellcastingBonus" object defined above name : "Lunar Magic (level 3)", spells : ["faerie fire"], selection : ["faerie fire"], oncelr : true, }, "moonbeam" : { //note the use of lower case characters name : "Moonbeam", //required; the name of the racial feature minlevel : 5, //required; the level at which the feature is gained usages : 1, //optional; number of times it can be used. This can be one value, but can also be an array of 20 values, one for each level recovery : "long rest", //required if "usages" is defined; way of getting the limited feature recharged. If you define either "long rest" or "short rest" (note the lower case), than the feature is also added to the limited features tooltip : " (Lunar Magic)", //optional; the tooltip added to the entry in the Limited Feature section, this example will read "Lesser Restoration is gainged from Something Catlike (Celestial Legacy)" action : ["action", ""], spellcastingBonus : { //optional; works just like the "spellcastingBonus" object defined above name : "Lunar Magic (level 5)", spells : ["moonbeam"], selection : ["moonbeam"], oncelr : true, }, }, } }; [/code][/sblock] [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Dungeons & Dragons
MPMB's D&D 5e Character Tools
Top