NWNX:EE  8193.37.14
nwnx_object.nss
Go to the documentation of this file.
1 
6 const string NWNX_Object = "NWNX_Object";
7 
19 
41 
48 
51 {
52  int type;
53  string key;
54 };
55 
59 int NWNX_Object_GetLocalVariableCount(object obj);
60 
75 struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable(object obj, int index);
76 
81 void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas = TRUE);
82 
87 int NWNX_Object_GetCurrentHitPoints(object obj);
88 
92 void NWNX_Object_SetCurrentHitPoints(object obj, int hp);
93 
98 void NWNX_Object_SetMaxHitPoints(object obj, int hp);
99 
104 string NWNX_Object_Serialize(object obj);
105 
110 object NWNX_Object_Deserialize(string serialized);
111 
115 string NWNX_Object_GetDialogResref(object obj);
116 
120 void NWNX_Object_SetDialogResref(object obj, string dialog);
121 
126 void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance);
127 
131 int NWNX_Object_GetAppearance(object oPlaceable);
132 
137 int NWNX_Object_GetHasVisualEffect(object obj, int nVFX);
138 
143 int NWNX_Object_GetDamageImmunity(object obj, int damageType);
144 
149 void NWNX_Object_AddToArea(object obj, object area, vector pos);
150 
154 int NWNX_Object_GetPlaceableIsStatic(object obj);
155 
160 void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic);
161 
165 int NWNX_Object_GetAutoRemoveKey(object obj);
166 
170 void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey);
171 
175 string NWNX_Object_GetTriggerGeometry(object oTrigger);
176 
186 void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry);
187 
192 void NWNX_Object_Export(object oObject, string sFileName, string sAlias = "NWNX");
193 
198 int NWNX_Object_GetInt(object oObject, string sVarName);
199 
205 void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist);
206 
210 void NWNX_Object_DeleteInt(object oObject, string sVarName);
211 
216 string NWNX_Object_GetString(object oObject, string sVarName);
217 
223 void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist);
224 
228 void NWNX_Object_DeleteString(object oObject, string sVarName);
229 
234 float NWNX_Object_GetFloat(object oObject, string sVarName);
235 
241 void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist);
242 
246 void NWNX_Object_DeleteFloat(object oObject, string sVarName);
247 
252 void NWNX_Object_DeleteVarRegex(object oObject, string sRegex);
253 
259 int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition);
260 
264 int NWNX_Object_GetInternalObjectType(object oObject);
265 
271 int NWNX_Object_AcquireItem(object oObject, object oItem);
272 
275 void NWNX_Object_ClearSpellEffectsOnOthers(object oObject);
276 
280 string NWNX_Object_PeekUUID(object oObject);
281 
285 int NWNX_Object_GetDoorHasVisibleModel(object oDoor);
286 
290 int NWNX_Object_GetIsDestroyable(object oObject);
291 
297 int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1);
298 
306 int NWNX_Object_DoSpellLevelAbsorption(object oDefender, object oCaster, int nSpellId=-1, int nSpellLevel=-1, int nSpellSchool=-1);
307 
312 void NWNX_Object_SetHasInventory(object obj, int bHasInventory);
313 
319 int NWNX_Object_GetCurrentAnimation(object oObject);
320 
324 int NWNX_Object_GetAILevel(object oObject);
325 
329 void NWNX_Object_SetAILevel(object oObject, int nLevel);
330 
335 string NWNX_Object_GetMapNote(object oObject, int nID = 0, int nGender = 0);
336 
342 void NWNX_Object_SetMapNote(object oObject, string sMapNote, int nID = 0, int nGender = 0);
343 
348 int NWNX_Object_GetLastSpellCastFeat(object oObject);
349 
354 void NWNX_Object_SetLastTriggered(object oObject, object oLast);
355 
360 
365 void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate);
366 
370 void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius);
371 
375 float NWNX_Object_GetAoEObjectRadius(object oAoE);
376 
381 int NWNX_Object_GetLastSpellCastSpontaneous(object oObject);
382 
387 int NWNX_Object_GetLastSpellCastDomainLevel(object oObject);
388 
392 void NWNX_Object_ForceAssignUUID(object oObject, string sUUID);
393 
397 int NWNX_Object_GetInventoryItemCount(object oObject);
398 
407 void NWNX_Object_OverrideSpellProjectileVFX(object oCreature, int nProjectileType = -1, int nProjectilePathType = -1, int nSpellID = -1, int bPersist = FALSE);
408 
413 
418 void NWNX_Object_SetTrapCreator(object oObject, object oCreator);
419 
425 string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender = 0);
426 
433 void NWNX_Object_SetLocalizedName(object oObject, string sName, int nLanguage, int nGender = 0);
434 
436 
438 {
439  NWNXPushObject(obj);
440  NWNXCall(NWNX_Object, "GetLocalVariableCount");
441  return NWNXPopInt();
442 }
443 
444 struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable(object obj, int index)
445 {
446  NWNXPushInt(index);
447  NWNXPushObject(obj);
448  NWNXCall(NWNX_Object, "GetLocalVariable");
449  struct NWNX_Object_LocalVariable var;
450  var.key = NWNXPopString();
451  var.type = NWNXPopInt();
452  return var;
453 }
454 
455 void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas = TRUE)
456 {
457  NWNXPushInt(bUpdateSubareas);
458  NWNXPushVector(vPosition);
459  NWNXPushObject(oObject);
460  NWNXCall(NWNX_Object, "SetPosition");
461 }
462 
464 {
465  NWNXPushObject(creature);
466  NWNXCall(NWNX_Object, "GetCurrentHitPoints");
467  return NWNXPopInt();
468 }
469 
470 void NWNX_Object_SetCurrentHitPoints(object creature, int hp)
471 {
472  NWNXPushInt(hp);
473  NWNXPushObject(creature);
474  NWNXCall(NWNX_Object, "SetCurrentHitPoints");
475 }
476 
477 void NWNX_Object_SetMaxHitPoints(object creature, int hp)
478 {
479  NWNXPushInt(hp);
480  NWNXPushObject(creature);
481  NWNXCall(NWNX_Object, "SetMaxHitPoints");
482 }
483 
484 string NWNX_Object_Serialize(object obj)
485 {
486  NWNXPushObject(obj);
487  NWNXCall(NWNX_Object, "Serialize");
488  return NWNXPopString();
489 }
490 
491 object NWNX_Object_Deserialize(string serialized)
492 {
493  NWNXPushString(serialized);
494  NWNXCall(NWNX_Object, "Deserialize");
495  return NWNXPopObject();
496 }
497 
498 string NWNX_Object_GetDialogResref(object obj)
499 {
500  NWNXPushObject(obj);
501  NWNXCall(NWNX_Object, "GetDialogResref");
502  return NWNXPopString();
503 }
504 
505 void NWNX_Object_SetDialogResref(object obj, string dialog)
506 {
507  NWNXPushString(dialog);
508  NWNXPushObject(obj);
509  NWNXCall(NWNX_Object, "SetDialogResref");
510 }
511 
512 void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance)
513 {
514  NWNXPushInt(nAppearance);
515  NWNXPushObject(oPlaceable);
516  NWNXCall(NWNX_Object, "SetAppearance");
517 }
518 
519 int NWNX_Object_GetAppearance(object oPlaceable)
520 {
521  NWNXPushObject(oPlaceable);
522  NWNXCall(NWNX_Object, "GetAppearance");
523  return NWNXPopInt();
524 }
525 
526 int NWNX_Object_GetHasVisualEffect(object obj, int nVFX)
527 {
528  NWNXPushInt(nVFX);
529  NWNXPushObject(obj);
530  NWNXCall(NWNX_Object, "GetHasVisualEffect");
531  return NWNXPopInt();
532 }
533 
534 int NWNX_Object_GetDamageImmunity(object obj, int damageType)
535 {
536  NWNXPushInt(damageType);
537  NWNXPushObject(obj);
538  NWNXCall(NWNX_Object, "GetDamageImmunity");
539  return NWNXPopInt();
540 }
541 
542 void NWNX_Object_AddToArea(object obj, object area, vector pos)
543 {
544  NWNXPushVector(pos);
545  NWNXPushObject(area);
546  NWNXPushObject(obj);
547  NWNXCall(NWNX_Object, "AddToArea");
548 }
549 
551 {
552  NWNXPushObject(obj);
553  NWNXCall(NWNX_Object, "GetPlaceableIsStatic");
554  return NWNXPopInt();
555 }
556 
557 void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic)
558 {
559  NWNXPushInt(isStatic);
560  NWNXPushObject(obj);
561  NWNXCall(NWNX_Object, "SetPlaceableIsStatic");
562 }
563 
565 {
566  NWNXPushObject(obj);
567  NWNXCall(NWNX_Object, "GetAutoRemoveKey");
568  return NWNXPopInt();
569 }
570 
571 void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey)
572 {
573  NWNXPushInt(bRemoveKey);
574  NWNXPushObject(obj);
575  NWNXCall(NWNX_Object, "SetAutoRemoveKey");
576 }
577 
578 string NWNX_Object_GetTriggerGeometry(object oTrigger)
579 {
580  NWNXPushObject(oTrigger);
581  NWNXCall(NWNX_Object, "GetTriggerGeometry");
582  return NWNXPopString();
583 }
584 
585 void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry)
586 {
587  NWNXPushString(sGeometry);
588  NWNXPushObject(oTrigger);
589  NWNXCall(NWNX_Object, "SetTriggerGeometry");
590 }
591 
592 void NWNX_Object_Export(object oObject, string sFileName, string sAlias = "NWNX")
593 {
594  NWNXPushString(sAlias);
595  NWNXPushString(sFileName);
596  NWNXPushObject(oObject);
597  NWNXCall(NWNX_Object, "Export");
598 }
599 
600 int NWNX_Object_GetInt(object oObject, string sVarName)
601 {
602  NWNXPushString(sVarName);
603  NWNXPushObject(oObject);
604  NWNXCall(NWNX_Object, "GetInt");
605  return NWNXPopInt();
606 }
607 
608 void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist)
609 {
610  NWNXPushInt(bPersist);
611  NWNXPushInt(nValue);
612  NWNXPushString(sVarName);
613  NWNXPushObject(oObject);
614  NWNXCall(NWNX_Object, "SetInt");
615 }
616 
617 void NWNX_Object_DeleteInt(object oObject, string sVarName)
618 {
619  NWNXPushString(sVarName);
620  NWNXPushObject(oObject);
621  NWNXCall(NWNX_Object, "DeleteInt");
622 }
623 
624 string NWNX_Object_GetString(object oObject, string sVarName)
625 {
626  NWNXPushString(sVarName);
627  NWNXPushObject(oObject);
628  NWNXCall(NWNX_Object, "GetString");
629  return NWNXPopString();
630 }
631 
632 void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist)
633 {
634  NWNXPushInt(bPersist);
635  NWNXPushString(sValue);
636  NWNXPushString(sVarName);
637  NWNXPushObject(oObject);
638  NWNXCall(NWNX_Object, "SetString");
639 }
640 
641 void NWNX_Object_DeleteString(object oObject, string sVarName)
642 {
643  NWNXPushString(sVarName);
644  NWNXPushObject(oObject);
645  NWNXCall(NWNX_Object, "DeleteString");
646 }
647 
648 float NWNX_Object_GetFloat(object oObject, string sVarName)
649 {
650  NWNXPushString(sVarName);
651  NWNXPushObject(oObject);
652  NWNXCall(NWNX_Object, "GetFloat");
653  return NWNXPopFloat();
654 }
655 
656 void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist)
657 {
658  NWNXPushInt(bPersist);
659  NWNXPushFloat(fValue);
660  NWNXPushString(sVarName);
661  NWNXPushObject(oObject);
662  NWNXCall(NWNX_Object, "SetFloat");
663 }
664 
665 void NWNX_Object_DeleteFloat(object oObject, string sVarName)
666 {
667  NWNXPushString(sVarName);
668  NWNXPushObject(oObject);
669  NWNXCall(NWNX_Object, "DeleteFloat");
670 }
671 
672 void NWNX_Object_DeleteVarRegex(object oObject, string sRegex)
673 {
674  NWNXPushString(sRegex);
675  NWNXPushObject(oObject);
676  NWNXCall(NWNX_Object, "DeleteVarRegex");
677 }
678 
679 int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition)
680 {
681  NWNXPushVector(vPosition);
682  NWNXPushObject(oTrigger);
683  NWNXCall(NWNX_Object, "GetPositionIsInTrigger");
684  return NWNXPopInt();
685 }
686 
688 {
689  NWNXPushObject(oObject);
690  NWNXCall(NWNX_Object, "GetInternalObjectType");
691  return NWNXPopInt();
692 }
693 
694 int NWNX_Object_AcquireItem(object oObject, object oItem)
695 {
696  NWNXPushObject(oItem);
697  NWNXPushObject(oObject);
698  NWNXCall(NWNX_Object, "AcquireItem");
699  return NWNXPopInt();
700 }
701 
703 {
704  NWNXPushObject(oObject);
705  NWNXCall(NWNX_Object, "ClearSpellEffectsOnOthers");
706 }
707 
708 string NWNX_Object_PeekUUID(object oObject)
709 {
710  NWNXPushObject(oObject);
711  NWNXCall(NWNX_Object, "PeekUUID");
712  return NWNXPopString();
713 }
714 
716 {
717  NWNXPushObject(oDoor);
718  NWNXCall(NWNX_Object, "GetDoorHasVisibleModel");
719  return NWNXPopInt();
720 }
721 
722 int NWNX_Object_GetIsDestroyable(object oObject)
723 {
724  NWNXPushObject(oObject);
725  NWNXCall(NWNX_Object, "GetIsDestroyable");
726  return NWNXPopInt();
727 }
728 
729 int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1)
730 {
731  NWNXPushInt(nSpellId);
732  NWNXPushObject(oCaster);
733  NWNXPushObject(oDefender);
734  NWNXCall(NWNX_Object, "DoSpellImmunity");
735  return NWNXPopInt();
736 }
737 
738 int NWNX_Object_DoSpellLevelAbsorption(object oDefender, object oCaster, int nSpellId=-1, int nSpellLevel=-1, int nSpellSchool=-1)
739 {
740  NWNXPushInt(nSpellSchool);
741  NWNXPushInt(nSpellLevel);
742  NWNXPushInt(nSpellId);
743  NWNXPushObject(oCaster);
744  NWNXPushObject(oDefender);
745  NWNXCall(NWNX_Object, "DoSpellLevelAbsorption");
746  return NWNXPopInt();
747 }
748 
749 void NWNX_Object_SetHasInventory(object obj, int bHasInventory)
750 {
751  NWNXPushInt(bHasInventory);
752  NWNXPushObject(obj);
753  NWNXCall(NWNX_Object, "SetHasInventory");
754 }
755 
757 {
758  NWNXPushObject(oObject);
759  NWNXCall(NWNX_Object, "GetCurrentAnimation");
760  return NWNXPopInt();
761 }
762 
763 int NWNX_Object_GetAILevel(object oObject)
764 {
765  NWNXPushObject(oObject);
766  NWNXCall(NWNX_Object, "GetAILevel");
767  return NWNXPopInt();
768 }
769 
770 void NWNX_Object_SetAILevel(object oObject, int nLevel)
771 {
772  NWNXPushInt(nLevel);
773  NWNXPushObject(oObject);
774  NWNXCall(NWNX_Object, "SetAILevel");
775 }
776 
777 string NWNX_Object_GetMapNote(object oObject, int nID = 0, int nGender = 0)
778 {
779  NWNXPushInt(nGender);
780  NWNXPushInt(nID);
781  NWNXPushObject(oObject);
782  NWNXCall(NWNX_Object, "GetMapNote");
783  return NWNXPopString();
784 }
785 
786 void NWNX_Object_SetMapNote(object oObject, string sMapNote, int nID = 0, int nGender = 0)
787 {
788  NWNXPushInt(nGender);
789  NWNXPushInt(nID);
790  NWNXPushString(sMapNote);
791  NWNXPushObject(oObject);
792  NWNXCall(NWNX_Object, "SetMapNote");
793 }
794 
796 {
797  NWNXPushObject(oObject);
798  NWNXCall(NWNX_Object, "GetLastSpellCastFeat");
799  return NWNXPopInt();
800 }
801 
802 void NWNX_Object_SetLastTriggered(object oObject, object oLast)
803 {
804  NWNXPushObject(oLast);
805  NWNXPushObject(oObject);
806  NWNXCall(NWNX_Object, "SetLastTriggered");
807 }
808 
810 {
811  NWNXPushObject(oAoE);
812  NWNXCall(NWNX_Object, "GetAoEObjectDurationRemaining");
813  return NWNXPopFloat();
814 }
815 
816 void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate)
817 {
818  NWNXPushInt(bPrivate);
819  NWNXPushObject(oObject);
820  NWNXCall(NWNX_Object, "SetConversationPrivate");
821 }
822 
823 void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius)
824 {
825  NWNXPushFloat(fRadius);
826  NWNXPushObject(oAoE);
827  NWNXCall(NWNX_Object, "SetAoEObjectRadius");
828 }
829 
831 {
832  NWNXPushObject(oAoE);
833  NWNXCall(NWNX_Object, "GetAoEObjectRadius");
834  return NWNXPopFloat();
835 }
836 
838 {
839  NWNXPushObject(oObject);
840  NWNXCall(NWNX_Object, "GetLastSpellCastSpontaneous");
841  return NWNXPopInt();
842 }
843 
845 {
846  NWNXPushObject(oObject);
847  NWNXCall(NWNX_Object, "GetLastSpellCastDomainLevel");
848  return NWNXPopInt();
849 }
850 
851 void NWNX_Object_ForceAssignUUID(object oObject, string sUUID)
852 {
853  NWNXPushString(sUUID);
854  NWNXPushObject(oObject);
855  NWNXCall(NWNX_Object, "ForceAssignUUID");
856 }
857 
859 {
860  NWNXPushObject(oObject);
861  NWNXCall(NWNX_Object, "GetInventoryItemCount");
862  return NWNXPopInt();
863 }
864 
865 void NWNX_Object_OverrideSpellProjectileVFX(object oCreature, int nProjectileType = -1, int nProjectilePathType = -1, int nSpellID = -1, int bPersist = FALSE)
866 {
867  NWNXPushInt(bPersist);
868  NWNXPushInt(nSpellID);
869  NWNXPushInt(nProjectilePathType);
870  NWNXPushInt(nProjectileType);
871  NWNXPushObject(oCreature);
872  NWNXCall(NWNX_Object, "OverrideSpellProjectileVFX");
873 }
874 
876 {
877  NWNXCall(NWNX_Object, "GetLastSpellInstant");
878  return NWNXPopInt();
879 }
880 
881 void NWNX_Object_SetTrapCreator(object oObject, object oCreator)
882 {
883  NWNXPushObject(oCreator);
884  NWNXPushObject(oObject);
885  NWNXCall(NWNX_Object, "SetTrapCreator");
886 }
887 
888 string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender = 0)
889 {
890  string sFunc = "GetLocalizedName";
891 
892  NWNXPushInt(nGender);
893  NWNXPushInt(nLanguage);
894  NWNXPushObject(oObject);
895 
896  NWNXCall(NWNX_Object, sFunc);
897  return NWNXPopString();
898 }
899 
900 void NWNX_Object_SetLocalizedName(object oObject, string sName, int nLanguage, int nGender = 0)
901 {
902  string sFunc = "SetLocalizedName";
903 
904  NWNXPushInt(nGender);
905  NWNXPushInt(nLanguage);
906  NWNXPushString(sName);
907  NWNXPushObject(oObject);
908 
909  NWNXCall(NWNX_Object, sFunc);
910 }
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
Definition: nwnx_object.nss:13
const int NWNX_OBJECT_TYPE_INTERNAL_STORE
Definition: nwnx_object.nss:37
int NWNX_Object_GetLocalVariableCount(object obj)
Gets the count of all local variables.
const int NWNX_OBJECT_TYPE_INTERNAL_PROJECTILE
Definition: nwnx_object.nss:31
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
Definition: nwnx_object.nss:12
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
Definition: nwnx_object.nss:33
int NWNX_Object_GetPlaceableIsStatic(object obj)
Get placeable's static setting.
const int NWNX_OBJECT_LOCALVAR_TYPE_OBJECT
Definition: nwnx_object.nss:15
float NWNX_Object_GetAoEObjectDurationRemaining(object oAoE)
Gets the remaining duration of the AoE object.
const int NWNX_OBJECT_TYPE_INTERNAL_ENCOUNTER
Definition: nwnx_object.nss:36
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
Definition: nwnx_object.nss:30
const int NWNX_OBJECT_TYPE_INTERNAL_ITEM
Definition: nwnx_object.nss:29
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
Definition: nwnx_object.nss:11
const int NWNX_OBJECT_LOCALVAR_TYPE_JSON
Definition: nwnx_object.nss:17
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
Definition: nwnx_object.nss:46
const int NWNX_OBJECT_TYPE_INTERNAL_MODULE
Definition: nwnx_object.nss:26
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
Definition: nwnx_object.nss:27
void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic)
Set placeable as static or not.
const int NWNX_OBJECT_LOCALVAR_TYPE_LOCATION
Definition: nwnx_object.nss:16
const int NWNX_OBJECT_TYPE_INTERNAL_WAYPOINT
Definition: nwnx_object.nss:35
void NWNX_Object_DeleteString(object oObject, string sVarName)
Delete oObject's string variable sVarName.
const int NWNX_OBJECT_TYPE_INTERNAL_GUI
Definition: nwnx_object.nss:24
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
Definition: nwnx_object.nss:23
const int NWNX_OBJECT_TYPE_INTERNAL_CREATURE
Definition: nwnx_object.nss:28
const int NWNX_OBJECT_TYPE_INTERNAL_PORTAL
Definition: nwnx_object.nss:38
void NWNX_Object_SetDialogResref(object obj, string dialog)
Sets the dialog resref.
const int NWNX_OBJECT_TYPE_INTERNAL_SOUND
Definition: nwnx_object.nss:39
const int NWNX_OBJECT_LOCALVAR_TYPE_STRING
Definition: nwnx_object.nss:14
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
Definition: nwnx_object.nss:32
int NWNX_Object_GetDamageImmunity(object obj, int damageType)
Get an object's damage immunity.
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
Definition: nwnx_object.nss:34
void NWNX_Object_DeleteFloat(object oObject, string sVarName)
Delete oObject's persistent float variable sVarName.
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
Definition: nwnx_object.nss:45
int NWNX_Object_GetHasVisualEffect(object obj, int nVFX)
Determine if an object has a visual effect.
const int NWNX_OBJECT_TYPE_INTERNAL_TILE
Definition: nwnx_object.nss:25
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.
Definition: nwnx_object.nss:51
string key
Name of the variable.
Definition: nwnx_object.nss:53
int type
Int, String, Float, Object.
Definition: nwnx_object.nss:52