Anvil
Anvil.Services Namespace Reference

Classes

class  ChatService
 
class  DevastatingCriticalData
 
class  DialogService
 
class  EncodingService
 Manages string conversion for NWN.Core, NWN.Native and the StringHelper utility class. More...
 
class  EnforceLegalCharacterService
 
class  EventService
 
class  FeedbackService
 Allows combat log, feedback and journal update messages to be hidden globally or per player. More...
 
class  FunctionHook
 
class  HomeStorage
 Full directory paths for the anvil home directory. More...
 
class  HookOrder
 
class  HookService
 An advanced service for hooking native NWN functions. More...
 
interface  IInitializable
 Interface that is invoked after all services have been initialised. More...
 
interface  ILateDisposable
 Interface that is invoked after the server has been shutdown. Not called during hot reloads. More...
 
class  InjectAttribute
 Indicates a property as a service dependency to be injected. More...
 
class  InjectionService
 
interface  IScriptDispatcher
 Implement in a service to add a custom handler for event scripts. More...
 
interface  IServiceManager
 The interface that manages all core, anvil and plugin services.
Advanced: implement in your own class and specify in AnvilCore.Init(System.IntPtr,int,IServiceManager) to implement your own service manager. More...
 
interface  ITwoDimArray
 Implement this interface to use the class as a deserialization target for TwoDimArrayFactory.Get2DA<T>. More...
 
interface  IUpdateable
 Implement this interface in your service to get a callback each server loop. More...
 
struct  MaxRangedAttackDistanceOverride
 
class  NativeFunctionAttribute
 
class  ObjectStorage
 
class  ObjectStorageService
 
struct  ObjectStorageValue
 
class  OnELCCustomCheck
 
class  OnELCFeatValidationFailure
 
class  OnELCItemValidationFailure
 
class  OnELCLevelValidationFailure
 
class  OnELCSkillValidationFailure
 
class  OnELCSpellValidationFailure
 
class  OnELCValidationBefore
 
class  OnELCValidationFailure
 
class  OnELCValidationSuccess
 
class  PlayerNameOverride
 
class  PlayerNameOverrideService
 
class  PluginStorageService
 Manages plugin data stored in the Anvil home directory.
Use this service to get a path for reading and writing configs or data for your plugin. More...
 
class  ResourceManager
 
class  ScheduledTask
 
class  SchedulerService
 A service for scheduling tasks to run with a timed delay and/or repeat with a regular interval. More...
 
class  ScriptCallbackHandle
 A handle for a native NSS script callback. More...
 
class  ScriptHandleFactory
 A service for registering C# functions as script handlers dynamically. More...
 
class  ScriptHandlerAttribute
 Indicates that the method in the service should be used to handle all NWScript calls to the specified ScriptName. More...
 
class  ServiceBindingAttribute
 The main attribute used to define new services and run them.
Each class flagged with a ServiceBindingAttribute will be automatically constructed on startup, and any services specified in the constructor will be injected as dependencies. More...
 
class  ServiceBindingOptionsAttribute
 Additional service binding options. More...
 
class  TargetingData
 Configuration options for the target helper. See TargetModeSettings.TargetingData, NwPlayer.SetSpellTargetingData. More...
 
class  TargetModeSettings
 Configuration options for target mode. See NwPlayer.EnterTargetMode, NwPlayer.TryEnterTargetMode. More...
 
class  TwoDimArrayFactory
 Creates a deserialized 2da structure using a ITwoDimArray converter. More...
 
class  WeaponService
 

Enumerations

enum class  BindingPriority : short {
  Highest = short.MinValue ,
  VeryHigh = -30000 ,
  High = -20000 ,
  AboveNormal = -10000 ,
  Normal = 0 ,
  BelowNormal = 10000 ,
  Low = 20000 ,
  VeryLow = 30000 ,
  Lowest = short.MaxValue
}
 
