Anvil
Anvil.API.NwClass Class Reference

A creature/character class definition. More...

Public Member Functions

byte GetRecommendedAbilityScore (Ability ability)
 Gets the ability score for the specified ability that is shown during character creation. More...
 
IReadOnlyList< byte > GetSavingThrowTable (SavingThrow savingThrow)
 Gets a list containing the saving throw progression granted by this class.
The list is 0-indexed, with level 1 starting at element 0. More...
 

Static Public Member Functions

static ? NwClass FromClassId (int classId)
 Resolves a NwClass from a class id. More...
 
static ? NwClass FromClassType (ClassType classType)
 Resolves a NwClass from a Anvil.API.ClassType. More...
 
static implicit operator NwClass? (ClassType classType)
 

Properties

IReadOnlyList< ClassAbilityGainListAbilityGainTable [get]
 Gets a list containing the ability score progression granted by this class (e.g. Dragon Disciple).
The list is 0-indexed, with level 1 starting at element 0. More...
 
int ArcaneSpellUsePerDayLevel [get]
 If positive, this specifies the number of levels in this class that together add one level to an arcane class when determining the spell slots based on class level. More...
 
IReadOnlyList< byte > AttackBonusTable [get]
 Gets a list containing the base attack bonus progression for this class.
The list is 0-indexed, with level 1 starting at element 0. More...
 
IReadOnlyList< byte > BonusFeatsTable [get]
 Gets a list containing the bonus feat progression for this class (e.g. Fighters).
The list is 0-indexed, with level 1 starting at element 0. More...
 
bool CanCastSpontaneously [get]
 Gets if this class can spontaneously cast certain domain spells (e.g. Cleric). More...
 
bool CanLearnFromScrolls [get]
 Gets if this class can learn spells from reading scrolls (e.g. Wizards) More...
 
float CasterLevelMultiplier [get]
 Gets the Caster Level multiplier for this class. More...
 
ClassType ClassType [get]
 Gets the associated Id for this class. More...
 
StrRef Description [get]
 Gets the description name of this class. More...
 
int DivineSpellUsePerDayLevel [get]
 If positive, this specifies the number of levels in this class that together add one level to a divine class when determining the spell slots based on class level. More...
 
IReadOnlyList< byte > EffectiveCRTable [get]
 Gets a list containing the CR progression for this class.
This value is used for purposes of encounter challenge rating calculations.
The list is 0-indexed, with level 1 starting at element 0. More...
 
byte EpicLevel [get]
 Gets the maximum amount of levels that can be taken into this class pre-epic (before level 21). More...
 
IReadOnlyList< ClassFeatFeats [get]
 Gets a list of the feats associated with this class. More...
 
bool HasArcaneSpellFailure [get]
 Gets if this class is subject to the effects of arcane spell failure. More...
 
bool HasDomains [get]
 Gets if this class can choose divine domains as a part of their class (e.g. Clerics) More...
 
bool HasMemorizedSpells [get]
 Gets if this class gains spells by memorization (e.g. Wizards) More...
 
bool HasMulticlassPenalty [get]
 Gets if this class counts towards the muliclass penalty for experience. More...
 
bool HasSpecialization [get]
 Gets if this class can choose a spell specialization/school as a part of their class (e.g. Wizards) More...
 
byte HitDie [get]
 Gets what size of die is used to roll hit points on level-up. (4, 6, 8, 10, 12, etc.) More...
 
string? IconResRef [get]
 Gets the ResRef specifying the icon displayed in the game for this class More...
 
byte Id [get]
 Gets the id of this class. More...
 
bool InvertRestrictions [get]
 Gets if the alignments specified in Restrictions and RestrictionTypes are the only alignments allowed to gain levels in this class (true), rather than being the alignments prohibited from gaining them (false). More...
 
bool IsArcaneCaster [get]
 Gets if this class is considered an arcane caster. False indicates that the caster is considered a divine caster. More...
 
bool IsPlayerClass [get]
 Gets if this class may be selected by a player. More...
 
