HOME Q & A CHANGLOG GUIDE GITHUB

Changelog

All of the changes that have been made to the package, in a somewhat organized list.

v2.0.8 Current Version

Changes

Armor

Added 'Pride Silk Outfit' as a new type of possible armor
Removed <Armor>#isMetal
Added <Armor>#armorClass
Added <Armor>#scalesWithDex
Added <Armor>#maxDexBonus

- Armor.isMetal
+ Armor.armorClass
+ Armor.scalesWithDex
+ Armor.maxDexBonus


Additions

Classes

Added the Artificer class
Click here for more details on the class



v2.0.0

Class Changes

E6 Module Conversion

Updated the code base to use ES6 modules.
This means you can no longer use require(), you must use import instead.

- const NPC = require("dnd-npc")
+ import NPC from "dnd-npc"


Module Export

The module itself is now the NPC class.
As such you no longer have to use a dot operator to get to the npc class.

- const npc = new dnd.npc()
+ const npc = new NPC()


#raceType()

#raceType() was changed to #setRace()
Support was also dropped for using an object or an array to set the race, instead favoring 2 strings.

- npc.raceType({ raceType: "Warforged", subRace: "Juggernaut" })
+ npc.setRace("Warforged", "Juggernaut")


#roleType()

#roleType() was changed to #setClass()
Support was also dropped for using an object or an array to set the role, instead favoring a single string.

- npc.roleType({ roleType: "Fighter" })
+ npc.setClass("Fighter")


#raceType

Made #raceType a private property, meaning you can no longer access it directly.
Instead you must use #getRace()

- npc.raceType
+ npc.getRace()


#roleType

Made #roleType a private property, meaning you can no longer access it directly.
Instead you must use #getClass()

- npc.roleType
+ npc.getClass()


#generate()

#generate() is now an asynchronous method.
As such it returns a promise instead of an object - Use await to resolve the promise.

- const npc = new NPC()
- const character = npc.generate()
+ const npc = new NPC()
+ const character = await npc.generate()


Character Object Changes

<character>#role

<character>#role role was changed back to <character>#class

- character.role
+ character.class


<character>#class#stats#<stat>

Each stat is no longer a singular number, but instead an object that contains the stat total & the profficancy bonus granted by that total

- character.class.stats.strength = 18
+ character.class.stats.strength = { total: 18, prof: 4 }


<character>#inventory#weapon

damageAmount was changed to damage
vDamage was changed to versatileDamage
allowShield was changed to allowsShield

- character.inventory.weapon.damageAmount
+ character.inventory.weapon.damage
- character.inventory.weapon.vDamage
+ character.inventory.weapon.versatileDamage
- character.inventory.weapon.allowShield
+ character.inventory.weapon.allowsShield


<character>#inventory#armor

strength was changed to strengthReq
metal was changed to isMetal
stealth was changed to isStealthy

- character.inventory.armor.strength
+ character.inventory.armor.strengthReq
- character.inventory.armor.metal
+ character.inventory.armor.isMetal
- character.inventory.armor.stealth
+ character.inventory.armor.isStealthy



v1.1.5

Changes

<NPC>#class

<NPC>#class was changed to <NPC>#role for better code consistency.

- npc.class
+ npc.role


Additions

Races

Added new race and sub-race types.


For a full list of available races, click here


<NPC>#character#age

Added NPC age.
This is based on each race and their lifespans.
TypeOf: Number


<NPC>#character#background

Added NPC background.
Based on the role & race to give somewhat logical backgrounds.
TypeOf: String


<NPC>#character#level

Added NPC level.
This will always be level 1.
TypeOf: Number



v1.1.0

Changes

NPC Constructor

Changed how the NPC Constructor is called.
This is so in the future more classes can be added for various things, such as generating monsters.

  const dnd = require('dnd-npc');
- const npc = new dnd({ ..options }).generate();
+ const npc = new dnd.npc({ ..options }).generate();


<NPC>#race#small

race#small was removed in favor of race#size
This is a string that contains the size of the npc. (Small, Medium, Large etc)
TypeOf: String

- npc.race.small
+ npc.race.size


Additions

<NPC>#character#alignment

Added NPC alignment. This is generated based on race and class chosen.
(No chaotic evil Paladins, though technically not against the rules of D&D 5e)
TypeOf: String



v1.0.0

- Initial Release