enum class  ChatChannel : byte {
  PlayerTalk = NWN.Native.API.ChatChannel.PlayerTalk ,
  PlayerShout = NWN.Native.API.ChatChannel.PlayerShout ,
  PlayerWhisper = NWN.Native.API.ChatChannel.PlayerWhisper ,
  PlayerTell = NWN.Native.API.ChatChannel.PlayerTell ,
  ServerMessage = NWN.Native.API.ChatChannel.ServerMessage ,
  PlayerParty = NWN.Native.API.ChatChannel.PlayerParty ,
  PlayerDm = NWN.Native.API.ChatChannel.PlayerDm ,
  DmTalk = NWN.Native.API.ChatChannel.DmTalk ,
  DmShout = NWN.Native.API.ChatChannel.DmShout ,
  DmWhisper = NWN.Native.API.ChatChannel.DmWhisper ,
  DmTell = NWN.Native.API.ChatChannel.DmTell ,
  DmParty = NWN.Native.API.ChatChannel.DmParty ,
  DmDm = NWN.Native.API.ChatChannel.DmDm
}
 
enum class  CombatLogMessage {
  SimpleAdjective = 1 ,
  SimpleDamage = 2 ,
  ComplexDamage = 3 ,
  ComplexDeath = 4 ,
  ComplexAttack = 5 ,
  SpecialAttack = 6 ,
  SavingThrow = 7 ,
  CastSpell = 8 ,
  UseSkill = 9 ,
  SpellResistance = 10 ,
  Feedback = 11 ,
  Counterspell = 12 ,
  Touchattack = 13 ,
  Initiative = 14 ,
  DispelMagic = 15 ,
  Polymorph = 17 ,
  Feedbackstring = 18 ,
  Vibrate = 19 ,
  Unlockachievement = 20
}
 
enum class  DialogState {
  Invalid ,
  Start ,
  SendEntry ,
  SendReplies ,
  HandleReply
}
 
enum class  EventCallbackType {
  Before ,
  After
}
 