bool IsSpellbookRestricted [get]
 Gets if this class is restricted to selecting spells from a spell book (e.g. Wizards) More...
 
bool IsSpellCaster [get]
 Gets if this class is a s More...
 
byte MaxLevel [get]
 Gets the maximum amount of levels that can be taken into this class.
0 means there is no limit. More...
 
byte MinAssociateLevel [get]
 Gets the minimum level required to receive the associate for the class. More...
 
int MinCastingLevel [get]
 Gets the minimum level required before this class may cast spells. (e.g. Paladin/Ranger) More...
 
StrRef Name [get]
 Gets the name of this class as shown on the character sheet. More...
 
StrRef NameLower [get]
 Gets the name of this class, in lowercase. More...
 
StrRef NamePlural [get]
 Gets the name of this class, in plural form. More...
 
IReadOnlyList< sbyte > NaturalACGainTable [get]
 Gets a list containing the natural AC progression granted by this class (e.g. Pale Masters).
The list is 0-indexed, with level 1 starting at element 0. More...
 
uint PackageIndex [get]
 Gets the associated packages.2da row index for this class. More...
 
TwoDimArray< ClassPreReqTableEntry >? PreReqTable [get]
 Gets the 2da table defining the prerequisites for this class (making this class a prestige class). More...
 
Ability PrimaryAbility [get]
 Gets the primary ability score for this class.
Not used for spellcasting. See SpellCastingAbility. More...
 
ClassRestrictions Restrictions [get]
 Gets the alignment restrictions that must be met to take this class.
This acts as a black/whitelist depending on RestrictionTypes and InvertRestrictions. More...
 
ClassRestrictionTypes RestrictionTypes [get]
 Gets the type of restrictions that Restrictions applies to. More...
 
byte SkillPointBase [get]
 Gets the number of skill points gained per level from this class before modifiers. More...
 
IReadOnlyList< ClassSkillSkills [get]
 Gets the list of skills available to this class. More...
 
Ability SpellCastingAbility [get]
 Gets the ability score used for spell casting - save DCs, extra spell slots. More...
 
IReadOnlyList< ClassSpellGainListSpellGainTable [get]
 Gets a list containing the spell slot progression for this class.
The list is 0-indexed, with level 1 starting at element 0. More...
 
IReadOnlyList< ClassSpellGainListSpellKnownTable [get]
 Gets a list containing the known spell progression for this class.
The list is 0-indexed, with level 1 starting at element 0. More...
 
string? SpellTableColumn [get]
 Gets the name of the column that this class references in spells.2da More...
 

Detailed Description

A creature/character class definition.

Member Function Documentation

◆ FromClassId()

static ? NwClass Anvil.API.NwClass.FromClassId ( int  classId)
inlinestatic

Resolves a NwClass from a class id.

Parameters
classIdThe id of the class to resolve.
Returns
The associated NwClass instance. Null if the class id is invalid.

◆ FromClassType()

static ? NwClass Anvil.API.NwClass.FromClassType ( ClassType  classType)
inlinestatic

Resolves a NwClass from a Anvil.API.ClassType.

Parameters
classTypeThe class type to resolve.
Returns
The associated NwClass instance. Null if the class type is invalid.

◆ GetRecommendedAbilityScore()

byte Anvil.API.NwClass.GetRecommendedAbilityScore ( Ability  ability)
inline

Gets the ability score for the specified ability that is shown during character creation.

Parameters
abilityThe ability score to query.
Returns
The ability score recommended during character creation.

◆ GetSavingThrowTable()

IReadOnlyList<byte> Anvil.API.NwClass.GetSavingThrowTable ( SavingThrow  savingThrow)
inline

Gets a list containing the saving throw progression granted by this class.
The list is 0-indexed, with level 1 starting at element 0.

Parameters
savingThrowThe saving throw to query. SavingThrow.All is not supported.

byte reflexSaveLevel15 = nwClass.GetSavingThrowTable(SavingThrow.Reflex)[14];

