CommonLibSSE NG
TESCondition.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/M/MemoryManager.h"
5 
6 namespace RE
7 {
8  struct BGSPackageDataList;
9  class BGSStoryEvent;
10  class TESGlobal;
11  class TESObjectREFR;
12  class TESQuest;
13 
15  {
16  kSelf = 0,
17  kTarget = 1,
18  kRef = 2,
19  kCombatTarget = 3,
20  kLinkedRef = 4,
21  kQuestAlias = 5,
22  kPackData = 6,
23  kEventData = 7,
24  kCommandTarget = 8
25  };
26 
28  {
29  public:
30  // Betheseda keeps these in a giant lookup table
31  // using func_t = bool(TESObjectREFR* a_thisObj, void* a_param1, void* a_param2, double& a_result);
32  enum class FunctionID
33  {
34  kGetWantBlocking = 0,
35  kGetDistance = 1,
36  kAddItem = 2,
37  kSetEssential = 3,
38  kRotate = 4,
39  kGetLocked = 5,
40  kGetPos = 6,
41  kSetPos = 7,
42  kGetAngle = 8,
43  kSetAngle = 9,
44  kGetStartingPos = 10,
45  kGetStartingAngle = 11,
46  kGetSecondsPassed = 12,
47  kActivate = 13,
48  kGetActorValue = 14,
49  kGetAV = static_cast<std::underlying_type_t<FunctionID>>(kGetActorValue),
50  kSetActorValue = 15,
51  kSetAV = static_cast<std::underlying_type_t<FunctionID>>(kSetActorValue),
52  kModActorValue = 16,
53  kModAV = static_cast<std::underlying_type_t<FunctionID>>(kModActorValue),
54  kSetAtStart = 17,
55  kGetCurrentTime = 18,
56  kPlayGroup = 19,
57  kLoopGroup = 20,
58  kSkipAnim = 21,
59  kStartCombat = 22,
60  kStopCombat = 23,
61  kGetScale = 24,
62  kIsMoving = 25,
63  kIsTurning = 26,
64  kGetLineOfSight = 27,
65  kGetLOS = static_cast<std::underlying_type_t<FunctionID>>(kGetLineOfSight),
66  kAddSpell = 28,
67  kRemoveSpell = 29,
68  kCast = 30,
69  kGetButtonPressed = 31,
70  kGetInSameCell = 32,
71  kEnable = 33,
72  kDisable = 34,
73  kGetDisabled = 35,
74  kMenuMode = 36,
75  kPlaceAtMe = 37,
76  kPlaySound = 38,
77  kGetDisease = 39,
78  kFailAllObjectives = 40,
79  kGetClothingValue = 41,
80  kSameFaction = 42,
81  kSameRace = 43,
82  kSameSex = 44,
83  kGetDetected = 45,
84  kGetDead = 46,
85  kGetItemCount = 47,
86  kGetGold = 48,
87  kGetSleeping = 49,
88  kGetTalkedToPC = 50,
89  kSay = 51,
90  kSayTo = 52,
91  kGetScriptVariable = 53,
92  kStartQuest = 54,
93  kStopQuest = 55,
94  kGetQuestRunning = 56,
95  kGetQR = static_cast<std::underlying_type_t<FunctionID>>(kGetQuestRunning),
96  kSetStage = 57,
97  kGetStage = 58,
98  kGetStageDone = 59,
99  kGetFactionRankDifference = 60,
100  kGetAlarmed = 61,
101  kIsRaining = 62,
102  kGetAttacked = 63,
103  kGetIsCreature = 64,
104  kGetLockLevel = 65,
105  kGetShouldAttack = 66,
106  kGetInCell = 67,
107  kGetIsClass = 68,
108  kGetIsRace = 69,
109  kGetIsSex = 70,
110  kGetInFaction = 71,
111  kGetIsID = 72,
112  kGetFactionRank = 73,
113  kGetGlobalValue = 74,
114  kIsSnowing = 75,
115  kFastTravel = 76,
116  kFT = static_cast<std::underlying_type_t<FunctionID>>(kFastTravel),
117  kGetRandomPercent = 77,
118  kRemoveMusic = 78,
119  kGetQuestVariable = 79,
120  kGetLevel = 80,
121  kIsRotating = 81,
122  kRemoveItem = 82,
123  kGetLeveledEncounterValue = 83,
124  kGetDeadCount = 84,
125  kAddToMap = 85,
126  kShowMap = static_cast<std::underlying_type_t<FunctionID>>(kAddToMap),
127  kStartConversation = 86,
128  kDrop = 87,
129  kAddTopic = 88,
130  kShowMessage = 89,
131  kSetAlert = 90,
132  kGetIsAlerted = 91,
133  kLook = 92,
134  kStopLook = 93,
135  kEvaluatePackage = 94,
136  kEvP = static_cast<std::underlying_type_t<FunctionID>>(kEvaluatePackage),
137  kSendAssaultAlarm = 95,
138  kEnablePlayerControls = 96,
139  kEPC = static_cast<std::underlying_type_t<FunctionID>>(kEnablePlayerControls),
140  kDisablePlayerControls = 97,
141  kDPC = static_cast<std::underlying_type_t<FunctionID>>(kDisablePlayerControls),
142  kGetPlayerControlsDisabled = 98,
143  kGPC = static_cast<std::underlying_type_t<FunctionID>>(kGetPlayerControlsDisabled),
144  kGetHeadingAngle = 99,
145  kPickIdle = 100,
146  kIsWeaponMagicOut = 101,
147  kIsTorchOut = 102,
148  kIsShieldOut = 103,
149  kCreateDetectionEvent = 104,
150  kIsActionRef = 105,
151  kIsFacingUp = 106,
152  kGetKnockedState = 107,
153  kGetWeaponAnimType = 108,
154  kIsWeaponSkillType = 109,
155  kGetCurrentAIPackage = 110,
156  kIsWaiting = 111,
157  kIsIdlePlaying = 112,
158  kCompleteQuest = 113,
159  kLock = 114,
160  kUnLock = 115,
161  kIsIntimidatedByPlayer = 116,
162  kIsPlayerInRegion = 117,
163  kGetActorAggroRadiusViolated = 118,
164  kGetCrimeKnown = 119,
165  kSetEnemy = 120,
166  kSetAlly = 121,
167  kGetCrime = 122,
168  kIsGreetingPlayer = 123,
169  kStartMisterSandMan = 124,
170  kIsGuard = 125,
171  kStartCannibal = 126,
172  kHasBeenEaten = 127,
173  kGetStaminaPercentage = 128,
174  kGetStamina = static_cast<std::underlying_type_t<FunctionID>>(kGetStaminaPercentage),
175  kGetPCIsClass = 129,
176  kGetPCIsRace = 130,
177  kGetPCIsSex = 131,
178  kGetPCInFaction = 132,
179  kSameFactionAsPC = 133,
180  kSameRaceAsPC = 134,
181  kSameSexAsPC = 135,
182  kGetIsReference = 136,
183  kSetFactionRank = 137,
184  kModFactionRank = 138,
185  kKillActor = 139,
186  kkill = static_cast<std::underlying_type_t<FunctionID>>(kKillActor),
187  kResurrectActor = 140,
188  kResurrect = static_cast<std::underlying_type_t<FunctionID>>(kResurrectActor),
189  kIsTalking = 141,
190  kGetWalkSpeed = 142,
191  kGetWalk = static_cast<std::underlying_type_t<FunctionID>>(kGetWalkSpeed),
192  kGetCurrentAIProcedure = 143,
193  kGetTrespassWarningLevel = 144,
194  kIsTrespassing = 145,
195  kIsInMyOwnedCell = 146,
196  kGetWindSpeed = 147,
197  kGetCurrentWeatherPercent = 148,
198  kGetweatherpct = static_cast<std::underlying_type_t<FunctionID>>(kGetCurrentWeatherPercent),
199  kGetIsCurrentWeather = 149,
200  kGetweather = static_cast<std::underlying_type_t<FunctionID>>(kGetIsCurrentWeather),
201  kIsContinuingPackagePCNear = 150,
202  kSetCrimeFaction = 151,
203  kGetIsCrimeFaction = 152,
204  kCanHaveFlames = 153,
205  kHasFlames = 154,
206  kAddFlames = 155,
207  kRemoveFlames = 156,
208  kGetOpenState = 157,
209  kMoveToMarker = 158,
210  kMoveTo = static_cast<std::underlying_type_t<FunctionID>>(kMoveToMarker),
211  kGetSitting = 159,
212  kGetFurnitureMarkerID = 160,
213  kGetIsCurrentPackage = 161,
214  kIsCurrentFurnitureRef = 162,
215  kIsCurrentFurnitureObj = 163,
216  kSetSize = 164,
217  kCSize = static_cast<std::underlying_type_t<FunctionID>>(kSetSize),
218  kRemoveMe = 165,
219  kDropMe = 166,
220  kGetFactionReaction = 167,
221  kSetFactionReaction = 168,
222  kModFactionReaction = 169,
223  kGetDayOfWeek = 170,
224  kIgnoreCrime = 171,
225  kGetTalkedToPCParam = 172,
226  kRemoveAllItems = 173,
227  kWakeUpPC = 174,
228  kIsPCSleeping = 175,
229  kIsPCAMurderer = 176,
230  kSetCombatStyle = 177,
231  kSetCS = static_cast<std::underlying_type_t<FunctionID>>(kSetCombatStyle),
232  kPlaySound3D = 178,
233  kSelectPlayerSpell = 179,
234  kSPSpell = static_cast<std::underlying_type_t<FunctionID>>(kSelectPlayerSpell),
235  kHasSameEditorLocAsRef = 180,
236  kHasSameEditorLocAsRefAlias = 181,
237  kGetEquipped = 182,
238  kWait = 183,
239  kStopWaiting = 184,
240  kIsSwimming = 185,
241  kScriptEffectElapsedSeconds = 186,
242  kSetCellPublicFlag = 187,
243  kSetPublic = static_cast<std::underlying_type_t<FunctionID>>(kSetCellPublicFlag),
244  kGetPCSleepHours = 188,
245  kSetPCSleepHours = 189,
246  kGetAmountSoldStolen = 190,
247  kModAmountSoldStolen = 191,
248  kGetIgnoreCrime = 192,
249  kGetPCExpelled = 193,
250  kSetPCExpelled = 194,
251  kGetPCFactionMurder = 195,
252  kSetPCFactionMurder = 196,
253  kGetPCEnemyofFaction = 197,
254  kSetPCEnemyofFaction = 198,
255  kGetPCFactionAttack = 199,
256  kSetPCFactionAttack = 200,
257  kStartScene = 201,
258  kStopScene = 202,
259  kGetDestroyed = 203,
260  kSetDestroyed = 204,
261  kGetActionRef = 205,
262  kGetAR = static_cast<std::underlying_type_t<FunctionID>>(kGetActionRef),
263  kGetSelf = 206,
264  kThis = static_cast<std::underlying_type_t<FunctionID>>(kGetSelf),
265  kGetContainer = 207,
266  kGetForceRun = 208,
267  kSetForceRun = 209,
268  kGetForceSneak = 210,
269  kSetForceSneak = 211,
270  kAdvancePCSkill = 212,
271  kAdvSkill = static_cast<std::underlying_type_t<FunctionID>>(kAdvancePCSkill),
272  kAdvancePCLevel = 213,
273  kAdvLevel = static_cast<std::underlying_type_t<FunctionID>>(kAdvancePCLevel),
274  kHasMagicEffect = 214,
275  kGetDefaultOpen = 215,
276  kSetDefaultOpen = 216,
277  kShowClassMenu = 217,
278  kShowRaceMenu = 218,
279  kSetPlayerRace = static_cast<std::underlying_type_t<FunctionID>>(kShowRaceMenu),
280  kGetAnimAction = 219,
281  kShowNameMenu = 220,
282  kSetOpenState = 221,
283  kResetReference = 222,
284  kRecycleActor = static_cast<std::underlying_type_t<FunctionID>>(kResetReference),
285  kIsSpellTarget = 223,
286  kGetVATSMode = 224,
287  kGetPersuasionNumber = 225,
288  kGetVampireFeed = 226,
289  kGetCannibal = 227,
290  kGetIsClassDefault = 228,
291  kGetClassDefaultMatch = 229,
292  kGetInCellParam = 230,
293  kUnusedFunction1 = 231,
294  kGetCombatTarget = 232,
295  kGetPackageTarget = 233,
296  kShowSpellMaking = 234,
297  kGetVatsTargetHeight = 235,
298  kSetGhost = 236,
299  kGetIsGhost = 237,
300  kEquipItem = 238,
301  kEquipObject = static_cast<std::underlying_type_t<FunctionID>>(kEquipItem),
302  kUnequipItem = 239,
303  kUnEquipObject = static_cast<std::underlying_type_t<FunctionID>>(kUnequipItem),
304  kSetClass = 240,
305  kSetUnconscious = 241,
306  kGetUnconscious = 242,
307  kSetRestrained = 243,
308  kGetRestrained = 244,
309  kForceFlee = 245,
310  kFlee = static_cast<std::underlying_type_t<FunctionID>>(kForceFlee),
311  kGetIsUsedItem = 246,
312  kGetIsUsedItemType = 247,
313  kIsScenePlaying = 248,
314  kIsInDialogueWithPlayer = 249,
315  kGetLocationCleared = 250,
316  kSetLocationCleared = 251,
317  kForceRefIntoAlias = 252,
318  kEmptyRefAlias = 253,
319  kGetIsPlayableRace = 254,
320  kGetOffersServicesNow = 255,
321  kGetGameSetting = 256,
322  kGetGS = static_cast<std::underlying_type_t<FunctionID>>(kGetGameSetting),
323  kStopCombatAlarmOnActor = 257,
324  kSCAOnActor = static_cast<std::underlying_type_t<FunctionID>>(kStopCombatAlarmOnActor),
325  kHasAssociationType = 258,
326  kHasFamilyRelationship = 259,
327  kFamily = static_cast<std::underlying_type_t<FunctionID>>(kHasFamilyRelationship),
328  kSetWeather = 260,
329  kSW = static_cast<std::underlying_type_t<FunctionID>>(kSetWeather),
330  kHasParentRelationship = 261,
331  kIsParent = static_cast<std::underlying_type_t<FunctionID>>(kHasParentRelationship),
332  kIsWarningAbout = 262,
333  kIsWeaponOut = 263,
334  kHasSpell = 264,
335  kIsTimePassing = 265,
336  kIsPleasant = 266,
337  kIsCloudy = 267,
338  kTrapUpdate = 268,
339  kShowQuestObjectives = 269,
340  kSQO = static_cast<std::underlying_type_t<FunctionID>>(kShowQuestObjectives),
341  kForceActorValue = 270,
342  kForceAV = static_cast<std::underlying_type_t<FunctionID>>(kForceActorValue),
343  kIncrementPCSkill = 271,
344  kIncPCS = static_cast<std::underlying_type_t<FunctionID>>(kIncrementPCSkill),
345  kDoTrap = 272,
346  kEnableFastTravel = 273,
347  kEnableFast = static_cast<std::underlying_type_t<FunctionID>>(kEnableFastTravel),
348  kIsSmallBump = 274,
349  kGetParentRef = 275,
350  kPlayBink = 276,
351  kGetBaseActorValue = 277,
352  kGetBaseAV = static_cast<std::underlying_type_t<FunctionID>>(kGetBaseActorValue),
353  kIsOwner = 278,
354  kSetOwnership = 279,
355  kIsCellOwner = 280,
356  kSetCellOwnership = 281,
357  kIsHorseStolen = 282,
358  kSetCellFullName = 283,
359  kSetActorFullName = 284,
360  kIsLeftUp = 285,
361  kIsSneaking = 286,
362  kIsRunning = 287,
363  kGetFriendHit = 288,
364  kIsInCombat = 289,
365  kSetPackDuration = 290,
366  kSPDur = static_cast<std::underlying_type_t<FunctionID>>(kSetPackDuration),
367  kPlayMagicShaderVisuals = 291,
368  kPMS = static_cast<std::underlying_type_t<FunctionID>>(kPlayMagicShaderVisuals),
369  kPlayMagicEffectVisuals = 292,
370  kPME = static_cast<std::underlying_type_t<FunctionID>>(kPlayMagicEffectVisuals),
371  kStopMagicShaderVisuals = 293,
372  kSMS = static_cast<std::underlying_type_t<FunctionID>>(kStopMagicShaderVisuals),
373  kStopMagicEffectVisuals = 294,
374  kSME = static_cast<std::underlying_type_t<FunctionID>>(kStopMagicEffectVisuals),
375  kResetInterior = 295,
376  kIsAnimPlaying = 296,
377  kSetActorAlpha = 297,
378  kSAA = static_cast<std::underlying_type_t<FunctionID>>(kSetActorAlpha),
379  kEnableLinkedPathPoints = 298,
380  kDisableLinkedPathPoints = 299,
381  kIsInInterior = 300,
382  kForceWeather = 301,
383  kFW = static_cast<std::underlying_type_t<FunctionID>>(kForceWeather),
384  kToggleActorsAI = 302,
385  kIsActorsAIOff = 303,
386  kIsWaterObject = 304,
387  kGetPlayerAction = 305,
388  kIsActorUsingATorch = 306,
389  kSetLevel = 307,
390  kResetFallDamageTimer = 308,
391  kIsXBox = 309,
392  kGetInWorldspace = 310,
393  kModPCMiscStat = 311,
394  kModPCMS = static_cast<std::underlying_type_t<FunctionID>>(kModPCMiscStat),
395  kGetPCMiscStat = 312,
396  kGetPCMS = static_cast<std::underlying_type_t<FunctionID>>(kGetPCMiscStat),
397  kGetPairedAnimation = 313,
398  kGPA = static_cast<std::underlying_type_t<FunctionID>>(kGetPairedAnimation),
399  kIsActorAVictim = 314,
400  kGetTotalPersuasionNumber = 315,
401  kSetScale = 316,
402  kModScale = 317,
403  kGetIdleDoneOnce = 318,
404  kKillAllActors = 319,
405  kkillall = static_cast<std::underlying_type_t<FunctionID>>(kKillAllActors),
406  kGetNoRumors = 320,
407  kSetNoRumors = 321,
408  kDispel = 322,
409  kGetCombatState = 323,
410  kTriggerHitShader = 324,
411  kTHS = static_cast<std::underlying_type_t<FunctionID>>(kTriggerHitShader),
412  kGetWithinPackageLocation = 325,
413  kReset3DState = 326,
414  kIsRidingMount = 327,
415  kDispelAllSpells = 328,
416  kIsFleeing = 329,
417  kAddAchievement = 330,
418  kDuplicateAllItems = 331,
419  kIsInDangerousWater = 332,
420  kEssentialDeathReload = 333,
421  kSetShowQuestItems = 334,
422  kDuplicateNPCStats = 335,
423  kResetHealth = 336,
424  kSetIgnoreFriendlyHits = 337,
425  kSIFH = static_cast<std::underlying_type_t<FunctionID>>(kSetIgnoreFriendlyHits),
426  kGetIgnoreFriendlyHits = 338,
427  kGIFH = static_cast<std::underlying_type_t<FunctionID>>(kGetIgnoreFriendlyHits),
428  kIsPlayersLastRiddenMount = 339,
429  kSetActorRefraction = 340,
430  kSAR = static_cast<std::underlying_type_t<FunctionID>>(kSetActorRefraction),
431  kSetItemValue = 341,
432  kSetRigidBodyMass = 342,
433  kShowViewerStrings = 343,
434  kSVS = static_cast<std::underlying_type_t<FunctionID>>(kShowViewerStrings),
435  kReleaseWeatherOverride = 344,
436  kRWO = static_cast<std::underlying_type_t<FunctionID>>(kReleaseWeatherOverride),
437  kSetAllReachable = 345,
438  kSetAllVisible = 346,
439  kSetNoAvoidance = 347,
440  kSendTrespassAlarm = 348,
441  kSetSceneIsComplex = 349,
442  kAutosave = 350,
443  kStartMasterFileSeekData = 351,
444  kDumpMasterFileSeekData = 352,
445  kIsActor = 353,
446  kIsEssential = 354,
447  kPreloadMagicEffect = 355,
448  kShowDialogSubtitles = 356,
449  kSetPlayerResistingArrest = 357,
450  kIsPlayerMovingIntoNewSpace = 358,
451  kGetInCurrentLoc = 359,
452  kGetInCurrentLocAlias = 360,
453  kGetTimeDead = 361,
454  kHasLinkedRef = 362,
455  kGetLinkedRef = 363,
456  kDamageObject = 364,
457  kDO = static_cast<std::underlying_type_t<FunctionID>>(kDamageObject),
458  kIsChild = 365,
459  kGetStolenItemValueNoCrime = 366,
460  kGetLastPlayerAction = 367,
461  kIsPlayerActionActive = 368,
462  kSetTalkingActivatorActor = 369,
463  kIsTalkingActivatorActor = 370,
464  kShowBarterMenu = 371,
465  kSBM = static_cast<std::underlying_type_t<FunctionID>>(kShowBarterMenu),
466  kIsInList = 372,
467  kGetStolenItemValue = 373,
468  kAddPerk = 374,
469  kGetCrimeGoldViolent = 375,
470  kGetviolent = static_cast<std::underlying_type_t<FunctionID>>(kGetCrimeGoldViolent),
471  kGetCrimeGoldNonviolent = 376,
472  kGetnonviolent = static_cast<std::underlying_type_t<FunctionID>>(kGetCrimeGoldNonviolent),
473  kShowRepairMenu = 377,
474  kSRM = static_cast<std::underlying_type_t<FunctionID>>(kShowRepairMenu),
475  kHasShout = 378,
476  kAddNote = 379,
477  kAN = static_cast<std::underlying_type_t<FunctionID>>(kAddNote),
478  kRemoveNote = 380,
479  kRN = static_cast<std::underlying_type_t<FunctionID>>(kRemoveNote),
480  kGetHasNote = 381,
481  kGetN = static_cast<std::underlying_type_t<FunctionID>>(kGetHasNote),
482  kAddToFaction = 382,
483  kAddFac = static_cast<std::underlying_type_t<FunctionID>>(kAddToFaction),
484  kRemoveFromFaction = 383,
485  kRemoveFac = static_cast<std::underlying_type_t<FunctionID>>(kRemoveFromFaction),
486  kDamageActorValue = 384,
487  kDamageAV = static_cast<std::underlying_type_t<FunctionID>>(kDamageActorValue),
488  kRestoreActorValue = 385,
489  kRestoreAV = static_cast<std::underlying_type_t<FunctionID>>(kRestoreActorValue),
490  kTriggerHUDShudder = 386,
491  kHudSH = static_cast<std::underlying_type_t<FunctionID>>(kTriggerHUDShudder),
492  kGetObjectiveFailed = 387,
493  kSetObjectiveFailed = 388,
494  kSetGlobalTimeMultiplier = 389,
495  kSGTM = static_cast<std::underlying_type_t<FunctionID>>(kSetGlobalTimeMultiplier),
496  kGetHitLocation = 390,
497  kIsPC1stPerson = 391,
498  kPC1st = static_cast<std::underlying_type_t<FunctionID>>(kIsPC1stPerson),
499  kPurgeCellBuffers = 392,
500  kPCB = static_cast<std::underlying_type_t<FunctionID>>(kPurgeCellBuffers),
501  kPushActorAway = 393,
502  kSetActorsAI = 394,
503  kClearOwnership = 395,
504  kGetCauseofDeath = 396,
505  kIsLimbGone = 397,
506  kIsWeaponInList = 398,
507  kPlayIdle = 399,
508  kApplyImageSpaceModifier = 400,
509  kIMod = static_cast<std::underlying_type_t<FunctionID>>(kApplyImageSpaceModifier),
510  kRemoveImageSpaceModifier = 401,
511  kRIMod = static_cast<std::underlying_type_t<FunctionID>>(kRemoveImageSpaceModifier),
512  kIsBribedbyPlayer = 402,
513  kGetRelationshipRank = 403,
514  kSetRelationshipRank = 404,
515  kSetCellImageSpace = 405,
516  kShowChargenMenu = 406,
517  kSCGM = static_cast<std::underlying_type_t<FunctionID>>(kShowChargenMenu),
518  kGetVATSValue = 407,
519  kIsKiller = 408,
520  kIsKillerObject = 409,
521  kGetFactionCombatReaction = 410,
522  kUseWeapon = 411,
523  kEvaluateSpellConditions = 412,
524  kESC = static_cast<std::underlying_type_t<FunctionID>>(kEvaluateSpellConditions),
525  kToggleMotionBlur = 413,
526  kTMB = static_cast<std::underlying_type_t<FunctionID>>(kToggleMotionBlur),
527  kExists = 414,
528  kGetGroupMemberCount = 415,
529  kGetGroupTargetCount = 416,
530  kSetObjectiveCompleted = 417,
531  kSetObjectiveDisplayed = 418,
532  kGetObjectiveCompleted = 419,
533  kGetObjectiveDisplayed = 420,
534  kSetImageSpace = 421,
535  kPipboyRadio = 422,
536  kPRad = static_cast<std::underlying_type_t<FunctionID>>(kPipboyRadio),
537  kRemovePerk = 423,
538  kDisableAllActors = 424,
539  kDisAA = static_cast<std::underlying_type_t<FunctionID>>(kDisableAllActors),
540  kGetIsFormType = 425,
541  kGetIsVoiceType = 426,
542  kGetPlantedExplosive = 427,
543  kCompleteAllObjectives = 428,
544  kIsScenePackageRunning = 429,
545  kGetHealthPercentage = 430,
546  kSetAudioMultithreading = 431,
547  kSAM = static_cast<std::underlying_type_t<FunctionID>>(kSetAudioMultithreading),
548  kGetIsObjectType = 432,
549  kShowChargenMenuParams = 433,
550  kSCGMP = static_cast<std::underlying_type_t<FunctionID>>(kShowChargenMenuParams),
551  kGetDialogueEmotion = 434,
552  kGetDialogueEmotionValue = 435,
553  kExitGame = 436,
554  kExit = static_cast<std::underlying_type_t<FunctionID>>(kExitGame),
555  kGetIsCreatureType = 437,
556  kPlayerCreatePotion = 438,
557  kPlayerEnchantObject = 439,
558  kShowWarning = 440,
559  kEnterTrigger = 441,
560  kMarkForDelete = 442,
561  kSetPlayerAIDriven = 443,
562  kGetInCurrentLocFormList = 444,
563  kGetInZone = 445,
564  kGetVelocity = 446,
565  kGetGraphVariableFloat = 447,
566  kHasPerk = 448,
567  kGetFactionRelation = 449,
568  kIsLastIdlePlayed = 450,
569  kSetNPCRadio = 451,
570  kSNR = static_cast<std::underlying_type_t<FunctionID>>(kSetNPCRadio),
571  kSetPlayerTeammate = 452,
572  kGetPlayerTeammate = 453,
573  kGetPlayerTeammateCount = 454,
574  kOpenActorContainer = 455,
575  kClearFactionPlayerEnemyFlag = 456,
576  kClearActorsFactionsPlayerEnemyFlag = 457,
577  kGetActorCrimePlayerEnemy = 458,
578  kGetCrimeGold = 459,
579  kSetCrimeGold = 460,
580  kModCrimeGold = 461,
581  kGetPlayerGrabbedRef = 462,
582  kIsPlayerGrabbedRef = 463,
583  kPlaceLeveledActorAtMe = 464,
584  kGetKeywordItemCount = 465,
585  kShowLockpickMenu = 466,
586  kSLPM = static_cast<std::underlying_type_t<FunctionID>>(kShowLockpickMenu),
587  kGetBroadcastState = 467,
588  kSetBroadcastState = 468,
589  kStartRadioConversation = 469,
590  kGetDestructionStage = 470,
591  kClearDestruction = 471,
592  kCastImmediateOnSelf = 472,
593  kCIOS = static_cast<std::underlying_type_t<FunctionID>>(kCastImmediateOnSelf),
594  kGetIsAlignment = 473,
595  kResetQuest = 474,
596  kSetQuestDelay = 475,
597  kIsProtected = 476,
598  kGetThreatRatio = 477,
599  kMatchFaceGeometry = 478,
600  kGetIsUsedItemEquipType = 479,
601  kGetPlayerName = 480,
602  kFireWeapon = 481,
603  kPayCrimeGold = 482,
604  kUnusedFunction2 = 483,
605  kMatchRace = 484,
606  kSetPCYoung = 485,
607  kSexChange = 486,
608  kIsCarryable = 487,
609  kGetConcussed = 488,
610  kSetZoneRespawns = 489,
611  kSetVATSTarget = 490,
612  kGetMapMarkerVisible = 491,
613  kResetInventory = 492,
614  kPlayerKnows = 493,
615  kGetPermanentActorValue = 494,
616  kGetPermAV = static_cast<std::underlying_type_t<FunctionID>>(kGetPermanentActorValue),
617  kGetKillingBlowLimb = 495,
618  kGoToJail = 496,
619  kCanPayCrimeGold = 497,
620  kServeTime = 498,
621  kGetDaysInJail = 499,
622  kEPAlchemyGetMakingPoison = 500,
623  kEPAlchemyEffectHasKeyword = 501,
624  kShowAllMapMarkers = 502,
625  kTMM = static_cast<std::underlying_type_t<FunctionID>>(kShowAllMapMarkers),
626  kGetAllowWorldInteractions = 503,
627  kResetAI = 504,
628  kSetRumble = 505,
629  kSetNoActivationSound = 506,
630  kClearNoActivationSound = 507,
631  kGetLastHitCritical = 508,
632  kAddMusic = 509,
633  kUnusedFunction3 = 510,
634  kUnusedFunction4 = 511,
635  kSetPCToddler = 512,
636  kIsCombatTarget = 513,
637  kTriggerScreenBlood = 514,
638  kTSB = static_cast<std::underlying_type_t<FunctionID>>(kTriggerScreenBlood),
639  kGetVATSRightAreaFree = 515,
640  kGetVATSLeftAreaFree = 516,
641  kGetVATSBackAreaFree = 517,
642  kGetVATSFrontAreaFree = 518,
643  kGetIsLockBroken = 519,
644  kIsPS3 = 520,
645  kIsWin32 = 521,
646  kGetVATSRightTargetVisible = 522,
647  kGetVATSLeftTargetVisible = 523,
648  kGetVATSBackTargetVisible = 524,
649  kGetVATSFrontTargetVisible = 525,
650  kAttachAshPile = 526,
651  kSetCriticalStage = 527,
652  kIsInCriticalStage = 528,
653  kRemoveFromAllFactions = 529,
654  kGetXPForNextLevel = 530,
655  kShowLockpickMenuDebug = 531,
656  kSLPMD = static_cast<std::underlying_type_t<FunctionID>>(kShowLockpickMenuDebug),
657  kForceSave = 532,
658  kGetInfamy = 533,
659  kGetInfamyViolent = 534,
660  kGetInfamyNonViolent = 535,
661  kUnusedFunction5 = 536,
662  kSin = 537,
663  kCos = 538,
664  kTan = 539,
665  kSqrt = 540,
666  kLog = 541,
667  kAbs = 542,
668  kGetQuestCompleted = 543,
669  kGetQC = static_cast<std::underlying_type_t<FunctionID>>(kGetQuestCompleted),
670  kUnusedFunction6 = 544,
671  kPipBoyRadioOff = 545,
672  kAutoDisplayObjectives = 546,
673  kIsGoreDisabled = 547,
674  kFadeSFX = 548,
675  kFSFX = static_cast<std::underlying_type_t<FunctionID>>(kFadeSFX),
676  kSetMinimalUse = 549,
677  kIsSceneActionComplete = 550,
678  kShowQuestStages = 551,
679  kSQS = static_cast<std::underlying_type_t<FunctionID>>(kShowQuestStages),
680  kGetSpellUsageNum = 552,
681  kForceRadioStationUpdate = 553,
682  kFRSU = static_cast<std::underlying_type_t<FunctionID>>(kForceRadioStationUpdate),
683  kGetActorsInHigh = 554,
684  kHasLoaded3D = 555,
685  kDisableAllMines = 556,
686  kSetLastExtDoorActivated = 557,
687  kKillQuestUpdates = 558,
688  kKQU = static_cast<std::underlying_type_t<FunctionID>>(kKillQuestUpdates),
689  kIsImageSpaceActive = 559,
690  kHasKeyword = 560,
691  kHasRefType = 561,
692  kLocationHasKeyword = 562,
693  kLocationHasRefType = 563,
694  kCreateEvent = 564,
695  kGetIsEditorLocation = 565,
696  kGetIsAliasRef = 566,
697  kGetIsEditorLocAlias = 567,
698  kIsSprinting = 568,
699  kIsBlocking = 569,
700  kHasEquippedSpell = 570,
701  kGetCurrentCastingType = 571,
702  kGetCasting = static_cast<std::underlying_type_t<FunctionID>>(kGetCurrentCastingType),
703  kGetCurrentDeliveryType = 572,
704  kGetDelivery = static_cast<std::underlying_type_t<FunctionID>>(kGetCurrentDeliveryType),
705  kEquipSpell = 573,
706  kGetAttackState = 574,
707  kGetAliasedRef = 575,
708  kGetEventData = 576,
709  kIsCloserToAThanB = 577,
710  kEquipShout = 578,
711  kGetEquippedShout = 579,
712  kIsBleedingOut = 580,
713  kUnlockWord = 581,
714  kTeachWord = 582,
715  kAddToContainer = 583,
716  kGetRelativeAngle = 584,
717  kSendAnimEvent = 585,
718  kSAE = static_cast<std::underlying_type_t<FunctionID>>(kSendAnimEvent),
719  kShout = 586,
720  kAddShout = 587,
721  kRemoveShout = 588,
722  kGetMovementDirection = 589,
723  kIsInScene = 590,
724  kGetRefTypeDeadCount = 591,
725  kGetRefTypeAliveCount = 592,
726  kApplyHavokImpulse = 593,
727  kGetIsFlying = 594,
728  kIsCurrentSpell = 595,
729  kSpellHasKeyword = 596,
730  kGetEquippedItemType = 597,
731  kGetLocationAliasCleared = 598,
732  kSetLocationAliasCleared = 599,
733  kGetLocAliasRefTypeDeadCount = 600,
734  kGetLocAliasRefTypeAliveCount = 601,
735  kIsWardState = 602,
736  kIsInSameCurrentLocAsRef = 603,
737  kIsInSameCurrentLocAsRefAlias = 604,
738  kLocAliasIsLocation = 605,
739  kGetKeywordDataForLocation = 606,
740  kSetKeywordDataForLocation = 607,
741  kGetKeywordDataForAlias = 608,
742  kSetKeywordDataForAlias = 609,
743  kLocAliasHasKeyword = 610,
744  kIsNullPackageData = 611,
745  kGetNumericPackageData = 612,
746  kIsFurnitureAnimType = 613,
747  kIsFurnitureEntryType = 614,
748  kGetHighestRelationshipRank = 615,
749  kGetLowestRelationshipRank = 616,
750  kHasAssociationTypeAny = 617,
751  kHasFamilyRelationshipAny = 618,
752  kGetPathingTargetOffset = 619,
753  kGetPathingTargetAngleOffset = 620,
754  kGetPathingTargetSpeed = 621,
755  kGetPathingTargetSpeedAngle = 622,
756  kGetMovementSpeed = 623,
757  kGetInContainer = 624,
758  kIsLocationLoaded = 625,
759  kIsLocAliasLoaded = 626,
760  kIsDualCasting = 627,
761  kDualCast = 628,
762  kGetVMQuestVariable = 629,
763  kGetVMScriptVariable = 630,
764  kIsEnteringInteractionQuick = 631,
765  kIsCasting = 632,
766  kGetFlyingState = 633,
767  kSetFavorState = 634,
768  kIsInFavorState = 635,
769  kHasTwoHandedWeaponEquipped = 636,
770  kIsExitingInstant = 637,
771  kIsInFriendStateWithPlayer = 638,
772  kGetWithinDistance = 639,
773  kGetActorValuePercent = 640,
774  kIsUnique = 641,
775  kGetLastBumpDirection = 642,
776  kCameraShake = 643,
777  kIsInFurnitureState = 644,
778  kGetIsInjured = 645,
779  kGetIsCrashLandRequest = 646,
780  kGetIsHastyLandRequest = 647,
781  kUpdateQuestInstanceGlobal = 648,
782  kSetAllowFlying = 649,
783  kIsLinkedTo = 650,
784  kGetKeywordDataForCurrentLocation = 651,
785  kGetInSharedCrimeFaction = 652,
786  kGetBribeAmount = 653,
787  kGetBribeSuccess = 654,
788  kGetIntimidateSuccess = 655,
789  kGetArrestedState = 656,
790  kGetArrestingActor = 657,
791  kClearArrestState = 658,
792  kEPTemperingItemIsEnchanted = 659,
793  kEPTemperingItemHasKeyword = 660,
794  kGetReceivedGiftValue = 661,
795  kGetGiftGivenValue = 662,
796  kForceLocIntoAlias = 663,
797  kGetReplacedItemType = 664,
798  kSetHorseActor = 665,
799  kPlayReferenceEffect = 666,
800  kPRE = static_cast<std::underlying_type_t<FunctionID>>(kPlayReferenceEffect),
801  kStopReferenceEffect = 667,
802  kSRE = static_cast<std::underlying_type_t<FunctionID>>(kStopReferenceEffect),
803  kPlayShaderParticleGeometry = 668,
804  kPSPG = static_cast<std::underlying_type_t<FunctionID>>(kPlayShaderParticleGeometry),
805  kStopShaderParticleGeometry = 669,
806  kSSPG = static_cast<std::underlying_type_t<FunctionID>>(kStopShaderParticleGeometry),
807  kApplyImageSpaceModifierCrossFade = 670,
808  kIModCF = static_cast<std::underlying_type_t<FunctionID>>(kApplyImageSpaceModifierCrossFade),
809  kRemoveImageSpaceModifierCrossFade = 671,
810  kRIModCF = static_cast<std::underlying_type_t<FunctionID>>(kRemoveImageSpaceModifierCrossFade),
811  kIsAttacking = 672,
812  kIsPowerAttacking = 673,
813  kIsLastHostileActor = 674,
814  kGetGraphVariableInt = 675,
815  kGetCurrentShoutVariation = 676,
816  kPlayImpactEffect = 677,
817  kPIE = static_cast<std::underlying_type_t<FunctionID>>(kPlayImpactEffect),
818  kShouldAttackKill = 678,
819  kSendStealAlarm = 679,
820  kSteal = static_cast<std::underlying_type_t<FunctionID>>(kSendStealAlarm),
821  kGetActivationHeight = 680,
822  kEPModSkillUsage_IsAdvanceSkill = 681,
823  kWornHasKeyword = 682,
824  kGetPathingCurrentSpeed = 683,
825  kGetPathingCurrentSpeedAngle = 684,
826  kKnockAreaEffect = 685,
827  kKAE = static_cast<std::underlying_type_t<FunctionID>>(kKnockAreaEffect),
828  kInterruptCast = 686,
829  kAddFormToFormList = 687,
830  kRevertFormList = 688,
831  kAddFormToLeveledList = 689,
832  kRevertLeveledList = 690,
833  kEPModSkillUsage_AdvanceObjectHasKeyword = 691,
834  kEPModSkillUsage_IsAdvanceAction = 692,
835  kEPMagic_SpellHasKeyword = 693,
836  kGetNoBleedoutRecovery = 694,
837  kSetNoBleedoutRecovery = 695,
838  kEPMagic_SpellHasSkill = 696,
839  kIsAttackType = 697,
840  kIsAllowedToFly = 698,
841  kHasMagicEffectKeyword = 699,
842  kIsCommandedActor = 700,
843  kIsStaggered = 701,
844  kIsRecoiling = 702,
845  kIsExitingInteractionQuick = 703,
846  kIsPathing = 704,
847  kGetShouldHelp = 705,
848  kHasBoundWeaponEquipped = 706,
849  kGetCombatTargetHasKeyword = 707,
850  kGCTHK = static_cast<std::underlying_type_t<FunctionID>>(kGetCombatTargetHasKeyword),
851  kUpdateLevel = 708,
852  kGetCombatGroupMemberCount = 709,
853  kGCGMC = static_cast<std::underlying_type_t<FunctionID>>(kGetCombatGroupMemberCount),
854  kIsIgnoringCombat = 710,
855  kGetLightLevel = 711,
856  kGLL = static_cast<std::underlying_type_t<FunctionID>>(kGetLightLevel),
857  kSavePCFace = 712,
858  kSPF = static_cast<std::underlying_type_t<FunctionID>>(kSavePCFace),
859  kSpellHasCastingPerk = 713,
860  kIsBeingRidden = 714,
861  kIsUndead = 715,
862  kGetRealHoursPassed = 716,
863  kUnequipAll = 717,
864  kIsUnlockedDoor = 718,
865  kIsHostileToActor = 719,
866  kGetTargetHeight = 720,
867  kIsPoison = 721,
868  kWornApparelHasKeywordCount = 722,
869  kGetItemHealthPercent = 723,
870  kEffectWasDualCast = 724,
871  kGetKnockStateEnum = 725,
872  kDoesNotExist = 726,
873  kUnequipItemSlot = 727,
874  kMountActor = 728,
875  kDismountActor = 729,
876  kIsOnFlyingMount = 730,
877  kCanFlyHere = 731,
878  kIsFlyingMountPatrolQueued = 732,
879  kIsFlyingMountFastTravelling = 733,
880  kIsOverEncumbered = 734,
881  kGetActorWarmth = 735,
882 
883  kTotal
884  };
885 
887  ~FUNCTION_DATA() = default;
888 
889  // members
891  std::uint16_t pad02; // 02
892  std::uint32_t pad04; // 04
893  void* params[2]; // 08
894  };
895  static_assert(sizeof(FUNCTION_DATA) == 0x18);
896 
898  {
899  public:
900  enum class OpCode : std::uint8_t
901  {
902  kEqualTo, // ==
903  kNotEqualTo, // !=
904  kGreaterThan, // >
905  kGreaterThanOrEqualTo, // >=
906  kLessThan, // <
907  kLessThanOrEqualTo, // <=
908  };
909 
911  {
913  ~GlobalOrFloat() = default;
914 
916  float f;
917  };
918  static_assert(sizeof(GlobalOrFloat) == 0x8);
919 
920  struct Flags
921  {
922  public:
923  Flags();
924  ~Flags() = default;
925 
926  // members
927  bool isOR: 1; // 0 - false == AND, true == OR
928  bool usesAliases: 1; // 1
929  bool global: 1; // 2
930  bool usePackData: 1; // 3
931  bool swapTarget: 1; // 4
932  OpCode opCode: 3; // 5
933  };
934  static_assert(sizeof(Flags) == 0x1);
935 
937  ~CONDITION_ITEM_DATA() = default;
938 
939  // members
941  ObjectRefHandle runOnRef; // 10 - kReference
942  std::uint32_t dataID; // 14
944  Flags flags; // 30
946  std::uint16_t pad32; // 32
947  std::uint32_t pad34; // 34
948  };
949  static_assert(sizeof(CONDITION_ITEM_DATA) == 0x30);
950 
952  {
953  public:
954  constexpr ConditionCheckParams(TESObjectREFR* a_actionRef, TESObjectREFR* a_targetRef) :
955  actionRef(a_actionRef),
956  targetRef(a_targetRef),
957  quest(nullptr),
958  questStartEvent(nullptr),
959  unk20(nullptr),
960  unk28(false),
961  packageDataList(nullptr)
962  {}
963 
964  // members
967  TESQuest* quest; // 10
969  void* unk20; // 20
970  bool unk28; // 28
972  };
973  static_assert(sizeof(ConditionCheckParams) == 0x38);
974 
975  struct TESConditionItem // CTDA
976  {
978  ~TESConditionItem() = default;
979 
981 
982  bool operator()(ConditionCheckParams& a_solution) const;
983  bool IsTrue(ConditionCheckParams& a_solution) const;
984 
985  // members
988  };
989  static_assert(sizeof(TESConditionItem) == 0x38);
990 
992  {
993  public:
996 
998 
999  [[nodiscard]] explicit operator bool() const;
1000 
1001  bool operator()(TESObjectREFR* a_actionRef, TESObjectREFR* a_targetRef) const;
1002  bool IsTrue(TESObjectREFR* a_actionRef, TESObjectREFR* a_targetRef) const; // Perk fragments will short circuit
1003 
1004  // members
1006  };
1007  static_assert(sizeof(TESCondition) == 0x8);
1008 }
Definition: TESQuest.h:177
Definition: TESCondition.h:992
bool IsTrue(TESObjectREFR *a_actionRef, TESObjectREFR *a_targetRef) const
bool operator()(TESObjectREFR *a_actionRef, TESObjectREFR *a_targetRef) const
TESConditionItem * head
Definition: TESCondition.h:1005
Definition: TESGlobal.h:10
Definition: TESObjectREFR.h:113
Definition: TESQuest.h:189
Definition: AbsorbEffect.h:6
CONDITIONITEMOBJECT
Definition: TESCondition.h:15
Definition: TESCustomPackageData.h:16
Definition: TESCondition.h:921
bool swapTarget
Definition: TESCondition.h:931
bool global
Definition: TESCondition.h:929
bool usePackData
Definition: TESCondition.h:930
bool usesAliases
Definition: TESCondition.h:928
OpCode opCode
Definition: TESCondition.h:932
bool isOR
Definition: TESCondition.h:927
Definition: TESCondition.h:898
FUNCTION_DATA functionData
Definition: TESCondition.h:943
ObjectRefHandle runOnRef
Definition: TESCondition.h:941
std::uint16_t pad32
Definition: TESCondition.h:946
GlobalOrFloat comparisonValue
Definition: TESCondition.h:940
~CONDITION_ITEM_DATA()=default
OpCode
Definition: TESCondition.h:901
std::uint32_t dataID
Definition: TESCondition.h:942
stl::enumeration< CONDITIONITEMOBJECT, std::uint8_t > object
Definition: TESCondition.h:945
Flags flags
Definition: TESCondition.h:944
std::uint32_t pad34
Definition: TESCondition.h:947
Definition: TESCondition.h:952
TESObjectREFR * targetRef
Definition: TESCondition.h:966
TESQuest * quest
Definition: TESCondition.h:967
constexpr ConditionCheckParams(TESObjectREFR *a_actionRef, TESObjectREFR *a_targetRef)
Definition: TESCondition.h:954
TESObjectREFR * actionRef
Definition: TESCondition.h:965
BGSPackageDataList * packageDataList
Definition: TESCondition.h:971
void * unk20
Definition: TESCondition.h:969
bool unk28
Definition: TESCondition.h:970
BGSStoryEvent * questStartEvent
Definition: TESCondition.h:968
Definition: TESCondition.h:28
std::uint16_t pad02
Definition: TESCondition.h:891
std::uint32_t pad04
Definition: TESCondition.h:892
~FUNCTION_DATA()=default
FunctionID
Definition: TESCondition.h:33
void * params[2]
Definition: TESCondition.h:893
Definition: TESCondition.h:976
CONDITION_ITEM_DATA data
Definition: TESCondition.h:987
bool operator()(ConditionCheckParams &a_solution) const
bool IsTrue(ConditionCheckParams &a_solution) const
TESConditionItem * next
Definition: TESCondition.h:986
~TESConditionItem()=default
Definition: TESCondition.h:911
TESGlobal * g
Definition: TESCondition.h:915
float f
Definition: TESCondition.h:916