NWNX:EE  8193.37.17
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 
441 string NWNX_Object_GetLocalizedDescription(object oObject, int nLanguage, int nGender = 0, int bIdentified = 1);
442 
449 void NWNX_Object_SetLocalizedDescription(object oObject, string sDescription, int nLanguage, int nGender = 0, int bIdentified = 1);
451 
453 {
454  NWNXPushObject(obj);
455  NWNXCall(NWNX_Object, "GetLocalVariableCount");
456  return NWNXPopInt();
457 }
458 
459 struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable(object obj, int index)
460 {
461  NWNXPushInt(index);
462  NWNXPushObject(obj);
463  NWNXCall(NWNX_Object, "GetLocalVariable");
464  struct NWNX_Object_LocalVariable var;
465  var.key = NWNXPopString();
466  var.type = NWNXPopInt();
467  return var;
468 }
469 
470 void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas = TRUE)
471 {
472  NWNXPushInt(bUpdateSubareas);
473  NWNXPushVector(vPosition);
474  NWNXPushObject(oObject);
475  NWNXCall(NWNX_Object, "SetPosition");
476 }
477 
479 {
480  NWNXPushObject(creature);
481  NWNXCall(NWNX_Object, "GetCurrentHitPoints");
482  return NWNXPopInt();
483 }
484 
485 void NWNX_Object_SetCurrentHitPoints(object creature, int hp)
486 {
487  NWNXPushInt(hp);
488  NWNXPushObject(creature);
489  NWNXCall(NWNX_Object, "SetCurrentHitPoints");
490 }
491 
492 void NWNX_Object_SetMaxHitPoints(object creature, int hp)
493 {
494  NWNXPushInt(hp);
495  NWNXPushObject(creature);
496  NWNXCall(NWNX_Object, "SetMaxHitPoints");
497 }
498 
499 string NWNX_Object_Serialize(object obj)
500 {
501  NWNXPushObject(obj);
502  NWNXCall(NWNX_Object, "Serialize");
503  return NWNXPopString();
504 }
505 
506 object NWNX_Object_Deserialize(string serialized)
507 {
508  NWNXPushString(serialized);
509  NWNXCall(NWNX_Object, "Deserialize");
510  return NWNXPopObject();
511 }
512 
513 string NWNX_Object_GetDialogResref(object obj)
514 {
515  NWNXPushObject(obj);
516  NWNXCall(NWNX_Object, "GetDialogResref");
517  return NWNXPopString();
518 }
519 
520 void NWNX_Object_SetDialogResref(object obj, string dialog)
521 {
522  NWNXPushString(dialog);
523  NWNXPushObject(obj);
524  NWNXCall(NWNX_Object, "SetDialogResref");
525 }
526 
527 void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance)
528 {
529  NWNXPushInt(nAppearance);
530  NWNXPushObject(oPlaceable);
531  NWNXCall(NWNX_Object, "SetAppearance");
532 }
533 
534 int NWNX_Object_GetAppearance(object oPlaceable)
535 {
536  NWNXPushObject(oPlaceable);
537  NWNXCall(NWNX_Object, "GetAppearance");
538  return NWNXPopInt();
539 }
540 
541 int NWNX_Object_GetHasVisualEffect(object obj, int nVFX)
542 {
543  NWNXPushInt(nVFX);
544  NWNXPushObject(obj);
545  NWNXCall(NWNX_Object, "GetHasVisualEffect");
546  return NWNXPopInt();
547 }
548 
549 int NWNX_Object_GetDamageImmunity(object obj, int damageType)
550 {
551  NWNXPushInt(damageType);
552  NWNXPushObject(obj);
553  NWNXCall(NWNX_Object, "GetDamageImmunity");
554  return NWNXPopInt();
555 }
556 
557 void NWNX_Object_AddToArea(object obj, object area, vector pos)
558 {
559  NWNXPushVector(pos);
560  NWNXPushObject(area);
561  NWNXPushObject(obj);
562  NWNXCall(NWNX_Object, "AddToArea");
563 }
564 
566 {
567  NWNXPushObject(obj);
568  NWNXCall(NWNX_Object, "GetPlaceableIsStatic");
569  return NWNXPopInt();
570 }
571 
572 void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic)
573 {
574  NWNXPushInt(isStatic);
575  NWNXPushObject(obj);
576  NWNXCall(NWNX_Object, "SetPlaceableIsStatic");
577 }
578 
580 {
581  NWNXPushObject(obj);
582  NWNXCall(NWNX_Object, "GetAutoRemoveKey");
583  return NWNXPopInt();
584 }
585 
586 void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey)
587 {
588  NWNXPushInt(bRemoveKey);
589  NWNXPushObject(obj);
590  NWNXCall(NWNX_Object, "SetAutoRemoveKey");
591 }
592 
593 string NWNX_Object_GetTriggerGeometry(object oTrigger)
594 {
595  NWNXPushObject(oTrigger);
596  NWNXCall(NWNX_Object, "GetTriggerGeometry");
597  return NWNXPopString();
598 }
599 
600 void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry)
601 {
602  NWNXPushString(sGeometry);
603  NWNXPushObject(oTrigger);
604  NWNXCall(NWNX_Object, "SetTriggerGeometry");
605 }
606 
607 void NWNX_Object_Export(object oObject, string sFileName, string sAlias = "NWNX")
608 {
609  NWNXPushString(sAlias);
610  NWNXPushString(sFileName);
611  NWNXPushObject(oObject);
612  NWNXCall(NWNX_Object, "Export");
613 }
614 
615 int NWNX_Object_GetInt(object oObject, string sVarName)
616 {
617  NWNXPushString(sVarName);
618  NWNXPushObject(oObject);
619  NWNXCall(NWNX_Object, "GetInt");
620  return NWNXPopInt();
621 }
622 
623 void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist)
624 {
625  NWNXPushInt(bPersist);
626  NWNXPushInt(nValue);
627  NWNXPushString(sVarName);
628  NWNXPushObject(oObject);
629  NWNXCall(NWNX_Object, "SetInt");
630 }
631 
632 void NWNX_Object_DeleteInt(object oObject, string sVarName)
633 {
634  NWNXPushString(sVarName);
635  NWNXPushObject(oObject);
636  NWNXCall(NWNX_Object, "DeleteInt");
637 }
638 
639 string NWNX_Object_GetString(object oObject, string sVarName)
640 {
641  NWNXPushString(sVarName);
642  NWNXPushObject(oObject);
643  NWNXCall(NWNX_Object, "GetString");
644  return NWNXPopString();
645 }
646 
647 void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist)
648 {
649  NWNXPushInt(bPersist);
650  NWNXPushString(sValue);
651  NWNXPushString(sVarName);
652  NWNXPushObject(oObject);
653  NWNXCall(NWNX_Object, "SetString");
654 }
655 
656 void NWNX_Object_DeleteString(object oObject, string sVarName)
657 {
658  NWNXPushString(sVarName);
659  NWNXPushObject(oObject);
660  NWNXCall(NWNX_Object, "DeleteString");
661 }
662 
663 float NWNX_Object_GetFloat(object oObject, string sVarName)
664 {
665  NWNXPushString(sVarName);
666  NWNXPushObject(oObject);
667  NWNXCall(NWNX_Object, "GetFloat");
668  return NWNXPopFloat();
669 }
670 
671 void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist)
672 {
673  NWNXPushInt(bPersist);
674  NWNXPushFloat(fValue);
675  NWNXPushString(sVarName);
676  NWNXPushObject(oObject);
677  NWNXCall(NWNX_Object, "SetFloat");
678 }
679 
680 void NWNX_Object_DeleteFloat(object oObject, string sVarName)
681 {
682  NWNXPushString(sVarName);
683  NWNXPushObject(oObject);
684  NWNXCall(NWNX_Object, "DeleteFloat");
685 }
686 
687 void NWNX_Object_DeleteVarRegex(object oObject, string sRegex)
688 {
689  NWNXPushString(sRegex);
690  NWNXPushObject(oObject);
691  NWNXCall(NWNX_Object, "DeleteVarRegex");
692 }
693 
694 int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition)
695 {
696  NWNXPushVector(vPosition);
697  NWNXPushObject(oTrigger);
698  NWNXCall(NWNX_Object, "GetPositionIsInTrigger");
699  return NWNXPopInt();
700 }
701 
703 {
704  NWNXPushObject(oObject);
705  NWNXCall(NWNX_Object, "GetInternalObjectType");
706  return NWNXPopInt();
707 }
708 
709 int NWNX_Object_AcquireItem(object oObject, object oItem)
710 {
711  NWNXPushObject(oItem);
712  NWNXPushObject(oObject);
713  NWNXCall(NWNX_Object, "AcquireItem");
714  return NWNXPopInt();
715 }
716 
718 {
719  NWNXPushObject(oObject);
720  NWNXCall(NWNX_Object, "ClearSpellEffectsOnOthers");
721 }
722 
723 string NWNX_Object_PeekUUID(object oObject)
724 {
725  NWNXPushObject(oObject);
726  NWNXCall(NWNX_Object, "PeekUUID");
727  return NWNXPopString();
728 }
729 
731 {
732  NWNXPushObject(oDoor);
733  NWNXCall(NWNX_Object, "GetDoorHasVisibleModel");
734  return NWNXPopInt();
735 }
736 
737 int NWNX_Object_GetIsDestroyable(object oObject)
738 {
739  NWNXPushObject(oObject);
740  NWNXCall(NWNX_Object, "GetIsDestroyable");
741  return NWNXPopInt();
742 }
743 
744 int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1)
745 {
746  NWNXPushInt(nSpellId);
747  NWNXPushObject(oCaster);
748  NWNXPushObject(oDefender);
749  NWNXCall(NWNX_Object, "DoSpellImmunity");
750  return NWNXPopInt();
751 }
752 
753 int NWNX_Object_DoSpellLevelAbsorption(object oDefender, object oCaster, int nSpellId=-1, int nSpellLevel=-1, int nSpellSchool=-1)
754 {
755  NWNXPushInt(nSpellSchool);
756  NWNXPushInt(nSpellLevel);
757  NWNXPushInt(nSpellId);
758  NWNXPushObject(oCaster);
759  NWNXPushObject(oDefender);
760  NWNXCall(NWNX_Object, "DoSpellLevelAbsorption");
761  return NWNXPopInt();
762 }
763 
764 void NWNX_Object_SetHasInventory(object obj, int bHasInventory)
765 {
766  NWNXPushInt(bHasInventory);
767  NWNXPushObject(obj);
768  NWNXCall(NWNX_Object, "SetHasInventory");
769 }
770 
772 {
773  NWNXPushObject(oObject);
774  NWNXCall(NWNX_Object, "GetCurrentAnimation");
775  return NWNXPopInt();
776 }
777 
778 int NWNX_Object_GetAILevel(object oObject)
779 {
780  NWNXPushObject(oObject);
781  NWNXCall(NWNX_Object, "GetAILevel");
782  return NWNXPopInt();
783 }
784 
785 void NWNX_Object_SetAILevel(object oObject, int nLevel)
786 {
787  NWNXPushInt(nLevel);
788  NWNXPushObject(oObject);
789  NWNXCall(NWNX_Object, "SetAILevel");
790 }
791 
792 string NWNX_Object_GetMapNote(object oObject, int nID = 0, int nGender = 0)
793 {
794  NWNXPushInt(nGender);
795  NWNXPushInt(nID);
796  NWNXPushObject(oObject);
797  NWNXCall(NWNX_Object, "GetMapNote");
798  return NWNXPopString();
799 }
800 
801 void NWNX_Object_SetMapNote(object oObject, string sMapNote, int nID = 0, int nGender = 0)
802 {
803  NWNXPushInt(nGender);
804  NWNXPushInt(nID);
805  NWNXPushString(sMapNote);
806  NWNXPushObject(oObject);
807  NWNXCall(NWNX_Object, "SetMapNote");
808 }
809 
811 {
812  NWNXPushObject(oObject);
813  NWNXCall(NWNX_Object, "GetLastSpellCastFeat");
814  return NWNXPopInt();
815 }
816 
817 void NWNX_Object_SetLastTriggered(object oObject, object oLast)
818 {
819  NWNXPushObject(oLast);
820  NWNXPushObject(oObject);
821  NWNXCall(NWNX_Object, "SetLastTriggered");
822 }
823 
825 {
826  NWNXPushObject(oAoE);
827  NWNXCall(NWNX_Object, "GetAoEObjectDurationRemaining");
828  return NWNXPopFloat();
829 }
830 
831 void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate)
832 {
833  NWNXPushInt(bPrivate);
834  NWNXPushObject(oObject);
835  NWNXCall(NWNX_Object, "SetConversationPrivate");
836 }
837 
838 void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius)
839 {
840  NWNXPushFloat(fRadius);
841  NWNXPushObject(oAoE);
842  NWNXCall(NWNX_Object, "SetAoEObjectRadius");
843 }
844 
846 {
847  NWNXPushObject(oAoE);
848  NWNXCall(NWNX_Object, "GetAoEObjectRadius");
849  return NWNXPopFloat();
850 }
851 
853 {
854  NWNXPushObject(oObject);
855  NWNXCall(NWNX_Object, "GetLastSpellCastSpontaneous");
856  return NWNXPopInt();
857 }
858 
860 {
861  NWNXPushObject(oObject);
862  NWNXCall(NWNX_Object, "GetLastSpellCastDomainLevel");
863  return NWNXPopInt();
864 }
865 
866 void NWNX_Object_ForceAssignUUID(object oObject, string sUUID)
867 {
868  NWNXPushString(sUUID);
869  NWNXPushObject(oObject);
870  NWNXCall(NWNX_Object, "ForceAssignUUID");
871 }
872 
874 {
875  NWNXPushObject(oObject);
876  NWNXCall(NWNX_Object, "GetInventoryItemCount");
877  return NWNXPopInt();
878 }
879 
880 void NWNX_Object_OverrideSpellProjectileVFX(object oCreature, int nProjectileType = -1, int nProjectilePathType = -1, int nSpellID = -1, int bPersist = FALSE)
881 {
882  NWNXPushInt(bPersist);
883  NWNXPushInt(nSpellID);
884  NWNXPushInt(nProjectilePathType);
885  NWNXPushInt(nProjectileType);
886  NWNXPushObject(oCreature);
887  NWNXCall(NWNX_Object, "OverrideSpellProjectileVFX");
888 }
889 
891 {
892  NWNXCall(NWNX_Object, "GetLastSpellInstant");
893  return NWNXPopInt();
894 }
895 
896 void NWNX_Object_SetTrapCreator(object oObject, object oCreator)
897 {
898  NWNXPushObject(oCreator);
899  NWNXPushObject(oObject);
900  NWNXCall(NWNX_Object, "SetTrapCreator");
901 }
902 
903 string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender = 0)
904 {
905  string sFunc = "GetLocalizedName";
906 
907  NWNXPushInt(nGender);
908  NWNXPushInt(nLanguage);
909  NWNXPushObject(oObject);
910 
911  NWNXCall(NWNX_Object, sFunc);
912  return NWNXPopString();
913 }
914 
915 void NWNX_Object_SetLocalizedName(object oObject, string sName, int nLanguage, int nGender = 0)
916 {
917  string sFunc = "SetLocalizedName";
918 
919  NWNXPushInt(nGender);
920  NWNXPushInt(nLanguage);
921  NWNXPushString(sName);
922  NWNXPushObject(oObject);
923 
924  NWNXCall(NWNX_Object, sFunc);
925 }
926 
927 string NWNX_Object_GetLocalizedDescription(object oObject, int nLanguage, int nGender = 0, int bIdentified = 1)
928 {
929  string sFunc = "GetLocalizedDescription";
930 
931  NWNXPushInt(bIdentified);
932  NWNXPushInt(nGender);
933  NWNXPushInt(nLanguage);
934  NWNXPushObject(oObject);
935 
936  NWNXCall(NWNX_Object, sFunc);
937  return NWNXPopString();
938 }
939 
940 void NWNX_Object_SetLocalizedDescription(object oObject, string sDescription, int nLanguage, int nGender = 0, int bIdentified = 1)
941 {
942  string sFunc = "SetLocalizedDescription";
943 
944  NWNXPushInt(bIdentified);
945  NWNXPushInt(nGender);
946  NWNXPushInt(nLanguage);
947  NWNXPushString(sDescription);
948  NWNXPushObject(oObject);
949 
950  NWNXCall(NWNX_Object, sFunc);
951 }
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.
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
Definition: nwnx_object.nss:34
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
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