Property Documentation

◆ AbilityGainTable

IReadOnlyList<ClassAbilityGainList> Anvil.API.NwClass.AbilityGainTable
get

Gets a list containing the ability score progression granted by this class (e.g. Dragon Disciple).
The list is 0-indexed, with level 1 starting at element 0.

◆ ArcaneSpellUsePerDayLevel

int Anvil.API.NwClass.ArcaneSpellUsePerDayLevel
get

If positive, this specifies the number of levels in this class that together add one level to an arcane class when determining the spell slots based on class level.

◆ AttackBonusTable

IReadOnlyList<byte> Anvil.API.NwClass.AttackBonusTable
get

Gets a list containing the base attack bonus progression for this class.
The list is 0-indexed, with level 1 starting at element 0.

byte babLevel15 = nwClass.AttackBonusTable[14];

◆ BonusFeatsTable

IReadOnlyList<byte> Anvil.API.NwClass.BonusFeatsTable
get

Gets a list containing the bonus feat progression for this class (e.g. Fighters).
The list is 0-indexed, with level 1 starting at element 0.

◆ CanCastSpontaneously

bool Anvil.API.NwClass.CanCastSpontaneously
get

Gets if this class can spontaneously cast certain domain spells (e.g. Cleric).

◆ CanLearnFromScrolls

bool Anvil.API.NwClass.CanLearnFromScrolls
get

Gets if this class can learn spells from reading scrolls (e.g. Wizards)

◆ CasterLevelMultiplier

float Anvil.API.NwClass.CasterLevelMultiplier
get

Gets the Caster Level multiplier for this class.

◆ ClassType

ClassType Anvil.API.NwClass.ClassType
get

Gets the associated Id for this class.

◆ Description

StrRef Anvil.API.NwClass.Description
get

Gets the description name of this class.

◆ DivineSpellUsePerDayLevel

int Anvil.API.NwClass.DivineSpellUsePerDayLevel
get

If positive, this specifies the number of levels in this class that together add one level to a divine class when determining the spell slots based on class level.

◆ EffectiveCRTable

IReadOnlyList<byte> Anvil.API.NwClass.EffectiveCRTable
get

Gets a list containing the CR progression for this class.
This value is used for purposes of encounter challenge rating calculations.
The list is 0-indexed, with level 1 starting at element 0.

◆ EpicLevel

byte Anvil.API.NwClass.EpicLevel
get

Gets the maximum amount of levels that can be taken into this class pre-epic (before level 21).

◆ Feats

IReadOnlyList<ClassFeat> Anvil.API.NwClass.Feats
get

Gets a list of the feats associated with this class.

◆ HasArcaneSpellFailure

bool Anvil.API.NwClass.HasArcaneSpellFailure
get

Gets if this class is subject to the effects of arcane spell failure.

◆ HasDomains

bool Anvil.API.NwClass.HasDomains
get

Gets if this class can choose divine domains as a part of their class (e.g. Clerics)

◆ HasMemorizedSpells

bool Anvil.API.NwClass.HasMemorizedSpells
get

Gets if this class gains spells by memorization (e.g. Wizards)

◆ HasMulticlassPenalty

bool Anvil.API.NwClass.HasMulticlassPenalty
get

Gets if this class counts towards the muliclass penalty for experience.

◆ HasSpecialization

bool Anvil.API.NwClass.HasSpecialization
get

Gets if this class can choose a spell specialization/school as a part of their class (e.g. Wizards)

◆ HitDie

byte Anvil.API.NwClass.HitDie
get

Gets what size of die is used to roll hit points on level-up. (4, 6, 8, 10, 12, etc.)

◆ IconResRef

string? Anvil.API.NwClass.IconResRef
get

Gets the ResRef specifying the icon displayed in the game for this class

◆ Id

byte Anvil.API.NwClass.Id
get

Gets the id of this class.

◆ InvertRestrictions