enum class  FeedbackMessage {
  SkillCantUse = 0 ,
  SkillCantUseTimer = 1 ,
  SkillAnimalEmpathyValidTargets = 2 ,
  SkillTauntValidTargets = 3 ,
  SkillTauntTargetImmune = 223 ,
  SkillPickpocketStoleItem = 4 ,
  SkillPickpocketStoleGold = 5 ,
  SkillPickpocketAttemptingToSteal = 46 ,
  SkillPickpocketAttemptDetected = 150 ,
  SkillPickpocketStoleItemTarget = 47 ,
  SkillPickpocketStoleGoldTarget = 48 ,
  SkillPickpocketTargetBroke = 57 ,
  SkillHealTargetNotDiseasedPoisoned = 55 ,
  SkillHealValidTargets = 56 ,
  SkillStealthInCombat = 60 ,
  TargetUnaware = 6 ,
  ActionNotPossibleStatus = 7 ,
  ActionNotPossiblePvp = 187 ,
  ActionCantReachTarget = 218 ,
  ActionNoLoot = 247 ,
  WeightTooEncumberedToRun = 8 ,
  WeightTooEncumberedWalkSlow = 9 ,
  WeightTooEncumberedCantPickup = 10 ,
  StatsLevelUp = 11 ,
  InventoryFull = 12 ,
  ContainerFull = 212 ,
  TrapTriggered = 82 ,
  DamageHealed = 151 ,
  ExperienceGained = 182 ,
  ExperienceLost = 183 ,
  JournalUpdated = 184 ,
  BarterCancelled = 185 ,
  DetectModeActivated = 83 ,
  DetectModeDeactivated = 84 ,
  StealthModeActivated = 85 ,
  StealthModeDeactivated = 86 ,
  ParryModeActivated = 87 ,
  ParryModeDeactivated = 88 ,
  PowerAttackModeActivated = 89 ,
  PowerAttackModeDeactivated = 90 ,
  ImprovedPowerAttackModeActivated = 91 ,
  ImprovedPowerAttackModeDeactivated = 92 ,
  RapidShotModeActivated = 166 ,
  RapidShotModeDeactivated = 167 ,
  FlurryOfBlowsModeActivated = 168 ,
  FlurryOfBlowsModeDeactivated = 169 ,
  ExpertiseModeActivated = 227 ,
  ExpertiseModeDeactivated = 228 ,
  ImprovedExpertiseModeActivated = 229 ,
  ImprovedExpertiseModeDeactivated = 230 ,
  DefensiveCastModeActivated = 231 ,
  DefensiveCastModeDeactivated = 232 ,
  ModeCannotUseWeapons = 188 ,
  DirtyFightingModeActivated = 237 ,
  DirtyFightingModeDeactivated = 238 ,
  DefensiveStanceModeActivated = 252 ,
  DefensiveStanceModeDeactivated = 253 ,
  EquipSkillSpellModifiers = 71 ,
  EquipUnidentified = 76 ,
  EquipMonkAbilities = 77 ,
  EquipInsufficientLevel = 98 ,
  EquipProficiencies = 119 ,
  EquipWeaponTooLarge = 120 ,
  EquipWeaponTooSmall = 260 ,
  EquipOneHandedWeapon = 121 ,
  EquipTwoHandedWeapon = 122 ,
  EquipWeaponSwappedOut = 123 ,
  EquipOneChainWeapon = 124 ,
  EquipNaturalAcNoStack = 189 ,
  EquipArmourAcNoStack = 190 ,
  EquipShieldAcNoStack = 191 ,
  EquipDeflectionAcNoStack = 192 ,
  EquipNoArmorCombat = 193 ,
  EquipRangerAbilities = 200 ,
  EquipAlignment = 207 ,
  EquipClass = 208 ,
  EquipRace = 209 ,
  UnequipNoArmorCombat = 194 ,
  ObjectLocked = 13 ,
  ObjectNotLocked = 14 ,
  ObjectSpecialKey = 15 ,
  ObjectUsedKey = 16 ,
  RestExcitedCantRest = 17 ,
  RestBeginningRest = 18 ,
  RestFinishedRest = 19 ,
  RestCancelRest = 20 ,
  RestNotAllowedInArea = 54 ,
  RestNotAllowedByPossessedFamiliar = 153 ,
  RestNotAllowedEnemies = 186 ,
  RestCantUnderThisEffect = 213 ,
  CastLostTarget = 21 ,
  CastCantCast = 22 ,
  CastCounterspellTargetLostTarget = 52 ,
  CastArcaneSpellFailure = 61 ,
  CastCounterspellTargetArcaneSpellFailure = 118 ,
  CastEntangleConcentrationFailure = 65 ,
  CastCounterspellTargetEntangleConcentrationFailure = 147 ,
  CastSpellInterrupted = 72 ,
  CastEffectSpellFailure = 236 ,
  CastCantCastWhilePolymorphed = 107 ,
  CastUseHands = 210 ,
  CastUseMouth = 211 ,
  CastDefensiveCastConcentrationFailure = 233 ,
  CastDefensiveCastConcentrationSuccess = 240 ,
  UseItemCantUse = 23 ,
  ConversationTooFar = 58 ,
  ConversationBusy = 59 ,
  ConversationInCombat = 152 ,
  CharacterInTransit = 74 ,
  CharacterOutTransit = 75 ,
  UseItemNotEquipped = 244 ,
  DropItemCantDrop = 245 ,
  DropItemCantGive = 246 ,
  ClientServerSpellMismatch = 259 ,
  CombatRunningOutOfAmmo = 24 ,
  CombatOutOfAmmo = 25 ,
  CombatHenchmanOutOfAmmo = 241 ,
  CombatDamageImmunity = 62 ,
  CombatSpellImmunity = 68 ,
  CombatDamageResistance = 63 ,
  CombatDamageResistanceRemaining = 66 ,
  CombatDamageReduction = 64 ,
  CombatDamageReductionRemaining = 67 ,
  CombatSpellLevelAbsorption = 69 ,
  CombatSpellLevelAbsorptionRemaining = 70 ,
  CombatWeaponNotEffective = 117 ,
  CombatEpicDodgeAttackEvaded = 234 ,
  CombatMassiveDamage = 235 ,
  CombatSavedVsMassiveDamage = 254 ,
  CombatSavedVsDevastatingCritical = 257 ,
  FeatSapValidTargets = 26 ,
  FeatKnockdownValidTargets = 27 ,
  FeatImprovedKnockdownValidTargets = 28 ,
  FeatCalledShotNoLegs = 29 ,
  FeatCalledShotNoArms = 30 ,
  FeatSmiteGoodTargetNotGood = 239 ,
  FeatSmiteEvilTargetNotEvil = 53 ,
  FeatQuiveringPalmHigherLevel = 73 ,
  FeatKeenSenseDetect = 195 ,
  FeatUseUnarmed = 198 ,
  FeatUses = 199 ,
  FeatUseWeaponOfChoice = 243 ,
  PartyNewLeader = 31 ,
  PartyMemberKicked = 32 ,
  PartyKickedYou = 33 ,
  PartyAlreadyConsidering = 34 ,
  PartyAlreadyInvolved = 35 ,
  PartySentInvitation = 36 ,
  PartyReceivedInvitation = 37 ,
  PartyJoined = 38 ,
  PartyInvitationIgnored = 39 ,
  PartyYouIgnoredInvitation = 40 ,
  PartyInvitationRejected = 41 ,
  PartyYouRejectedInvitation = 42 ,
  PartyInvitationExpired = 43 ,
  PartyLeftParty = 44 ,
  PartyYouLeft = 45 ,
  PartyHenchmanLimit = 49 ,
  PartyCannotLeaveTheOneParty = 196 ,
  PartyCannotKickFromTheOneParty = 197 ,
  PartyYouInvitedNonSingleton = 202 ,
  PvpReactionDislikesYou = 203 ,
  ItemReceived = 50 ,
  ItemLost = 51 ,
  ItemEjected = 96 ,
  ItemUseUnidentified = 97 ,
  ItemGoldGained = 148 ,
  ItemGoldLost = 149 ,
  LearnScrollNotScroll = 78 ,
  LearnScrollCantLearnClass = 79 ,
  LearnScrollCantLearnLevel = 80 ,
  LearnScrollCantLearnAbility = 81 ,
  LearnScrollCantLearnOpposition = 219 ,
  LearnScrollCantLearnPossess = 220 ,
  LearnScrollCantLearnKnown = 221 ,
  LearnScrollCantLearnDivine = 224 ,
  LearnScrollSuccess = 222 ,
  FloatyTextStrref = 93 ,
  FloatyTextString = 94 ,
  CannotSellPlotItem = 99 ,
  CannotSellContainer = 100 ,
  CannotSellItem = 101 ,
  NotEnoughGold = 102 ,
  TransactionSucceeded = 103 ,
  PriceTooHigh = 248 ,
  StoreNotEnoughGold = 249 ,
  CannotSellStolenItem = 250 ,
  CannotSellRestrictedItem = 251 ,
  PortalTimedOut = 104 ,
  PortalInvalid = 105 ,
  ChatTellPlayerNotFound = 106 ,
  AlignmentShift = 108 ,
  AlignmentPartyShift = 111 ,
  AlignmentChange = 109 ,
  AlignmentRestrictedByClassLost = 110 ,
  AlignmentRestrictedByClassGain = 115 ,
  AlignmentRestrictedWarningLoss = 116 ,
  AlignmentRestrictedWarningGain = 112 ,
  AlignmentEpitomeGained = 113 ,
  AlignmentEpitomeLost = 114 ,
  ImmunityDisease = 125 ,
  ImmunityCriticalHit = 126 ,
  ImmunityDeathMagic = 127 ,
  ImmunityFear = 128 ,
  ImmunityKnockdown = 129 ,
  ImmunityParalysis = 130 ,
  ImmunityNegativeLevel = 131 ,
  ImmunityMindSpells = 132 ,
  ImmunityPoison = 133 ,
  ImmunitySneakAttack = 134 ,
  ImmunitySleep = 135 ,
  ImmunityDaze = 136 ,
  ImmunityConfusion = 137 ,
  ImmunityStun = 138 ,
  ImmunityBlindness = 139 ,
  ImmunityDeafness = 140 ,
  ImmunityCurse = 141 ,
  ImmunityCharm = 142 ,
  ImmunityDominate = 143 ,
  ImmunityEntangle = 144 ,
  ImmunitySilence = 145 ,
  ImmunitySlow = 146 ,
  AssociateSummoned = 154 ,
  AssociateUnsummoning = 155 ,
  AssociateUnsummoningBecauseRest = 156 ,
  AssociateUnsummoningBecauseDied = 157 ,
  AssociateDominated = 158 ,
  AssociateDominationEnded = 159 ,
  AssociatePossessedCannotRecoverTrap = 170 ,
  AssociatePossessedCannotBarter = 171 ,
  AssociatePossessedCannotEquip = 172 ,
  AssociatePossessedCannotRepositoryMove = 173 ,
  AssociatePossessedCannotPickUp = 174 ,
  AssociatePossessedCannotDrop = 175 ,
  AssociatePossessedCannotUnequip = 176 ,
  AssociatePossessedCannotRest = 177 ,
  AssociatePossessedCannotDialogue = 178 ,
  AssociatePossessedCannotGiveItem = 179 ,
  AssociatePossessedCannotTakeItem = 180 ,
  AssociatePossessedCannotUseContainer = 181 ,
  ScriptError = 160 ,
  ActionListOverflow = 161 ,
  EffectListOverflow = 162 ,
  AiUpdateTimeOverflow = 163 ,
  ActionListWipeOverflow = 164 ,
  EffectListWipeOverflow = 165 ,
  SendMessageToPc = 204 ,
  SendMessageToPcStrref = 242 ,
  GuiOnlyPartyLeaderMayClick = 201 ,
  Paused = 205 ,
  Unpaused = 206 ,
  RestYouMayNotAtThisTime = 214 ,
  GuiCharExportRequestSent = 215 ,
  GuiCharExportedSuccessfully = 216 ,
  GuiErrorCharNotExported = 217 ,
  CameraBg = 255 ,
  CameraEq = 256 ,
  CameraChaseCam = 258 ,
  Saving = 225 ,
  SaveComplete = 226
}
 
