NWNX:EE  8193.36.12
nwnx_object.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Object = "NWNX_Object";
8 
20 
42 
49 
52 {
53  int type;
54  string key;
55 };
56 
60 int NWNX_Object_GetLocalVariableCount(object obj);
61 
76 struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable(object obj, int index);
77 
82 void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas = TRUE);
83 
88 int NWNX_Object_GetCurrentHitPoints(object obj);
89 
93 void NWNX_Object_SetCurrentHitPoints(object obj, int hp);
94 
99 void NWNX_Object_SetMaxHitPoints(object obj, int hp);
100 
105 string NWNX_Object_Serialize(object obj);
106 
111 object NWNX_Object_Deserialize(string serialized);
112 
116 string NWNX_Object_GetDialogResref(object obj);
117 
121 void NWNX_Object_SetDialogResref(object obj, string dialog);
122 
127 void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance);
128 
132 int NWNX_Object_GetAppearance(object oPlaceable);
133 
138 int NWNX_Object_GetHasVisualEffect(object obj, int nVFX);
139 
144 int NWNX_Object_GetDamageImmunity(object obj, int damageType);
145 
150 void NWNX_Object_AddToArea(object obj, object area, vector pos);
151 
155 int NWNX_Object_GetPlaceableIsStatic(object obj);
156 
161 void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic);
162 
166 int NWNX_Object_GetAutoRemoveKey(object obj);
167 
171 void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey);
172 
176 string NWNX_Object_GetTriggerGeometry(object oTrigger);
177 
187 void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry);
188 
193 void NWNX_Object_Export(object oObject, string sFileName, string sAlias = "NWNX");
194 
199 int NWNX_Object_GetInt(object oObject, string sVarName);
200 
206 void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist);
207 
211 void NWNX_Object_DeleteInt(object oObject, string sVarName);
212 
217 string NWNX_Object_GetString(object oObject, string sVarName);
218 
224 void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist);
225 
229 void NWNX_Object_DeleteString(object oObject, string sVarName);
230 
235 float NWNX_Object_GetFloat(object oObject, string sVarName);
236 
242 void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist);
243 
247 void NWNX_Object_DeleteFloat(object oObject, string sVarName);
248 
253 void NWNX_Object_DeleteVarRegex(object oObject, string sRegex);
254 
260 int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition);
261 
265 int NWNX_Object_GetInternalObjectType(object oObject);
266 
272 int NWNX_Object_AcquireItem(object oObject, object oItem);
273 
276 void NWNX_Object_ClearSpellEffectsOnOthers(object oObject);
277 
281 string NWNX_Object_PeekUUID(object oObject);
282 
286 int NWNX_Object_GetDoorHasVisibleModel(object oDoor);
287 
291 int NWNX_Object_GetIsDestroyable(object oObject);
292 
298 int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1);
299 
307 int NWNX_Object_DoSpellLevelAbsorption(object oDefender, object oCaster, int nSpellId=-1, int nSpellLevel=-1, int nSpellSchool=-1);
308 
313 void NWNX_Object_SetHasInventory(object obj, int bHasInventory);
314 
320 int NWNX_Object_GetCurrentAnimation(object oObject);
321 
325 int NWNX_Object_GetAILevel(object oObject);
326 
330 void NWNX_Object_SetAILevel(object oObject, int nLevel);
331 
336 string NWNX_Object_GetMapNote(object oObject, int nID = 0, int nGender = 0);
337 
343 void NWNX_Object_SetMapNote(object oObject, string sMapNote, int nID = 0, int nGender = 0);
344 
349 int NWNX_Object_GetLastSpellCastFeat(object oObject);
350 
355 void NWNX_Object_SetLastTriggered(object oObject, object oLast);
356 
361 
366 void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate);
367 
371 void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius);
372 
376 float NWNX_Object_GetAoEObjectRadius(object oAoE);
377 
382 int NWNX_Object_GetLastSpellCastSpontaneous(object oObject);
383 
388 int NWNX_Object_GetLastSpellCastDomainLevel(object oObject);
389 
393 void NWNX_Object_ForceAssignUUID(object oObject, string sUUID);
394 
398 int NWNX_Object_GetInventoryItemCount(object oObject);
399 
408 void NWNX_Object_OverrideSpellProjectileVFX(object oCreature, int nProjectileType = -1, int nProjectilePathType = -1, int nSpellID = -1, int bPersist = FALSE);
409 
414 
419 void NWNX_Object_SetTrapCreator(object oObject, object oCreator);
420 
426 string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender = 0);
427 
434 void NWNX_Object_SetLocalizedName(object oObject, string sName, int nLanguage, int nGender = 0);
435 
437 
439 {
440  string sFunc = "GetLocalVariableCount";
441 
443  NWNX_CallFunction(NWNX_Object, sFunc);
444 
445  return NWNX_GetReturnValueInt();
446 }
447 
449 {
450  string sFunc = "GetLocalVariable";
451 
452  NWNX_PushArgumentInt(index);
454  NWNX_CallFunction(NWNX_Object, sFunc);
455 
456  struct NWNX_Object_LocalVariable var;
459  return var;
460 }
461 
462 void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas = TRUE)
463 {
464  string sFunc = "SetPosition";
465 
466  NWNX_PushArgumentInt(bUpdateSubareas);
467  NWNX_PushArgumentFloat(vPosition.x);
468  NWNX_PushArgumentFloat(vPosition.y);
469  NWNX_PushArgumentFloat(vPosition.z);
470  NWNX_PushArgumentObject(oObject);
471 
472  NWNX_CallFunction(NWNX_Object, sFunc);
473 }
474 
476 {
477  string sFunc = "GetCurrentHitPoints";
478 
479  NWNX_PushArgumentObject(creature);
480  NWNX_CallFunction(NWNX_Object, sFunc);
481 
482  return NWNX_GetReturnValueInt();
483 }
484 
485 void NWNX_Object_SetCurrentHitPoints(object creature, int hp)
486 {
487  string sFunc = "SetCurrentHitPoints";
488 
490  NWNX_PushArgumentObject(creature);
491 
492  NWNX_CallFunction(NWNX_Object, sFunc);
493 }
494 
495 void NWNX_Object_SetMaxHitPoints(object creature, int hp)
496 {
497  string sFunc = "SetMaxHitPoints";
498 
500  NWNX_PushArgumentObject(creature);
501 
502  NWNX_CallFunction(NWNX_Object, sFunc);
503 }
504 
505 string NWNX_Object_Serialize(object obj)
506 {
507  string sFunc = "Serialize";
508 
510 
511  NWNX_CallFunction(NWNX_Object, sFunc);
512  return NWNX_GetReturnValueString();
513 }
514 
515 object NWNX_Object_Deserialize(string serialized)
516 {
517  string sFunc = "Deserialize";
518 
519  NWNX_PushArgumentString(serialized);
520 
521  NWNX_CallFunction(NWNX_Object, sFunc);
522  return NWNX_GetReturnValueObject();
523 }
524 
525 string NWNX_Object_GetDialogResref(object obj)
526 {
527  string sFunc = "GetDialogResref";
528 
530 
531  NWNX_CallFunction(NWNX_Object, sFunc);
532  return NWNX_GetReturnValueString();
533 }
534 
535 void NWNX_Object_SetDialogResref(object obj, string dialog)
536 {
537  string sFunc = "SetDialogResref";
538 
539  NWNX_PushArgumentString(dialog);
541 
542  NWNX_CallFunction(NWNX_Object, sFunc);
543 }
544 
545 void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance)
546 {
547  string sFunc = "SetAppearance";
548 
549  NWNX_PushArgumentInt(nAppearance);
550  NWNX_PushArgumentObject(oPlaceable);
551 
552  NWNX_CallFunction(NWNX_Object, sFunc);
553 }
554 
555 int NWNX_Object_GetAppearance(object oPlaceable)
556 {
557  string sFunc = "GetAppearance";
558 
559  NWNX_PushArgumentObject(oPlaceable);
560  NWNX_CallFunction(NWNX_Object, sFunc);
561 
562  return NWNX_GetReturnValueInt();
563 }
564 
565 int NWNX_Object_GetHasVisualEffect(object obj, int nVFX)
566 {
567  string sFunc = "GetHasVisualEffect";
568 
569  NWNX_PushArgumentInt(nVFX);
571 
572  NWNX_CallFunction(NWNX_Object, sFunc);
573 
574  return NWNX_GetReturnValueInt();
575 }
576 
577 int NWNX_Object_GetDamageImmunity(object obj, int damageType)
578 {
579  string sFunc = "GetDamageImmunity";
580 
581  NWNX_PushArgumentInt(damageType);
583 
584  NWNX_CallFunction(NWNX_Object, sFunc);
585 
586  return NWNX_GetReturnValueInt();
587 }
588 
589 void NWNX_Object_AddToArea(object obj, object area, vector pos)
590 {
591  string sFunc = "AddToArea";
592 
593  NWNX_PushArgumentFloat(pos.z);
594  NWNX_PushArgumentFloat(pos.y);
595  NWNX_PushArgumentFloat(pos.x);
598  NWNX_CallFunction(NWNX_Object, sFunc);
599 }
600 
602 {
603  string sFunc = "GetPlaceableIsStatic";
604 
606 
607  NWNX_CallFunction(NWNX_Object, sFunc);
608  return NWNX_GetReturnValueInt();
609 }
610 
611 void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic)
612 {
613  string sFunc = "SetPlaceableIsStatic";
614 
615  NWNX_PushArgumentInt(isStatic);
617 
618  NWNX_CallFunction(NWNX_Object, sFunc);
619 }
620 
622 {
623  string sFunc = "GetAutoRemoveKey";
624 
626  NWNX_CallFunction(NWNX_Object, sFunc);
627 
628  return NWNX_GetReturnValueInt();
629 }
630 
631 void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey)
632 {
633  string sFunc = "SetAutoRemoveKey";
634 
635  NWNX_PushArgumentInt(bRemoveKey);
637 
638  NWNX_CallFunction(NWNX_Object, sFunc);
639 }
640 
641 string NWNX_Object_GetTriggerGeometry(object oTrigger)
642 {
643  string sFunc = "GetTriggerGeometry";
644 
645  NWNX_PushArgumentObject(oTrigger);
646  NWNX_CallFunction(NWNX_Object, sFunc);
647 
648  return NWNX_GetReturnValueString();
649 }
650 
651 void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry)
652 {
653  string sFunc = "SetTriggerGeometry";
654 
655  NWNX_PushArgumentString(sGeometry);
656  NWNX_PushArgumentObject(oTrigger);
657  NWNX_CallFunction(NWNX_Object, sFunc);
658 }
659 
660 void NWNX_Object_Export(object oObject, string sFileName, string sAlias = "NWNX")
661 {
662  string sFunc = "Export";
663 
664  NWNX_PushArgumentString(sAlias);
665  NWNX_PushArgumentString(sFileName);
666  NWNX_PushArgumentObject(oObject);
667  NWNX_CallFunction(NWNX_Object, sFunc);
668 }
669 
670 int NWNX_Object_GetInt(object oObject, string sVarName)
671 {
672  string sFunc = "GetInt";
673 
674  NWNX_PushArgumentString(sVarName);
675  NWNX_PushArgumentObject(oObject);
676  NWNX_CallFunction(NWNX_Object, sFunc);
677 
678  return NWNX_GetReturnValueInt();
679 }
680 
681 void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist)
682 {
683  string sFunc = "SetInt";
684 
685  NWNX_PushArgumentInt(bPersist);
686  NWNX_PushArgumentInt(nValue);
687  NWNX_PushArgumentString(sVarName);
688  NWNX_PushArgumentObject(oObject);
689  NWNX_CallFunction(NWNX_Object, sFunc);
690 }
691 
692 void NWNX_Object_DeleteInt(object oObject, string sVarName)
693 {
694  string sFunc = "DeleteInt";
695 
696  NWNX_PushArgumentString(sVarName);
697  NWNX_PushArgumentObject(oObject);
698  NWNX_CallFunction(NWNX_Object, sFunc);
699 }
700 
701 string NWNX_Object_GetString(object oObject, string sVarName)
702 {
703  string sFunc = "GetString";
704 
705  NWNX_PushArgumentString(sVarName);
706  NWNX_PushArgumentObject(oObject);
707  NWNX_CallFunction(NWNX_Object, sFunc);
708 
709  return NWNX_GetReturnValueString();
710 }
711 
712 void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist)
713 {
714  string sFunc = "SetString";
715 
716  NWNX_PushArgumentInt(bPersist);
717  NWNX_PushArgumentString(sValue);
718  NWNX_PushArgumentString(sVarName);
719  NWNX_PushArgumentObject(oObject);
720  NWNX_CallFunction(NWNX_Object, sFunc);
721 }
722 
723 void NWNX_Object_DeleteString(object oObject, string sVarName)
724 {
725  string sFunc = "DeleteString";
726 
727  NWNX_PushArgumentString(sVarName);
728  NWNX_PushArgumentObject(oObject);
729  NWNX_CallFunction(NWNX_Object, sFunc);
730 }
731 
732 float NWNX_Object_GetFloat(object oObject, string sVarName)
733 {
734  string sFunc = "GetFloat";
735 
736  NWNX_PushArgumentString(sVarName);
737  NWNX_PushArgumentObject(oObject);
738  NWNX_CallFunction(NWNX_Object, sFunc);
739 
740  return NWNX_GetReturnValueFloat();
741 }
742 
743 void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist)
744 {
745  string sFunc = "SetFloat";
746 
747  NWNX_PushArgumentInt(bPersist);
748  NWNX_PushArgumentFloat(fValue);
749  NWNX_PushArgumentString(sVarName);
750  NWNX_PushArgumentObject(oObject);
751  NWNX_CallFunction(NWNX_Object, sFunc);
752 }
753 
754 void NWNX_Object_DeleteFloat(object oObject, string sVarName)
755 {
756  string sFunc = "DeleteFloat";
757 
758  NWNX_PushArgumentString(sVarName);
759  NWNX_PushArgumentObject(oObject);
760  NWNX_CallFunction(NWNX_Object, sFunc);
761 }
762 
763 void NWNX_Object_DeleteVarRegex(object oObject, string sRegex)
764 {
765  string sFunc = "DeleteVarRegex";
766 
767  NWNX_PushArgumentString(sRegex);
768  NWNX_PushArgumentObject(oObject);
769  NWNX_CallFunction(NWNX_Object, sFunc);
770 }
771 
772 int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition)
773 {
774  string sFunc = "GetPositionIsInTrigger";
775 
776  NWNX_PushArgumentFloat(vPosition.z);
777  NWNX_PushArgumentFloat(vPosition.y);
778  NWNX_PushArgumentFloat(vPosition.x);
779  NWNX_PushArgumentObject(oTrigger);
780  NWNX_CallFunction(NWNX_Object, sFunc);
781 
782  return NWNX_GetReturnValueInt();
783 }
784 
786 {
787  string sFunc = "GetInternalObjectType";
788 
789  NWNX_PushArgumentObject(oObject);
790  NWNX_CallFunction(NWNX_Object, sFunc);
791 
792  return NWNX_GetReturnValueInt();
793 }
794 
795 int NWNX_Object_AcquireItem(object oObject, object oItem)
796 {
797  string sFunc = "AcquireItem";
798 
800  NWNX_PushArgumentObject(oObject);
801  NWNX_CallFunction(NWNX_Object, sFunc);
802 
803  return NWNX_GetReturnValueInt();
804 }
805 
807 {
808  string sFunc = "ClearSpellEffectsOnOthers";
809 
810  NWNX_PushArgumentObject(oObject);
811  NWNX_CallFunction(NWNX_Object, sFunc);
812 }
813 
814 string NWNX_Object_PeekUUID(object oObject)
815 {
816  string sFunc = "PeekUUID";
817 
818  NWNX_PushArgumentObject(oObject);
819  NWNX_CallFunction(NWNX_Object, sFunc);
820 
821  return NWNX_GetReturnValueString();
822 }
823 
825 {
826  string sFunc = "GetDoorHasVisibleModel";
827 
829  NWNX_CallFunction(NWNX_Object, sFunc);
830 
831  return NWNX_GetReturnValueInt();
832 }
833 
834 int NWNX_Object_GetIsDestroyable(object oObject)
835 {
836  string sFunc = "GetIsDestroyable";
837 
838  NWNX_PushArgumentObject(oObject);
839  NWNX_CallFunction(NWNX_Object, sFunc);
840 
841  return NWNX_GetReturnValueInt();
842 }
843 
844 int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1)
845 {
846  string sFunc = "DoSpellImmunity";
847  NWNX_PushArgumentInt(nSpellId);
848  NWNX_PushArgumentObject(oCaster);
849  NWNX_PushArgumentObject(oDefender);
850  NWNX_CallFunction(NWNX_Object, sFunc);
851 
852  return NWNX_GetReturnValueInt();
853 }
854 
855 int NWNX_Object_DoSpellLevelAbsorption(object oDefender, object oCaster, int nSpellId=-1, int nSpellLevel=-1, int nSpellSchool=-1)
856 {
857  string sFunc = "DoSpellLevelAbsorption";
858  NWNX_PushArgumentInt(nSpellSchool);
859  NWNX_PushArgumentInt(nSpellLevel);
860  NWNX_PushArgumentInt(nSpellId);
861  NWNX_PushArgumentObject(oCaster);
862  NWNX_PushArgumentObject(oDefender);
863  NWNX_CallFunction(NWNX_Object, sFunc);
864 
865  return NWNX_GetReturnValueInt();
866 }
867 
868 void NWNX_Object_SetHasInventory(object obj, int bHasInventory)
869 {
870  string sFunc = "SetHasInventory";
871 
872  NWNX_PushArgumentInt(bHasInventory);
874 
875  NWNX_CallFunction(NWNX_Object, sFunc);
876 }
877 
879 {
880  string sFunc = "GetCurrentAnimation";
881 
882  NWNX_PushArgumentObject(oObject);
883  NWNX_CallFunction(NWNX_Object, sFunc);
884 
885  return NWNX_GetReturnValueInt();
886 }
887 
888 int NWNX_Object_GetAILevel(object oObject)
889 {
890  string sFunc = "GetAILevel";
891 
892  NWNX_PushArgumentObject(oObject);
893  NWNX_CallFunction(NWNX_Object, sFunc);
894 
895  return NWNX_GetReturnValueInt();
896 }
897 
898 void NWNX_Object_SetAILevel(object oObject, int nLevel)
899 {
900  string sFunc = "SetAILevel";
901 
902  NWNX_PushArgumentInt(nLevel);
903  NWNX_PushArgumentObject(oObject);
904 
905  NWNX_CallFunction(NWNX_Object, sFunc);
906 }
907 
908 string NWNX_Object_GetMapNote(object oObject, int nID = 0, int nGender = 0)
909 {
910  string sFunc = "GetMapNote";
911 
912  NWNX_PushArgumentInt(nGender);
914  NWNX_PushArgumentObject(oObject);
915  NWNX_CallFunction(NWNX_Object, sFunc);
916 
917  return NWNX_GetReturnValueString();
918 }
919 
920 void NWNX_Object_SetMapNote(object oObject, string sMapNote, int nID = 0, int nGender = 0)
921 {
922  string sFunc = "SetMapNote";
923 
924  NWNX_PushArgumentInt(nGender);
926  NWNX_PushArgumentString(sMapNote);
927  NWNX_PushArgumentObject(oObject);
928  NWNX_CallFunction(NWNX_Object, sFunc);
929 }
930 
932 {
933  string sFunc = "GetLastSpellCastFeat";
934 
935  NWNX_PushArgumentObject(oObject);
936  NWNX_CallFunction(NWNX_Object, sFunc);
937 
938  return NWNX_GetReturnValueInt();
939 }
940 
941 void NWNX_Object_SetLastTriggered(object oObject, object oLast)
942 {
943  string sFunc = "SetLastTriggered";
944 
946  NWNX_PushArgumentObject(oObject);
947 
948  NWNX_CallFunction(NWNX_Object, sFunc);
949 }
950 
952 {
953  string sFunc = "GetAoEObjectDurationRemaining";
954 
956  NWNX_CallFunction(NWNX_Object, sFunc);
957 
958  return NWNX_GetReturnValueFloat();
959 }
960 
961 void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate)
962 {
963  string sFunc = "SetConversationPrivate";
964 
965  NWNX_PushArgumentInt(bPrivate);
966  NWNX_PushArgumentObject(oObject);
967 
968  NWNX_CallFunction(NWNX_Object, sFunc);
969 }
970 
971 void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius)
972 {
973  string sFunc = "SetAoEObjectRadius";
974 
975  NWNX_PushArgumentFloat(fRadius);
977  NWNX_CallFunction(NWNX_Object, sFunc);
978 }
979 
981 {
982  string sFunc = "GetAoEObjectRadius";
983 
985  NWNX_CallFunction(NWNX_Object, sFunc);
986 
987  return NWNX_GetReturnValueFloat();
988 }
989 
991 {
992  string sFunc = "GetLastSpellCastSpontaneous";
993 
994  NWNX_PushArgumentObject(oObject);
995  NWNX_CallFunction(NWNX_Object, sFunc);
996 
997  return NWNX_GetReturnValueInt();
998 }
999 
1001 {
1002  string sFunc = "GetLastSpellCastDomainLevel";
1003 
1004  NWNX_PushArgumentObject(oObject);
1005  NWNX_CallFunction(NWNX_Object, sFunc);
1006 
1007  return NWNX_GetReturnValueInt();
1008 }
1009 
1010 void NWNX_Object_ForceAssignUUID(object oObject, string sUUID)
1011 {
1012  string sFunc = "ForceAssignUUID";
1013 
1014  NWNX_PushArgumentString(sUUID);
1015  NWNX_PushArgumentObject(oObject);
1016  NWNX_CallFunction(NWNX_Object, sFunc);
1017 }
1018 
1020 {
1021  string sFunc = "GetInventoryItemCount";
1022 
1023  NWNX_PushArgumentObject(oObject);
1024  NWNX_CallFunction(NWNX_Object, sFunc);
1025  return NWNX_GetReturnValueInt();
1026 }
1027 
1028 void NWNX_Object_OverrideSpellProjectileVFX(object oCreature, int nProjectileType = -1, int nProjectilePathType = -1, int nSpellID = -1, int bPersist = FALSE)
1029 {
1030  string sFunc = "OverrideSpellProjectileVFX";
1031 
1032  NWNX_PushArgumentInt(bPersist);
1033  NWNX_PushArgumentInt(nSpellID);
1034  NWNX_PushArgumentInt(nProjectilePathType);
1035  NWNX_PushArgumentInt(nProjectileType);
1036  NWNX_PushArgumentObject(oCreature);
1037  NWNX_CallFunction(NWNX_Object, sFunc);
1038 }
1039 
1041 {
1042  string sFunc = "GetLastSpellInstant";
1043  NWNX_CallFunction(NWNX_Object, sFunc);
1044  return NWNX_GetReturnValueInt();
1045 }
1046 
1047 void NWNX_Object_SetTrapCreator(object oObject, object oCreator)
1048 {
1049  string sFunc = "SetTrapCreator";
1050  NWNX_PushArgumentObject(oCreator);
1051  NWNX_PushArgumentObject(oObject);
1052  NWNX_CallFunction(NWNX_Object, sFunc);
1053 }
1054 
1055 string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender = 0)
1056 {
1057  string sFunc = "GetLocalizedName";
1058 
1059  NWNX_PushArgumentInt(nGender);
1060  NWNX_PushArgumentInt(nLanguage);
1061  NWNX_PushArgumentObject(oObject);
1062 
1063  NWNX_CallFunction(NWNX_Object, sFunc);
1064  return NWNX_GetReturnValueString();
1065 }
1066 
1067 void NWNX_Object_SetLocalizedName(object oObject, string sName, int nLanguage, int nGender = 0)
1068 {
1069  string sFunc = "SetLocalizedName";
1070 
1071  NWNX_PushArgumentInt(nGender);
1072  NWNX_PushArgumentInt(nLanguage);
1073  NWNX_PushArgumentString(sName);
1074  NWNX_PushArgumentObject(oObject);
1075 
1076  NWNX_CallFunction(NWNX_Object, sFunc);
1077 }
NWNX_Object_SetTriggerGeometry
void NWNX_Object_SetTriggerGeometry(object oTrigger, string sGeometry)
Set the geometry of a trigger with a list of vertex positions.
Definition: nwnx_object.nss:651
NWNX_Object_SetInt
void NWNX_Object_SetInt(object oObject, string sVarName, int nValue, int bPersist)
Set oObject's integer variable sVarName to nValue.
Definition: nwnx_object.nss:681
NWNX_Object_GetAppearance
int NWNX_Object_GetAppearance(object oPlaceable)
Get oPlaceable's appearance.
Definition: nwnx_object.nss:555
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_Object_PeekUUID
string NWNX_Object_PeekUUID(object oObject)
Peek at the UUID of oObject without assigning one if it does not have one.
Definition: nwnx_object.nss:814
NWNX_Object_Export
void NWNX_Object_Export(object oObject, string sFileName, string sAlias="NWNX")
Export an object to the UserDirectory/nwnx folder.
Definition: nwnx_object.nss:660
NWNX_OBJECT_TYPE_INTERNAL_DOOR
const int NWNX_OBJECT_TYPE_INTERNAL_DOOR
Definition: nwnx_object.nss:34
NWNX_OBJECT_TYPE_INTERNAL_AREA
const int NWNX_OBJECT_TYPE_INTERNAL_AREA
Definition: nwnx_object.nss:28
NWNX_OBJECT_SPELL_PROJECTILE_TYPE_DEFAULT
const int NWNX_OBJECT_SPELL_PROJECTILE_TYPE_DEFAULT
Definition: nwnx_object.nss:46
NWNX_OBJECT_TYPE_INTERNAL_GUI
const int NWNX_OBJECT_TYPE_INTERNAL_GUI
Definition: nwnx_object.nss:25
NWNX_Object_GetLocalizedName
string NWNX_Object_GetLocalizedName(object oObject, int nLanguage, int nGender=0)
Return the name of the object for nLanguage.
Definition: nwnx_object.nss:1055
NWNX_Object_SetPlaceableIsStatic
void NWNX_Object_SetPlaceableIsStatic(object obj, int isStatic)
Set placeable as static or not.
Definition: nwnx_object.nss:611
NWNX_Object_DeleteString
void NWNX_Object_DeleteString(object oObject, string sVarName)
Delete oObject's string variable sVarName.
Definition: nwnx_object.nss:723
NWNX_Object_DeleteInt
void NWNX_Object_DeleteInt(object oObject, string sVarName)
Delete oObject's integer variable sVarName.
Definition: nwnx_object.nss:692
NWNX_OBJECT_TYPE_INTERNAL_PLACEABLE
const int NWNX_OBJECT_TYPE_INTERNAL_PLACEABLE
Definition: nwnx_object.nss:33
NWNX_Object_GetDialogResref
string NWNX_Object_GetDialogResref(object obj)
Gets the dialog resref.
Definition: nwnx_object.nss:525
NWNX_Object_GetLocalVariable
struct NWNX_Object_LocalVariable NWNX_Object_GetLocalVariable(object obj, int index)
Gets the local variable at the provided index of the provided object.
Definition: nwnx_object.nss:448
NWNX_OBJECT_TYPE_INTERNAL_PROJECTILE
const int NWNX_OBJECT_TYPE_INTERNAL_PROJECTILE
Definition: nwnx_object.nss:32
NWNX_Object_GetHasVisualEffect
int NWNX_Object_GetHasVisualEffect(object obj, int nVFX)
Determine if an object has a visual effect.
Definition: nwnx_object.nss:565
NWNX_Object_GetInventoryItemCount
int NWNX_Object_GetInventoryItemCount(object oObject)
Returns how many items are in oObject's inventory.
Definition: nwnx_object.nss:1019
NWNX_Object_SetAoEObjectRadius
void NWNX_Object_SetAoEObjectRadius(object oAoE, float fRadius)
Sets the radius of a circle AoE object.
Definition: nwnx_object.nss:971
NWNX_Object_SetPosition
void NWNX_Object_SetPosition(object oObject, vector vPosition, int bUpdateSubareas=TRUE)
Set oObject's position.
Definition: nwnx_object.nss:462
NWNX_Object_SetLastTriggered
void NWNX_Object_SetLastTriggered(object oObject, object oLast)
Sets the last object that triggered door or placeable trap.
Definition: nwnx_object.nss:941
NWNX_Object_ForceAssignUUID
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...
Definition: nwnx_object.nss:1010
NWNX_Object_GetString
string NWNX_Object_GetString(object oObject, string sVarName)
Get oObject's string variable sVarName.
Definition: nwnx_object.nss:701
NWNX_GetReturnValueFloat
float NWNX_GetReturnValueFloat()
Returns the specified type from the c++ side.
Definition: nwnx.nss:99
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_OBJECT_TYPE_INTERNAL_AREAOFEFFECT
const int NWNX_OBJECT_TYPE_INTERNAL_AREAOFEFFECT
Definition: nwnx_object.nss:35
NWNX_OBJECT_TYPE_INTERNAL_MODULE
const int NWNX_OBJECT_TYPE_INTERNAL_MODULE
Definition: nwnx_object.nss:27
NWNX_Object_GetCurrentAnimation
int NWNX_Object_GetCurrentAnimation(object oObject)
Get the current animation of oObject.
Definition: nwnx_object.nss:878
NWNX_GetReturnValueString
string NWNX_GetReturnValueString()
Returns the specified type from the c++ side.
Definition: nwnx.nss:109
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_Object_GetInternalObjectType
int NWNX_Object_GetInternalObjectType(object oObject)
Gets the given object's internal type (NWNX_OBJECT_TYPE_INTERNAL_*)
Definition: nwnx_object.nss:785
NWNX_Object_GetMapNote
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.
Definition: nwnx_object.nss:908
NWNX_Object_ClearSpellEffectsOnOthers
void NWNX_Object_ClearSpellEffectsOnOthers(object oObject)
Clear all spell effects oObject has applied to others.
Definition: nwnx_object.nss:806
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_Object_GetAoEObjectRadius
float NWNX_Object_GetAoEObjectRadius(object oAoE)
Gets the radius of a circle AoE object.
Definition: nwnx_object.nss:980
NWNX_Object_SetCurrentHitPoints
void NWNX_Object_SetCurrentHitPoints(object obj, int hp)
Set an object's hit points.
Definition: nwnx_object.nss:485
NWNX_Object_GetAILevel
int NWNX_Object_GetAILevel(object oObject)
Gets the AI level of an object.
Definition: nwnx_object.nss:888
NWNX_Object_SetHasInventory
void NWNX_Object_SetHasInventory(object obj, int bHasInventory)
Sets if a placeable has an inventory.
Definition: nwnx_object.nss:868
NWNX_OBJECT_TYPE_INTERNAL_TILE
const int NWNX_OBJECT_TYPE_INTERNAL_TILE
Definition: nwnx_object.nss:26
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_OBJECT_LOCALVAR_TYPE_INT
const int NWNX_OBJECT_LOCALVAR_TYPE_INT
Definition: nwnx_object.nss:13
NWNX_Object_GetLastSpellInstant
int NWNX_Object_GetLastSpellInstant()
Returns TRUE if the last spell was cast instantly. This function should only be called in a spell scr...
Definition: nwnx_object.nss:1040
NWNX_OBJECT_LOCALVAR_TYPE_UNKNOWN
const int NWNX_OBJECT_LOCALVAR_TYPE_UNKNOWN
Definition: nwnx_object.nss:12
NWNX_OBJECT_LOCALVAR_TYPE_FLOAT
const int NWNX_OBJECT_LOCALVAR_TYPE_FLOAT
Definition: nwnx_object.nss:14
NWNX_Object_SetConversationPrivate
void NWNX_Object_SetConversationPrivate(object oObject, int bPrivate)
Sets conversations started by oObject to be private or not.
Definition: nwnx_object.nss:961
NWNX_Object_GetCurrentHitPoints
int NWNX_Object_GetCurrentHitPoints(object obj)
Get an object's hit points.
Definition: nwnx_object.nss:475
NWNX_Object_LocalVariable::key
string key
Name of the variable.
Definition: nwnx_object.nss:54
NWNX_Object_GetDoorHasVisibleModel
int NWNX_Object_GetDoorHasVisibleModel(object oDoor)
Get if oDoor has a visible model.
Definition: nwnx_object.nss:824
NWNX_Object_GetPlaceableIsStatic
int NWNX_Object_GetPlaceableIsStatic(object obj)
Get placeable's static setting.
Definition: nwnx_object.nss:601
NWNX_Object_SetTrapCreator
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...
Definition: nwnx_object.nss:1047
NWNX_Object_GetFloat
float NWNX_Object_GetFloat(object oObject, string sVarName)
Get oObject's float variable sVarName.
Definition: nwnx_object.nss:732
NWNX_Object_GetLocalVariableCount
int NWNX_Object_GetLocalVariableCount(object obj)
Gets the count of all local variables.
Definition: nwnx_object.nss:438
NWNX_Object_DoSpellImmunity
int NWNX_Object_DoSpellImmunity(object oDefender, object oCaster, int nSpellId=-1)
Checks for specific spell immunity. Should only be called in spellscripts.
Definition: nwnx_object.nss:844
NWNX_OBJECT_TYPE_INTERNAL_ENCOUNTER
const int NWNX_OBJECT_TYPE_INTERNAL_ENCOUNTER
Definition: nwnx_object.nss:37
NWNX_Object_GetLastSpellCastFeat
int NWNX_Object_GetLastSpellCastFeat(object oObject)
Gets the last spell cast feat of oObject.
Definition: nwnx_object.nss:931
NWNX_Object_GetAoEObjectDurationRemaining
float NWNX_Object_GetAoEObjectDurationRemaining(object oAoE)
Gets the remaining duration of the AoE object.
Definition: nwnx_object.nss:951
NWNX_Object_DeleteFloat
void NWNX_Object_DeleteFloat(object oObject, string sVarName)
Delete oObject's persistent float variable sVarName.
Definition: nwnx_object.nss:754
NWNX_Object_SetMapNote
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...
Definition: nwnx_object.nss:920
NWNX_Object_SetFloat
void NWNX_Object_SetFloat(object oObject, string sVarName, float fValue, int bPersist)
Set oObject's float variable sVarName to fValue.
Definition: nwnx_object.nss:743
NWNX_Object_GetLastSpellCastDomainLevel
int NWNX_Object_GetLastSpellCastDomainLevel(object oObject)
Gets the last spell cast domain level.
Definition: nwnx_object.nss:1000
NWNX_OBJECT_LOCALVAR_TYPE_LOCATION
const int NWNX_OBJECT_LOCALVAR_TYPE_LOCATION
Definition: nwnx_object.nss:17
NWNX_Object_GetLastSpellCastSpontaneous
int NWNX_Object_GetLastSpellCastSpontaneous(object oObject)
Gets whether the last spell cast of oObject was spontaneous.
Definition: nwnx_object.nss:990
NWNX_Object_SetAppearance
void NWNX_Object_SetAppearance(object oPlaceable, int nAppearance)
Set oPlaceable's appearance.
Definition: nwnx_object.nss:545
NWNX_OBJECT_TYPE_INTERNAL_ITEM
const int NWNX_OBJECT_TYPE_INTERNAL_ITEM
Definition: nwnx_object.nss:30
NWNX_Object_GetPositionIsInTrigger
int NWNX_Object_GetPositionIsInTrigger(object oTrigger, vector vPosition)
Get if vPosition is inside oTrigger's geometry.
Definition: nwnx_object.nss:772
NWNX_OBJECT_LOCALVAR_TYPE_JSON
const int NWNX_OBJECT_LOCALVAR_TYPE_JSON
Definition: nwnx_object.nss:18
NWNX_Object_GetIsDestroyable
int NWNX_Object_GetIsDestroyable(object oObject)
Get if oObject is destroyable.
Definition: nwnx_object.nss:834
NWNX_Object_DoSpellLevelAbsorption
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.
Definition: nwnx_object.nss:855
NWNX_Object_GetInt
int NWNX_Object_GetInt(object oObject, string sVarName)
Get oObject's integer variable sVarName.
Definition: nwnx_object.nss:670
NWNX_Object_AcquireItem
int NWNX_Object_AcquireItem(object oObject, object oItem)
Have oObject acquire oItem.
Definition: nwnx_object.nss:795
NWNX_OBJECT_TYPE_INTERNAL_WAYPOINT
const int NWNX_OBJECT_TYPE_INTERNAL_WAYPOINT
Definition: nwnx_object.nss:36
NWNX_OBJECT_TYPE_INTERNAL_STORE
const int NWNX_OBJECT_TYPE_INTERNAL_STORE
Definition: nwnx_object.nss:38
NWNX_Object_SetString
void NWNX_Object_SetString(object oObject, string sVarName, string sValue, int bPersist)
Set oObject's string variable sVarName to sValue.
Definition: nwnx_object.nss:712
NWNX_GetReturnValueObject
object NWNX_GetReturnValueObject()
Returns the specified type from the c++ side.
Definition: nwnx.nss:104
NWNX_OBJECT_TYPE_INTERNAL_PORTAL
const int NWNX_OBJECT_TYPE_INTERNAL_PORTAL
Definition: nwnx_object.nss:39
NWNX_Object_SetMaxHitPoints
void NWNX_Object_SetMaxHitPoints(object obj, int hp)
Adjust an object's maximum hit points.
Definition: nwnx_object.nss:495
NWNX_Object_SetDialogResref
void NWNX_Object_SetDialogResref(object obj, string dialog)
Sets the dialog resref.
Definition: nwnx_object.nss:535
NWNX_Object_AddToArea
void NWNX_Object_AddToArea(object obj, object area, vector pos)
Add or move an object.
Definition: nwnx_object.nss:589
NWNX_Object_GetDamageImmunity
int NWNX_Object_GetDamageImmunity(object obj, int damageType)
Get an object's damage immunity.
Definition: nwnx_object.nss:577
NWNX_Object_OverrideSpellProjectileVFX
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.
Definition: nwnx_object.nss:1028
NWNX_Object_GetTriggerGeometry
string NWNX_Object_GetTriggerGeometry(object oTrigger)
Get the geometry of a trigger.
Definition: nwnx_object.nss:641
NWNX_Object_LocalVariable::type
int type
Int, String, Float, Object.
Definition: nwnx_object.nss:53
NWNX_Object_DeleteVarRegex
void NWNX_Object_DeleteVarRegex(object oObject, string sRegex)
Delete any variables that match sRegex.
Definition: nwnx_object.nss:763
NWNX_Object_GetAutoRemoveKey
int NWNX_Object_GetAutoRemoveKey(object obj)
Gets if a door/placeable auto-removes the key after use.
Definition: nwnx_object.nss:621
NWNX_PushArgumentFloat
void NWNX_PushArgumentFloat(float value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:64
NWNX_Object_SetAutoRemoveKey
void NWNX_Object_SetAutoRemoveKey(object obj, int bRemoveKey)
Sets if a door/placeable auto-removes the key after use.
Definition: nwnx_object.nss:631
NWNX_OBJECT_TYPE_INTERNAL_CREATURE
const int NWNX_OBJECT_TYPE_INTERNAL_CREATURE
Definition: nwnx_object.nss:29
NWNX_OBJECT_LOCALVAR_TYPE_OBJECT
const int NWNX_OBJECT_LOCALVAR_TYPE_OBJECT
Definition: nwnx_object.nss:16
NWNX_Object_LocalVariable
A local variable structure.
Definition: nwnx_object.nss:51
NWNX_Object_SetAILevel
void NWNX_Object_SetAILevel(object oObject, int nLevel)
Sets the AI level of an object.
Definition: nwnx_object.nss:898
NWNX_Object_SetLocalizedName
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.
Definition: nwnx_object.nss:1067
NWNX_OBJECT_TYPE_INTERNAL_INVALID
const int NWNX_OBJECT_TYPE_INTERNAL_INVALID
Definition: nwnx_object.nss:24
NWNX_Object_Deserialize
object NWNX_Object_Deserialize(string serialized)
Deserialize the object.
Definition: nwnx_object.nss:515
NWNX_OBJECT_TYPE_INTERNAL_TRIGGER
const int NWNX_OBJECT_TYPE_INTERNAL_TRIGGER
Definition: nwnx_object.nss:31
NWNX_Object_Serialize
string NWNX_Object_Serialize(object obj)
Serialize a full object to a base64 string.
Definition: nwnx_object.nss:505
NWNX_OBJECT_SPELL_PROJECTILE_TYPE_USE_PATH
const int NWNX_OBJECT_SPELL_PROJECTILE_TYPE_USE_PATH
Definition: nwnx_object.nss:47
NWNX_OBJECT_TYPE_INTERNAL_SOUND
const int NWNX_OBJECT_TYPE_INTERNAL_SOUND
Definition: nwnx_object.nss:40
NWNX_OBJECT_LOCALVAR_TYPE_STRING
const int NWNX_OBJECT_LOCALVAR_TYPE_STRING
Definition: nwnx_object.nss:15