bool Anvil.API.NwClass.InvertRestrictions
get

Gets if the alignments specified in Restrictions and RestrictionTypes are the only alignments allowed to gain levels in this class (true), rather than being the alignments prohibited from gaining them (false).

◆ IsArcaneCaster

bool Anvil.API.NwClass.IsArcaneCaster
get

Gets if this class is considered an arcane caster. False indicates that the caster is considered a divine caster.

◆ IsPlayerClass

bool Anvil.API.NwClass.IsPlayerClass
get

Gets if this class may be selected by a player.

◆ IsSpellbookRestricted

bool Anvil.API.NwClass.IsSpellbookRestricted
get

Gets if this class is restricted to selecting spells from a spell book (e.g. Wizards)

◆ IsSpellCaster

bool Anvil.API.NwClass.IsSpellCaster
get

Gets if this class is a s

◆ MaxLevel

byte Anvil.API.NwClass.MaxLevel
get

Gets the maximum amount of levels that can be taken into this class.
0 means there is no limit.

◆ MinAssociateLevel

byte Anvil.API.NwClass.MinAssociateLevel
get

Gets the minimum level required to receive the associate for the class.

◆ MinCastingLevel

int Anvil.API.NwClass.MinCastingLevel
get

Gets the minimum level required before this class may cast spells. (e.g. Paladin/Ranger)

◆ Name

StrRef Anvil.API.NwClass.Name
get

Gets the name of this class as shown on the character sheet.

◆ NameLower

StrRef Anvil.API.NwClass.NameLower
get

Gets the name of this class, in lowercase.

◆ NamePlural

StrRef Anvil.API.NwClass.NamePlural
get

Gets the name of this class, in plural form.

◆ NaturalACGainTable

IReadOnlyList<sbyte> Anvil.API.NwClass.NaturalACGainTable
get

Gets a list containing the natural AC progression granted by this class (e.g. Pale Masters).
The list is 0-indexed, with level 1 starting at element 0.

◆ PackageIndex

uint Anvil.API.NwClass.PackageIndex
get

Gets the associated packages.2da row index for this class.

◆ PreReqTable

TwoDimArray<ClassPreReqTableEntry>? Anvil.API.NwClass.PreReqTable
get

Gets the 2da table defining the prerequisites for this class (making this class a prestige class).

◆ PrimaryAbility

Ability Anvil.API.NwClass.PrimaryAbility
get

Gets the primary ability score for this class.
Not used for spellcasting. See SpellCastingAbility.

◆ Restrictions

ClassRestrictions Anvil.API.NwClass.Restrictions
get

Gets the alignment restrictions that must be met to take this class.
This acts as a black/whitelist depending on RestrictionTypes and InvertRestrictions.

◆ RestrictionTypes

ClassRestrictionTypes Anvil.API.NwClass.RestrictionTypes
get

Gets the type of restrictions that Restrictions applies to.

◆ SkillPointBase

byte Anvil.API.NwClass.SkillPointBase
get

Gets the number of skill points gained per level from this class before modifiers.

◆ Skills

IReadOnlyList<ClassSkill> Anvil.API.NwClass.Skills
get

Gets the list of skills available to this class.

◆ SpellCastingAbility

Ability Anvil.API.NwClass.SpellCastingAbility
get

Gets the ability score used for spell casting - save DCs, extra spell slots.

◆ SpellGainTable

IReadOnlyList<ClassSpellGainList> Anvil.API.NwClass.SpellGainTable
get

Gets a list containing the spell slot progression for this class.
The list is 0-indexed, with level 1 starting at element 0.

◆ SpellKnownTable

IReadOnlyList<ClassSpellGainList> Anvil.API.NwClass.SpellKnownTable
get

Gets a list containing the known spell progression for this class.
The list is 0-indexed, with level 1 starting at element 0.

◆ SpellTableColumn

string? Anvil.API.NwClass.SpellTableColumn
get

Gets the name of the column that this class references in spells.2da


The documentation for this class was generated from the following file: