ERAiAPI
Loading...
Searching...
No Matches
AiFunc.hpp
Go to the documentation of this file.
1#pragma once
2#include "AiConstants.hpp"
3#include "GoalFunc.hpp"
5#include "Goals.hpp"
6#include "GoalNative.hpp"
7
37class AiFunc
38{
39public:
44
49 void AddNPCActProb(int npcAiBehaviorParam);
50
64 void AddObserveArea(int observeSlot, TARGET targetOrigin, TARGET targetObserved, AI_DIR_TYPE directionStart, float angleWidth, float distance);
65
80 void AddObserveAreaCustom(int observeSlot, TARGET targetOrigin, TARGET targetObserved, AI_DIR_TYPE directionStart, float angleWidth, float angleHeight, float distance);
81
93 void AddObserveChrDmySphere(int observeSlot, TARGET targetObserved, int dummyPolyId, float radius);
94
99 void AddObserveObjBreak(unsigned int observeObjectId);
100
111 void AddObserveRegion(int observeSlot, int targetObserved, unsigned int regionId);
112
122 void AddObserveSpecialEffectAttribute(TARGET targetObserved, int specialEffectId);
123
124 //TODO Add info
131 void AddTeamRecord(int recordId, TARGET target, float distance);
132
133 //TODO Add info
140 void AddTeamTimeRecord(int recordId, TARGET target, float distance);
141
158 GoalFunc* AddTopGoal(int goalId, float life, float goalParam0 = 0, float goalParam1 = 0, float goalParam2 = 0, float goalParam3 = 0, float goalParam4 = 0, float goalParam5 = 0, float goalParam6 = 0, float goalParam7 = 0, float goalParam8 = 0, float goalParam9 = 0);
159
160 //TODO Add info
165
171
180 int CalcNearMovePointOnRoute(int p1, int p2, float p3, float p4);
181
182 //TODO Add info. Calcs the info for the target POINT_WaitAndSee.
188
194
202 bool CanShootMagicByType(int equipWeaponParam, int magicType);
203
209
215 bool CanWeaponEnhance(int equipWeaponParam);
216
222
228 void ChangeEquipItem(int slot, ITEM_SLOTTYPE slotType);
229
234 void ChangeEquipMagic(int slot);
235
240 void ChangeEquipMagicByMagicParamId(int magicParam);
241
242 //TODO Add info.
247
255 bool CheckDoesExistPath(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance);
256
265 bool CheckTurnAngleDiff(TARGET target, bool isAntiClockwise, float angleThreshold);
266
272 bool ChkNearCorpsePos(float maxAlertDistance);
273
280 bool ChkNearLowHpFriend(float maxHpRate, float maxAlertDifference);
281
282 //TODO Add info
287
288 //TODO Add info
293
298
304
310
315
321
327
333
338
345
351 void DbgSetLastActIdx(int actIndex);
352
353 //TODO Add info.
358
363 void DeleteObserve(int observeSlot);
364
369 void DeleteObserveObjBreak(unsigned int objectId);
370
376 void DeleteObserveSpecialEffectAttribute(TARGET targetObserved, int specialEffectId);
377
382 void DeleteTeamReacor(int recordId);
383
389
394 unsigned char DoAdmirer_ThinkAttr_();
395
401 void DoEzAction(float actionLife, int ezActionId);
402
408 void EnableUnfavorableAttackCheck(unsigned int animationIdOffset, unsigned int animationId);
409
414 void EndDash();
415
419 void EndGuard();
420
421 //TODO Add info
426
432
438
439 //TODO finish this up, what does close proximity do *exactly*? directional distance?
440 //Close proximity mode is an additional restriction on arrived check. Make sure the target is below/equal to self height and that they are unobstructed?
456 bool FollowPath(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance, bool isWalk, float directionalDistance, bool xzDistanceOnly, bool defaultOrientationAndDirDist, bool closeProximityMode);
457
471 bool FollowPath(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance, bool isWalk, float directionalDistance);
472
486 bool FollowPathToPoint(TARGET moveTarget, int directionFromTarget, float stopDistance, bool isWalk);
487
492
503 int GetAIUsageParam(int paramUsageType, int rowId);
504
511
517
523
529
535
541
551 int GetAreaObserveSlot(int areaObserveInterruptState, int matchingObservesCount);
552
558 int GetAreaObserveSlotNum(int areaObserveInterruptState);
559
565
571 int GetArtsID(ARM arm);
572
578 float GetAttackPassedTime(int animationId);
579
586
592
598
604
610
616
622 float GetChrHitRadius(int target);
623
629
635 int GetCurrEquipMagicID(int target);
636
642
648
655
661
667 float GetDist(TARGET target);
668
675 float GetDistAtoB(TARGET targetA, TARGET targetB);
676
688 float GetDistParam(DIST distanceType);
689
695 float GetDistXZ(TARGET target);
696
702 float GetDistY(TARGET target);
703
709 float GetDistYSigned(TARGET target);
710
718 int GetEquipArrowBoltId(TARGET target, ARROW_OR_BOLT arrowOrBolt, int slot);
719
727 int GetEquipItemId(TARGET target, int slot, ITEM_SLOTTYPE slotType);
728
735 int GetEquipMagicId(TARGET target, int slot);
736
742
750 int GetEquipWeaponId(TARGET target, ARM arm, int slot);
751
758
764 int GetEventRequest(int slot);
765
771
778
787 float GetExistMeshOnLineDist(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance);
788
798 float GetExistMeshOnLineDistEx(TARGET target, AI_DIR_TYPE directionFromTarget, float lineEndDistance, float lineWidth, float lineStartDist);
799
809 float GetExistMeshOnLineDistSpecifyAngle(TARGET target, float angle, float maxDistance, AI_SPA_DIR_TYPE spatialDirectionStart);
810
821 float GetExistMeshOnLineDistSpecifyAngleEx(TARGET target, float angle, float lineEndDistance, AI_SPA_DIR_TYPE spatialDirectionStart, float lineWidth, float lineStartDist);
822
828
834 int GetHp(TARGET target);
835
841 float GetHpRate(TARGET target);
842
849 float GetIdTimer(int timerId);
850
856
865 int GetInsidePlatoonMemberNum(float p1, float p2, float p3, float p4);
866
873
880
886
914
920 int GetLadderDirMove(int p1);
921
927
933
939
945
952
958
964 int GetMagicCategory(int magicId);
965
971 int GetMapHitRadius(int target);
972
973
974 //TODO Verify
982 float GetMeshHeight(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance);
983
992 float GetMeshHeightSpecifyAngle(TARGET target, float angle, float maxDistance, AI_SPA_DIR_TYPE spatialDirectionStart);
993
994 //TODO Add info
1000 int GetMovePointActionId(int pointIndex);
1001
1002 //TODO Add info
1008
1009 //TODO Add info
1015
1016 //TODO Add info
1022
1028 int GetMp(TARGET target);
1029
1035
1041
1047 float GetNPCActProb(int actId);
1048
1054
1060 int GetNumFriend(float distance);
1061
1067 float GetNumber(int index);
1068
1069 //TODO Add info, related to obj break observer
1075 float GetObjBreakRate(unsigned int objId);
1076
1082 float GetOffsetY(TARGET target);
1083
1089 float GetOriginDist(TARGET target);
1090
1096 int GetPartsDmg(int p1);
1097
1103
1109
1115
1121
1127
1128 //TODO Add info
1134
1140
1148 float GetRandam_Float(float min, float max);
1149
1159 int GetRandam_Int(int min, int max);
1160
1167
1174 float GetRemainingAttackCoolTime(int animationId);
1175
1182
1189
1194 unsigned int GetRideObjEntityID();
1195
1201 float GetSA(TARGET target);
1202
1208 int GetSp(TARGET target);
1209
1216 bool GetSpecialEffectActivateInterruptId(int specialEffectId);
1217
1224
1231 int GetSpecialEffectActivateInterruptType(int interruptsActivatedUntilReturn);
1232
1238 bool GetSpecialEffectDeActivateInterruptId(int specialEffectId);
1239
1245
1252 int GetSpecialEffectInactivateInterruptType(int interruptsDeactivatedUntilReturn);
1253
1261 float GetStringIndexedArray(char* arrayName, int index);
1262
1268 float GetStringIndexedNumber(char* variableName);
1269
1275
1282
1288
1289 //TODO Add info
1295
1301 float GetTeamIdTimer(int p1);
1302
1308
1314 float GetTeamNumber(int p1);
1315
1321 float GetTeamOrder(ORDER_TYPE orderType);
1322
1323 //TODO Add info
1331 int GetTeamRecordCount(int p1, TARGET target, float p3);
1332
1339
1345 float GetTimer(int index);
1346
1353
1359
1365
1375
1381 int GetWeaponBehaviorVarID(int equipWeaponId);
1382
1389
1396
1408
1420
1427
1434
1440
1446 bool HasGoal(int goalId);
1447
1453 bool HasParalysis(TARGET target);
1454
1460
1467 bool HasSpecialEffectAttribute(TARGET target, int stateInfo);
1468
1475 bool HasSpecialEffectCategory(TARGET target, int category);
1476
1483 bool HasSpecialEffectId(TARGET target, int specialEffectId);
1484
1490
1496 bool IsActiveGoal(int goalId);
1497
1503
1509
1515
1521
1527
1534
1541
1548
1554
1561 bool IsChrAroundLadderEdge(float distance, int ladderDmyId);
1562
1568
1574
1580 bool IsEnableCancelAttack_CheckAttackNo(int actionRequestId);
1581
1587
1593 bool IsEnableCancelMove_CheckAttackNo(int actionRequestId);
1594
1600
1606 bool IsEnableCancelStep_CheckAttackNo(int actionRequestId);
1607
1613
1619 bool IsEnableComboAttack_CheckAttackNo(int actionRequestId);
1620
1626
1632 bool IsEventFlag(unsigned int eventFlagId);
1633
1641
1647
1657 bool IsExistChrOnLineSpecifyAngle(TARGET target, float angle, float maxDistance, AI_SPA_DIR_TYPE spatialDirectionStart);
1658
1665
1674 bool IsExistMeshOnLine(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance);
1675
1676 //TODO Add info
1682
1683 //TODO Add info
1689
1695
1701 bool IsExistTeamRecord(int recordId);
1702
1708
1709 //TODO Add info
1715
1721 bool IsFinishAttackCoolTime(int animationId);
1722
1723 //TODO Add info
1729 bool IsFinishAttack_CheckAttackNo(int actionRequestId);
1730
1731 //TODO Add info
1737
1743 bool IsFinishTimer(int index);
1744
1750
1757
1764
1771
1772 //TODO Add info
1778
1785
1792
1793 //TODO Add info
1801 bool IsHoleFlag(TARGET target, AI_DIR_TYPE directionFromTarget, float distance);
1802
1808
1809 //TODO Add info
1815
1821
1822 //TODO Add info.
1828
1835
1844 bool IsInsideMsbRegion(TARGET target, AI_DIR_TYPE direction, float length, unsigned int regionId);
1845
1851 bool IsInsideObserve(int observeSlot);
1852
1862 bool IsInsideTarget(TARGET target, AI_DIR_TYPE directionStart, float angleWidth);
1863
1874 bool IsInsideTarget(TARGET target, AI_DIR_TYPE directionStart, float angleWidth, float angleHeight);
1875
1886 bool IsInsideTargetCustom(TARGET targetOrigin, TARGET target, AI_DIR_TYPE directionStart, float angleWidth, float angleHeight, float distance);
1887
1897 bool IsInsideTargetEx(TARGET targetOrigin, TARGET target, AI_DIR_TYPE directionStart, float angleWidth, float distance);
1898
1905 bool IsInsideTargetRegion(TARGET target, unsigned int regionId);
1906
1929 bool IsInterupt(INTERUPT interruptType);
1930
1937 bool IsLadderAct(TARGET target);
1938
1943 bool IsLand();
1944
1950
1961 bool IsLookToTarget(TARGET target, float angleWidth);
1962
1973 bool IsLookToTarget(float angleWidth);
1974
1986
1993
1999
2006
2012
2013 //TODO Add info
2022 bool IsOnNearMesh(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance, int p4);
2023
2024 //TODO Add info
2032 bool IsOnNearMeshByPos(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance);
2033
2042 bool IsOnPath(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance);
2043
2044 //TODO Add info
2050
2056
2062
2068
2074
2081
2082 //TODO Add info
2089
2090 //TODO Add info
2097
2103 bool IsRiding(TARGET target);
2104
2112
2119
2126
2134
2142
2149 bool IsSleepSpecialEffectId(TARGET target, int specialEffectId);
2150
2157
2164 bool IsStartAttack_CheckAttackNo(int actionRequestId);
2165
2172 bool IsTargetGuard(TARGET target);
2173
2180 bool IsTargetOutOfAngleInterruptSlot(int angleObserveSlot);
2181
2188 bool IsTargetOutOfRangeInterruptSlot(int rangeObserveSlot);
2189
2196
2202
2208
2214
2221
2227
2228 //TODO Add info
2234
2240
2246
2253
2262
2267 void KickEvent(int eventIndex);
2268
2276 bool KickLuaCall(int p1, int p2, int p3);
2277
2283
2295 bool MemoryRelativeTarget(TARGET target, float angleStart, float angle, AI_SPA_DIR_TYPE spatialDirectionStart);
2296
2303 int Mod(int dividend, int divisor);
2304
2305 //TOOD Add info- what is directional distance
2315 bool MoveTo(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance, bool isWalk, float directionalDistance);
2316
2325 bool MoveToEventPoint(unsigned int regionId, int p2, float p3, bool isWalk);
2326
2327 //TODO Add info
2332
2337
2342
2347
2352 void PrintText(char* p1);
2353
2361 float RegistAttackTimeInterval(int animationId, float cooldown);
2362
2368 bool RegisterBoidsUnit(int p1);
2369
2381 bool RegisterTriggerRegion(int p1, int p2, float p3, float p4, int p5, int p6, float p7);
2382
2395 bool RegisterTriggerRegionCylinder(int p1, int p2, float p3, float p4, float p5, int p6, int p7, float p8);
2396
2403
2408 void RemoveBoidsUnit(int p1);
2409
2415
2420
2421 //TODO Add info
2426 void ReqPlatoonState(PLATOON_STATE platoonState);
2427
2428 //TODO Add info
2433 void ReqTeam_Support(float maxDistance);
2434
2439 void RequestChangeFlyState(bool enable);
2440
2446
2452 void RequestFadeWarpToInitPos(float fadeTime, float p2);
2453
2458
2464
2465 //TODO Add info
2471 bool ReserveObjAct(int objActIndex);
2472
2478 bool ReserveRide(float maxDistance);
2479
2484
2489 void ResetInitialPositionByEventRegion(unsigned int regionId);
2490
2495
2502 int SearchGetEnemyNumAround(TARGET target, float maxDistance);
2503
2509
2516 void SetAIFixedMoveTarget(TARGET targetOrigin, AI_DIR_TYPE directionFromTarget, float lineLength);
2517
2525 void SetAIFixedMoveTargetSpecifyAngle(TARGET targetOrigin, float angle, float lineLength, AI_SPA_DIR_TYPE spatialDirectionStart);
2526
2527 //TODO Add info. Test later.
2528 //SetAIPredictionMoveTargetSpecifyAngle(p1, angle, lineLength, 0)
2529
2536 void SetAIPredictionMoveTargetSpecifyAngle(float p1, float angle, float lineLength);
2537
2545 void SetAIPredictionMoveTargetSpecifyAngle(float p1, float angle, float lineLength, float p4);
2546
2554 void SetAIPredictionMoveTargetSpecifyTargetDir(float predictionFactor, int directionFromEnemy, float lineLength, float p5);
2555
2560
2566 void SetAttackRequest(unsigned int ezStateId);
2567
2573
2579
2585
2591 void SetBoidsSpeedRateRange(float p1, float p2);
2592
2597 void SetCurrentMovePointIndex(int pointIndex);
2598
2599 //TODO Add info
2604
2610
2611 //TODO Add info
2616
2617 //TODO Add info
2622 void SetEnableUsePath(bool enable);
2623
2629 void SetEventFlag(unsigned int eventFlagId, bool value);
2630
2635 void SetEventMoveTarget(unsigned int regionId);
2636
2641
2648
2653 void SetMoveLROnly(bool enable);
2654
2660 void SetNumber(int index, float value);
2661
2666 void SetPassiveMoveModifier(float modifier);
2667
2668 //TODO Add info
2675
2680 void SetRouteInfoByEntityId(unsigned int p1);
2681
2689 void SetStringIndexedArray(char* arrayName, int index, float value);
2690
2696 void SetStringIndexedNumber(char* variableName, float value);
2697
2703 void SetSuperClimbingMode(bool enable);
2704
2710 void SetTeamNumber(int p1, float p2);
2711
2718 void SetTeamNumber(int p1, float p2, float p3);
2719
2726 void SetTimer(int index, float value);
2727
2734
2739 void SetUserInterupt(unsigned int p1);
2740
2741 //TODO Add info
2746
2753 void StartAttackPassedTimer(int animationId, float time);
2754
2759
2764
2769 void StartIdTimer(int index);
2770
2776 void StartIdTimerSpecifyTime(int index, float startingTime);
2777
2782 void StartTeamIdTimer(int p1);
2783
2789
2795
2801
2807
2813
2820
2821 //TODO Add info. Handles answering call logic, including setting as target?
2826
2827 //TODO Add info
2832
2833 //TODO Add info. Validates call
2838
2839 //TODO Add info. Validates reply
2844
2850 void TurnTo(TARGET target);
2851};
ORDER_TYPE
INTERUPT
PLATOON_STATE
AI_TARGET_TYPE
DIST
TEAM_TYPE
ARROW_OR_BOLT
AI_TARGET_STATE
PLAN_IDX_AINOTE
WEP_CATE
AI_SPA_DIR_TYPE
AI_EXCEL_THINK_PARAM_TYPE
ITEM_SLOTTYPE
AI_DIR_TYPE
AI_TARGET_WEIGHT_TYPE
TARGET
AI_AREAOBSERVE_INTERRUPT
AI_SOUND_RANK
Represents the AI of a character.
Definition AiFunc.hpp:38
int GetSpecialEffectInactivateInterruptType(int interruptsDeactivatedUntilReturn)
Returns the special effect id of the nth special effect observe that is in interrupt deactivate state...
float GetTeamNumber(int p1)
Does nothing.
GoalFunc * GetTopGoal()
Returns the AI's top goal.
bool GetSpecialEffectActivateInterruptId(int specialEffectId)
Returns true if the given special effect has been applied on any target that is being observed for th...
void TeamHelp_Call()
Call for help from team. The distance is taken from NpcThinkParam's "callHelp_CallValidRange".
void SetBoidsSearchConnectorRange(float p1)
Does nothing.
void ResetInitialPosition()
Sets the character's initial position to their current position.
bool IsInterupt(INTERUPT interruptType)
Returns true if the given interrupt type is currently active. List of the interrupt types and their a...
bool IsHitAttack()
Returns true if the character hit an attack within the current goal, otherwise false....
int GetInitStayId()
Returns the character's event defined idle animation.
float GetDistXZ(TARGET target)
Returns the strictly horizontal distance between the character and the target, taking into account th...
bool CalcSetPointWaitAndSee()
Calcs the info for the target POINT_WaitAndSee?
void SetAIPredictionMoveTargetSpecifyAngle(float p1, float angle, float lineLength, float p4)
bool IsEnableCancelStep_CheckAttackNo(int actionRequestId)
Returns true if the AI's current request equals the given request id and the character has EnableCanc...
void AddObserveArea(int observeSlot, TARGET targetOrigin, TARGET targetObserved, AI_DIR_TYPE directionStart, float angleWidth, float distance)
Adds an observer to the area observers. The area is a spherical sector defined by the parameters.
void ShiftCurrTargetBattleState()
bool ReserveRide(float maxDistance)
Attempts to find and reserve a ride target within the given distance.
void SetTeamNumber(int p1, float p2)
Does nothing.
int GetReplanningGoalAction()
Returns NpcThinkParam's goalAction_ToCautionImportant if AI targeting search is currently "important"...
int GetTouchBreakableObjectDefense()
Returns the defense/health of the object the AI is touching, used to determine if the AI is strong en...
bool IsBattleState()
Returns true if in battle state (usually battle goals). Equivalent to GetCurrTargetState() == AI_TARG...
bool IsExistReqObjAct()
void SetEventFlag(unsigned int eventFlagId, bool value)
Sets the given flag to the given value.
float GetMovePointEffectRange()
bool GetSpecialEffectDeActivateInterruptId(int specialEffectId)
Returns true if the given special effect has worn off on any target that is being observed for the gi...
bool IsInsideTarget(TARGET target, AI_DIR_TYPE directionStart, float angleWidth, float angleHeight)
Returns true if the given target is within the given spherical sector, otherwise false....
float DbgAutoRemo_GetWaitCommandTime()
Does nothing.
void AddFriendAttackedTarget()
Notifies targeting system that someone in the team attacked target.
bool IsExistTeamRecord(int recordId)
Returns true if the given team record exists, otherwise false.
void PrintText(char *p1)
Does nothing.
float GetTargetSARate(TARGET target)
Returns the target's poise to max poise ratio.
void AddTeamTimeRecord(int recordId, TARGET target, float distance)
void SetAIFixedMoveTargetSpecifyAngle(TARGET targetOrigin, float angle, float lineLength, AI_SPA_DIR_TYPE spatialDirectionStart)
Sets the AI's fixed target pos (POINT_AI_FIXED_POS) to the given position, as defined by the end poin...
void SetStringIndexedNumber(char *variableName, float value)
Sets the given variable to the given value.
bool IsTouchBreakableObject()
Returns true if the character is touching a breakable object, otherwise false. Used to determine if t...
bool HasSpecialEffectId(TARGET target, int specialEffectId)
Returns true if the target has a special effect with the given id, otherwise false.
void SetEnableInterrupt_LookedTarget(bool enable)
Enables/disables the interrupt "INTERUPT_LookedTarget".
void BeginWalkAroundFree()
void SetCurrentMovePointIndex(int pointIndex)
Sets the point to move to to the one in the given index.
int GetNpcThinkParamID()
Returns the character's NpcThinkParam id.
int GetAnimIdOffset()
Returns the character's animation id offset.
int GetEventRequest(int slot)
Returns the event request value in the given slot. Slots are 0-3. This is used to let events communic...
int GetCurrentEquipWeaponId(ARM arm)
Returns the character's current equipped weapon id in the given arm.
bool FollowPath(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance, bool isWalk, float directionalDistance)
Use pathing to move towards a spherical sector defined by the following parameters....
float GetTargetApproachSpeed()
Does nothing.
void SetAttackRequest(unsigned int ezStateId)
Request action. Animation offset is included automatically in this function.
AI_SOUND_RANK GetLatestSoundTargetRank()
Returns the last detected sound's rank.
void SetAIPredictionMoveTargetSpecifyTargetDir(float predictionFactor, int directionFromEnemy, float lineLength, float p5)
float GetTeamOrder(ORDER_TYPE orderType)
Returns the AI's role type/call help type (?).
void TeamHelp_ReserveCall()
bool IsFinishAttack_CheckAttackNo(int actionRequestId)
PLATOON_STATE GetPlatoonState()
Returns AI's platoon's state, if there is none then -1.
void AddObserveSpecialEffectAttribute(TARGET targetObserved, int specialEffectId)
Adds an observer to the special effect observers. Interrupts the AI when the given special effect is ...
bool IsNpcPlayer()
Returns true if the character is a player npc, otherwise false.
void SetBoidsCohesionRange(float p1)
Does nothing.
bool IsLookToTarget(TARGET target, float angleWidth)
Returns true if the given target is within the given circular sector, otherwise false....
bool IsRideLargeSpaceFlag(TARGET target)
bool IsEnableComboAttack()
Returns true if the character has EnableComboAttack enabled, enabled through TAE 0 "ChrActionFlag"/"J...
bool RegisterTriggerRegion(int p1, int p2, float p3, float p4, int p5, int p6, float p7)
Does nothing.
bool IsTeamLeader()
Does nothing.
bool IsEnableNewLadderAct()
Does nothing.
int GetTeamInterruptCommand()
Does nothing.
bool IsStartAttack_CheckAttackNo(int actionRequestId)
Returns true if currently executing the given animation as requested by the AI, otherwise false....
void RemoveTriggerRegionObserver(int p1)
Does nothing.
bool HasSpecialEffectCategory(TARGET target, int category)
Returns true if the target has a special effect with the given category, otherwise false.
float GetExistMeshOnLineDistSpecifyAngleEx(TARGET target, float angle, float lineEndDistance, AI_SPA_DIR_TYPE spatialDirectionStart, float lineWidth, float lineStartDist)
Returns the distance between the given target and the furthest nav mesh that collides with the given ...
int GetAreaHour()
Returns the world's hour in the current day.
float GetMeshHeightSpecifyAngle(TARGET target, float angle, float maxDistance, AI_SPA_DIR_TYPE spatialDirectionStart)
Returns 99999 if the given line doesn't end on a nav mesh, otherwise global y pos of the mesh.
int GetActTypeOnFailedPathEnd()
Returns the NpcThinkParam's actTypeOnFailedPath. Used to determine what to do on battle act pathing f...
int GetMovePointType()
void SetEnableUsePath(bool enable)
Use map patrol path?
void TurnTo(TARGET target)
Sets the given target as the turn target/target to turn to. The turn target can be considered the "ma...
void SetEventMoveTarget(unsigned int regionId)
Set POINT_EVENT to the given region.
bool IsValidPlatoon()
Returns true if the AI is part of a team/platoon, otherwise false.
float GetExistMeshOnLineDistSpecifyAngle(TARGET target, float angle, float maxDistance, AI_SPA_DIR_TYPE spatialDirectionStart)
Returns the distance between the given target and the furthest nav mesh that collides with the given ...
int GetLeaveTriggerRegionCategory(int p1)
Does nothing.
void ClearTeam_Support()
Clear request for team support. See ReqTeam_Support(float).
int GetLatestSoundBehaviorID()
Returns the last detected sound's (AiSoundParam) soundBehaviorId if its rank is "behavior" (7).
float GetDistY(TARGET target)
Returns the strictly vertical distance between the character and the target.
void RequestLadderWait()
Requests LadderWait, triggering the same named interrupt which is used in top_goal....
bool IsExecChangeStateAction()
Returns ttrue if the current state isn't AI_TARGET_STATE__CAUTION or if the last state is AI_TARGET_S...
int GetSp(TARGET target)
Returns the target's stamina.
void KickEvent(int eventIndex)
float GetRandam_Float(float min, float max)
Returns a random float between the given bounds, uniform distribution, min inclusive max exclusive....
unsigned char DoAdmirer_ThinkAttr_()
Returns the NpcThinkParam's thinkAttr_doAdmirer. Usually used to determine whether the character shou...
int GetPlatoonMemberNum()
Returns the amount of members/ais in the AI's platoon.
bool DbgAutoRemo_IsWaitCommand()
Does nothing.
int GetInsidePlatoonMemberNum(float p1, float p2, float p3, float p4)
Does nothing.
int GetCurrEquipMagicID(int target)
Returns the target's currently selected magic.
bool IsForceBattleGoal()
Returns force battle goal. Set manually by AI functions. If true then battle goal will be priortized ...
void NotifyBuddyUnsummon()
AI_DIR_TYPE GetTurnAroundOptimizedDirection(TARGET target, AI_DIR_TYPE direction)
Returns AI_DIR_TYPE_L if the given direction from the target is pointing beyond the AI,...
bool IsLadderAct(TARGET target)
Returns true if the given target is on a ladder, otherwise false. Equivalent to GetLadderActState(TAR...
int GetEquipMagicId(TARGET target, int slot)
Returns the magic id in the given target and slot.
bool IsTargetGuard(TARGET target)
Returns true if the given target is guarding, otherwise false. Given from ChrActionFlagModule.
bool IsInsideTargetCustom(TARGET targetOrigin, TARGET target, AI_DIR_TYPE directionStart, float angleWidth, float angleHeight, float distance)
Returns true if the given target is within the given spherical sector, otherwise false.
bool IsHorseCall()
Returns true if the local player has SpEffect 3039, otherwise false.
float GetMeshHeight(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance)
Returns 99999 if the given line doesn't end on a nav mesh, otherwise global y pos of the mesh.
bool ReserveObjAct(int objActIndex)
bool IsForgettingMemoryTarget()
Returns true if the AI's targeting system's memory target is being forgotten, otherwise false....
void SetIsForceBattleGoal()
Sets IsForceBattleGoal() to true.
AI_TARGET_WEIGHT_TYPE GetWeightType(TARGET target)
Returns the weight type of the target.
float GetDistYSigned(TARGET target)
Returns the strictly vertical distance between the character and the target, signed as such (targetY ...
float GetIdTimer(int timerId)
Returns the timer's elapsed time since last accessed. Sets the timer to its starting offset (0 by def...
void ClearFinishObjAct()
Set finish obj act.
bool ChkNearCorpsePos(float maxAlertDistance)
Returns true if there is a teammate within the given distance that is dead.
float GetDistParam(DIST distanceType)
Converts distance type into distance. DIST_Near = 3 DIST_Middle = 6 DIST_Far = 15 DIST_Out = 999 DIST...
int GetInvadeTriggerRegionCategoryNum()
Does nothing.
int GetChangeStateActionType()
Does nothing.
bool HasTopSubgoal()
Returns true if the top goal has a subgoal, otherwise false.
bool IsTargetWeakSoulCoin(int p1)
Does nothing.
int GetPathResult()
Returns 0 if mid pathing, otherwise -1.
bool IsLookToTarget(float angleWidth)
Returns true if the turning target is within the given circular sector, otherwise false....
void OnUpdateLadderGoal()
Used on the update of the LadderMove goal to update both ladder specific and pathing data.
int GetEquipWeaponIndex(ARM arm)
Returns the currently active weapon slot index in the characterar's given arm.
bool IsOmissionLevel30()
Returns true if the character is at omission level 30. Used to determine how much effort the AI shoul...
void SetMoveLROnly(bool enable)
Forces the AI to only use left/right movement directions when moving.
void ClearEnableEndureCancel_forGoal()
Used in DS3/Sekiro for StabCounterAttack/EndureAttack, effect unknown. Unused in ER.
bool IsEnableComboAttack_CheckAttackNo(int actionRequestId)
Returns true if the AI's current request equals the given request id and the character has EnableComb...
int GetPartsDmg(int p1)
Does nothing.
bool IsExistChrSelfToTarget(TARGET target)
Returns true if there exists a character on the line between self and the target, otherwise false.
bool IsSearchHighState()
Returns true if in search high state, also known as "search2". Equivalent to GetCurrTargetState() == ...
int GetInvadeTriggerRegionCategory(int p1)
Does nothing.
bool HasGoal(int goalId)
Returns true if the AI has the given goal in queue (regardless of child depth), otherwise false.
bool FollowPath(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance, bool isWalk, float directionalDistance, bool xzDistanceOnly, bool defaultOrientationAndDirDist, bool closeProximityMode)
Use pathing to move towards a spherical sector defined by the following parameters....
void AddObserveRegion(int observeSlot, int targetObserved, unsigned int regionId)
Adds an observer to the area observers. This area is defined by the given event region.
bool IsUpdateFirstAnimation()
int GetMagicCategory(int magicId)
Returns the given magic's ezStateBehaviorType (0 = sorcery, 1 = incantation, 2 = pyromancy,...
bool IsFinishObjAct()
void RequestFadeWarpToInitPos(float fadeTime, float p2)
Requests to warp to init pos while fading.
bool CanLadderGoalEnd()
Returns true if not on a ladder.
int GetEquipArrowBoltId(TARGET target, ARROW_OR_BOLT arrowOrBolt, int slot)
Returns the arrow or bolt equipment id in the given target and slot.
bool IsEnableCancelAttack()
Returns true if the character has EnableCancelAttack enabled, enabled through TAE 0 "ChrActionFlag"/"...
void StartTeamIdTimer(int p1)
Does nothing.
bool IsOnPath(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance)
Returns true if the character is pathing on the nav mesh found from the given line?...
int GetSpecialEffectActivateInterruptType(int interruptsActivatedUntilReturn)
Returns the special effect id of the nth special effect observe that is in interrupt activate state....
void RequestParallelMove()
Requests parallel move type. See usage in c9997.hks, env(327).
int GetArtsID(ARM arm)
Returns the SwordArtsParam id of the weapon in the given arm.
void OnStartLadderGoal()
Used on the activation of the LadderMove goal to clear some data. Does nothing by itself.
void StartIdTimer(int index)
Starts id timer.
float EvaluateAttackDist()
Does nothing.
void AddNPCActProb(int npcAiBehaviorParam)
Add the probabilities in the given NpcAiBehaviorProbability param to the NPC's probabilities array.
void TeamHelp_ValidateCall()
int GetHp(TARGET target)
Returns the target's hp.
void ChangeEquipMagic(int slot)
Changes current selected magic to the specified slot's magic.
void StartDash()
Forces run.
bool IsCautionState()
Returns true if in caution state (usually represented by slowly walking around a sound/last remembere...
bool FollowPathToPoint(TARGET moveTarget, int directionFromTarget, float stopDistance, bool isWalk)
Use pathing to move towards a spherical sector defined by the following parameters....
bool IsVisibleTarget(TARGET target)
Returns true if the current target is visible to the AI, or the given target is one of the speicifed ...
bool IsRiding(TARGET target)
Returns true if the target is riding, otherwise false.
void ChangeEquipMagicByMagicParamId(int magicParam)
Changes the current selected magic to the specified magic by param.
int GetAIUsageParam(int paramUsageType, int rowId)
Returns the ai usage judgement id (aiUsageId or aiUseJudgeId) of the given param. paramUsageType: 0 =...
bool HasSpecialEffectAttribute(TARGET target, int stateInfo)
Returns true if the target has a special effect with the given stateInfo, otherwise false.
bool IsApparentAnyFriend()
Returns true if the AI has a friend in its targeting system (TARGET_FRI_0 has a target),...
bool CanStartLadderAttach()
Returns true if the character can attach to ladders, which is true when the character is touching sol...
bool IsGotHome()
Returns true if the AI arrived to its home location using the path described by BackToHome goal,...
bool IsInsideTargetEx(TARGET targetOrigin, TARGET target, AI_DIR_TYPE directionStart, float angleWidth, float distance)
Returns true if the given target is within the given circular sector, otherwise false.
void DeleteObserveObjBreak(unsigned int objectId)
Stop observing the given object.
float GetStringIndexedArray(char *arrayName, int index)
Returns the number that is stored in the given array's given index. The structure of these is questio...
bool MoveTo(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance, bool isWalk, float directionalDistance)
Use pathing to move towards a point defined by the given parameters.
void StepNextMovePoint()
Cycle to the next point on your path. Used in the common pathing goals' Terminate function when the m...
AI_AREAOBSERVE_INTERRUPT GetInterruptStatus(int observeSlot)
Returns the interrupt status of the given area observer.
void StartIdTimerSpecifyTime(int index, float startingTime)
Starts id timer with the given time.
int GetWepSpAtkCategoryNo(ARM arm)
Returns the spAtkcategory of the weapon in the character's given arm.
bool IsActiveGoal(int goalId)
Returns true if the given goal is currently active/running, otherwise false.
float GetRelativeAngleFromTarget(TARGET target)
Returns the angle from the target's front to the character, clockwise.
void Replaning()
Resets/clears/reintializes a signifcant amount of data from the AI (e.g all observers,...
void SetTimer(int index, float value)
Sets the given timer to the given value. Timers constantly tick down until they reach 0.
bool RegisterTriggerRegionObserver(int p1)
Does nothing.
int GetLadderDirMove(int p1)
Retruns 1 if the ladder path is upwards, -1 if downwards.
bool IsHoleFlag(TARGET target, AI_DIR_TYPE directionFromTarget, float distance)
void EndWalkAroundFree()
Clears WalkAroundFree list?
bool IsMemoryState()
Returns true if in memory state, otherwise false. Equivalent to GetCurrTargetState() == AI_TARGET_STA...
int GetSpecialEffectInactivateInterruptNum()
Returns the amount of special effect observes that are in interrupt deactivate state....
float GetAttackPassedTime(int animationId)
Returns the time passed since the last time the character started the given animation.
int GetFlyRouteState()
Does nothing.
WEP_CATE GetWepCateRight(TARGET target)
Returns the right hand's AI weapon's category. 1 = Torch 2 = Bow 3 = Crossbow 4 = Staff 0 = Other.
int GetLatestAttackedDir()
Returns the atkDir_forSfx value of the last attack the AI detected.
int GetSpecialEffectActivateInterruptNum()
Returns the amount of special effect observes that are in interrupt activate state....
bool IsOptimalAttackRangeV()
Does nothing.
bool IsEventFlag(unsigned int eventFlagId)
Returns the given event flag's value.
bool IsOnNearMeshByPos(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance)
Returns true if the character is pathing on the nav mesh found from the given line?
void SetEnableEndureCancel_forGoal()
int GetLadderActState(TARGET target)
Returns the target's ladder state. -1 = Not on 0 = Enter from bottom 1 = Enter from top 2 = Climbin...
bool CheckTurnAngleDiff(TARGET target, bool isAntiClockwise, float angleThreshold)
Check if the target is within the circular sector (with infinite radius) defined by the character as ...
bool IsTargetOutOfAngleInterruptSlot(int angleObserveSlot)
Dose nothing in ER. Previously used along with GoalFunc function SetTargetAngle to determine whether ...
int GetPrevMovePointNumber()
int GetClanMemberNum()
Does nothing.
int GetNumFriend(float distance)
Returns the number of characters with friendly team type towards the character within the given dista...
void ClearEnableStabCounterCancel_forGoal()
Used in DS3/Sekiro for StabCounterAttack/EndureAttack, effect unknown. Unused in ER.
void SetSuperClimbingMode(bool enable)
Enables super climbing mode for the character, increasing their ability to step up inclines....
void SetPassiveMoveModifier(float modifier)
Sets a root motion factor in all directions for all animations.
void AddObserveObjBreak(unsigned int observeObjectId)
Observes an object, interrupts when it is broken. There can be only 4 of these at once....
bool IsOptimalAttackDist()
Does nothing.
bool IsTrueLand()
Returns true if the character is standing on even, non sloped ground, otherwise false.
bool IsProcessingFadeWarpToInitPos()
Returns true if the character is currently fade warping, otherwise false. Set by RequestFadeWarpToIni...
void AddTeamRecord(int recordId, TARGET target, float distance)
void SetBoidsSeparateRange(float p1)
Does nothing.
int GetReplanningGoalID()
Returns NpcThinkParam's goalAction_ToCautionImportant if AI targeting search is currently "important"...
bool IsEventRequestReceived(int slot)
Returns true if there is an event request in the given slot, otherwise false. See GetEventRequest(int...
WEP_CATE GetWepCateLeft(TARGET target)
Returns the left hand's AI weapon's category. 1 = Torch 2 = Bow 3 = Crossbow 4 = Staff 0 = Other.
AI_TARGET_STATE GetCurrTargetState()
Returns the AI's current target-state. In what state is the AI in in regards to targeting/searching f...
bool IsBothHandMode(TARGET target)
Returns true if the target is two handing, otherwise false.
bool IsChrAroundLadderEdge(float distance, int ladderDmyId)
Returns true if the character is within the given distance to the given ladder edge,...
bool IsHugeEnemy()
Returns true if the character's NpcParam's chrHitGroupAndNavimesh is 5, otherwise false.
bool MemoryRelativeTarget(TARGET target, float angleStart, float angle, AI_SPA_DIR_TYPE spatialDirectionStart)
Updates the position of "TARGET_MEMORIED_RELATIVE_TARGET" based on the given parameters,...
float GetDist(TARGET target)
Returns the distance between the character and the target, taking into account the hit capsules.
bool SetPosAngBy1stNearLadderDmyId(int p1)
void SetAllowTriggerNearObjAct()
Does nothing.
bool IsEnableCancelAttack_CheckAttackNo(int actionRequestId)
Returns true if the AI's current request equals the given request id and the character has EnableCanc...
int GetTeamRecordCount(int p1, TARGET target, float p3)
void TeamHelp_Reply()
Handles answering call logic, including setting as target?
bool IsFinishTimer(int index)
Returns true if the given timer's remaining time is less than or equal to 0, otherwise false.
bool IsExistChrOnLineSpecifyAngle(TARGET target, float angle, float maxDistance, AI_SPA_DIR_TYPE spatialDirectionStart)
Returns true if there exists a character on the given line besides the target, otherwise false....
bool HasParalysis(TARGET target)
Returns true if the target has a special effect with stateInfo 32 (Middle of Paralysis).
void SetMoveAllDirection_LegWalk2And4(bool enable)
Allows the character to use all movement directions when moving. Overwritten by move left right only ...
bool CanWeaponEnhance(int equipWeaponParam)
Returns true if the specified weapon can be buffed.
bool IsThrowing()
Returns true if the character is in the middle of a throw (e.g grab, riposte, etc....
void OnEndLadderGoal()
Used on the termination of the LadderMove goal to clear some data. Does nothing by itself.
void ClearMoveToSomewhereSmoothMemory()
Clears GoalMoveToSomewhere_SwitchRouteMove's memory (e.g point positions).
void SetBoidsSpeedRateRange(float p1, float p2)
Does nothing.
bool IsOnNearMesh(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance, int p4)
Returns true if the character is pathing on the nav mesh found from the given line?
bool IsLookToTarget()
Returns true if the turning target is within the given circular sector, otherwise false....
bool IsEnableCancelMove()
Returns true if the character has EnableCancelMove enabled, enabled through TAE 0 "ChrActionFlag"/"Ju...
int GetWeaponBothHandState(TARGET target)
If the target is 2 handing return the arm that is doing so, otherwise return -1.
bool IsSearchTarget(TARGET target)
Returns true if the given target can be accessed, otherwise false. For example if IsSearchTarget(TARG...
int GetMovePointActionId(int pointIndex)
bool LastPathFindingIsFailed()
Does nothing.
bool IsOnGround_FlyRoute()
Does nothing.
void ClearMoveRequest()
Stop moving. Must not be on a ladder or moving to a jumping point (mid jump).
float GetNumber(int index)
Returns the number stored at the given index (0-63)
bool IsFinishAttackCoolTime(int animationId)
Returns true if the cooldown time set for the given animation is smaller than the time lapsed since i...
bool RegisterBoidsUnit(int p1)
Does nothing.
void SetTurnReferenceDirection(TARGET target)
Store the direction to the given target's current position as the turn reference. The turn reference ...
void ClearForceBattleGoal()
Sets IsForceBattleGoal() to false. Used in common_logic_func.lua to clear IsForceBattleGoal after han...
float EvaluateAttackRangeH()
Does nothing.
int GetPlatoonRanking()
Does nothing.
void EndDash()
Stops forcing run. See StartDash().
void EnableUnfavorableAttackCheck(unsigned int animationIdOffset, unsigned int animationId)
Adds the given attack to the unfavorable attacks list, interrupting the AI when used under certain co...
bool IsOptimalAttackRangeH()
Does nothing.
bool IsHoverType()
bool IsSearchLowState()
Returns true if in search low state, also known as "search". Equivalent to GetCurrTargetState() == AI...
bool IsExistTargetTeamDefeat()
Equivalent to GetTeamDefeatEntityId() != -1.
float GetNPCActProb(int actId)
Returns the probability of the given act.
bool IsExistTeamNumber()
Does nothing.
bool IsInsideMovePoint()
Returns true if the character is near its move point, otherwise false. Default distance is 0....
bool IsInsideBattleArea()
void ResetNPCActProb()
Resets all NPC act probabilities to 0.
float GetOffsetY(TARGET target)
Returns the target's hitYOffset, the offset between the position (on the ground) and the character's ...
bool IsExistMeshOnLine(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance)
Returns true if there exists a nav mesh that collides with the given line, otherwise false....
unsigned int GetRideObjEntityID()
Returns map object that entity rides?
int GetActTypeOnNonBattleFailedPathEnd()
Returns the NpcThinkParam's actTypeOnNonBtlFailedPath. Used to determine what to do on non battle act...
void ChangeEquipItem(int slot, ITEM_SLOTTYPE slotType)
Changes current selected item to the given slot's item.
int CalcNearMovePointOnRoute(int p1, int p2, float p3, float p4)
Does nothing.
void DeleteTeamReacor(int recordId)
Delete the given team record.
bool TeamHelp_IsValidCall()
Returns true if there are any valid teammates that can respond to your call, otherwise false....
bool IsSearchState()
Returns true if in search low state, also known as "search". Equivalent to GetCurrTargetState() == AI...
int GetAreaObserveSlot(int areaObserveInterruptState, int matchingObservesCount)
Returns the nth observe slot that matches the area observe interrupt state (No change,...
void DeleteObserveSpecialEffectAttribute(TARGET targetObserved, int specialEffectId)
Delete the given special effect observer.
void SetTeamNumber(int p1, float p2, float p3)
Does nothing.
bool IsOnRideCostMesh()
float GetToTargetAngle(TARGET target)
Returns the angle (-180, 180) from the character's front to the target, clockwise.
int GetLeaveTriggerRegionCategoryNum()
Does nothing.
float GetHpRate(TARGET target)
Returns the target's hp to max hp ratio.
bool IsStartAttack()
Returns true if currently executing an animation requested by the AI, otherwise false....
bool DoAdmirer_ThinkAttr()
Returns the NpcThinkParam's thinkAttr_doAdmirer. Usually used to determine whether the character shou...
bool ChkNearLowHpFriend(float maxHpRate, float maxAlertDifference)
Returns true if there is a teammate within the given distance that has less than or equal hprate to t...
int GetWeaponBehaviorVarID(int equipWeaponId)
Returns the behaviorVariationId of the given EquipParamWeapon.
int GetEquipItemId(TARGET target, int slot, ITEM_SLOTTYPE slotType)
Returns the item equipment id in the given target and slot.
void DeleteObserve(int observeSlot)
Deletes the area observer in the given slot.
void ReqTeam_Support(float maxDistance)
Call for help for teammates within range.
void RequestChangeFlyState(bool enable)
Set fly state.
int Mod(int dividend, int divisor)
Returns dividend % divisor.
bool IsVisibleCurrTarget()
Returns true if the current target (as referenced by the AI's target search system) is visible to the...
int GetChangeBattleStateCount()
Returns the amount of times the AI went into battle goal (going into battle goal adds 1,...
bool HasConnectionReserve()
Does nothing.
bool IsForgettingSoundTarget()
Returns true if the AI's targeting system's sound target is being forgotten, otherwise false....
void SetRouteInfoByEntityId(unsigned int p1)
Does nothing.
float GetDamageLastFrame()
Returns the damage taken by the character in the last frame.
AiPlatoonCommand * GetPlatoonCommand()
Returns the AI's platoon command object, if there is none return a default empty platoon command obje...
bool IsLocalPlayer()
Returns true if the character is the local player (main player), otherwise false.
int CalcGetNearestLadderActDmyIdByLadder()
Returns 192 if the bottom of the ladder is closer than the top, otherwise 191.
float GetTeamIdTimer(int p1)
Does nothing.
unsigned int GetTeamDefeatEntityId()
int GetMsbPartsIdx()
Does nothing.
float GetSA(TARGET target)
Returns the target's poise rounded down.
int GetAreaObserveSlotNum(int areaObserveInterruptState)
Returns the amount of area observes that match the given interrupt state.
int DbgGetForceActIdx()
Returns the force act index, used in common_battle_func.lua -> Common_Battle_Activate to force enemie...
void DoEzAction(float actionLife, int ezActionId)
Request the given action for the given amount of time.
bool IsRouteEnd()
Returns true if the AI finished its route, otherwise false. This stays true until the AI reaches the ...
int GetChangeStateActionParam()
Does nothing.
bool IsRideEdgeFlag(TARGET target)
int GetTeamCommand()
Does nothing.
float GetDistAtoB(TARGET targetA, TARGET targetB)
Returns the distance between targetA and targetB, taking into account the hit capsules.
AI_TARGET_TYPE GetCurrTargetType()
Returns the AI's current target-type. What type is the target the AI is currently looking for/found.
bool IsArrived()
Returns true if arrived to the position specified by current pathing, otherwise false.
int GetEquipWeaponId(TARGET target, ARM arm, int slot)
Returns the weapon equipment id in the given target and slot.
bool IsAiJumpProcessing()
Returns true if the character is: about to start/mid/ending a jump, otherwise false.
float GetTimer(int index)
Returns the given timer's remaining time.
bool RegisterTriggerRegionCylinder(int p1, int p2, float p3, float p4, float p5, int p6, int p7, float p8)
Does nothing.
bool IsInsideTargetRegion(TARGET target, unsigned int regionId)
Returns true if the given target is within the given region, otherwise false.
void StartAttackPassedTimer(int animationId, float time)
Sets the animation cooldown timer for the given animation to the given time. Animation offset is incl...
void SetNumber(int index, float value)
Store the given number in the given index.
void SendTeamMemberMessage(int p1)
Does nothing.
bool IsInsideTarget(TARGET target, AI_DIR_TYPE directionStart, float angleWidth)
Returns true if the given target is within the given circular sector, otherwise false....
bool CannotMove()
Returns true if the character determines it cannot move based on its hit capsule and position's proxi...
int GetMapHitRadius(int target)
Returns the target's map hit radius (often simply called hitRadius in places like DSMS).
void TeamHelp_ValidateReply()
int GetRandam_Int(int min, int max)
Returns a random integer between the given bounds, inclusive. If min > max or min < 0 then behavior i...
float GetRemainingAttackCoolTime(int animationId)
Returns the difference between the cooldown time set for the given animation and the time lapsed sinc...
AI_TARGET_STATE GetPrevTargetState()
Returns the AI's previous target-state. In what state is the AI in in regards to targeting/searching ...
void AddObserveChrDmySphere(int observeSlot, TARGET targetObserved, int dummyPolyId, float radius)
Adds an observer to the area observers. The area is a sphere whose origin is the dummy poly on the ch...
void DecideWalkAroundPos()
Recalculate POINT_WalkAroundPosition_Home using randomness? But it adds to a list?...
bool IsAiJumping()
Returns true if the character is mid/ending a jump, otherwise false.
float GetExistMeshOnLineDistEx(TARGET target, AI_DIR_TYPE directionFromTarget, float lineEndDistance, float lineWidth, float lineStartDist)
Returns the distance between the given target and the furthest nav mesh that collides with the given ...
bool IsFindState()
Does nothing.
int GetMyBlockID()
Does nothing.
bool CheckDoesExistPath(TARGET moveTarget, AI_DIR_TYPE directionFromTarget, float stopDistance)
Returns true if there is a path from the specified direction to the sphere around the target using th...
void RemoveBoidsUnit(int p1)
Does nothing.
bool IsTargetOutOfRangeInterruptSlot(int rangeObserveSlot)
Does nothing in ER. Previously used along with GoalFunc function SetTargetRange to determine whether ...
void RequestEmergencyQuickTurn()
Requests emergency turn, possibly forcing a turn animation that otherwise wouldn't have happened beca...
void DbgSetLastActIdx(int actIndex)
Sets the last act index, used in common_battle_func.lua -> Common_Battle_Activate....
TEAM_TYPE GetTeamType(TARGET target)
Returns the target's team type.
bool IsTeamCommandExist()
Does nothing.
bool IsFlyState()
Returns the character's fly state.
void SetAIFixedMoveTarget(TARGET targetOrigin, AI_DIR_TYPE directionFromTarget, float lineLength)
Sets the AI's fixed target pos (POINT_AI_FIXED_POS) to the given position, as defined by the end poin...
void ForceClanFormationMove()
Does nothing.
float TeamHelp_GetMinWaitTime()
Returns NPCThinkParam's "callHelp_MinWaitTime" * 0.1.
bool KickLuaCall(int p1, int p2, int p3)
Does nothing.
bool IsLand()
Returns true if the character is touching the ground, otherwise false.
bool IsPlatoonLeader()
Retruns true if the AI is the leader of its team, otherwise false.
int GetEventRequest()
Returns the event request value in slot 0. This is used to let events communicate with the AI via INT...
float GetOriginDist(TARGET target)
Returns the distance to the target without taking into account hit capsule, meaning the distance to t...
void SetUserInterupt(unsigned int p1)
Does nothing.
GoalFunc * AddTopGoal(int goalId, float life, float goalParam0=0, float goalParam1=0, float goalParam2=0, float goalParam3=0, float goalParam4=0, float goalParam5=0, float goalParam6=0, float goalParam7=0, float goalParam8=0, float goalParam9=0)
Adds subgoal to the top goal directly.
void AddObserveAreaCustom(int observeSlot, TARGET targetOrigin, TARGET targetObserved, AI_DIR_TYPE directionStart, float angleWidth, float angleHeight, float distance)
Adds an observer to the area observers. The area is a spherical sector defined by the parameters.
void SetAIPredictionMoveTargetSpecifyAngle(float p1, float angle, float lineLength)
SetAIPredictionMoveTargetSpecifyAngle(p1, angle, lineLength, 0)
void StartGuard()
Does nothing.
void SetEnableStabCounterCancel_forGoal()
bool IsEnableCancelStep()
Returns true if the character has EnableCancelStep enabled, enabled through TAE 0 "ChrActionFlag"/"Ju...
int GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE excelParam)
Returns the first active SpecialEffect's overwitten excel param if there is one, otherwise NpcThinkPa...
bool CanShootMagicByType(int equipWeaponParam, int magicType)
Returns true if the weapon can cast the specified magic type. See GetMagicCategory(int) for magic typ...
void ReqPlatoonState(PLATOON_STATE platoonState)
Attempt to set platoon state?
bool HasPathResult()
Returns true if the AI has results for the current pathing attempt, otherwise false.
bool IsUseFlyRoute()
Does nothing.
void ChangeWalkAroundFreePoint()
Recalculate POINT_WalkAroundPosition_Free using randomness? But it adds to a list?...
bool IsInsideMsbRegion(TARGET target, AI_DIR_TYPE direction, float length, unsigned int regionId)
Returns true if the position defined by the given parameters is within the given region,...
int GetMp(TARGET target)
Returns the target's fp.
int GetBehaviorStateId(PLAN_IDX_AINOTE planIndex)
Returns the current plan style/state based on the given plan index. Either PLAN_IDX_AINOTE_STYLE to g...
bool TeamHelp_IsValidReply()
Returns true if there are any valid teammates that you can reply to, otherwise false....
float GetAbsoluteAngleFromTarget(TARGET target)
Returns the angle from the character's left to the target, clockwise.
float GetBuddyActiveRange()
Returns the NpcThinkParam's overwriteReturnRange if it's non negative, otherwise the activateRange.
bool IsForgettingTopSearchTarget()
void SetStringIndexedArray(char *arrayName, int index, float value)
Sets the given number in the given array's given index. The structure of these is questionable,...
float GetStringIndexedNumber(char *variableName)
Returns the number that has been set for the given string.
int GetEquipMagicIndex()
Returns the character's currently selected magic slot.
float TeamHelp_GetMaxWaitTime()
Returns NPCThinkParam's "callHelp_MaxWaitTime" * 0.1.
int GetAreaMinute()
Returns the world's minute in the current hour.
void EndGuard()
Does nothing.
bool IsFinishAttack()
Returns true if attack is over.
int SearchGetEnemyNumAround(TARGET target, float maxDistance)
Returns the number of enemies (of the AI, not the target) around the given target within the given di...
bool IsEnableCancelMove_CheckAttackNo(int actionRequestId)
Returns true if the AI's current request equals the given request id and the character has EnableCanc...
float GetExistMeshOnLineDist(TARGET target, AI_DIR_TYPE directionFromTarget, float maxDistance)
Returns the distance between the given target and the furthest nav mesh that collides with the given ...
bool IsInsideObserve(int observeSlot)
Returns true if the given observer's target is inside the observer's area, otherwise false.
bool IsSleepSpecialEffectId(TARGET target, int specialEffectId)
Returns true if the given target has the given special effect id but the effect is incompatible via v...
void ResetInitialPositionByEventRegion(unsigned int regionId)
Sets the character's initial position to the given event region position.
int GetMovePointNumber()
bool IsApparentDeath()
Returns true if the character is dead/dying (player only?), otherwise false.
bool IsChangeState()
Returns true if the previous state is different from the current state.
float GetObjBreakRate(unsigned int objId)
int GetLatestSoundTargetID()
Returns the last detected sound's param id.
float RegistAttackTimeInterval(int animationId, float cooldown)
Registers a cooldown to the given animationId. Animation offset is automatically added and does count...
int GetAreaSecond()
Returns the world's second in the current minute.
void DbgAutoRemo_ResetWaitCommand()
Does nothing.
int GetWepCategoryNo(ARM arm)
Returns the wepmotionCategory of the weapon in the character's given arm.
float GetChrHitRadius(int target)
Returns the target's chr hit radius.
int GetBuddyFollowType()
Returns the character's pcFollowType (defined in BuddyParam). Used to determine how and if a summon s...
bool IsClanLeader()
Does nothing.
bool MoveToEventPoint(unsigned int regionId, int p2, float p3, bool isWalk)
Use pathing to move towards the given event region.
Represents a Goal object.
Definition GoalFunc.hpp:9