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);
456 bool FollowPath(
TARGET moveTarget,
AI_DIR_TYPE directionFromTarget,
float stopDistance,
bool isWalk,
float directionalDistance,
bool xzDistanceOnly,
bool defaultOrientationAndDirDist,
bool closeProximityMode);
2303 int Mod(
int dividend,
int divisor);
AI_EXCEL_THINK_PARAM_TYPE
Represents the AI of a character.
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...
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...
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,...
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 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.
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.
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.