NWNX:EE  8193.36.12
nwnx_race.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Race = "NWNX_Race";
8 
14 const int NWNX_RACE_MODIFIER_AB = 1;
16 const int NWNX_RACE_MODIFIER_AC = 3;
27 const int NWNX_RACE_MODIFIER_RACE = 14;
29 const int NWNX_RACE_MODIFIER_SAVE = 16;
32 const int NWNX_RACE_MODIFIER_SKILL = 19;
37 
42 void NWNX_Race_SetRacialModifier(int iRace, int iMod, int iParam1, int iParam2 = 0xDEADBEEF, int iParam3 = 0xDEADBEEF);
43 
47 int NWNX_Race_GetParentRace(int iRace);
48 
55 void NWNX_Race_SetFavoredEnemyFeat(int iRace, int iFeat);
56 
60 void NWNX_Race_SuppressCreatureRaceEffects(object oCreature);
61 
65 void NWNX_Race_ReactivateCreatureRaceEffects(object oCreature);
66 
68 
69 void NWNX_Race_SetRacialModifier(int iRace, int iMod, int iParam1, int iParam2 = 0xDEADBEEF, int iParam3 = 0xDEADBEEF)
70 {
71  string sFunc = "SetRacialModifier";
72 
73  NWNX_PushArgumentInt(iParam3);
74  NWNX_PushArgumentInt(iParam2);
75  NWNX_PushArgumentInt(iParam1);
77  NWNX_PushArgumentInt(iRace);
78 
79  NWNX_CallFunction(NWNX_Race, sFunc);
80 }
81 
83 {
84  string sFunc = "GetParentRace";
85 
86  NWNX_PushArgumentInt(iRace);
87 
88  NWNX_CallFunction(NWNX_Race, sFunc);
89  return NWNX_GetReturnValueInt();
90 }
91 
92 void NWNX_Race_SetFavoredEnemyFeat(int iRace, int iFeat)
93 {
94  string sFunc = "SetFavoredEnemyFeat";
95 
96  NWNX_PushArgumentInt(iFeat);
97  NWNX_PushArgumentInt(iRace);
98 
99  NWNX_CallFunction(NWNX_Race, sFunc);
100 }
101 
103 {
104  string sFunc = "SuppressCreatureRaceEffects";
105 
106  NWNX_PushArgumentObject(creature);
107  NWNX_CallFunction(NWNX_Race, sFunc);
108 }
109 
111 {
112  string sFunc = "ReactivateCreatureRaceEffects";
113 
114  NWNX_PushArgumentObject(oCreature);
115  NWNX_CallFunction(NWNX_Race, sFunc);
116 }
NWNX_RACE_MODIFIER_SAVEVSTYPE
const int NWNX_RACE_MODIFIER_SAVEVSTYPE
Definition: nwnx_race.nss:31
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_RACE_MODIFIER_SRINCLEVEL
const int NWNX_RACE_MODIFIER_SRINCLEVEL
Definition: nwnx_race.nss:35
NWNX_RACE_MODIFIER_INITIATIVE
const int NWNX_RACE_MODIFIER_INITIATIVE
Definition: nwnx_race.nss:25
NWNX_RACE_MODIFIER_DMGREDUCTION
const int NWNX_RACE_MODIFIER_DMGREDUCTION
Definition: nwnx_race.nss:20
NWNX_RACE_MODIFIER_SAVE
const int NWNX_RACE_MODIFIER_SAVE
Definition: nwnx_race.nss:29
NWNX_RACE_MODIFIER_AC
const int NWNX_RACE_MODIFIER_AC
Definition: nwnx_race.nss:16
NWNX_RACE_MODIFIER_SRCHARGEN
const int NWNX_RACE_MODIFIER_SRCHARGEN
Definition: nwnx_race.nss:34
NWNX_RACE_MODIFIER_FEAT
const int NWNX_RACE_MODIFIER_FEAT
Definition: nwnx_race.nss:22
NWNX_RACE_MODIFIER_DMGRESIST
const int NWNX_RACE_MODIFIER_DMGRESIST
Definition: nwnx_race.nss:21
NWNX_RACE_MODIFIER_AB
const int NWNX_RACE_MODIFIER_AB
Definition: nwnx_race.nss:14
NWNX_RACE_MODIFIER_IMMUNITY
const int NWNX_RACE_MODIFIER_IMMUNITY
Definition: nwnx_race.nss:24
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_RACE_MODIFIER_DMGIMMUNITY
const int NWNX_RACE_MODIFIER_DMGIMMUNITY
Definition: nwnx_race.nss:19
NWNX_RACE_MODIFIER_SAVEVSRACE
const int NWNX_RACE_MODIFIER_SAVEVSRACE
Definition: nwnx_race.nss:30
NWNX_RACE_MODIFIER_SKILL
const int NWNX_RACE_MODIFIER_SKILL
Definition: nwnx_race.nss:32
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_Race_GetParentRace
int NWNX_Race_GetParentRace(int iRace)
Gets the parent race for a race.
Definition: nwnx_race.nss:82
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_RACE_MODIFIER_RACE
const int NWNX_RACE_MODIFIER_RACE
Definition: nwnx_race.nss:27
NWNX_Race_SetFavoredEnemyFeat
void NWNX_Race_SetFavoredEnemyFeat(int iRace, int iFeat)
Associates the race with its favored enemy feat.
Definition: nwnx_race.nss:92
NWNX_RACE_MODIFIER_FEATUSAGE
const int NWNX_RACE_MODIFIER_FEATUSAGE
Definition: nwnx_race.nss:23
NWNX_RACE_MODIFIER_SPELLIMMUNITY
const int NWNX_RACE_MODIFIER_SPELLIMMUNITY
Definition: nwnx_race.nss:33
NWNX_RACE_MODIFIER_REGENERATION
const int NWNX_RACE_MODIFIER_REGENERATION
Definition: nwnx_race.nss:28
NWNX_RACE_MODIFIER_CONCEALMENT
const int NWNX_RACE_MODIFIER_CONCEALMENT
Definition: nwnx_race.nss:18
NWNX_Race_SuppressCreatureRaceEffects
void NWNX_Race_SuppressCreatureRaceEffects(object oCreature)
Removes any nwnx_race 'Effects' on the targeted creature. Suppression lasts until levelup,...
Definition: nwnx_race.nss:102
NWNX_RACE_MODIFIER_INVALID
const int NWNX_RACE_MODIFIER_INVALID
Definition: nwnx_race.nss:13
NWNX_RACE_MODIFIER_ACVSRACE
const int NWNX_RACE_MODIFIER_ACVSRACE
Definition: nwnx_race.nss:17
NWNX_Race_SetRacialModifier
void NWNX_Race_SetRacialModifier(int iRace, int iMod, int iParam1, int iParam2=0xDEADBEEF, int iParam3=0xDEADBEEF)
Sets a racial modifier.
Definition: nwnx_race.nss:69
NWNX_Race_ReactivateCreatureRaceEffects
void NWNX_Race_ReactivateCreatureRaceEffects(object oCreature)
Reactivates the nwnx_race 'Effects' on the targeted creature after they were Suppressed.
Definition: nwnx_race.nss:110
NWNX_RACE_MODIFIER_MOVEMENTSPEED
const int NWNX_RACE_MODIFIER_MOVEMENTSPEED
Definition: nwnx_race.nss:26
NWNX_RACE_MODIFIER_ABVSRACE
const int NWNX_RACE_MODIFIER_ABVSRACE
Definition: nwnx_race.nss:15