NWNX:EE  8193.36.12
nwnx_object.nss File Reference
#include "nwnx"

Go to the source code of this file.

Classes

struct  NWNX_Object_LocalVariable
 A local variable structure. More...
 

Functions

int NWNX_Object_GetLocalVariableCount (object obj)
 Gets the count of all local variables. More...
 
struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable (object obj, int index)
 Gets the local variable at the provided index of the provided object. More...
 
void NWNX_Object_SetPosition (object oObject, vector vPosition, int bUpdateSubareas=TRUE)
 Set oObject's position. More...
 
int NWNX_Object_GetCurrentHitPoints (object obj)
 Get an object's hit points. More...
 
void NWNX_Object_SetCurrentHitPoints (object obj, int hp)
 Set an object's hit points. More...
 
void NWNX_Object_SetMaxHitPoints (object obj, int hp)
 Adjust an object's maximum hit points. More...
 
string NWNX_Object_Serialize (object obj)
 Serialize a full object to a base64 string. More...
 
object NWNX_Object_Deserialize (string serialized)
 Deserialize the object. More...
 
string NWNX_Object_GetDialogResref (object obj)
 Gets the dialog resref. More...
 
void NWNX_Object_SetDialogResref (object obj, string dialog)
 Sets the dialog resref. More...
 
void NWNX_Object_SetAppearance (object oPlaceable, int nAppearance)
 Set oPlaceable's appearance. More...
 
int NWNX_Object_GetAppearance (object oPlaceable)
 Get oPlaceable's appearance. More...
 
int NWNX_Object_GetHasVisualEffect (object obj, int nVFX)
 Determine if an object has a visual effect. More...
 
int NWNX_Object_GetDamageImmunity (object obj, int damageType)
 Get an object's damage immunity. More...
 
void NWNX_Object_AddToArea (object obj, object area, vector pos)
 Add or move an object. More...
 
int NWNX_Object_GetPlaceableIsStatic (object obj)
 Get placeable's static setting. More...
 
void NWNX_Object_SetPlaceableIsStatic (object obj, int isStatic)
 Set placeable as static or not. More...
 
int NWNX_Object_GetAutoRemoveKey (object obj)
 Gets if a door/placeable auto-removes the key after use. More...
 
void NWNX_Object_SetAutoRemoveKey (object obj, int bRemoveKey)
 Sets if a door/placeable auto-removes the key after use. More...
 
string NWNX_Object_GetTriggerGeometry (object oTrigger)
 Get the geometry of a trigger. More...
 
void NWNX_Object_SetTriggerGeometry (object oTrigger, string sGeometry)
 Set the geometry of a trigger with a list of vertex positions. More...
 
void NWNX_Object_Export (object oObject, string sFileName, string sAlias="NWNX")
 Export an object to the UserDirectory/nwnx folder. More...
 
int NWNX_Object_GetInt (object oObject, string sVarName)
 Get oObject's integer variable sVarName. More...
 
void NWNX_Object_SetInt (object oObject, string sVarName, int nValue, int bPersist)
 Set oObject's integer variable sVarName to nValue. More...
 
void NWNX_Object_DeleteInt (object oObject, string sVarName)
 Delete oObject's integer variable sVarName. More...
 
string NWNX_Object_GetString (object oObject, string sVarName)
 Get oObject's string variable sVarName. More...
 
void NWNX_Object_SetString (object oObject, string sVarName, string sValue, int bPersist)
 Set oObject's string variable sVarName to sValue. More...
 
void NWNX_Object_DeleteString (object oObject, string sVarName)
 Delete oObject's string variable sVarName. More...
 
float NWNX_Object_GetFloat (object oObject, string sVarName)
 Get oObject's float variable sVarName. More...
 
void NWNX_Object_SetFloat (object oObject, string sVarName, float fValue, int bPersist)
 Set oObject's float variable sVarName to fValue. More...
 
void NWNX_Object_DeleteFloat (object oObject, string sVarName)
 Delete oObject's persistent float variable sVarName. More...
 
void NWNX_Object_DeleteVarRegex (object oObject, string sRegex)
 Delete any variables that match sRegex. More...
 
int NWNX_Object_GetPositionIsInTrigger (object oTrigger, vector vPosition)
 Get if vPosition is inside oTrigger's geometry. More...
 
int NWNX_Object_GetInternalObjectType (object oObject)
 Gets the given object's internal type (NWNX_OBJECT_TYPE_INTERNAL_*) More...
 
int NWNX_Object_AcquireItem (object oObject, object oItem)
 Have oObject acquire oItem. More...
 
void NWNX_Object_ClearSpellEffectsOnOthers (object oObject)
 Clear all spell effects oObject has applied to others. More...
 
string NWNX_Object_PeekUUID (object oObject)
 Peek at the UUID of oObject without assigning one if it does not have one. More...
 
int NWNX_Object_GetDoorHasVisibleModel (object oDoor)
 Get if oDoor has a visible model. More...
 
int NWNX_Object_GetIsDestroyable (object oObject)
 Get if oObject is destroyable. More...
 
int NWNX_Object_DoSpellImmunity (object oDefender, object oCaster, int nSpellId=-1)
 Checks for specific spell immunity. Should only be called in spellscripts. More...
 
int NWNX_Object_DoSpellLevelAbsorption (object oDefender, object oCaster, int nSpellId=-1, int nSpellLevel=-1, int nSpellSchool=-1)
 Checks for spell school/level immunities and mantles. Should only be called in spellscripts. More...
 
void NWNX_Object_SetHasInventory (object obj, int bHasInventory)
 Sets if a placeable has an inventory. More...
 
int NWNX_Object_GetCurrentAnimation (object oObject)
 Get the current animation of oObject. More...
 
int NWNX_Object_GetAILevel (object oObject)
 Gets the AI level of an object. More...
 
void NWNX_Object_SetAILevel (object oObject, int nLevel)
 Sets the AI level of an object. More...
 
string NWNX_Object_GetMapNote (object oObject, int nID=0, int nGender=0)
 Retrieves the Map Note (AKA Map Pin) from a waypoint - Returns even if currently disabled. More...
 
void NWNX_Object_SetMapNote (object oObject, string sMapNote, int nID=0, int nGender=0)
 Sets a Map Note (AKA Map Pin) to any waypoint, even if no previous map note. Only updates for clients on area-load. Use SetMapPinEnabled() as required. More...
 
int NWNX_Object_GetLastSpellCastFeat (object oObject)
 Gets the last spell cast feat of oObject. More...
 
void NWNX_Object_SetLastTriggered (object oObject, object oLast)
 Sets the last object that triggered door or placeable trap. More...
 
float NWNX_Object_GetAoEObjectDurationRemaining (object oAoE)
 Gets the remaining duration of the AoE object. More...
 
void NWNX_Object_SetConversationPrivate (object oObject, int bPrivate)
 Sets conversations started by oObject to be private or not. More...
 
void NWNX_Object_SetAoEObjectRadius (object oAoE, float fRadius)
 Sets the radius of a circle AoE object. More...
 
float NWNX_Object_GetAoEObjectRadius (object oAoE)
 Gets the radius of a circle AoE object. More...
 
int NWNX_Object_GetLastSpellCastSpontaneous (object oObject)
 Gets whether the last spell cast of oObject was spontaneous. More...
 
int NWNX_Object_GetLastSpellCastDomainLevel (object oObject)
 Gets the last spell cast domain level. More...
 
void NWNX_Object_ForceAssignUUID (object oObject, string sUUID)
 Force the given object to carry the given UUID. Any other object currently owning the UUID is stripped of it. More...
 
int NWNX_Object_GetInventoryItemCount (object oObject)
 Returns how many items are in oObject's inventory. More...
 
void NWNX_Object_OverrideSpellProjectileVFX (object oCreature, int nProjectileType=-1, int nProjectilePathType=-1, int nSpellID=-1, int bPersist=FALSE)
 Override the projectile visual effect of ranged/throwing weapons and spells. More...
 
int NWNX_Object_GetLastSpellInstant ()
 Returns TRUE if the last spell was cast instantly. This function should only be called in a spell script. More...
 
void NWNX_Object_SetTrapCreator (object oObject, object oCreator)
 Sets the creator of a trap on door, placeable, or trigger. Also changes trap Faction to that of the new Creator. More...
 
string NWNX_Object_GetLocalizedName (object oObject, int nLanguage, int nGender=0)
 Return the name of the object for nLanguage. More...
 
void NWNX_Object_SetLocalizedName (object oObject, string sName, int nLanguage, int nGender=0)
 Set the name of the object as set in the toolset for nLanguage. More...
 

Variables

Local Variable Types

const int NWNX_OBJECT_LOCALVAR_TYPE_UNKNOWN = 0
 
const int NWNX_OBJECT_LOCALVAR_TYPE_INT = 1
 
const int NWNX_OBJECT_LOCALVAR_TYPE_FLOAT = 2
 
const int NWNX_OBJECT_LOCALVAR_TYPE_STRING = 3
 
const int NWNX_OBJECT_LOCALVAR_TYPE_OBJECT = 4
 
const int NWNX_OBJECT_LOCALVAR_TYPE_LOCATION = 5
 
const int NWNX_OBJECT_LOCALVAR_TYPE_JSON = 6
 
Internal Object Types

const int NWNX_OBJECT_TYPE_INTERNAL_INVALID = -1
 
const int NWNX_OBJECT_TYPE_INTERNAL_GUI = 1
 
const int NWNX_OBJECT_TYPE_INTERNAL_TILE = 2
 
const int NWNX_OBJECT_TYPE_INTERNAL_MODULE = 3
 
const int NWNX_OBJECT_TYPE_INTERNAL_AREA = 4
 
const int NWNX_OBJECT_TYPE_INTERNAL_CREATURE = 5
 
const int NWNX_OBJECT_TYPE_INTERNAL_ITEM = 6
 
const int NWNX_OBJECT_TYPE_INTERNAL_TRIGGER = 7
 
const int NWNX_OBJECT_TYPE_INTERNAL_PROJECTILE = 8
 
const int NWNX_OBJECT_TYPE_INTERNAL_PLACEABLE = 9
 
const int NWNX_OBJECT_TYPE_INTERNAL_DOOR = 10
 
const int NWNX_OBJECT_TYPE_INTERNAL_AREAOFEFFECT = 11
 
const int NWNX_OBJECT_TYPE_INTERNAL_WAYPOINT = 12
 
const int NWNX_OBJECT_TYPE_INTERNAL_ENCOUNTER = 13
 
const int NWNX_OBJECT_TYPE_INTERNAL_STORE = 14
 
const int NWNX_OBJECT_TYPE_INTERNAL_PORTAL = 15
 
const int NWNX_OBJECT_TYPE_INTERNAL_SOUND = 16
 
Projectile VFX Types

const int NWNX_OBJECT_SPELL_PROJECTILE_TYPE_DEFAULT = 6
 
const int NWNX_OBJECT_SPELL_PROJECTILE_TYPE_USE_PATH = 7