Advertisement
Xanjaycof

Big Ol' Script Dumb on MPMB's Sheet (Part 2-2: Kuriboh)

Jan 11th, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var iFileName = "Homebrew Syntax - Kuriboh Race.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
  2. RequiredSheetVersion(12.999); // 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
  3.  
  4. RaceList["kuriboh"] = { //Object name; Note the use of only lower case! Also note the absence of the word "var" and the use of brackets []
  5.  
  6.     regExpSearch : /^(?=.*kuriboh).*$/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 too complicated, just write: /something catlike/i
  7.  
  8.     name : "Kuriboh", //required; the name to use for the race
  9.  
  10.     sortname : "", //optional; this is the name used to fill the drop-down boxes. If you don't include this, the 'name' will used instead
  11.  
  12.     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]]
  13.  
  14.     plural : "Kuribohs", //required; the name to use for the race when the plural form is used
  15.  
  16.     size : 5, //required;  the size of the race (Gargantuan = 0, Huge = 1, Large = 2, Medium = 3, Small = 4, Tiny = 5)
  17.  
  18.     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", "burrow", "climb", "fly", "swim", and "allModes"
  19.  
  20.         // all of the following attributes are optional and you can add more ("burrow" isn't part of this example!)
  21.  
  22.         walk : { spd : 10, enc : 0 }, // the objects "walk", "burrow", "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.
  23.  
  24.         fly : { spd : 25, enc : 0 }, // instead of a number/modifier, you can also set the attribute to "walk". This makes the speed mode assume the walking speed // Using an underscore as the first character means the value is only added if the value would be non-zero
  25.     },
  26.  
  27. /* SYNTAX CHANGE v12.998 >> old syntax for 'tools' and 'languages' are no longer supported!! */
  28.     toolProfs : [["Musical instrument", 3], ["Thieves' tools", "Dex"], "Tinker's tools"], // optional; this is an array with the tool proficiencies gained. Each entry can be its own array of 2 entries (but doesn't have to be). The first entry is the name of the tool and the second entry is either 1) a number if the tool is yet to be chosen, or 2) the 3-letter ability score abbreviation if the tool is to be listed in the skill section and have a bonus calculated
  29.  
  30.     languageProfs : ["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
  31.  
  32.     weapons : [""], //optional; an array of weapons that are added to the attacks section; This will be the name of the weapon how it appears in the attack section, not necessarily the object name in the WeaponsList
  33.  
  34.     addarmor : "", //optional; a string of the name of the armour that is literally put in the Armor Description field when the class feature is applicable, and removed if not
  35.  
  36.     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
  37.  
  38.     skills : ["Insight", "Persuasion"], //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"
  39.  
  40.     age : " reach adulthood at 5 years and are immortal", //optional; the age tooltip/mouseover text (will be displayed in combination with the "plural" entry)
  41.  
  42.     height : " range just under 2 feet tall", //optional; the height tooltip/mouseover text (will be displayed in combination with the "plural" entry)
  43.  
  44.     weight : " weigh around 10 lbs", //optional; the weight tooltip/mouseover text (will be displayed in combination with the "plural" entry)
  45.  
  46.     heightMetric : " range just under 0.6 meteres tall", //optional; the height tooltip/mouseover text (will be displayed in combination with the "plural" entry), when the metric system is chosen
  47.  
  48.     weightMetric : " weigh around 4.5 kg", //optional; the weight tooltip/mouseover text (will be displayed in combination with the "plural" entry), when the metric system is chosen
  49.  
  50.     improvements : "Kuriboh: +2 Charisma;", //required; the text that is displayed when listing all the ability score improvements
  51.  
  52.     scores : [0, 0, 0, 0, 0, 2], //required; the ability score improvements as used by the Ability Score dialog. The syntax is: [Str, Dex, Con, Int, Wis, Cha]
  53.  
  54.     trait : "Kuriboh (+2 Charisma)\nLightwighet Plush: My size and cushion hair help me stop damage from falling. I do not take fall damage from heights of 100 feet or less.\nSpiritual Bond: Kuribohs are known to have deep bonds with some people. Despite their inability to use words properly, these bonded individuals will understand them. As part of a long rest, I may bond with another creature in a deeper level, allowing us both to communicate telepathically. I may only bond with one creature at a time. If I create a new bond, the old one is severed.\nSacrifice: I'm willing to die for my friends. If a creature friendly to me is successfully attacked within 30 feet of myself, I may expend my reaction and swap places with them and take the damage they would have taken instead. I must declare this before I know of how much damage is dealt, but after the DM declares it hit. I must finish a long rest before using this trait again.", //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).
  55.  
  56.     variants : [""], //optional; the names of the racial variants, using the exact names of the entry of the variants given in the
  57. };RaceSubList (note the use of only lower case)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement