6 const string NWNX_Object =
"NWNX_Object";
455 NWNXCall(NWNX_Object,
"GetLocalVariableCount");
463 NWNXCall(NWNX_Object,
"GetLocalVariable");
465 var.
key = NWNXPopString();
466 var.type = NWNXPopInt();
472 NWNXPushInt(bUpdateSubareas);
473 NWNXPushVector(vPosition);
474 NWNXPushObject(oObject);
475 NWNXCall(NWNX_Object,
"SetPosition");
480 NWNXPushObject(creature);
481 NWNXCall(NWNX_Object,
"GetCurrentHitPoints");
488 NWNXPushObject(creature);
489 NWNXCall(NWNX_Object,
"SetCurrentHitPoints");
495 NWNXPushObject(creature);
496 NWNXCall(NWNX_Object,
"SetMaxHitPoints");
502 NWNXCall(NWNX_Object,
"Serialize");
503 return NWNXPopString();
508 NWNXPushString(serialized);
509 NWNXCall(NWNX_Object,
"Deserialize");
510 return NWNXPopObject();
516 NWNXCall(NWNX_Object,
"GetDialogResref");
517 return NWNXPopString();
522 NWNXPushString(dialog);
524 NWNXCall(NWNX_Object,
"SetDialogResref");
529 NWNXPushInt(nAppearance);
530 NWNXPushObject(oPlaceable);
531 NWNXCall(NWNX_Object,
"SetAppearance");
536 NWNXPushObject(oPlaceable);
537 NWNXCall(NWNX_Object,
"GetAppearance");
545 NWNXCall(NWNX_Object,
"GetHasVisualEffect");
551 NWNXPushInt(damageType);
553 NWNXCall(NWNX_Object,
"GetDamageImmunity");
560 NWNXPushObject(area);
562 NWNXCall(NWNX_Object,
"AddToArea");
568 NWNXCall(NWNX_Object,
"GetPlaceableIsStatic");
574 NWNXPushInt(isStatic);
576 NWNXCall(NWNX_Object,
"SetPlaceableIsStatic");
582 NWNXCall(NWNX_Object,
"GetAutoRemoveKey");
588 NWNXPushInt(bRemoveKey);
590 NWNXCall(NWNX_Object,
"SetAutoRemoveKey");
595 NWNXPushObject(oTrigger);
596 NWNXCall(NWNX_Object,
"GetTriggerGeometry");
597 return NWNXPopString();
602 NWNXPushString(sGeometry);
603 NWNXPushObject(oTrigger);
604 NWNXCall(NWNX_Object,
"SetTriggerGeometry");
609 NWNXPushString(sAlias);
610 NWNXPushString(sFileName);
611 NWNXPushObject(oObject);
612 NWNXCall(NWNX_Object,
"Export");
617 NWNXPushString(sVarName);
618 NWNXPushObject(oObject);
619 NWNXCall(NWNX_Object,
"GetInt");
625 NWNXPushInt(bPersist);
627 NWNXPushString(sVarName);
628 NWNXPushObject(oObject);
629 NWNXCall(NWNX_Object,
"SetInt");
634 NWNXPushString(sVarName);
635 NWNXPushObject(oObject);
636 NWNXCall(NWNX_Object,
"DeleteInt");
641 NWNXPushString(sVarName);
642 NWNXPushObject(oObject);
643 NWNXCall(NWNX_Object,
"GetString");
644 return NWNXPopString();
649 NWNXPushInt(bPersist);
650 NWNXPushString(sValue);
651 NWNXPushString(sVarName);
652 NWNXPushObject(oObject);
653 NWNXCall(NWNX_Object,
"SetString");
658 NWNXPushString(sVarName);
659 NWNXPushObject(oObject);
660 NWNXCall(NWNX_Object,
"DeleteString");
665 NWNXPushString(sVarName);
666 NWNXPushObject(oObject);
667 NWNXCall(NWNX_Object,
"GetFloat");
668 return NWNXPopFloat();
673 NWNXPushInt(bPersist);
674 NWNXPushFloat(fValue);
675 NWNXPushString(sVarName);
676 NWNXPushObject(oObject);
677 NWNXCall(NWNX_Object,
"SetFloat");
682 NWNXPushString(sVarName);
683 NWNXPushObject(oObject);
684 NWNXCall(NWNX_Object,
"DeleteFloat");
689 NWNXPushString(sRegex);
690 NWNXPushObject(oObject);
691 NWNXCall(NWNX_Object,
"DeleteVarRegex");
696 NWNXPushVector(vPosition);
697 NWNXPushObject(oTrigger);
698 NWNXCall(NWNX_Object,
"GetPositionIsInTrigger");
704 NWNXPushObject(oObject);
705 NWNXCall(NWNX_Object,
"GetInternalObjectType");
711 NWNXPushObject(oItem);
712 NWNXPushObject(oObject);
713 NWNXCall(NWNX_Object,
"AcquireItem");
719 NWNXPushObject(oObject);
720 NWNXCall(NWNX_Object,
"ClearSpellEffectsOnOthers");
725 NWNXPushObject(oObject);
726 NWNXCall(NWNX_Object,
"PeekUUID");
727 return NWNXPopString();
732 NWNXPushObject(oDoor);
733 NWNXCall(NWNX_Object,
"GetDoorHasVisibleModel");
739 NWNXPushObject(oObject);
740 NWNXCall(NWNX_Object,
"GetIsDestroyable");
746 NWNXPushInt(nSpellId);
747 NWNXPushObject(oCaster);
748 NWNXPushObject(oDefender);
749 NWNXCall(NWNX_Object,
"DoSpellImmunity");
755 NWNXPushInt(nSpellSchool);
756 NWNXPushInt(nSpellLevel);
757 NWNXPushInt(nSpellId);
758 NWNXPushObject(oCaster);
759 NWNXPushObject(oDefender);
760 NWNXCall(NWNX_Object,
"DoSpellLevelAbsorption");
766 NWNXPushInt(bHasInventory);
768 NWNXCall(NWNX_Object,
"SetHasInventory");
773 NWNXPushObject(oObject);
774 NWNXCall(NWNX_Object,
"GetCurrentAnimation");
780 NWNXPushObject(oObject);
781 NWNXCall(NWNX_Object,
"GetAILevel");
788 NWNXPushObject(oObject);
789 NWNXCall(NWNX_Object,
"SetAILevel");
794 NWNXPushInt(nGender);
796 NWNXPushObject(oObject);
797 NWNXCall(NWNX_Object,
"GetMapNote");
798 return NWNXPopString();
803 NWNXPushInt(nGender);
805 NWNXPushString(sMapNote);
806 NWNXPushObject(oObject);
807 NWNXCall(NWNX_Object,
"SetMapNote");
812 NWNXPushObject(oObject);
813 NWNXCall(NWNX_Object,
"GetLastSpellCastFeat");
819 NWNXPushObject(oLast);
820 NWNXPushObject(oObject);
821 NWNXCall(NWNX_Object,
"SetLastTriggered");
826 NWNXPushObject(oAoE);
827 NWNXCall(NWNX_Object,
"GetAoEObjectDurationRemaining");
828 return NWNXPopFloat();
833 NWNXPushInt(bPrivate);
834 NWNXPushObject(oObject);
835 NWNXCall(NWNX_Object,
"SetConversationPrivate");
840 NWNXPushFloat(fRadius);
841 NWNXPushObject(oAoE);
842 NWNXCall(NWNX_Object,
"SetAoEObjectRadius");
847 NWNXPushObject(oAoE);
848 NWNXCall(NWNX_Object,
"GetAoEObjectRadius");
849 return NWNXPopFloat();
854 NWNXPushObject(oObject);
855 NWNXCall(NWNX_Object,
"GetLastSpellCastSpontaneous");
861 NWNXPushObject(oObject);
862 NWNXCall(NWNX_Object,
"GetLastSpellCastDomainLevel");
868 NWNXPushString(sUUID);
869 NWNXPushObject(oObject);
870 NWNXCall(NWNX_Object,
"ForceAssignUUID");
875 NWNXPushObject(oObject);
876 NWNXCall(NWNX_Object,
"GetInventoryItemCount");
882 NWNXPushInt(bPersist);
883 NWNXPushInt(nSpellID);
884 NWNXPushInt(nProjectilePathType);
885 NWNXPushInt(nProjectileType);
886 NWNXPushObject(oCreature);
887 NWNXCall(NWNX_Object,
"OverrideSpellProjectileVFX");
892 NWNXCall(NWNX_Object,
"GetLastSpellInstant");
898 NWNXPushObject(oCreator);
899 NWNXPushObject(oObject);
900 NWNXCall(NWNX_Object,
"SetTrapCreator");
905 string sFunc =
"GetLocalizedName";
907 NWNXPushInt(nGender);
908 NWNXPushInt(nLanguage);
909 NWNXPushObject(oObject);
911 NWNXCall(NWNX_Object, sFunc);
912 return NWNXPopString();
917 string sFunc =
"SetLocalizedName";
919 NWNXPushInt(nGender);
920 NWNXPushInt(nLanguage);
921 NWNXPushString(sName);
922 NWNXPushObject(oObject);
924 NWNXCall(NWNX_Object, sFunc);
929 string sFunc =
"GetLocalizedDescription";
931 NWNXPushInt(bIdentified);
932 NWNXPushInt(nGender);
933 NWNXPushInt(nLanguage);
934 NWNXPushObject(oObject);
936 NWNXCall(NWNX_Object, sFunc);
937 return NWNXPopString();
942 string sFunc =
"SetLocalizedDescription";
944 NWNXPushInt(bIdentified);
945 NWNXPushInt(nGender);
946 NWNXPushInt(nLanguage);
947 NWNXPushString(sDescription);
948 NWNXPushObject(oObject);
950 NWNXCall(NWNX_Object, sFunc);
string NWNX_Object_Serialize(object obj)
Serialize a full object to a base64 string.
void NWNX_Object_SetAILevel(object oObject, int nLevel)
Sets the AI level of an object.
const int NWNX_OBJECT_LOCALVAR_TYPE_FLOAT
const int NWNX_OBJECT_TYPE_INTERNAL_STORE
int NWNX_Object_GetLocalVariableCount(object obj)
Gets the count of all local variables.
const int NWNX_OBJECT_TYPE_INTERNAL_PROJECTILE
void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas=TRUE)
Set oObject's position.
int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition)
Get if vPosition is inside oTrigger's geometry.
const int NWNX_OBJECT_LOCALVAR_TYPE_INT
void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance)
Set oPlaceable's appearance.
void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate)
Sets conversations started by oObject to be private or not.
string NWNX_Object_GetString(object oObject, string sVarName)
Get oObject's string variable sVarName.
const int NWNX_OBJECT_TYPE_INTERNAL_DOOR
int NWNX_Object_GetPlaceableIsStatic(object obj)
Get placeable's static setting.
const int NWNX_OBJECT_LOCALVAR_TYPE_OBJECT
float NWNX_Object_GetAoEObjectDurationRemaining(object oAoE)
Gets the remaining duration of the AoE object.
const int NWNX_OBJECT_TYPE_INTERNAL_ENCOUNTER
void NWNX_Object_Export(object oObject, string sFileName, string sAlias="NWNX")
Export an object to the UserDirectory/nwnx folder.
const int NWNX_OBJECT_TYPE_INTERNAL_TRIGGER
const int NWNX_OBJECT_TYPE_INTERNAL_ITEM
string NWNX_Object_GetTriggerGeometry(object oTrigger)
Get the geometry of a trigger.
int NWNX_Object_GetAutoRemoveKey(object obj)
Gets if a door/placeable auto-removes the key after use.
void NWNX_Object_AddToArea(object obj, object area, vector pos)
Add or move an object.
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.
void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry)
Set the geometry of a trigger with a list of vertex positions.
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.
void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius)
Sets the radius of a circle AoE object.
void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist)
Set oObject's float variable sVarName to fValue.
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.
int NWNX_Object_GetCurrentAnimation(object oObject)
Get the current animation of oObject.
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 strippe...
const int NWNX_OBJECT_LOCALVAR_TYPE_UNKNOWN
const int NWNX_OBJECT_LOCALVAR_TYPE_JSON
int NWNX_Object_GetAILevel(object oObject)
Gets the AI level of an object.
int NWNX_Object_GetDoorHasVisibleModel(object oDoor)
Get if oDoor has a visible model.
const int NWNX_OBJECT_SPELL_PROJECTILE_TYPE_USE_PATH
const int NWNX_OBJECT_TYPE_INTERNAL_MODULE
int NWNX_Object_GetIsDestroyable(object oObject)
Get if oObject is destroyable.
int NWNX_Object_GetLastSpellCastFeat(object oObject)
Gets the last spell cast feat of oObject.
int NWNX_Object_GetLastSpellCastDomainLevel(object oObject)
Gets the last spell cast domain level.
const int NWNX_OBJECT_TYPE_INTERNAL_AREA
void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic)
Set placeable as static or not.
const int NWNX_OBJECT_LOCALVAR_TYPE_LOCATION
const int NWNX_OBJECT_TYPE_INTERNAL_WAYPOINT
void NWNX_Object_DeleteString(object oObject, string sVarName)
Delete oObject's string variable sVarName.
const int NWNX_OBJECT_TYPE_INTERNAL_GUI
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...
void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist)
Set oObject's integer variable sVarName to nValue.
const int NWNX_OBJECT_TYPE_INTERNAL_INVALID
const int NWNX_OBJECT_TYPE_INTERNAL_CREATURE
const int NWNX_OBJECT_TYPE_INTERNAL_PORTAL
void NWNX_Object_SetDialogResref(object obj, string dialog)
Sets the dialog resref.
const int NWNX_OBJECT_TYPE_INTERNAL_SOUND
const int NWNX_OBJECT_LOCALVAR_TYPE_STRING
int NWNX_Object_GetLastSpellInstant()
Returns TRUE if the last spell was cast instantly. This function should only be called in a spell scr...
const int NWNX_OBJECT_TYPE_INTERNAL_PLACEABLE
int NWNX_Object_GetDamageImmunity(object obj, int damageType)
Get an object's damage immunity.
string NWNX_Object_GetLocalizedDescription(object oObject, int nLanguage, int nGender=0, int bIdentified=1)
Return the description of the object for nLanguage.
int NWNX_Object_GetInternalObjectType(object oObject)
Gets the given object's internal type (NWNX_OBJECT_TYPE_INTERNAL_*)
void NWNX_Object_SetHasInventory(object obj, int bHasInventory)
Sets if a placeable has an inventory.
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.
int NWNX_Object_AcquireItem(object oObject, object oItem)
Have oObject acquire oItem.
void NWNX_Object_SetLastTriggered(object oObject, object oLast)
Sets the last object that triggered door or placeable trap.
int NWNX_Object_GetCurrentHitPoints(object obj)
Get an object's hit points.
void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey)
Sets if a door/placeable auto-removes the key after use.
string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender=0)
Return the name of the object for nLanguage.
string NWNX_Object_GetDialogResref(object obj)
Gets the dialog resref.
object NWNX_Object_Deserialize(string serialized)
Deserialize the object.
void NWNX_Object_SetCurrentHitPoints(object obj, int hp)
Set an object's hit points.
int NWNX_Object_GetInventoryItemCount(object oObject)
Returns how many items are in oObject's inventory.
void NWNX_Object_ClearSpellEffectsOnOthers(object oObject)
Clear all spell effects oObject has applied to others.
string NWNX_Object_PeekUUID(object oObject)
Peek at the UUID of oObject without assigning one if it does not have one.
void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist)
Set oObject's string variable sVarName to sValue.
float NWNX_Object_GetFloat(object oObject, string sVarName)
Get oObject's float variable sVarName.
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 n...
void NWNX_Object_DeleteInt(object oObject, string sVarName)
Delete oObject's integer variable sVarName.
const int NWNX_OBJECT_TYPE_INTERNAL_AREAOFEFFECT
void NWNX_Object_DeleteFloat(object oObject, string sVarName)
Delete oObject's persistent float variable sVarName.
void NWNX_Object_SetLocalizedDescription(object oObject, string sDescription, int nLanguage, int nGender=0, int bIdentified=1)
Set the description of the object as set in the toolset for nLanguage.
int NWNX_Object_GetLastSpellCastSpontaneous(object oObject)
Gets whether the last spell cast of oObject was spontaneous.
int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1)
Checks for specific spell immunity. Should only be called in spellscripts.
struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable(object obj, int index)
Gets the local variable at the provided index of the provided object.
float NWNX_Object_GetAoEObjectRadius(object oAoE)
Gets the radius of a circle AoE object.
void NWNX_Object_SetMaxHitPoints(object obj, int hp)
Adjust an object's maximum hit points.
const int NWNX_OBJECT_SPELL_PROJECTILE_TYPE_DEFAULT
int NWNX_Object_GetHasVisualEffect(object obj, int nVFX)
Determine if an object has a visual effect.
const int NWNX_OBJECT_TYPE_INTERNAL_TILE
int NWNX_Object_GetAppearance(object oPlaceable)
Get oPlaceable's appearance.
void NWNX_Object_DeleteVarRegex(object oObject, string sRegex)
Delete any variables that match sRegex.
int NWNX_Object_GetInt(object oObject, string sVarName)
Get oObject's integer variable sVarName.
A local variable structure.
string key
Name of the variable.
int type
Int, String, Float, Object.