enum class  FilterMode {
  Blacklist ,
  Whitelist
}
 
enum class  InjectPropertyTypes {
  InstanceOnly ,
  StaticOnly
}
 
enum class  Language {
  English = 0 ,
  French = 1 ,
  German = 2 ,
  Italian = 3 ,
  Spanish = 4 ,
  Polish = 5 ,
  Korean = 128 ,
  ChineseTraditional = 129 ,
  ChineseSimplified = 130 ,
  Japanese = 131
}
 
enum class  LogMode {
  Default = 0 ,
  Off = 0 ,
  Duplicate ,
  Redirect
}
 
enum class  NodeType {
  Invalid = -1 ,
  StartingNode = 0 ,
  EntryNode = 1 ,
  ReplyNode = 2
}
 
enum class  OverrideNameType {
  Original = 0 ,
  Character = 1 ,
  Player = 2
}
 
enum class  ScriptHandleResult {
  NotHandled = ~0 ,
  Handled = 0 ,
  False = 0 ,
  True = 1
}
 
enum class  ScriptType {
  Other = 0 ,
  StartingConditional = 1 ,
  ActionTaken = 2
}
 
enum class  ValidationFailureSubType {
  None = 0 ,
  ServerLevelRestriction ,
  LevelHack ,
  ColoredName ,
  UnidentifiedEquippedItem ,
  MinEquipLevel ,
  NonPCCharacter ,
  DMCharacter ,
  NonPlayerRace ,
  NonPlayerClass ,
  ClassLevelRestriction ,
  PrestigeClassRequirements ,
  ClassAlignmentRestriction ,
  StartingAbilityValueMax ,
  AbilityPointBuySystemCalculation ,
  ClassSpellcasterInvalidPrimaryStat ,
  EpicLevelFlag ,
  TooManyHitPoints ,
  UnusableSkill ,
  NotEnoughSkillPoints ,
  InvalidNumRanksInClassSkill ,
  InvalidNumRanksInNonClassSkill ,
  InvalidNumRemainingSkillPoints ,
  InvalidFeat ,
  FeatRequiredSpellLevelNotMet ,
  FeatRequiredBaseAttackBonusNotMet ,
  FeatRequiredAbilityValueNotMet ,
  FeatRequiredSkillNotMet ,
  FeatRequiredFeatNotMet ,
  TooManyFeatsThisLevel ,
  FeatNotAvailableToClass ,
  FeatIsNormalFeatOnly ,
  FeatIsBonusFeatOnly ,
  SpellInvalidSpellGainWizard ,
  SpellInvalidSpellGainBardSorcerer ,
  SpellInvalidSpellGainOtherClasses ,
  InvalidSpell ,
  SpellInvalidSpellLevel ,
  SpellMinimumAbilityBardSorcererUnused ,
  SpellMinimumAbilityWizardUnused ,
  SpellMinimumAbility ,
  SpellRestrictedSpellSchool ,
  SpellAlreadyKnown ,
  SpellWizardExceedsNumSpellsToAdd ,
  IllegalRemovedSpell ,
  RemovedNotKnownSpell ,
  InvalidNumSpells ,
  SpellListComparison ,
  SkillListComparison ,
  FeatListComparison ,
  MiscSavingThrow ,
  NumFeatComparison ,
  InvalidClass ,
  NumMulticlass
}
 
enum class  ValidationFailureType {
  None = 0 ,
  Character ,
  Item ,
  Skill ,
  Feat ,
  Spell ,
  Custom
}
 
enum class  VisibilityMode {
  Default = 0 ,
  Visible ,
  Hidden ,
  DMOnly ,
  AlwaysVisible ,
  AlwaysVisibleDMOnly
}
 

Functions

delegate string TwoDimEntry (string column)
 

Enumeration Type Documentation

◆ CombatLogMessage

Enumerator
SimpleAdjective 

<charname> : <adjective described by strref>.

SimpleDamage 

<charname> damaged : <amount>.

ComplexDamage 

<charname> damages <charname> : <amount>.

ComplexDeath 

<charname> killed <charname>.

ComplexAttack 

<charname> attacks <charname> : hit / miss / parried : (<attack roll> + <attack mod> = <modified total>).

SpecialAttack 

<charname> attempts <special attack> on <charname> : success / failure : (<attack roll> + <attack mod> = <modified roll>).

SavingThrow 

<charname> : <saving throw type> : success / failure : (<saving throw roll> + <saving throw modifier> = <modified total>).

CastSpell 

<charname> casts <spell name> : Spellcraft check failure / success.

UseSkill 

<charname> : <skill name> : success / failure : (<skill roll> + <skill modifier> = <modified total> vs <DC> ).

SpellResistance 

<charname> : Spell Resistance <SR value> : success / failure.

Feedback 

Feedback: Reason skill/feat/ability failed.
NOTE: This hides ALL feedback messages, to hide individual messages use NWNX_Feedback_SetFeedbackMessageHidden().

Counterspell 

<charname> casts <spell name> : spell countered by : <charname> casting <spell name>.

Touchattack 

<charname> attempts <melee/ranged touch attack> on <charname> : hit/miss/critical : (<attack roll> + <attack mod> = <modified roll>).

Initiative 

<charname> : Initiative Roll : <total> : (<roll> + <modifier> = <total>).

DispelMagic 

Dispel Magic : <charname> : <spell name>, <spell name>, <spell name>...

Polymorph 

Unused.

Feedbackstring 

Unused.

Vibrate 

Unused.

Unlockachievement 

Unused.