An item object that can be carried by creatures, stored in placeable containers, or dropped in an anrea.
More...
|
unsafe void | AcquireItem (NwItem item, bool displayFeedback=true) |
|
void | AddItemProperty (ItemProperty itemProperty, EffectDuration durationType, TimeSpan duration=default, AddPropPolicy policy=AddPropPolicy.IgnoreExisting, bool ignoreDuration=false, bool ignoreSubType=false, bool ignoreTag=false) |
| Add an item property. Optional parameters allow for preventing unwanted stacking by removing the existing one first. More...
|
|
NwItem | Clone (Location location, bool preserveDropFlag, string? newTag=null, bool copyLocalState=true) |
| Creates a copy of this item. More...
|
|
override NwItem | Clone (Location location, string? newTag=null, bool copyLocalState=true) |
| Creates a copy of this game object. More...
|
|
NwItem | Clone (NwGameObject targetInventory, string? newTag=null, bool copyLocalState=true, bool preserveDropFlag=true) |
| Creates a copy of this item. More...
|
|
bool | CompareItem (NwItem otherItem) |
| Compare this item to another item to test if it is stackable. More...
|
|
int | GetUsesPerDayRemaining (ItemProperty property) |
| Gets the number of uses per day remaining for the specified item property on this item. More...
|
|
bool | HasItemProperty (ItemPropertyTableEntry? propertyType=null, ItemPropertySubTypeTableEntry? subType=null, EffectDuration? durationType=null, string? tag=null) |
| Gets whether this item has a given item property that matches the specified filters.
If no filters are set, returns if any item property is set on this item. More...
|
|
bool | HasItemProperty (ItemPropertyType property) |
| Gets whether this item has a given item property. More...
|
|
void | RemoveItemProperties (ItemPropertyTableEntry? propertyType=null, ItemPropertySubTypeTableEntry? subType=null, EffectDuration? durationType=null, string? tag=null) |
| Remove all item properties from this item, using the specified filter options.
If no filters are set, removes all item properties from this item. More...
|
|
void | RemoveItemProperty (ItemProperty itemProperty) |
| Removes the specified item property from this item.
See ItemProperties to enumerate item properties on this item. More...
|
|
override? byte[] | Serialize () |
|
void | SetUsesPerDayRemaining (ItemProperty property, int numUses) |
| Sets the number of uses per day remaining for the specified item property on this item. 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 | ACValue [get] |
| Gets the armor class of this item. More...
|
|
int | AddGoldValue [get, set] |
| Gets or sets the additional GP value of this item.
Does not persist through saving. More...
|
|
ItemAppearance | Appearance [get] |
| Gets the appearance properties of this item. More...
|
|
int | BaseACValue [get] |
| Gets the base armor class of this item. More...
|
|
uint | BaseGoldValue [get, set] |
| Gets or sets the base GP value of this item.
Does not persist through saving. More...
|
|
NwBaseItem | BaseItem [get, set] |
| Gets or sets the NwBaseItem for this item. More...
|
|
bool | CursedFlag [get, set] |
| Gets or sets a value indicating whether this item is considered cursed. Cursed items cannot be dropped. More...
|
|
bool | Droppable [get, set] |
| Gets or sets a value indicating whether this item can be dropped. More...
|
|
int | GoldValue [get] |
| Gets the gp value for this item. More...
|
|
bool | HasInventory [get] |
| Gets a value indicating whether this item has an inventory (container). More...
|
|
int | HiddenWhenEquipped [get, set] |
| Gets or sets a value indicating whether this item should be hidden when equipped. More...
|
|
bool | Identified [get, set] |
| Gets or sets a value indicating whether this item has been identified. More...
|
|
bool | Infinite [get, set] |
| Gets or sets a value indicating whether this item may be infinitely purchased from stores.
An infinite item will still be available to purchase from a store after a player buys the item. More...
|
|
Inventory | Inventory [get] |
| Gets the inventory of this item, if it is a container. More...
|
|
bool | IsRangedWeapon [get] |
| Gets if this item is considered a ranged weapon. More...
|
|
int | ItemCharges [get, set] |
| Gets or sets the number of charges left on this item. More...
|
|
IEnumerable< ItemProperty >? | ItemProperties [get] |
| Gets all active item properties currently applied to this object. More...
|
|
byte | MinEquipLevel [get] |
| Gets the minimum level required to equip this item. More...
|
|
Action< OnInventoryItemAdd > | OnInventoryItemAdd |
|
Action< OnInventoryItemRemove > | OnInventoryItemRemove |
|
string | OriginalUnidentifiedDescription [get] |
| Gets the original unidentified description for this item. More...
|
|
bool | Pickpocketable [get, set] |
| Gets or sets a value indicating whether this item can be pickpocketed. More...
|
|
NwGameObject? | Possessor [get] |
| Gets the GameObject that has this item in its inventory. Returns null if it is on the ground, or not in any inventory. More...
|
|
NwGameObject? | RootPossessor [get] |
| Gets the root possessor of this item. More...
|
|
int | StackSize [get, set] |
| Gets or sets the number of stacked items attached to this item. More...
|
|
bool | Stolen [get, set] |
| Gets or sets a value indicating whether this item is considered stolen. Only stores with the "Buys Stolen Goods" will purchase this item. More...
|
|
string | UnidentifiedDescription [get, set] |
| Gets or sets the unidentified description for this item. More...
|
|
decimal | Weight [get, set] |
| Gets or sets the weight of this item, in pounds. 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] |
|
An item object that can be carried by creatures, stored in placeable containers, or dropped in an anrea.