|
unsafe void | AcquireItem (NwItem item, bool displayFeedback=true) |
|
async Task | ActionAttackTarget (NwGameObject target, bool passive=false) |
| Instructs this creature to start attacking the target using whichever weapon they currently have equipped. More...
|
|
async Task | ActionCastFakeSpellAt (NwSpell spell, Location location, ProjectilePathType pathType=ProjectilePathType.Default) |
| Begins the casting animation and spell fx for the specified spell, without any spell effects. More...
|
|
async Task | ActionCastFakeSpellAt (NwSpell spell, NwGameObject target, ProjectilePathType pathType=ProjectilePathType.Default) |
| Begins the casting animation and spell fx for the specified spell, without any spell effects. More...
|
|
async Task | ActionCounterspell (NwGameObject counterSpellTarget) |
| Intructs this creature to enter counterspell combat mode against the specified creature. More...
|
|
async Task | ActionEquipItem (NwItem item, InventorySlot slot) |
| Instructs this creature to equip the specified item into the given inventory slot.
Note: If the creature already has an item equipped in the slot specified, it will be unequipped automatically by the call to EquipItem, and dropped if the creature lacks inventory space.
In order for EquipItem to succeed the creature must be able to equip the item normally. This means that:
1) The item is in the creature's inventory.
2) The item must already be identified (if magical).
3) The creature has the level required to equip the item (if magical and ILR is on).
4) The creature possesses the required feats to equip the item (such as weapon proficiencies). More...
|
|
async Task | ActionEquipMostDamagingMelee (NwGameObject? verses=null, bool offhand=false) |
| Instructs this creature to equip its most damaging melee weapon. If no valid melee weapon is found, it will equip the most damaging ranged weapon. More...
|
|
async Task | ActionEquipMostDamagingRanged (NwGameObject? verses=null) |
| Instructs this creature to equip its most damaging ranged weapon. If no valid ranged weapon is found, it will equip the most damaging melee weapon. More...
|
|
async Task | ActionEquipMostEffectiveArmor () |
| Instructs this creature to equip the best armor in its inventory. More...
|
|
async Task | ActionForceFollowObject (NwGameObject target, float distance) |
| Forces this creature to follow the specified target until NwObject.ClearActionQueue is called. More...
|
|
async Task | ActionForceMoveTo (Location target, bool run=false, TimeSpan? timeOut=null) |
| Instructs this creature to walk/run to the specified target location. More...
|
|
async Task | ActionForceMoveTo (NwObject target, bool run=false, float range=1.0f, TimeSpan? timeOut=null) |
| Instructs this creature to walk/run to the specified target object. More...
|
|
async Task | ActionInteractObject (NwPlaceable placeable) |
| Instructs this creature to use the specified placeable. More...
|
|
Task | ActionLockObject (NwDoor door) |
| Instructs this creature to approach and lock the specified door. More...
|
|
Task | ActionLockObject (NwPlaceable placeable) |
| Instructs this creature to approach and lock the specified placeable. More...
|
|
async Task | ActionMoveAwayFrom (Location location, bool run, float range=40.0f) |
| Instructs this creature to move to a certain distance away from the specified location. More...
|
|
async Task | ActionMoveAwayFrom (NwObject target, bool run, float range=40.0f) |
| Instructs this creature to move a certain distance away from the specified target. More...
|
|
async Task | ActionMoveTo (Location target, bool run=false) |
| Instructs this creature to walk/run to the specified target location. More...
|
|
async Task | ActionMoveTo (NwObject target, bool run=false, float range=1.0f) |
| Instructs this creature to walk/run to the specified target object. More...
|
|
async Task | ActionPickUpItem (NwItem item) |
| Instructs this creature to walk over and pick up the specified item on the ground. More...
|
|
async Task | ActionPutDownItem (NwItem item) |
| Instructs this creature to begin placing down an item at its feet. More...
|
|
async Task | ActionRandomWalk () |
| The creature will generate a random location near its current location and pathfind to it. This repeats and never ends, which means it is necessary to call NwObject.ClearActionQueue in order to allow a creature to perform any other action once BeginRandomWalking has been called. More...
|
|
async Task | ActionRest (bool enemyLineOfSightCheck=false) |
| Instructs this creature to rest. More...
|
|
async Task | ActionSit (NwPlaceable sitPlaceable, bool alignToPlaceable=true) |
| Instructs the creature to sit in the specified placeable. More...
|
|
async Task | ActionUnequipItem (NwItem item) |
| Instructs this creature to unequip the specified item from whatever slot it is currently in. More...
|
|
Task | ActionUnlockObject (NwDoor door) |
| Instructs this creature to approach and unlock the specified door. More...
|
|
Task | ActionUnlockObject (NwPlaceable placeable) |
| Instructs this creature to approach and unlock the specified placeable. More...
|
|
async Task | ActionUseFeat (NwFeat feat, Location target, Subfeat subFeat=Subfeat.None) |
| Instructs this creature to use the specified feat at the target location. More...
|
|
async Task | ActionUseFeat (NwFeat feat, NwGameObject target, Subfeat subFeat=Subfeat.None) |
| Instructs this creature to use the specified feat on the target object. More...
|
|
async Task | ActionUseItem (NwItem item, ItemProperty itemProperty, Location location, bool decrementCharges=true, int subPropertyIndex=0) |
| Instructs this creature to use the specified item property of an item in their inventory. More...
|
|
async Task | ActionUseItem (NwItem item, ItemProperty itemProperty, NwGameObject gameObject, bool decrementCharges=true, int subPropertyIndex=0) |
| Instructs this creature to use the specified item property of an item in their inventory. More...
|
|
async Task | ActionUseSkill (NwSkill skill, NwGameObject target, SubSkill subSkill=SubSkill.None, NwItem? itemUsed=null) |
| Instructs this creature to attempt to use a skill on another object. More...
|
|
async Task | ActionUseTalent (Talent talent, Location target) |
| Uses the specified talent. More...
|
|
async Task | ActionUseTalent (Talent talent, NwGameObject target) |
| Uses the specified talent. More...
|
|
void | AddFeat (NwFeat feat) |
| Gives this creature the specified feat.
Consider using the AddFeat(NwFeat, int) overload to properly allocate the feat to a level. More...
|
|
void | AddFeat (NwFeat feat, int level) |
| Gives this creature the specified feat at a level.
Consider using the AddFeat(NwFeat, int) overload to properly allocate the feat to a level. More...
|
|
void | AddSpecialAbility (SpecialAbility ability) |
| Adds the specified ability to this creature. More...
|
|
void | AdjustPartyAlignment (Alignment alignment, int shift) |
| Adjusts the alignment of this creature and associated party members by the specified value.
Use the LawChaosValue and GoodEvilValue setters to only affect this creature. More...
|
|
void | BroadcastSkillRoll (int diceRoll, NwSkill skill, int modifier, int difficultyClass, bool take20, SkillResult result) |
| Causes this creature to broadcast feedback for an arbitrary skill roll (pre-calculated)
This causes a message to be posted in the combat log, and floaty skill text to appear above the character. More...
|
|
int | CalculateAbilityModifierFromScore (byte abilityScore) |
| Gets the ability modifier from the given ability score. More...
|
|
ResistSpellResult | CheckResistSpell (NwGameObject target) |
| Performs a spell resistance check between this creature, and the specified target object. More...
|
|
void | ClearDamageLevelOverride () |
| Clears any override that is set for the creature's damage level.
More...
|
|
void | ClearInitiativeModifier () |
| Clears the modifier that is set for the creature's initiative.
More...
|
|
override NwCreature | Clone (Location location, string? newTag=null, bool copyLocalState=true) |
| Creates a copy of this game object. More...
|
|
void | DecrementRemainingFeatUses (NwFeat feat, int amount=1) |
| Decrements the remaining number of uses of a particular feat for this creature by the specified amount.
You must have at least one feat use remaining to be able to decrement it.
Passive feats, and feats that can be used unlimited times per day, cannot be decremented or suppressed. More...
|
|
bool | DeserializeQuickbar (byte[] serialized) |
|
async Task | DoDoorAction (NwDoor door, DoorAction doorAction) |
| Instructs this creature to perform the specified action on a door. More...
|
|
async Task | DoPlaceableAction (NwPlaceable placeable, PlaceableAction placeableAction) |
| Instructs this creature to perform the specified action on a placeable. More...
|
|
bool | DoSkillCheck (NwSkill skill, int difficultyClass) |
| Returns true if 1d20 + skill rank is greater than, or equal to difficultyClass. More...
|
|
NwItem? | FindItemWithTag (string itemTag) |
| Get the item possessed by this creature with the tag itemTag. More...
|
|
void | ForceRest () |
| Instantly gives this creature the benefits of a rest (restored hitpoints, spells, feats, etc...). More...
|
|
int | GetAbilityModifier (Ability ability) |
| Gets this creature's ability modifier for the specified ability. More...
|
|
int | GetAbilityScore (Ability ability, bool baseOnly=false) |
| Gets the specified ability score from this creature. More...
|
|
bool | GetActionMode (ActionMode actionMode) |
| Gets if this creature is using the specified action mode. More...
|
|
int | GetArmorClassVersus (NwCreature creature) |
| Return the Armor Class this creature has against another creature More...
|
|
NwCreature? | GetAssociate (AssociateType associateType) |
| Gets the first associate of this creature with the matching associate type.
See Henchmen for getting a list of all henchmen associated with this creature. See Associates for getting a list of all creatures associated with this creature. More...
|
|
int | GetAttackBonus (bool isMelee=false, bool isTouchAttack=false, bool isOffHand=false, bool includeBaseAttackBonus=true) |
| Gets the creature's highest attack bonus based on its own stats.
AB vs. Type and +AB on Gauntlets are excluded. More...
|
|
int | GetBaseSavingThrow (SavingThrow savingThrow) |
| Gets this creature's base save value for the specified saving throw. More...
|
|
IEnumerable< NwDomain > | GetClassDomains (NwClass? nwClass=default) |
| Returns this creature's domains in the specified class. Unless custom content is used, only clerics have domains. More...
|
|
CreatureClassInfo? | GetClassInfo (NwClass? nwClass) |
| Gets the CreatureClassInfo associated with the specified class type. More...
|
|
int | GetCreatureBodyPart (CreaturePart creaturePart) |
| Gets the model number for the specified body part on the creature. More...
|
|
DamageLevelEntry? | GetDamageLevelOverride () |
| Gets the override that is set for the creature's damage level.
More...
|
|
int | GetFeatGainLevel (NwFeat feat) |
| Gets the level a feat was gained. More...
|
|
byte | GetFeatRemainingUses (NwFeat feat) |
| Gets the remaining uses available for the specified feat. More...
|
|
byte | GetFeatTotalUses (NwFeat feat) |
| Gets the max/total amount of times the specified feat can be used. More...
|
|
int? | GetInitiativeModifier () |
| Gets the modifier that is set for the creature's initiative.
More...
|
|
NwItem? | GetItemInSlot (InventorySlot slot) |
| Gets the item that is equipped in the specified inventory slot. More...
|
|
CreatureLevelInfo | GetLevelStats (int level) |
| Gets the level stat info for the specified level (feat, class, skills, etc.). More...
|
|
byte | GetPrePolymorphAbilityScore (Ability ability) |
| Gets the raw ability score a polymorphed creature had prior to polymorphing. More...
|
|
PlayerQuickBarButton | GetQuickBarButton (byte index) |
|
PlayerQuickBarButton[] | GetQuickBarButtons () |
|
byte | GetRawAbilityScore (Ability ability) |
| Gets the base (raw) ability score for the specified ability, without racial modfiers. More...
|
|
int | GetSavingThrow (SavingThrow savingThrow) |
| Gets the specified saving throw modifier for this creature. More...
|
|
int | GetSkillRank (NwSkill skill, bool ranksOnly=false) |
| Gets the number of ranks this creature has in the specified skill. More...
|
|
EquipmentSlots | GetSlotFromItem (NwItem item) |
| Gets the slot that the specified item is in. More...
|
|
SpellSchool | GetSpecialization (NwClass? nwClass=default) |
| Returns this creature's spell school specialization in the specified class.
Unless custom content is used, only Wizards have spell schools. More...
|
|
int | GetSpellUsesLeft (NwClass nwClass, NwSpell spell, MetaMagic metaMagic=MetaMagic.None, int domain=0) |
| Gets the number of remaining uses for a specific spell for this creature. More...
|
|
bool | GetTileExplored (NwArea area, int x, int y) |
| Gets whether the given area tile is visible on the map for this creature.
Tile exploration also controls object visibility in areas and the fog of war for interior and underground areas. More...
|
|
void | GiveGold (int amount, bool showFeedback=true) |
| Gives gold to this creature. More...
|
|
async Task | GiveItem (NwItem item) |
| Moves the specified item/item stack to this creature's inventory. More...
|
|
async Task | GiveItem (NwItem item, int amount) |
| Moves a specified amount of items from an item stack to this creature's inventory. More...
|
|
bool | HasFeatEffect (NwFeat feat) |
| Gets whether this creature is under the effects of the specified feat. More...
|
|
bool | HasFeatPrepared (NwFeat feat) |
| Returns true if this creature knows the specified NwFeat, and can use it.
Use KnowsFeat to simply check if a creature knows NwFeat, but may or may not have uses remaining. More...
|
|
bool | HasSkill (NwSkill skill) |
| Returns true if this creature has the skill specified, and is useable. More...
|
|
bool | HasSpellEffect (NwSpell spell) |
| Gets whether this creature is under the effects of the specified spell. More...
|
|
bool | HasSpellUse (NwSpell spell) |
| Gets if this creature has the specified spell available to cast. More...
|
|
bool | HasTalent (Talent talent) |
| Determines whether this creature has the specified talent. More...
|
|
void | IncrementRemainingFeatUses (NwFeat feat, int amount=1) |
| Increment the remaining uses per day for this (creature) by the specified amount.
Total number of feats uses per-day cannot exceed the creature's standard maximum. More...
|
|
bool | IsCreatureHeard (NwCreature creature) |
| Gets whether this creature can hear the specified creature. More...
|
|
bool | IsCreatureSeen (NwCreature creature) |
| Gets whether this creature can see the specified creature. More...
|
|
bool | IsEnemy (NwCreature target) |
| Gets a value indicating whether this creature considers the target as a friend. More...
|
|
bool | IsFlanking (NwCreature target) |
| Gets if this creature is flanking the specified target. More...
|
|
bool | IsFriend (NwCreature target) |
| Gets a value indicating whether this creature considers the target as a enemy. More...
|
|
bool | IsImmuneTo (ImmunityType immunityType, NwGameObject? verses=null) |
| Gets whether this creature has a specific immunity. More...
|
|
bool | IsNeutral (NwCreature target) |
| Gets a value indicating whether this creature considers the target as neutral. More...
|
|
bool | IsReactionTypeFriendly (NwCreature creature) |
| Gets whether this creature has a friendly reaction towards another given creature. More...
|
|
bool | IsReactionTypeHostile (NwCreature creature) |
| Gets whether this creature has a hostile reaction towards another given creature. More...
|
|
bool | IsReactionTypeNeutral (NwCreature creature) |
| Gets whether this creature has a neutral reaction towards another given creature. More...
|
|
async Task< bool > | IsWeaponEffective (NwGameObject target, bool offHand=false) |
| Check whether this creature can damage the specified object using their current weapon/s. More...
|
|
async Task | JumpToObject (NwGameObject gameObject, bool walkStraightLineToPoint=true) |
| Teleports this creature to the nearest valid location by the target.
This action produces no visual effect. More...
|
|
bool | KnowsFeat (NwFeat feat) |
| Gets if this creature knows the specified feat. More...
|
|
void | LevelUp (NwClass nwClass, int count) |
| Adds levels of the specified class to a creature, bypassing all validation. More...
|
|
int | LevelUpHenchman (NwClass nwClass, PackageType package, bool spellsReady=false) |
| Levels up this creature using the default settings.
You can assign a new class to level up
If an invalid class combination is chosen the default class is leveled up.
Package determines which package to level up with.
If package is omitted it will use the starting package assigned to that class or just the class package.
More...
|
|
bool | MeetsFeatRequirements (NwFeat feat) |
| Gets if this creature meets the requirements to take the specified feat. More...
|
|
void | PlayVoiceChat (VoiceChatType voiceChatType) |
| Instructs this creature to speak/play the specified voice chat. More...
|
|
void | RemoveFeat (NwFeat feat, bool removeFeatFromLevelList=false) |
| Removes the specified feat from this creature. More...
|
|
void | RemoveSpecialAbilityAt (int index) |
| Removes the specified ability at the given index. More...
|
|
int | Reputation (NwCreature creature) |
| Gets how one creature feels toward this creature. More...
|
|
void | RestoreAllSpells () |
| Restore all NwCreature spells per day for all levels. More...
|
|
void | RestoreBaseAttackBonus () |
| Restores the number of base attacks back to it's original state on this (creature). More...
|
|
void | RestoreSpells (byte level) |
| Restore all NwCreature spells per day for given level. More...
|
|
bool | RunEquip (NwItem item, EquipmentSlots equipmentSlot) |
| Instruct this creature to instantly equip the specified item. More...
|
|
bool | RunEquip (NwItem item, InventorySlot inventorySlot) |
| Instruct this creature to instantly equip the specified item. More...
|
|
bool | RunUnequip (NwItem item) |
| Instruct this creature to instantly unequip the specified item. More...
|
|
override? byte[] | Serialize () |
|
byte?[] | SerializeQuickbar () |
|
void | SetActionMode (ActionMode actionMode, bool status) |
| Instructs this creature to enable/disable the specified action mode (parry, power attack, expertise, etc). More...
|
|
void | SetAssociateListenPatterns () |
| Initialises this creature to listen for the standard AssociateCommand messages.
These are the messages sent by the standard party UI. More...
|
|
void | SetBaseSavingThrow (SavingThrow savingThrow, sbyte newValue) |
| Sets this creatures's base save value for the specified saving throw. More...
|
|
void | SetCreatureBodyPart (CreaturePart creaturePart, int modelNumber) |
| Sets the model number to use for the specified body part on the creature. More...
|
|
void | SetDamageLevelOverride (DamageLevelEntry damageLevel) |
| Sets the override value to use for this creature's damage level.
More...
|
|
void | SetEffectIconFlashing (EffectIconTableEntry effectIcon, bool flashing) |
| Sets whether the specified effect icon should be flashing in the creature's GUI icon bar. More...
|
|
void | SetFeatRemainingUses (NwFeat feat, byte remainingUses) |
| Sets the remaining uses available for the specified feat.
Cannot exceed the creature's total/max uses of the feat. More...
|
|
void | SetInitiativeModifier (int modifier) |
| Sets the modifier that is set for the creature's initiative.
More...
|
|
void | SetQuickBarButton (byte index, PlayerQuickBarButton data) |
|
void | SetQuickBarButtons (PlayerQuickBarButton[] buttons) |
|
void | SetSkillRank (NwSkill skill, sbyte rank) |
| Sets the skill ranks for the specified skill on this creature. More...
|
|
void | SetSpecialAbilityAt (int index, SpecialAbility ability) |
| Updates the specified ability at the given index. More...
|
|
void | SetsRawAbilityScore (Ability ability, byte value) |
| Sets the base (raw) ability score for the specified ability, without racial modifiers. More...
|
|
bool | SetTileExplored (NwArea area, int x, int y, bool newState) |
| Gets whether the given area tile is visible on the map for this creature.
Tile exploration also controls object visibility in areas and the fog of war for interior and underground areas. More...
|
|
async Task | SpeakOneLinerConversation (string dialogResRef="", NwGameObject? tokenTarget=null) |
| Instructs this creature to immediately speak the first non-branching conversation line in their dialog. More...
|
|
void | SummonAnimalCompanion () |
| Instructs this creature to summon their animal companion.
Does nothing if this creature has no animal companion available. More...
|
|
void | SummonFamiliar () |
| Instructs this creature to summon their familiar (wizard/sorcerer).
Does nothing if this creature has no familiar available. More...
|
|
void | TakeGold (int amount, bool showFeedback=true) |
| Takes gold away from this creature. More...
|
|
Talent | TalentBest (TalentCategory category, int maxCr) |
| Gets the best talent from a group of talents. More...
|
|
Talent | TalentRandom (TalentCategory category) |
| Gets a random talent from a group of talents possessed by this creature. More...
|
|
async Task< TouchAttackResult > | TouchAttackMelee (NwGameObject target) |
| Attempts to perform a melee touch attack on target. This is not a creature action, and assumes that this creature is already within range of the target. More...
|
|
async Task< TouchAttackResult > | TouchAttackRanged (NwGameObject target, bool displayFeedback) |
| Attempts to perform a ranged touch attack on the target. This is not a creature action, and simply does a roll to see if the target was hit. More...
|
|
void | UnpossessFamiliar () |
| Instructs this creature to unpossess their familiar.
This function can be run on the player creature, or the possessed familiar. More...
|
|
async Task | ActionCastSpellAt (NwSpell spell, Location target, MetaMagic metaMagic=MetaMagic.Any, bool cheat=false, ProjectilePathType projectilePathType=ProjectilePathType.Default, bool instant=false, NwClass? spellClass=null, bool spontaneousCast=false, int domainLevel=0) |
| Casts a spell at an location. More...
|
|
async Task | ActionCastSpellAt (NwSpell spell, NwGameObject target, MetaMagic metaMagic=MetaMagic.Any, bool cheat=false, int domainLevel=0, ProjectilePathType projectilePathType=ProjectilePathType.Default, bool instant=false, NwClass? spellClass=null, bool spontaneousCast=false) |
| Casts a spell at an object. More...
|
|
async Task | ActionJumpToLocation (Location location) |
| Jumps this object to the specified location.
Unlike the Location setter, this method will compute a safe location when teleporting, and may not equal the location specified. More...
|
|
async Task | ActionWait (TimeSpan duration) |
| Instructs this object to do nothing for the specified duration, before continuing with the next item in the action queue. More...
|
|
void | ApplyEffect (EffectDuration durationType, Effect effect, TimeSpan duration=default) |
| Applies the specified effect to this game object. More...
|
|
void | ClearObjectAnimationOverride (string anim) |
| Clears the specified animation override, restoring the original. More...
|
|
virtual void | Destroy () |
| Destroys this object (irrevocably). More...
|
|
float | Distance (NwGameObject target) |
| Returns the distance to the target.
If you only need to compare the distance, you can compare the squared distance using DistanceSquared to avoid a costly sqrt operation. More...
|
|
float | DistanceSquared (NwGameObject target) |
| Returns the squared distance to the target. More...
|
|
async void | EndConversation () |
| Immediately ends this GameObject's current conversation. More...
|
|
Task | FaceToObject (NwGameObject target) |
| Rotates this object to face towards target. More...
|
|
virtual async Task | FaceToPoint (Vector3 point) |
| Rotates this object to face a position. More...
|
|
int | GetColor (ColorChannel colorChannel) |
| Gets the color for the specified color channel. More...
|
|
IEnumerable< NwCreature > | GetNearestCreatures () |
| Returns the creatures closest to this object. More...
|
|
IEnumerable< NwCreature > | GetNearestCreatures (CreatureTypeFilter filter1) |
| Returns the creatures closest to this object, matching the specified criteria. More...
|
|
IEnumerable< NwCreature > | GetNearestCreatures (CreatureTypeFilter filter1, CreatureTypeFilter filter2) |
| Returns the creatures closest to this object, matching all of the specified criteria. More...
|
|
IEnumerable< NwCreature > | GetNearestCreatures (CreatureTypeFilter filter1, CreatureTypeFilter filter2, CreatureTypeFilter filter3) |
| Returns the creatures closest to this object, matching all of the specified criteria. More...
|
|
IEnumerable< T > | GetNearestObjectsByType< T > () |
| Gets the nearest object that is of the specified type. More...
|
|
VisualTransform | GetVisualTransform (ObjectVisualTransformDataScope scope) |
| Gets the visual transform of this object for the specified scope. More...
|
|
bool | HasLineOfSight (NwGameObject target) |
| Gets whether this object has a direct line of sight to the specified object (not blocked by any geometry).
More...
|
|
override? Guid | PeekUUID () |
| Attempts to get the UUID of this object, if assigned. More...
|
|
async Task | PlayAnimation (Animation animation, float animSpeed, bool queueAsAction=false, TimeSpan duration=default) |
| Plays the specified animation. More...
|
|
async Task | PlaySound (string soundName) |
| Plays the specified sound as mono audio from the location of this object. More...
|
|
async Task | PlaySoundByStrRef (StrRef strRef, bool runAsAction=true) |
| Plays a sound associated with a string reference (strRef).
The sound comes out as a mono sound sourcing from the location of the object running the command.
If runAsAction is False, then the sound is played instantly. More...
|
|
void | RemoveEffect (Effect effect) |
| Removes the specified effect from this game object. More...
|
|
void | ReplaceObjectAnimation (string anim, string newAnim) |
| Replaces the specified animation with an override.
Use ClearObjectAnimationOverride to clear the override. More...
|
|
void | ReplaceObjectTexture (string texture, string newTexture) |
| Replaces the specified texture with a new texture on this object only. More...
|
|
void | ResetMaterialShaderUniforms () |
| Resets all material shader parameter overrides on this object. More...
|
|
void | ResetMaterialShaderUniforms (string material) |
| Resets all material shader parameter overrides for the specified material on this object. - Parameters
-
material | The material on the object to be reset. |
More...
|
|
void | ResetMaterialShaderUniforms (string material, string param) |
| Resets the specified material shader parameter override for the specified material. - Parameters
-
material | The material on the object to be reset. |
param | The parameter override to reset. |
More...
|
|
SavingThrowResult | RollSavingThrow (SavingThrow savingThrow, int dc, SavingThrowType saveType, NwGameObject? saveVs=null) |
| Performs a saving throw against the given dc. More...
|
|
void | SetColor (ColorChannel colorChannel, int newColor) |
| Sets the color for the specified color channel. More...
|
|
async Task | SetFacing (float facing) |
| Rotates this object to face the specified facing angle. More...
|
|
async Task | SetIsDestroyable (bool destroyable, bool raiseable=true, bool selectableWhenDead=false) |
| Sets whether this object is destroyable. More...
|
|
void | SetListenPattern (string pattern, int patternNumber) |
| Sets a listen pattern for this object, assigning a pattern number that is accessible from the related object's OnConversation event. More...
|
|
void | SetMaterialShaderUniform (string material, string param, float value) |
| Sets a material shader uniform override. More...
|
|
void | SetMaterialShaderUniform (string material, string param, int value) |
| Sets a material shader uniform override. More...
|
|
void | SetMaterialShaderUniform (string material, string param, Vector4 value) |
| Sets a material shader uniform override. More...
|
|
void | SetTextBubbleOverride (ObjectUiTextBubbleOverride mode, string text) |
| Sets a text override for the hover/tab-highlight text of this object. More...
|
|
async Task | AddActionToQueue (System.Action action) |
| Inserts the function call aCommand into the Action Queue, ensuring the calling object will perform actions in a particular order. More...
|
|
async Task | ClearActionQueue (bool clearCombatState=false) |
| Clear all the object's actions. More...
|
|
void | ClearEventSubscriptions () |
| Clears any event subscriptions associated with this object. More...
|
|
bool | Equals (NwObject? other) |
|
override bool | Equals (object? obj) |
|
void | ForceRefreshUUID () |
|
string | GetEventScript (EventScriptType eventType) |
| Gets the script assigned to run for the specified object event. More...
|
|
override int | GetHashCode () |
|
T | GetObjectVariable< T > (string name) |
| Gets the specified object variable for this object. More...
|
|
bool | IsEventLocked (EventScriptType eventType) |
| Gets a value indicating whether the event script can be modified for the specified event. More...
|
|
Json | SerializeToJson (bool saveObjectState) |
| Serializes this game object to a json representation More...
|
|
void | SetEventScript (EventScriptType eventType, string? script) |
| Sets the script to be run on the specified object event. More...
|
|
async Task | SpeakString (string message, TalkVolume talkVolume=TalkVolume.Talk, bool queueAsAction=false) |
| Instructs this object to speak. More...
|
|
override string | ToString () |
| The ID of this object as a string. Can be used in StringExtensions.ParseObject while the object is alive.
This cannot be used across server restarts. See UUID for a persistent unique identifier. More...
|
|
bool | TryGetUUID (out Guid uid) |
| Attempts to get the UUID for this object, assigning a new ID if it does not already exist.
More...
|
|
async Task | WaitForObjectContext () |
| Notifies then awaits for this object to become the current active object for the purpose of implicitly assigned values (e.g. effect creators).
If the current active object is already this object, then the code runs immediately. Otherwise, it will be run with all other closures.
This is the async equivalent of AssignCommand in NWScript. More...
|
|
|
int | AC [get] |
| Gets this creature's armour class. More...
|
|
int | Age [get, set] |
| Gets or sets this creature's age, in years. More...
|
|
AiLevel | AiLevel [get, set] |
| Gets or sets the current AI level that this creature is running at.
Anvil.API.AiLevel.Default is recommended for most creatures. Too many creatures at Anvil.API.AiLevel.Normal or higher can cause performance degradation. More...
|
|
bool | AlwaysWalk [get, set] |
| Gets or sets whether this creature is forced to walk.
Is not persistent, and must be applied again at login. More...
|
|
string | AnimalCompanionName [get] |
| Gets this creature's animal companion name. More...
|
|
AnimalCompanionCreatureType | AnimalCompanionType [get] |
| Gets this creature's animal companion creature type. More...
|
|
AppearanceTableEntry | Appearance [get, set] |
| Gets or sets the appearance of this creature. More...
|
|
int | ArcaneSpellFailure [get] |
| Gets the arcane spell failure factor for this creature. More...
|
|
sbyte | ArmorCheckPenalty [get] |
|
IEnumerable< NwCreature > | Associates [get] |
| Gets all creatures associated with this creature. More...
|
|
AssociateType | AssociateType [get] |
| Gets the associate type of this creature, otherwise returns Anvil.API.AssociateType.None if this creature is not an associate of anyone. More...
|
|
NwGameObject? | AttackTarget [get] |
| Gets this creature's current attack target. More...
|
|
NwGameObject? | AttemptedAttackTarget [get] |
| Gets the last target this creature tried to attack. More...
|
|
NwGameObject? | AttemptedSpellTarget [get] |
| Gets the target this creature attempted to cast a spell at. More...
|
|
sbyte | BaseAC [get, set] |
| Gets or sets the base AC for this creature. More...
|
|
byte | BaseArmorArcaneSpellFailure [get, set] |
| Gets or sets the current base armor arcane spell failure factor for this creature (global ASF is automatically recalculated). More...
|
|
byte | BaseAttackBonus [get, set] |
| Gets or sets the Base Attack Bonus for this creature. More...
|
|
int | BaseAttackCount [get, set] |
| Sets the number of base attacks for this creature.
The range of values accepted are from 1 to 6.
More...
|
|
byte | BaseShieldArcaneSpellFailure [get, set] |
| Gets or sets the current base shield arcane spell failure factor for this creature (global ASF is automatically recalculated). More...
|
|
NwPlaceable? | BodyBag [get] |
| Gets the body bag assigned to this creature as a result of its death. More...
|
|
BodyBagTableEntry | BodyBagTemplate [get, set] |
| Gets or sets the body bag template to use when this creature dies. More...
|
|
float | ChallengeRating [get, set] |
| Gets or sets the calculated challenge rating for this creature. More...
|
|
IReadOnlyList< CreatureClassInfo > | Classes [get] |
| Gets this creature's classes, and associated class info. More...
|
|
CombatMode | CombatMode [get] |
| Gets the creature's current Combat Mode.
Can be used in the Events.OnCombatModeToggle event to determine which combat mode is being toggled off. More...
|
|
bool | Commandable [get, set] |
| Gets or sets a value indicating whether this creature's action queue can be modified. More...
|
|
NwPlayer?? | ControllingPlayer [get, set] |
| Gets or sets the player currently controlling this creature.
If this creature is a possessed familiar or is DM possessed, this will return the player or DM controlling this creature.
If this creature is a player creature (the creature a played logged in with), but the player is possessing another creature, this returns null.
If no player is controlling this creature, this returns null.
The setter makes this this creature controllable by the specified player, if player party control is enabled. More...
|
|
TimeSpan | CorpseDecayTime [get, set] |
| Gets or sets the corpse decay time for this creature. More...
|
|
Action | CurrentAction [get] |
| Gets the current action that this creature is executing. More...
|
|
DamageLevelEntry | DamageLevel [get] |
| Gets the creature's current damage level (Uninjured, Injured, Near Death, etc).
If an override is set with SetDamageLevelOverride, this property will return the override value. More...
|
|
bool | DefensiveCastingModeActive [get] |
| Gets a value indicating whether this creature is currently in Defensive Casting Mode. More...
|
|
string | Deity [get, set] |
| Gets or sets the name of this creature's deity. More...
|
|
bool | DetectModeActive [get] |
| Gets a value indicating whether this creature is currently in Detect Mode. More...
|
|
string? | DialogResRef [get, set] |
| Gets or sets the dialog ResRef for this creature. More...
|
|
bool | Disarmable [get] |
| Gets a value indicating whether this creature can be disarmed (checks disarm flag on creature, and if the creature actually has a weapon equipped in their right hand that is droppable). More...
|
|
NwEncounter? | Encounter [get] |
| Gets the encounter that spawned this creature. More...
|
|
bool | ExploresMinimap [get, set] |
| Gets or sets a value indicating whether this creature will auto-explore the minimap as it walks around. More...
|
|
NwFaction | Faction [get, set] |
| Gets or sets the faction of this object. More...
|
|
string | FamiliarName [get] |
| Gets this creature's familiar name. More...
|
|
FamiliarCreatureType | FamiliarType [get] |
| Gets the type of familiar that this creature can summon. More...
|
|
int | FeatCount [get] |
| Gets the number of feats known by this creature. More...
|
|
IReadOnlyList< NwFeat > | Feats [get] |
| Gets the feats known by this character. More...
|
|
bool | FlatFooted [get] |
| Gets a value indicating whether this creature is flat footed. More...
|
|
FootstepType | FootstepType [get, set] |
| Gets or sets the sounds to use when this creature makes a step. By default, this is based on the creature's appearance. More...
|
|
Gender | Gender [get, set] |
| Gets or sets the gender of this creature. More...
|
|
uint | Gold [get, set] |
| Gets or sets the amount of gold carried by this creature.
This property does not display feedback to the creature. See GiveGold and TakeGold for options that provide feedback. More...
|
|
Alignment | GoodEvilAlignment [get] |
| Gets this creature's Good/Evil Alignment. More...
|
|
int? | GoodEvilValue [get, set] |
| Gets or sets this creature's Evil (0) - Good (100) alignment value. More...
|
|
IEnumerable< NwCreature > | Henchmen [get] |
| Gets all henchmen associated with this creature. More...
|
|
bool | Immortal [get, set] |
| Gets or sets a value indicating whether this creature is immortal.
An immortal creature still takes damage, but cannot be killed. More...
|
|
Inventory | Inventory [get] |
| Gets the inventory of this creature. More...
|
|
bool | IsBartering [get] |
| Gets a value indicating whether this creature is currently bartering. More...
|
|
bool | IsDead [get] |
| Gets a value indicating whether this creature is a dead NPC, dead PC, or dying PC. More...
|
|
bool | IsDMAvatar [get] |
| Gets a value indicating whether this creature is a DM avatar character.
This returns false for NPC creatures possessed by DMs. More...
|
|
bool | IsDMPossessed [get] |
| Gets a value indicating whether this creature is currently possessed by a DM avatar. More...
|
|
bool | IsEncounterCreature [get] |
| Gets a value indicating whether this creature was spawned from an encounter. More...
|
|
bool | IsInCombat [get] |
| Gets a value indicating whether this creature is in combat. More...
|
|
bool | IsLoginPlayerCharacter [get] |
| Gets if this creature is a player character/DM avatar.
If this creature is a NPC or familiar, regardless of possession, this will return false. More...
|
|
bool | IsPlayableRace [get] |
| Gets a value indicating whether this creature is a playable racial type. More...
|
|
bool | IsPlayerControlled [get] |
| Gets if this creature is currently being controlled by a player/DM.
If this creature is a possessed familiar or is DM possessed, this will return true.
If this creature is a player creature (the creature a played logged in with), but the player is possessing another creature, this returns false.
If no player is controlling this creature, this returns false. More...
|
|
bool | IsPossessedFamiliar [get] |
| Gets a value indicating whether this creature is a familiar currently possessed by a master. More...
|
|
bool? | IsRangedWeaponEquipped [get] |
| Gets if this creature is currently holding a ranged weapon. More...
|
|
bool | IsResting [get] |
| Gets a value indicating whether this creature is currently resting. More...
|
|
LastAttackMode | LastAttackMode [get] |
| Gets the attack mode used during this creature's last attack. More...
|
|
AssociateCommand | LastCommandFromMaster [get] |
| Gets the last command issued to this creature. More...
|
|
SpecialAttack | LastSpecialAttackType [get] |
| Gets the special attack type used in the last physical attack against this creature. More...
|
|
NwTrappable? | LastTrapDetected [get] |
| Gets the last trap detected by this creature. More...
|
|
Alignment | LawChaosAlignment [get] |
| Gets this creature's Law/Chaos Alignment. More...
|
|
int? | LawChaosValue [get, set] |
| Gets or sets this creature's Chaos (0) - Lawful (100) alignment value. More...
|
|
int | Level [get] |
| Gets the Hit Dice/Level of this creature. More...
|
|
IReadOnlyList< CreatureLevelInfo > | LevelInfo [get] |
| Gets an enumerable containing information about this creature's levels (feats, skills, class taken, etc). More...
|
|
NwPlayer? | LoginPlayer [get] |
| Gets the player that logged in with this creature.
If this creature is a NPC or familiar, regardless of possession, this will return null. More...
|
|
bool | Lootable [get, set] |
| Gets or sets a value indicating whether this creature will leave a lootable corpse on death.
This flag must be set while the creature is alive. Players are not supported. More...
|
|
NwCreature? | Master [get] |
| Gets the possessor of this creature. This can be the master of a familiar, or the DM for a DM controlled creature. More...
|
|
MovementRate | MovementRate [get, set] |
| Gets or sets the movement rate of this creature. More...
|
|
float | MovementRateFactor [get, set] |
| Gets or sets the creature's current movement rate factor.
Base movement rate factor is 1.0. More...
|
|
MovementType | MovementType [get] |
| Gets the creature's current movement type. More...
|
|
Action< ModuleEvents.OnActivateItem > | OnActivateItem |
|
Action< OnAssociateAdd > | OnAssociateAdd |
|
Action< OnAssociateRemove > | OnAssociateRemove |
|
Action< CreatureEvents.OnBlocked > | OnBlocked |
|
Action< OnCheckEffectImmunity > | OnCheckEffectImmunity |
|
Action< OnCombatDRBroken > | OnCombatDRBroken |
|
Action< OnCombatModeToggle > | OnCombatModeToggle |
|
Action< CreatureEvents.OnCombatRoundEnd > | OnCombatRoundEnd |
|
Action< OnCombatRoundStart > | OnCombatRoundStart |
|
Action< CreatureEvents.OnConversation > | OnConversation |
|
Action< OnCreatureAttack > | OnCreatureAttack |
|
Action< OnCreatureCheckProficiencies > | OnCreatureCheckProficiencies |
|
Action< OnCreatureDamage > | OnCreatureDamage |
|
Action< CreatureEvents.OnDamaged > | OnDamaged |
|
Action< CreatureEvents.OnDeath > | OnDeath |
|
Action< OnDetectModeUpdate > | OnDetectModeUpdate |
|
Action< CreatureEvents.OnDisturbed > | OnDisturbed |
|
Action< OnDoListenDetection > | OnDoListenDetection |
|
Action< OnDoSpotDetection > | OnDoSpotDetection |
|
Action< OnFamiliarPossess > | OnFamiliarPossess |
|
Action< OnFamiliarUnpossess > | OnFamiliarUnpossess |
|
Action< OnHealKitUse > | OnHealKitUse |
|
Action< CreatureEvents.OnHeartbeat > | OnHeartbeat |
|
Action< OnInventoryGoldAdd > | OnInventoryGoldAdd |
|
Action< OnInventoryGoldRemove > | OnInventoryGoldRemove |
|
Action< OnItemEquip > | OnItemEquip |
|
Action< OnItemInventoryClose > | OnItemInventoryClose |
|
Action< OnItemInventoryOpen > | OnItemInventoryOpen |
|
Action< OnItemPayToIdentify > | OnItemPayToIdentify |
|
Action< OnItemScrollLearn > | OnItemScrollLearn |
|
Action< OnItemUnequip > | OnItemUnequip |
|
Action< OnItemUse > | OnItemUse |
|
Action< OnItemValidateEquip > | OnItemValidateEquip |
|
Action< OnItemValidateUse > | OnItemValidateUse |
|
Action< OnLevelDown > | OnLevelDown |
|
Action< OnLevelUp > | OnLevelUp |
|
Action< OnLevelUpAutomatic > | OnLevelUpAutomatic |
|
Action< OnObjectUse > | OnObjectUse |
|
Action< CreatureEvents.OnPerception > | OnPerception |
|
Action< CreatureEvents.OnPhysicalAttacked > | OnPhysicalAttacked |
|
Action< CreatureEvents.OnRested > | OnRested |
|
Action< CreatureEvents.OnSpawn > | OnSpawn |
|
Action< OnSpellAction > | OnSpellAction |
|
Action< CreatureEvents.OnSpellCastAt > | OnSpellCastAt |
|
Action< OnSpellSlotClear > | OnSpellSlotClear |
|
Action< OnSpellSlotMemorize > | OnSpellSlotMemorize |
|
Action< OnStealthModeUpdate > | OnStealthModeUpdate |
|
Action< OnStoreRequestBuy > | OnStoreRequestBuy |
|
Action< OnStoreRequestSell > | OnStoreRequestSell |
|
Action< OnUseFeat > | OnUseFeat |
|
Action< CreatureEvents.OnUserDefined > | OnUserDefined |
|
Action< OnUseSkill > | OnUseSkill |
|
string | OriginalFirstName [get, set] |
| Gets or sets the original first name of this creature. More...
|
|
string | OriginalLastName [get, set] |
| Gets or sets the original last name of this creature. More...
|
|
string | OriginalName [get] |
| Gets the original name of this creature. More...
|
|
Phenotype | Phenotype [get, set] |
| Gets or sets this creature's currently set Phenotype (body type). More...
|
|
override Vector3 | Position [set] |
| Gets or sets the creature's position.
NOTE: For player creatures, you likely want to immobilize the player first before moving them.
An issue exists where drive mode (W/A/S/D) can cause a client/server desync, making the creature appear at their old position. More...
|
|
NwRace | Race [get, set] |
| Gets this creature's race. More...
|
|
ushort | RemainingSkillPoints [get, set] |
| Gets or sets the remaining skill points this creature has to spend. More...
|
|
sbyte | ShieldCheckPenalty [get] |
|
NwPlaceable? | SittingObject [get] |
| Gets the placeable object (if any) that this creature is currently sitting in. More...
|
|
CreatureSize | Size [get, set] |
| Gets or sets the size of this creature. More...
|
|
ushort | SoundSet [get, set] |
| Gets or sets the sound set index for this creature. More...
|
|
IReadOnlyList< SpecialAbility > | SpecialAbilities [get] |
| Gets the special abilities available to this creature. More...
|
|
IEnumerable< CreatureSpellAbility > | SpellAbilities [get] |
| Gets a list of spell abilities usable by this creature. More...
|
|
sbyte | SpellResistance [get, set] |
| Gets or sets the spell resistance of this creature.
Returns 0 if this creature has no spell resistance. More...
|
|
PackageType | StartingPackage [get] |
| Gets this creature's default level up package. More...
|
|
bool | StealthModeActive [get] |
| Gets a value indicating whether this creature is currently in stealth mode. More...
|
|
string | SubRace [get, set] |
| Gets or sets the name of this creature's sub-race. More...
|
|
CreatureTailType | TailType [get, set] |
| Gets or sets the tail type of this creature. More...
|
|
decimal | TotalWeight [get] |
| Gets the total weight of this creature, in pounds. More...
|
|
int | TurnResistanceHitDice [get] |
| Gets the number of hit dice worth of Turn Resistance this creature has. More...
|
|
float? | WalkRateCap [get, set] |
| Gets or sets the walk rate cap for this creature (persistent).
Set to null to clear existing walk rate caps. Returns null if no walk rate cap is set. More...
|
|
CreatureWingType | WingType [get, set] |
| Gets or sets the wing type of this creature. More...
|
|
int? | Xp [get, set] |
| Gets or sets the total experience points for this creature, taking/granting levels based on progression. More...
|
|
IEnumerable< Effect >? | ActiveEffects [get] |
| Gets all effects (permanent and temporary) that are active on this game object. More...
|
|
AnimationState | AnimationState [get] |
| Gets the current animation state of this object. More...
|
|
NwArea? | Area [get] |
| Gets the area this object is currently in. More...
|
|
int | CasterLevel [get] |
| Gets the caster level of this object. More...
|
|
Color | HighlightColor [get, set] |
| Gets or sets the highlight color of this object. More...
|
|
int | HP [get, set] |
| Gets or sets the current HP for this object. More...
|
|
bool | IsInConversation [get] |
| Gets a value indicating whether this object is in a conversation. More...
|
|
bool | IsListening [get, set] |
| Gets or sets if this object should be listening for chat patterns, via the listen pattern system. More...
|
|
virtual ? Location | Location [get, set] |
| Gets or sets the location of this object. More...
|
|
int | MaxHP [get, set] |
| Gets or sets the maximum HP for this object. Returns 0 if this object has no defined HP. More...
|
|
MouseCursor | MouseCursor [get, set] |
| Gets or sets the mouse cursor for this object. More...
|
|
Action< ModuleEvents.OnAcquireItem > | OnAcquireItem |
|
Action< OnChatMessageSend > | OnChatMessageSend |
|
Action< OnDisarmWeapon > | OnDisarmWeapon |
|
Action< OnDispelMagicApply > | OnDispelMagicApply |
|
Action< OnEffectApply > | OnEffectApply |
|
Action< OnEffectRemove > | OnEffectRemove |
|
Action< OnHeal > | OnHeal |
|
Action< OnSpellBroadcast > | OnSpellBroadcast |
|
Action< OnSpellCast > | OnSpellCast |
|
Action< OnSpellInterrupt > | OnSpellInterrupt |
|
Action< ModuleEvents.OnUnacquireItem > | OnUnacquireItem |
|
bool | PlotFlag [get, set] |
| Gets or sets a value indicating whether the plot flag is enabled. More...
|
|
PortraitTableEntry???? | PortraitId [get, set] |
| Gets or sets the PortraitId of this (game object). More...
|
|
string | PortraitResRef [get, set] |
| Gets or sets the Portrait ResRef for this object. More...
|
|
virtual Vector3 | Position [get, set] |
| Gets or sets the local area position of this GameObject. More...
|
|
virtual float | Rotation [get, set] |
| Gets or sets the world rotation for this object. More...
|
|
NwGameObject? | TransitionTarget [get, set] |
| Gets or sets the transition target for this object. More...
|
|
ObjectUiDiscovery | UiDiscoveryFlags [get, set] |
| Gets or sets flags for controlling Ui discovery of this object. More...
|
|
bool | Useable [get, set] |
| Gets or sets a value indicating whether this object should be useable (clickable). More...
|
|
VisibilityMode | VisibilityOverride [get, set] |
| Gets or sets the global visiblity override for this object. More...
|
|
float | VisibleDistance [get, set] |
| Gets or sets the distance that this object will become visible to clients (default 45.0).
This is still subject to other limitations, such as perception ranges for creatures. More...
|
|
VisualTransform | VisualTransform [get] |
| Gets the base visual transform for this object.
Use GetVisualTransform to get the visual transform for other scopes for this object. More...
|
|
string | Description [get, set] |
| Gets or sets the description for this object. More...
|
|
static EventService | EventService = null! [get] |
|
bool | HasUUID [get] |
| Gets a value indicating whether this object has an assigned UUID. More...
|
|
bool | IsValid [get] |
| Gets a value indicating whether this is a valid object. More...
|
|
IEnumerable< ObjectVariable > | LocalVariables [get] |
| Gets all local variables assigned on this object. More...
|
|
string | Name [get, set] |
| Gets or sets the name of this object. More...
|
|
static Lazy< ObjectVisibilityService > | ObjectVisibilityService = null! [get] |
|
string | OriginalDescription [get] |
| Gets the original description for this object as defined in the toolset. More...
|
|
static ResourceManager | ResourceManager = null! [get] |
|
string | ResRef [get] |
| Gets the resource reference used to create this object. More...
|
|
string | Tag [get, set] |
| Gets or sets the tag for this object. More...
|
|
Guid | UUID [get] |
| Gets the globally unique identifier for this object. More...
|
|
static VirtualMachine | VirtualMachine = null! [get] |
|