Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AelarTheElfRogue/f8e92e8a884b7afc651216da3ba699fd to your computer and use it in GitHub Desktop.
Save AelarTheElfRogue/f8e92e8a884b7afc651216da3ba699fd to your computer and use it in GitHub Desktop.
[Archetype] - Barbarian: Path of the Hellion
/* -INFORMATION-
Subject: Barbarian - Path of the Hellion
Effect: This is the syntax for adding a new subclass/archetype to a class that is defined in the sheet, or to a class you made yourself
Sheet: v12.999 (2017-11-29)
*/
// Converted for use with MPMB's Character Sheet by /u/AelarTheElfRogue
var iFileName = "Barbarian - Path of the Hellion [The Darkest Dungeon] [AelarTheElfRogue].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.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
SourceList["TDD"] ={
name : "The Darkest Dungeon",
abbreviation : "TDD",
group : "Homebrew",
url : "https://www.drivethrurpg.com/product/194013/The-Darkest-Dungeon-Compendium",
date : "2018/08/21"
};
AddSubClass( // this is the function you will be calling to add the variant
"barbarian", // Parent Class object name; Required; This has to be the exact name of the class of which you are adding a subclass. Look for the name of the class in the ClassList variable. For the default 12 classes these names are: "barbarian", "bard", "cleric", "druid", "fighter", "monk", "paladin", "ranger", "rogue", "sorcerer", "warlock", and "wizard"
"hellion", // Object name; Required; The name the entry in the ClassSubList will have. This can be anything, it is just something that the sheet uses to reference the new entry and it will never be printed anywhere
{ // don't forget this opening bracket
regExpSearch : /^(?=.*hellion).*$/i, //required; regular expression of what to look for (i.e. now it looks for any entry that has both the words "special" and "me" in it, disregarding capitalization). If this looks to complicated, just write: /specialme/i
subname : "Path of the Hellion", //required; the name of the subclass
source : ["TDD", 7], //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]]
// after defining the above three, you don't need to define anything more, but you can. Defining more stuff will overwrite the entries as they are given in the ClassList. So if you do not need something to be different than the basics of the class (for example, you subclass uses the same spellcasting ability), then you don't need to define it again.
// For the syntax of how to define more stuff, look at the ClassList (see "Homebrew Syntax - ClassList.js"). You can define all the same stuff in the same way. The below are a couple of examples:
//fullname : "SpecialMe of MyClass", //if no fullname is defined it will be automatically generated as "Class Name (Subclass name)". In this example that would be: "MyClass (Path of SpecialMe)"
//abilitySave : 6, //overwrites the abilitySave that was defined in the ClassList
//abilitySaveAlt : 2,//overwrites the abilitySaveAlt that was defined in the ClassList
//spellcastingFactor : 2, //overwrites the spellcastingFactor that was defined in the ClassList
features : { //unlike the other entries, "features" will not delete all the features from the ClassList, but will add to the features in the ClassList. For this to work properly, the feature object has to be named "subclassfeatureX" and not something appropriate for the feature. The below are the features of the purple Dragon Knight
"subclassfeature3" : { // has to start with "subclassfeature" followed by a number. Note that the name has to be unique for this subclass, but it can be the same name as one of the features of the class in the ClassList variable. If you use the same name as a feature in the ClassList variable, it will be overwritten with this entry
name : "Trophy Hunter",
source : ["TDD", 7],
minlevel : 3,
description : desc([
"When I reduce a creature to 0 hit points with the beast, fey, humanoid, undead, or",
"monstrosity type, I can collect a piece of them as a trophy over the course of an hour.",
"I must attune to this trophy and I can only attune to a number of trophies equal to my",
"Constitution modifier (minimum 1). While attuned to a trophy, I gain the following",
"benefits against creature of the same type: I score a critical hit on a roll of 19 or 20 on",
"the d20. I gain a +2 bonus to my AC. I gain a +2 bonus to saving throws.",
]),
usages : "Con mod (minimum of 1)",
usagescalc : "event.value = Math.max(1, this.getField(\"Con Mod\").value);",
additional : "# of Trophies",
},
"subclassfeature6" : {
name : "Hunters Knowledge",
source : ["TDD", 7],
minlevel : 6,
description : desc([
"While attuned to a trophy, I have advantage on Wisdom (Survival) checks to track",
"creatures of the same type, as well as on Intelligence checks to recall information about",
"them. I also gain one language associated with the type of creature while attuned.",
]),
},
"subclassfeature6.1" : {
name : "Superior Trophy",
source : ["TDD", 7],
minlevel : 6,
description : desc([
"I can now make trophies from creatures with the aberration, celestial, construct,",
"dragon, elemental, fiend, or giant type.",
]),
},
"subclassfeature10" : {
name : "Brothers in Arms",
source : ["TDD", 7],
minlevel : 10,
description : desc([
"I can make trophies for allies. An ally can only attune to 1 trophy. They gain +1 AC",
"and +1 to saving throws against creatures of the same type.",
]),
},
"subclassfeature14" : {
name : "Relentless Hunter",
source : ["TDD", 7],
minlevel : 14,
description : desc([
"When a creature with the same type as a trophy I have causes me to use my Relentless",
"Rage feature, I gain a +1 to my Constitution save per trophy I am attuned to.",
]),
},
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment