|
ERAiAPI
|
Represents the AI of a character. More...
#include <AiFunc.hpp>
Public Member Functions | |
| void | AddFriendAttackedTarget () |
| Notifies targeting system that someone in the team attacked target. | |
| void | AddNPCActProb (int npcAiBehaviorParam) |
| Add the probabilities in the given NpcAiBehaviorProbability param to the NPC's probabilities array. | |
| 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 | 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 | 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 character with the specified radius. | |
| void | AddObserveObjBreak (unsigned int observeObjectId) |
| Observes an object, interrupts when it is broken. There can be only 4 of these at once. This is not an area observer. | |
| 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. | |
| void | AddObserveSpecialEffectAttribute (TARGET targetObserved, int specialEffectId) |
| Adds an observer to the special effect observers. Interrupts the AI when the given special effect is applied to the target and when it is cleared (INTERUPT_ActivateSpecialEffect and INTERUPT_DeActivateSpecialEffect respectively). | |
| void | AddTeamRecord (int recordId, TARGET target, float distance) |
| void | AddTeamTimeRecord (int recordId, TARGET target, float distance) |
| 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 | BeginWalkAroundFree () |
| int | CalcGetNearestLadderActDmyIdByLadder () |
| Returns 192 if the bottom of the ladder is closer than the top, otherwise 191. | |
| int | CalcNearMovePointOnRoute (int p1, int p2, float p3, float p4) |
| Does nothing. | |
| bool | CalcSetPointWaitAndSee () |
| Calcs the info for the target POINT_WaitAndSee? | |
| bool | CanLadderGoalEnd () |
| Returns true if not on a ladder. | |
| bool | CanShootMagicByType (int equipWeaponParam, int magicType) |
| Returns true if the weapon can cast the specified magic type. See GetMagicCategory(int) for magic type. | |
| bool | CanStartLadderAttach () |
| Returns true if the character can attach to ladders, which is true when the character is touching solid ground. | |
| bool | CanWeaponEnhance (int equipWeaponParam) |
| Returns true if the specified weapon can be buffed. | |
| bool | CannotMove () |
| Returns true if the character determines it cannot move based on its hit capsule and position's proximity to objects, and if the navigate manager determines it so. | |
| void | ChangeEquipItem (int slot, ITEM_SLOTTYPE slotType) |
| Changes current selected item to the given slot's item. | |
| void | ChangeEquipMagic (int slot) |
| Changes current selected magic to the specified slot's magic. | |
| void | ChangeEquipMagicByMagicParamId (int magicParam) |
| Changes the current selected magic to the specified magic by param. | |
| void | ChangeWalkAroundFreePoint () |
| Recalculate POINT_WalkAroundPosition_Free using randomness? But it adds to a list? Extremely unsure. | |
| 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 the stop distance. | |
| 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 the origin, starting direction is set by SetTurnReferenceDirection(TARGET) and the perimeter is the given angle to 180. Additionally TARGET_ENE_0 (regardless of the target argument) must be in the character's 30 degree view (IsInsideTarget(TARGET_SELF, TARGET_ENE_0, AI_DIR_TYPE_F, 30)). | |
| bool | ChkNearCorpsePos (float maxAlertDistance) |
| Returns true if there is a teammate within the given distance that is dead. | |
| 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 the one given. | |
| void | ClearEnableEndureCancel_forGoal () |
| Used in DS3/Sekiro for StabCounterAttack/EndureAttack, effect unknown. Unused in ER. | |
| void | ClearEnableStabCounterCancel_forGoal () |
| Used in DS3/Sekiro for StabCounterAttack/EndureAttack, effect unknown. Unused in ER. | |
| void | ClearFinishObjAct () |
| Set finish obj act. | |
| void | ClearForceBattleGoal () |
| Sets IsForceBattleGoal() to false. Used in common_logic_func.lua to clear IsForceBattleGoal after handing its logic. | |
| void | ClearMoveRequest () |
| Stop moving. Must not be on a ladder or moving to a jumping point (mid jump). | |
| void | ClearMoveToSomewhereSmoothMemory () |
| Clears GoalMoveToSomewhere_SwitchRouteMove's memory (e.g point positions). | |
| void | ClearTeam_Support () |
| Clear request for team support. See ReqTeam_Support(float). | |
| float | DbgAutoRemo_GetWaitCommandTime () |
| Does nothing. | |
| bool | DbgAutoRemo_IsWaitCommand () |
| Does nothing. | |
| void | DbgAutoRemo_ResetWaitCommand () |
| Does nothing. | |
| int | DbgGetForceActIdx () |
| Returns the force act index, used in common_battle_func.lua -> Common_Battle_Activate to force enemies to repeat an act. No set function (original use is through Debug Menu), but still functions properly. | |
| void | DbgSetLastActIdx (int actIndex) |
| Sets the last act index, used in common_battle_func.lua -> Common_Battle_Activate. No get function, but still functions properly. | |
| void | DecideWalkAroundPos () |
| Recalculate POINT_WalkAroundPosition_Home using randomness? But it adds to a list? Extremely unsure. | |
| void | DeleteObserve (int observeSlot) |
| Deletes the area observer in the given slot. | |
| void | DeleteObserveObjBreak (unsigned int objectId) |
| Stop observing the given object. | |
| void | DeleteObserveSpecialEffectAttribute (TARGET targetObserved, int specialEffectId) |
| Delete the given special effect observer. | |
| void | DeleteTeamReacor (int recordId) |
| Delete the given team record. | |
| bool | DoAdmirer_ThinkAttr () |
| Returns the NpcThinkParam's thinkAttr_doAdmirer. Usually used to determine whether the character should behave in a different way when fighting with a team. | |
| unsigned char | DoAdmirer_ThinkAttr_ () |
| Returns the NpcThinkParam's thinkAttr_doAdmirer. Usually used to determine whether the character should behave in a different way when fighting with a team. | |
| void | DoEzAction (float actionLife, int ezActionId) |
| Request the given action for the given amount of time. | |
| void | EnableUnfavorableAttackCheck (unsigned int animationIdOffset, unsigned int animationId) |
| Adds the given attack to the unfavorable attacks list, interrupting the AI when used under certain conditions. | |
| void | EndDash () |
| Stops forcing run. See StartDash(). | |
| void | EndGuard () |
| Does nothing. | |
| void | EndWalkAroundFree () |
| Clears WalkAroundFree list? | |
| float | EvaluateAttackDist () |
| Does nothing. | |
| float | EvaluateAttackRangeH () |
| Does nothing. | |
| 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. The sector's angle width depends on the direction from the target: AI_DIR_TYPE_CENTER = 360 (full sphere) otherwise 180. | |
| 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. See <see cref="FollowPath(TARGET, AI_DIR_TYPE, float, bool, float, bool, bool, bool)" xzDistanceOnly = false defaultOrientationAndDirDist = false closeProximityMode = false. | |
| bool | FollowPathToPoint (TARGET moveTarget, int directionFromTarget, float stopDistance, bool isWalk) |
| Use pathing to move towards a spherical sector defined by the following parameters. See <see cref="FollowPath(TARGET, AI_DIR_TYPE, float, bool, float, bool, bool, bool)" directionalDistance = 0 xzDistanceOnly = false defaultOrientationAndStopDist = false closeProximityMode = false. | |
| void | ForceClanFormationMove () |
| Does nothing. | |
| int | GetAIUsageParam (int paramUsageType, int rowId) |
| Returns the ai usage judgement id (aiUsageId or aiUseJudgeId) of the given param. paramUsageType: 0 = Magic 1 = EquipParamGoods 2 = SwordArtsParam. | |
| float | GetAbsoluteAngleFromTarget (TARGET target) |
| Returns the angle from the character's left to the target, clockwise. | |
| int | GetActTypeOnFailedPathEnd () |
| Returns the NpcThinkParam's actTypeOnFailedPath. Used to determine what to do on battle act pathing failure. | |
| int | GetActTypeOnNonBattleFailedPathEnd () |
| Returns the NpcThinkParam's actTypeOnNonBtlFailedPath. Used to determine what to do on non battle act pathing failure. | |
| int | GetAnimIdOffset () |
| Returns the character's animation id offset. | |
| int | GetAreaHour () |
| Returns the world's hour in the current day. | |
| int | GetAreaMinute () |
| Returns the world's minute in the current hour. | |
| int | GetAreaObserveSlot (int areaObserveInterruptState, int matchingObservesCount) |
| Returns the nth observe slot that matches the area observe interrupt state (No change, inside, outside). For example if there are 2 area observers that check if the target is inside the front of the character, the first with a distance of 10 in the 7th slot and the second with a distance of 5 in the 12th slot. Walking from behind to the front will (for that frame) mean that GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 0) will return 7, and GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 1) will return 12. Walking forwards towards a distance of 5 will (for that frame) mean that GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 0) will return 12, and GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 1) will return -1. | |
| int | GetAreaObserveSlotNum (int areaObserveInterruptState) |
| Returns the amount of area observes that match the given interrupt state. | |
| int | GetAreaSecond () |
| Returns the world's second in the current minute. | |
| int | GetArtsID (ARM arm) |
| Returns the SwordArtsParam id of the weapon in the given arm. | |
| float | GetAttackPassedTime (int animationId) |
| Returns the time passed since the last time the character started the given animation. | |
| int | GetBehaviorStateId (PLAN_IDX_AINOTE planIndex) |
| Returns the current plan style/state based on the given plan index. Either PLAN_IDX_AINOTE_STYLE to get guard related behaviors or PLAN_IDX_AINOTE_STATETYPE for attack related behaviors. | |
| float | GetBuddyActiveRange () |
| Returns the NpcThinkParam's overwriteReturnRange if it's non negative, otherwise the activateRange. | |
| int | GetBuddyFollowType () |
| Returns the character's pcFollowType (defined in BuddyParam). Used to determine how and if a summon should follow the player. | |
| int | GetChangeBattleStateCount () |
| Returns the amount of times the AI went into battle goal (going into battle goal adds 1, going into non battle goal doesn't add). | |
| int | GetChangeStateActionParam () |
| Does nothing. | |
| int | GetChangeStateActionType () |
| Does nothing. | |
| float | GetChrHitRadius (int target) |
| Returns the target's chr hit radius. | |
| int | GetClanMemberNum () |
| Does nothing. | |
| int | GetCurrEquipMagicID (int target) |
| Returns the target's currently selected magic. | |
| AI_TARGET_STATE | GetCurrTargetState () |
| Returns the AI's current target-state. In what state is the AI in in regards to targeting/searching for target. | |
| AI_TARGET_TYPE | GetCurrTargetType () |
| Returns the AI's current target-type. What type is the target the AI is currently looking for/found. | |
| int | GetCurrentEquipWeaponId (ARM arm) |
| Returns the character's current equipped weapon id in the given arm. | |
| float | GetDamageLastFrame () |
| Returns the damage taken by the character in the last frame. | |
| float | GetDist (TARGET target) |
| Returns the distance between the character and the target, taking into account the hit capsules. | |
| float | GetDistAtoB (TARGET targetA, TARGET targetB) |
| Returns the distance between targetA and targetB, taking into account the hit capsules. | |
| float | GetDistParam (DIST distanceType) |
| Converts distance type into distance. DIST_Near = 3 DIST_Middle = 6 DIST_Far = 15 DIST_Out = 999 DIST_None = 3.402823e+38 (MAX FLOAT) else = -1. | |
| float | GetDistXZ (TARGET target) |
| Returns the strictly horizontal distance between the character and the target, taking into account the hit capsules. | |
| float | GetDistY (TARGET target) |
| Returns the strictly vertical distance between the character and the target. | |
| float | GetDistYSigned (TARGET target) |
| Returns the strictly vertical distance between the character and the target, signed as such (targetY - characterY) | |
| int | GetEquipArrowBoltId (TARGET target, ARROW_OR_BOLT arrowOrBolt, int slot) |
| Returns the arrow or bolt equipment id in the given target and slot. | |
| int | GetEquipItemId (TARGET target, int slot, ITEM_SLOTTYPE slotType) |
| Returns the item equipment id in the given target and slot. | |
| int | GetEquipMagicId (TARGET target, int slot) |
| Returns the magic id in the given target and slot. | |
| int | GetEquipMagicIndex () |
| Returns the character's currently selected magic slot. | |
| int | GetEquipWeaponId (TARGET target, ARM arm, int slot) |
| Returns the weapon equipment id in the given target and slot. | |
| int | GetEquipWeaponIndex (ARM arm) |
| Returns the currently active weapon slot index in the characterar's given arm. | |
| int | GetEventRequest (int slot) |
| Returns the event request value in the given slot. Slots are 0-3. This is used to let events communicate with the AI via INTERUPT_EventRequest. | |
| int | GetEventRequest () |
| Returns the event request value in slot 0. This is used to let events communicate with the AI via INTERUPT_EventRequest. | |
| int | GetExcelParam (AI_EXCEL_THINK_PARAM_TYPE excelParam) |
| Returns the first active SpecialEffect's overwitten excel param if there is one, otherwise NpcThinkParam's given excel param value. | |
| 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 line. If none are found returns -1. Equivalent to GetExistMeshOnLineDistEx(target, directionFromTarget, maxDistance, GetHitRadius(), 0). | |
| 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 line. If none are found returns -1. | |
| 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 line. If none are found returns -1. Equivalent to GetExistMeshOnLineDistSpecifyAngleEx(target, angle, maxDistance, spatialDirectionStart, GetHitRadius(), 0) | |
| 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 line. If none are found returns -1. | |
| int | GetFlyRouteState () |
| Does nothing. | |
| int | GetHp (TARGET target) |
| Returns the target's hp. | |
| float | GetHpRate (TARGET target) |
| Returns the target's hp to max hp ratio. | |
| float | GetIdTimer (int timerId) |
| Returns the timer's elapsed time since last accessed. Sets the timer to its starting offset (0 by default). | |
| int | GetInitStayId () |
| Returns the character's event defined idle animation. | |
| int | GetInsidePlatoonMemberNum (float p1, float p2, float p3, float p4) |
| Does nothing. | |
| AI_AREAOBSERVE_INTERRUPT | GetInterruptStatus (int observeSlot) |
| Returns the interrupt status of the given area observer. | |
| int | GetInvadeTriggerRegionCategory (int p1) |
| Does nothing. | |
| int | GetInvadeTriggerRegionCategoryNum () |
| Does nothing. | |
| int | GetLadderActState (TARGET target) |
| Returns the target's ladder state. -1 = Not on 0 = Enter from bottom 1 = Enter from top 2 = Climbing, left hand from bottom to top 3 = Climbing, right hand from bottom to top 4 = Descending, right hand from top to bottom 5 = Descending, left hand from top to bottom 6 = Leave from top 7 = Leave from bottom 8 = Idling on ladder, right hand on top 9 = Idling on ladder, left hand on top 10 = Attack up, right hand on top 11 = Attack up, left hand on top 12 = Attack down, right hand on top 13 = Attack down, left hand on top 14 = Sliding start 16 = Sliding stop 18 = Sliding 20 = Sliding reached bottom 21 = Hit flinch 22 = Hit hanging on. | |
| int | GetLadderDirMove (int p1) |
| Retruns 1 if the ladder path is upwards, -1 if downwards. | |
| int | GetLatestAttackedDir () |
| Returns the atkDir_forSfx value of the last attack the AI detected. | |
| int | GetLatestSoundBehaviorID () |
| Returns the last detected sound's (AiSoundParam) soundBehaviorId if its rank is "behavior" (7). | |
| int | GetLatestSoundTargetID () |
| Returns the last detected sound's param id. | |
| AI_SOUND_RANK | GetLatestSoundTargetRank () |
| Returns the last detected sound's rank. | |
| int | GetLeaveTriggerRegionCategory (int p1) |
| Does nothing. | |
| int | GetLeaveTriggerRegionCategoryNum () |
| Does nothing. | |
| int | GetMagicCategory (int magicId) |
| Returns the given magic's ezStateBehaviorType (0 = sorcery, 1 = incantation, 2 = pyromancy, 3 = vow type). | |
| int | GetMapHitRadius (int target) |
| Returns the target's map hit radius (often simply called hitRadius in places like DSMS). | |
| 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. | |
| 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 | GetMovePointActionId (int pointIndex) |
| float | GetMovePointEffectRange () |
| int | GetMovePointNumber () |
| int | GetMovePointType () |
| int | GetMp (TARGET target) |
| Returns the target's fp. | |
| int | GetMsbPartsIdx () |
| Does nothing. | |
| int | GetMyBlockID () |
| Does nothing. | |
| float | GetNPCActProb (int actId) |
| Returns the probability of the given act. | |
| int | GetNpcThinkParamID () |
| Returns the character's NpcThinkParam id. | |
| int | GetNumFriend (float distance) |
| Returns the number of characters with friendly team type towards the character within the given distance. | |
| float | GetNumber (int index) |
| Returns the number stored at the given index (0-63) | |
| float | GetObjBreakRate (unsigned int objId) |
| float | GetOffsetY (TARGET target) |
| Returns the target's hitYOffset, the offset between the position (on the ground) and the character's actual position usually used for flying characters but not always (for example bats have 0.8). | |
| float | GetOriginDist (TARGET target) |
| Returns the distance to the target without taking into account hit capsule, meaning the distance to their exact physics position. | |
| int | GetPartsDmg (int p1) |
| Does nothing. | |
| int | GetPathResult () |
| Returns 0 if mid pathing, otherwise -1. | |
| AiPlatoonCommand * | GetPlatoonCommand () |
| Returns the AI's platoon command object, if there is none return a default empty platoon command object. | |
| int | GetPlatoonMemberNum () |
| Returns the amount of members/ais in the AI's platoon. | |
| int | GetPlatoonRanking () |
| Does nothing. | |
| PLATOON_STATE | GetPlatoonState () |
| Returns AI's platoon's state, if there is none then -1. | |
| int | GetPrevMovePointNumber () |
| AI_TARGET_STATE | GetPrevTargetState () |
| Returns the AI's previous target-state. In what state is the AI in in regards to targeting/searching for target. | |
| float | GetRandam_Float (float min, float max) |
| Returns a random float between the given bounds, uniform distribution, min inclusive max exclusive. = [0-1) * (max - min) + min. | |
| int | GetRandam_Int (int min, int max) |
| Returns a random integer between the given bounds, inclusive. If min > max or min < 0 then behavior is poorly defined. = (int)([0-1) * (max - min + 1.0) + min) The casting to int as opposed to floor will make negative floats round upwards. | |
| float | GetRelativeAngleFromTarget (TARGET target) |
| Returns the angle from the target's front to the character, clockwise. | |
| float | GetRemainingAttackCoolTime (int animationId) |
| Returns the difference between the cooldown time set for the given animation and the time lapsed since its last usage, if it hasn't been used yet then 0. Animation ID offset is automatically added and does count as a different animation for cooldowns. | |
| int | GetReplanningGoalAction () |
| Returns NpcThinkParam's goalAction_ToCautionImportant if AI targeting search is currently "important", otherwise goalAction_ToCaution. Unused in ER where they instead directly get the params with GetExcelParam. | |
| int | GetReplanningGoalID () |
| Returns NpcThinkParam's goalAction_ToCautionImportant if AI targeting search is currently "important", otherwise goalAction_ToCaution. Unused in ER where they instead directly get the params with GetExcelParam. | |
| unsigned int | GetRideObjEntityID () |
| Returns map object that entity rides? | |
| float | GetSA (TARGET target) |
| Returns the target's poise rounded down. | |
| int | GetSp (TARGET target) |
| Returns the target's stamina. | |
| bool | GetSpecialEffectActivateInterruptId (int specialEffectId) |
| Returns true if the given special effect has been applied on any target that is being observed for the given special effect id, meaning this has been observed this frame. If the AI observes the same special effect on multiple targets, this will be true on activation regardless of the target. | |
| int | GetSpecialEffectActivateInterruptNum () |
| Returns the amount of special effect observes that are in interrupt activate state. Meaning the amount of special effect observes that have been activated this frame. the amount of special effect observes that are in interrupt activate state. | |
| int | GetSpecialEffectActivateInterruptType (int interruptsActivatedUntilReturn) |
| Returns the special effect id of the nth special effect observe that is in interrupt activate state. I would not recommend using this method as the order of the special effect observe nodes depends on the order you added them which on many cases can be subject to change over development. | |
| bool | GetSpecialEffectDeActivateInterruptId (int specialEffectId) |
| Returns true if the given special effect has worn off on any target that is being observed for the given special effect id, meaning this has been observed this frame. | |
| int | GetSpecialEffectInactivateInterruptNum () |
| Returns the amount of special effect observes that are in interrupt deactivate state. Meaning the amount of special effect observes that have been deactivated this frame. | |
| int | GetSpecialEffectInactivateInterruptType (int interruptsDeactivatedUntilReturn) |
| Returns the special effect id of the nth special effect observe that is in interrupt deactivate state. I would not recommend using this method as the order of the special effect observe nodes depends on the order you added them which on many cases can be subject to change over development. | |
| float | GetStringIndexedArray (char *arrayName, int index) |
| Returns the number that is stored in the given array's given index. The structure of these is questionable, having 1 big (1024) float array buffer where each "array" is a pointer to somewhere in this buffer. | |
| float | GetStringIndexedNumber (char *variableName) |
| Returns the number that has been set for the given string. | |
| float | GetTargetApproachSpeed () |
| Does nothing. | |
| float | GetTargetSARate (TARGET target) |
| Returns the target's poise to max poise ratio. | |
| int | GetTeamCommand () |
| Does nothing. | |
| unsigned int | GetTeamDefeatEntityId () |
| float | GetTeamIdTimer (int p1) |
| Does nothing. | |
| int | GetTeamInterruptCommand () |
| Does nothing. | |
| float | GetTeamNumber (int p1) |
| Does nothing. | |
| float | GetTeamOrder (ORDER_TYPE orderType) |
| Returns the AI's role type/call help type (?). | |
| int | GetTeamRecordCount (int p1, TARGET target, float p3) |
| TEAM_TYPE | GetTeamType (TARGET target) |
| Returns the target's team type. | |
| float | GetTimer (int index) |
| Returns the given timer's remaining time. | |
| float | GetToTargetAngle (TARGET target) |
| Returns the angle (-180, 180) from the character's front to the target, clockwise. | |
| GoalFunc * | GetTopGoal () |
| Returns the AI's top goal. | |
| int | GetTouchBreakableObjectDefense () |
| Returns the defense/health of the object the AI is touching, used to determine if the AI is strong enough to break the object (see top_goal.lua). | |
| 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, otherwise AI_DIR_TYPE_R. Let the AI be at (0, 0, 0) If the vector "targetPos + directionFromTargetForwardsNormal * 10" is closer to "selfNormalForwards" than "selfNormalBackwards" then the direction is right, otherwise left. | |
| int | GetWeaponBehaviorVarID (int equipWeaponId) |
| Returns the behaviorVariationId of the given EquipParamWeapon. | |
| int | GetWeaponBothHandState (TARGET target) |
| If the target is 2 handing return the arm that is doing so, otherwise return -1. | |
| AI_TARGET_WEIGHT_TYPE | GetWeightType (TARGET target) |
| Returns the weight type of the target. | |
| WEP_CATE | GetWepCateLeft (TARGET target) |
| Returns the left hand's AI weapon's category. 1 = Torch 2 = Bow 3 = Crossbow 4 = Staff 0 = Other. | |
| 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 | GetWepCategoryNo (ARM arm) |
| Returns the wepmotionCategory of the weapon in the character's given arm. | |
| int | GetWepSpAtkCategoryNo (ARM arm) |
| Returns the spAtkcategory of the weapon in the character's given arm. | |
| bool | HasConnectionReserve () |
| Does nothing. | |
| bool | HasGoal (int goalId) |
| Returns true if the AI has the given goal in queue (regardless of child depth), otherwise false. | |
| bool | HasParalysis (TARGET target) |
| Returns true if the target has a special effect with stateInfo 32 (Middle of Paralysis). | |
| bool | HasPathResult () |
| Returns true if the AI has results for the current pathing attempt, otherwise false. | |
| bool | HasSpecialEffectAttribute (TARGET target, int stateInfo) |
| Returns true if the target has a special effect with the given stateInfo, otherwise false. | |
| bool | HasSpecialEffectCategory (TARGET target, int category) |
| Returns true if the target has a special effect with the given category, otherwise false. | |
| bool | HasSpecialEffectId (TARGET target, int specialEffectId) |
| Returns true if the target has a special effect with the given id, otherwise false. | |
| bool | HasTopSubgoal () |
| Returns true if the top goal has a subgoal, otherwise false. | |
| bool | IsActiveGoal (int goalId) |
| Returns true if the given goal is currently active/running, otherwise false. | |
| bool | IsAiJumpProcessing () |
| Returns true if the character is: about to start/mid/ending a jump, otherwise false. | |
| bool | IsAiJumping () |
| Returns true if the character is mid/ending a jump, otherwise false. | |
| bool | IsApparentAnyFriend () |
| Returns true if the AI has a friend in its targeting system (TARGET_FRI_0 has a target), otherwise false. | |
| bool | IsApparentDeath () |
| Returns true if the character is dead/dying (player only?), otherwise false. | |
| bool | IsArrived () |
| Returns true if arrived to the position specified by current pathing, otherwise false. | |
| bool | IsBattleState () |
| Returns true if in battle state (usually battle goals). Equivalent to GetCurrTargetState() == AI_TARGET_STATE__BATTLE. | |
| bool | IsBothHandMode (TARGET target) |
| Returns true if the target is two handing, otherwise false. | |
| bool | IsCautionState () |
| Returns true if in caution state (usually represented by slowly walking around a sound/last remembered target's position). Equivalent to GetCurrTargetState() == AI_TARGET_STATE__CAUTION. | |
| bool | IsChangeState () |
| Returns true if the previous state is different from the current state. | |
| bool | IsChrAroundLadderEdge (float distance, int ladderDmyId) |
| Returns true if the character is within the given distance to the given ladder edge, otherwise false. | |
| bool | IsClanLeader () |
| Does nothing. | |
| bool | IsEnableCancelAttack () |
| Returns true if the character has EnableCancelAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 86 known as "End if AI Attack Queued", otherwise false. | |
| bool | IsEnableCancelAttack_CheckAttackNo (int actionRequestId) |
| Returns true if the AI's current request equals the given request id and the character has EnableCancelAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 86 known as "End if AI Attack Queued", otherwise false. | |
| bool | IsEnableCancelMove () |
| Returns true if the character has EnableCancelMove enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 78 known as "Cancel - AI Move", otherwise false. | |
| bool | IsEnableCancelMove_CheckAttackNo (int actionRequestId) |
| Returns true if the AI's current request equals the given request id and the character has EnableCancelMove enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 78 known as "Cancel - AI Move", otherwise false. | |
| bool | IsEnableCancelStep () |
| Returns true if the character has EnableCancelStep enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 79 known as "Cancel - AI Step", otherwise false. | |
| bool | IsEnableCancelStep_CheckAttackNo (int actionRequestId) |
| Returns true if the AI's current request equals the given request id and the character has EnableCancelStep enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 79 known as "Cancel - AI Step", otherwise false. | |
| bool | IsEnableComboAttack () |
| Returns true if the character has EnableComboAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 23 known as "Cancel - AI ComboAttack", otherwise false. | |
| bool | IsEnableComboAttack_CheckAttackNo (int actionRequestId) |
| Returns true if the AI's current request equals the given request id and the character has EnableComboAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 23 known as "Cancel - AI ComboAttack", otherwise false. | |
| bool | IsEnableNewLadderAct () |
| Does nothing. | |
| bool | IsEventFlag (unsigned int eventFlagId) |
| Returns the given event flag's value. | |
| bool | IsEventRequestReceived (int slot) |
| Returns true if there is an event request in the given slot, otherwise false. See GetEventRequest(int) | |
| bool | IsExecChangeStateAction () |
| Returns ttrue if the current state isn't AI_TARGET_STATE__CAUTION or if the last state is AI_TARGET_STATE__NONE. | |
| 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. Width is hit radius of the target. | |
| bool | IsExistChrSelfToTarget (TARGET target) |
| Returns true if there exists a character on the line between self and the target, otherwise false. | |
| 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. Width is hit radius of the target. | |
| bool | IsExistReqObjAct () |
| bool | IsExistTargetTeamDefeat () |
| Equivalent to GetTeamDefeatEntityId() != -1. | |
| bool | IsExistTeamNumber () |
| Does nothing. | |
| bool | IsExistTeamRecord (int recordId) |
| Returns true if the given team record exists, otherwise false. | |
| bool | IsFindState () |
| Does nothing. | |
| bool | IsFinishAttack () |
| Returns true if attack is over. | |
| bool | IsFinishAttackCoolTime (int animationId) |
| Returns true if the cooldown time set for the given animation is smaller than the time lapsed since its last usage, otherwise false. | |
| bool | IsFinishAttack_CheckAttackNo (int actionRequestId) |
| bool | IsFinishObjAct () |
| bool | IsFinishTimer (int index) |
| Returns true if the given timer's remaining time is less than or equal to 0, otherwise false. | |
| bool | IsFlyState () |
| Returns the character's fly state. | |
| bool | IsForceBattleGoal () |
| Returns force battle goal. Set manually by AI functions. If true then battle goal will be priortized (see _COMMON_SetBattleActLogic in common_logic_func.lua) | |
| bool | IsForgettingMemoryTarget () |
| Returns true if the AI's targeting system's memory target is being forgotten, otherwise false. For example the time until forgetting an enemy memory is 30 seconds from losing your target. | |
| bool | IsForgettingSoundTarget () |
| Returns true if the AI's targeting system's sound target is being forgotten, otherwise false. For example the time until forgetting an enemy sound is 30 seconds from hearing it. | |
| bool | IsForgettingTopSearchTarget () |
| bool | IsGotHome () |
| Returns true if the AI arrived to its home location using the path described by BackToHome goal, otherwise false. This value starts as false, but once true it stays so until the AI is no longer doing regular route actions. | |
| bool | IsHitAttack () |
| Returns true if the character hit an attack within the current goal, otherwise false. Does not matter which character the AI hits, iframes prevent this from activating. | |
| bool | IsHoleFlag (TARGET target, AI_DIR_TYPE directionFromTarget, float distance) |
| bool | IsHorseCall () |
| Returns true if the local player has SpEffect 3039, otherwise false. | |
| bool | IsHoverType () |
| bool | IsHugeEnemy () |
| Returns true if the character's NpcParam's chrHitGroupAndNavimesh is 5, otherwise false. | |
| bool | IsInsideBattleArea () |
| bool | IsInsideMovePoint () |
| Returns true if the character is near its move point, otherwise false. Default distance is 0.5, can vary based on MsbPoint data? | |
| 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, otherwise false. | |
| bool | IsInsideObserve (int observeSlot) |
| Returns true if the given observer's target is inside the observer's area, otherwise false. | |
| bool | IsInsideTarget (TARGET target, AI_DIR_TYPE directionStart, float angleWidth) |
| Returns true if the given target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. | |
| 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. The origin of the spherical sector is the character. The radius of the spherical sector is infinite. | |
| 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 | 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. | |
| bool | IsInsideTargetRegion (TARGET target, unsigned int regionId) |
| Returns true if the given target is within the given region, otherwise false. | |
| bool | IsInterupt (INTERUPT interruptType) |
| Returns true if the given interrupt type is currently active. List of the interrupt types and their activation conditions: INTERUPT_FindEnemy - Activates INTERUPT_FindAttack - Activates when a target attacks, called through HKS script, act(143, 0). INTERUPT_Damaged - Activates when hit by a typical attack / hitbox(e.g not poison). INTERUPT_Damaged_Stranger - Activates when hit by a typical attack / hitbox(e.g not poison) whose source isn't in the AI's targeting system. INTERUPT_SuccessGuard - Activates when hit by a typical attack / hitbox(e.g not poison) that caused a successful guard(not guard broken, while guarding in general ? ). Exclusive with INTERUPT_Damaged, INTERUPT_AIGuardBroken. INTERUPT_MissSwing - Activates when a target missed a swing(DS1 only with its unique miss animations). INTERUPT_GuardBegin - Activates when a target begins guarding. INTERUPT_GuardFinish - Activates when a target finishes guarding. INTERUPT_GuardBreak - Activates when a target is guard broken. INTERUPT_Shoot - Activates when a target shoots a bullet, bullets with no damage that have isAiInterruptShootNoDamageBullet row disabled will not activate this interrupt. INTERUPT_UseItem - Activates when a target uses an item, called through HKS script, act(143, 1). INTERUPT_EventRequest - Activates when "RequestCharacterAICommand" (2004[17]) is called in an event script(EMEVD).Interrupt info functions: GetEventRequest. INTERUPT_AIGuardBroken - Activates when hit by a typical attack / hitbox(e.g not poison) that caused a guard break (while guard broken in general ? ).Exclusive with INTERUPT_Damaged, INTERUPT_SuccessGuard, INTERUPT_AIReboundByOpponentGuard. INTERUPT_AIReboundByOpponentGuard - Activates when hit by a typical attack / hitbox(e.g not poison) that caused a successful guard(not guard broken, while guarding in general ? ) and caused the opponent to "rebound" (weapon / arm recoiled back).Exclusive with INTERUPT_Damaged, INTERUPT_AIGuardBroken. INTERUPT_CANNOT_MOVE_DisableInterupt - Activates INTERUPT_UnfavorableAttack - Activates at the end of an attacking goal if the animation is marked as UnfavorableAttack by EnableUnfavorableAttackCheck and the path from the ai to the target is obstructed.This happens in CSGoalCommonAttack::Update. | |
| bool | IsLadderAct (TARGET target) |
| Returns true if the given target is on a ladder, otherwise false. Equivalent to GetLadderActState(TARGET) != -1. | |
| bool | IsLand () |
| Returns true if the character is touching the ground, otherwise false. | |
| bool | IsLocalPlayer () |
| Returns true if the character is the local player (main player), otherwise false. | |
| bool | IsLookToTarget (TARGET target, float angleWidth) |
| Returns true if the given target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. The starting direction of the circular sector is the character's front. Meaning of angle width to each side: (180 = full circle, 90 = semicircle, etc.) | |
| bool | IsLookToTarget (float angleWidth) |
| Returns true if the turning target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. The starting direction of the circular sector is the character's front. Meaning of angle width to each side: (180 = full circle, 90 = semicircle, etc.) Turning target can be seen as the "main target", it is referenced/set with many of the goals (using TurnTo(TARGET)). | |
| bool | IsLookToTarget () |
| Returns true if the turning target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. The starting direction of the circular sector is the character's front. Meaning of angle width to each side: (180 = full circle, 90 = semicircle, etc.). Turning target can be seen as the "main target", it is referenced/set with many of the goals (using TurnTo(TARGET)). Equivalent to IsLookToTarget(10) | |
| bool | IsMemoryState () |
| Returns true if in memory state, otherwise false. Equivalent to GetCurrTargetState() == AI_TARGET_STATE__MEMORY. | |
| bool | IsNpcPlayer () |
| Returns true if the character is a player npc, otherwise false. | |
| bool | IsOmissionLevel30 () |
| Returns true if the character is at omission level 30. Used to determine how much effort the AI should make in certain calculations and operations, as the character is far/offscreen for this omission level. | |
| bool | IsOnGround_FlyRoute () |
| 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 | 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? | |
| 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? Identical to IsOnNearMeshByPos(TARGET, AI_DIR_TYPE, float). | |
| bool | IsOnRideCostMesh () |
| bool | IsOptimalAttackDist () |
| Does nothing. | |
| bool | IsOptimalAttackRangeH () |
| Does nothing. | |
| bool | IsOptimalAttackRangeV () |
| Does nothing. | |
| bool | IsPlatoonLeader () |
| Retruns true if the AI is the leader of its team, otherwise false. | |
| bool | IsProcessingFadeWarpToInitPos () |
| Returns true if the character is currently fade warping, otherwise false. Set by RequestFadeWarpToInitPos and used in the similary named goal. | |
| bool | IsRideEdgeFlag (TARGET target) |
| bool | IsRideLargeSpaceFlag (TARGET target) |
| bool | IsRiding (TARGET target) |
| Returns true if the target is riding, otherwise false. | |
| bool | IsRouteEnd () |
| Returns true if the AI finished its route, otherwise false. This stays true until the AI reaches the start of its route cycle again. If the AI has no route this returns true. | |
| bool | IsSearchHighState () |
| Returns true if in search high state, also known as "search2". Equivalent to GetCurrTargetState() == AI_TARGET_STATE__SEARCH2. | |
| bool | IsSearchLowState () |
| Returns true if in search low state, also known as "search". Equivalent to GetCurrTargetState() == AI_TARGET_STATE__SEARCH. | |
| bool | IsSearchState () |
| Returns true if in search low state, also known as "search". Equivalent to GetCurrTargetState() == AI_TARGET_STATE__SEARCH Equivalent to IsSearchLowState() | |
| bool | IsSearchTarget (TARGET target) |
| Returns true if the given target can be accessed, otherwise false. For example if IsSearchTarget(TARGET_ENE_0) returns false, then the AI has no knowledge of TARGET_ENE_0. | |
| bool | IsSleepSpecialEffectId (TARGET target, int specialEffectId) |
| Returns true if the given target has the given special effect id but the effect is incompatible via vow type, otherwise false. | |
| bool | IsStartAttack () |
| Returns true if currently executing an animation requested by the AI, otherwise false. (Read the name as "Has started the attack yet?" instead of "Is at the beginning of an attack?"). | |
| bool | IsStartAttack_CheckAttackNo (int actionRequestId) |
| Returns true if currently executing the given animation as requested by the AI, otherwise false. (Read the name as "Has started the attack yet?" instead of "Is at the beginning of an attack?"). | |
| bool | IsTargetGuard (TARGET target) |
| Returns true if the given target is guarding, otherwise false. Given from ChrActionFlagModule. | |
| bool | IsTargetOutOfAngleInterruptSlot (int angleObserveSlot) |
| Dose nothing in ER. Previously used along with GoalFunc function SetTargetAngle to determine whether the target is out of the angle width. | |
| bool | IsTargetOutOfRangeInterruptSlot (int rangeObserveSlot) |
| Does nothing in ER. Previously used along with GoalFunc function SetTargetRange to determine whether the target is out of the distance range. | |
| bool | IsTargetWeakSoulCoin (int p1) |
| Does nothing. | |
| bool | IsTeamCommandExist () |
| Does nothing. | |
| bool | IsTeamLeader () |
| Does nothing. | |
| bool | IsThrowing () |
| Returns true if the character is in the middle of a throw (e.g grab, riposte, etc.) | |
| bool | IsTouchBreakableObject () |
| Returns true if the character is touching a breakable object, otherwise false. Used to determine if the enemy needs to break an object around them to get free. | |
| bool | IsTrueLand () |
| Returns true if the character is standing on even, non sloped ground, otherwise false. | |
| bool | IsUpdateFirstAnimation () |
| bool | IsValidPlatoon () |
| Returns true if the AI is part of a team/platoon, otherwise false. | |
| bool | IsUseFlyRoute () |
| Does nothing. | |
| bool | IsVisibleCurrTarget () |
| Returns true if the current target (as referenced by the AI's target search system) is visible to the AI (that is, in the visibility cone, unobstructed), otherwise false. It seems sound targets are always visible? | |
| bool | IsVisibleTarget (TARGET target) |
| Returns true if the current target is visible to the AI, or the given target is one of the speicifed options, otherwise false. This function is identical to IsVisibleCurrTarget() beyond the following target exceptions that always return true: TARGET_NONE, TARGET_SELF, TARGET_EVENT, TARGET_LOCALPLAYER, TARGET_LowHp_Friend, TARGET_HOSTPLAYER, target > 133. | |
| void | KickEvent (int eventIndex) |
| bool | KickLuaCall (int p1, int p2, int p3) |
| Does nothing. | |
| bool | LastPathFindingIsFailed () |
| Does nothing. | |
| 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, If we center and align our axes with the target the resulting position would be: result = direction vector from "self+angleStart" to "target" result = (result.x * cos(angle), result.y * sin(angle), result.z * -cos(angle)) | |
| int | Mod (int dividend, int divisor) |
| Returns dividend % divisor. | |
| 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. | |
| bool | MoveToEventPoint (unsigned int regionId, int p2, float p3, bool isWalk) |
| Use pathing to move towards the given event region. | |
| void | NotifyBuddyUnsummon () |
| void | OnEndLadderGoal () |
| Used on the termination of the LadderMove goal to clear some data. Does nothing by itself. | |
| void | OnStartLadderGoal () |
| Used on the activation of the LadderMove goal to clear some data. Does nothing by itself. | |
| void | OnUpdateLadderGoal () |
| Used on the update of the LadderMove goal to update both ladder specific and pathing data. | |
| void | PrintText (char *p1) |
| Does nothing. | |
| float | RegistAttackTimeInterval (int animationId, float cooldown) |
| Registers a cooldown to the given animationId. Animation offset is automatically added and does count as a different animation for cooldowns. | |
| bool | RegisterBoidsUnit (int p1) |
| Does nothing. | |
| bool | RegisterTriggerRegion (int p1, int p2, float p3, float p4, int p5, int p6, float p7) |
| Does nothing. | |
| bool | RegisterTriggerRegionCylinder (int p1, int p2, float p3, float p4, float p5, int p6, int p7, float p8) |
| Does nothing. | |
| bool | RegisterTriggerRegionObserver (int p1) |
| Does nothing. | |
| void | RemoveBoidsUnit (int p1) |
| Does nothing. | |
| void | RemoveTriggerRegionObserver (int p1) |
| Does nothing. | |
| void | Replaning () |
| Resets/clears/reintializes a signifcant amount of data from the AI (e.g all observers, goals (with termination), walking type, re-executing goal logic funcs). | |
| void | ReqPlatoonState (PLATOON_STATE platoonState) |
| Attempt to set platoon state? | |
| void | ReqTeam_Support (float maxDistance) |
| Call for help for teammates within range. | |
| void | RequestChangeFlyState (bool enable) |
| Set fly state. | |
| void | RequestEmergencyQuickTurn () |
| Requests emergency turn, possibly forcing a turn animation that otherwise wouldn't have happened because the turn angle was too small. See usage in c9997.hks, env(330). | |
| void | RequestFadeWarpToInitPos (float fadeTime, float p2) |
| Requests to warp to init pos while fading. | |
| void | RequestLadderWait () |
| Requests LadderWait, triggering the same named interrupt which is used in top_goal.lua. | |
| void | RequestParallelMove () |
| Requests parallel move type. See usage in c9997.hks, env(327). | |
| bool | ReserveObjAct (int objActIndex) |
| bool | ReserveRide (float maxDistance) |
| Attempts to find and reserve a ride target within the given distance. | |
| void | ResetInitialPosition () |
| Sets the character's initial position to their current position. | |
| void | ResetInitialPositionByEventRegion (unsigned int regionId) |
| Sets the character's initial position to the given event region position. | |
| void | ResetNPCActProb () |
| Resets all NPC act probabilities to 0. | |
| int | SearchGetEnemyNumAround (TARGET target, float maxDistance) |
| Returns the number of enemies (of the AI, not the target) around the given target within the given distance. | |
| void | SendTeamMemberMessage (int p1) |
| Does nothing. | |
| 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 point of the given line. | |
| 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 point of the given line. | |
| void | SetAIPredictionMoveTargetSpecifyAngle (float p1, float angle, float lineLength) |
| SetAIPredictionMoveTargetSpecifyAngle(p1, angle, lineLength, 0) | |
| void | SetAIPredictionMoveTargetSpecifyAngle (float p1, float angle, float lineLength, float p4) |
| void | SetAIPredictionMoveTargetSpecifyTargetDir (float predictionFactor, int directionFromEnemy, float lineLength, float p5) |
| void | SetAllowTriggerNearObjAct () |
| Does nothing. | |
| void | SetAttackRequest (unsigned int ezStateId) |
| Request action. Animation offset is included automatically in this function. | |
| void | SetBoidsCohesionRange (float p1) |
| Does nothing. | |
| void | SetBoidsSearchConnectorRange (float p1) |
| Does nothing. | |
| void | SetBoidsSeparateRange (float p1) |
| Does nothing. | |
| void | SetBoidsSpeedRateRange (float p1, float p2) |
| Does nothing. | |
| void | SetCurrentMovePointIndex (int pointIndex) |
| Sets the point to move to to the one in the given index. | |
| void | SetEnableEndureCancel_forGoal () |
| void | SetEnableInterrupt_LookedTarget (bool enable) |
| Enables/disables the interrupt "INTERUPT_LookedTarget". | |
| void | SetEnableStabCounterCancel_forGoal () |
| void | SetEnableUsePath (bool enable) |
| Use map patrol path? | |
| void | SetEventFlag (unsigned int eventFlagId, bool value) |
| Sets the given flag to the given value. | |
| void | SetEventMoveTarget (unsigned int regionId) |
| Set POINT_EVENT to the given region. | |
| void | SetIsForceBattleGoal () |
| Sets IsForceBattleGoal() to true. | |
| void | SetMoveAllDirection_LegWalk2And4 (bool enable) |
| Allows the character to use all movement directions when moving. Overwritten by move left right only and move back to home. | |
| void | SetMoveLROnly (bool enable) |
| Forces the AI to only use left/right movement directions when moving. | |
| void | SetNumber (int index, float value) |
| Store the given number in the given index. | |
| void | SetPassiveMoveModifier (float modifier) |
| Sets a root motion factor in all directions for all animations. | |
| bool | SetPosAngBy1stNearLadderDmyId (int p1) |
| void | SetRouteInfoByEntityId (unsigned int p1) |
| Does nothing. | |
| 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, having 1 big (1024) float array buffer where each "array" is a pointer to somewhere in this buffer. | |
| void | SetStringIndexedNumber (char *variableName, float value) |
| Sets the given variable to the given value. | |
| void | SetSuperClimbingMode (bool enable) |
| Enables super climbing mode for the character, increasing their ability to step up inclines. Character must be categorized as huge enemy and have a hit radius smaller than 5 to have an effect. | |
| void | SetTeamNumber (int p1, float p2) |
| Does nothing. | |
| void | SetTeamNumber (int p1, float p2, float p3) |
| Does nothing. | |
| void | SetTimer (int index, float value) |
| Sets the given timer to the given value. Timers constantly tick down until they reach 0. | |
| void | SetTurnReferenceDirection (TARGET target) |
| Store the direction to the given target's current position as the turn reference. The turn reference direction is used at the beginning of SidewayMove storing the target's position, to know when to end the goal. | |
| void | SetUserInterupt (unsigned int p1) |
| Does nothing. | |
| void | ShiftCurrTargetBattleState () |
| void | StartAttackPassedTimer (int animationId, float time) |
| Sets the animation cooldown timer for the given animation to the given time. Animation offset is included automatically in this function. | |
| void | StartDash () |
| Forces run. | |
| void | StartGuard () |
| Does nothing. | |
| void | StartIdTimer (int index) |
| Starts id timer. | |
| void | StartIdTimerSpecifyTime (int index, float startingTime) |
| Starts id timer with the given time. | |
| void | StartTeamIdTimer (int p1) |
| Does nothing. | |
| void | StepNextMovePoint () |
| Cycle to the next point on your path. Used in the common pathing goals' Terminate function when the move target is a move point. | |
| void | TeamHelp_Call () |
| Call for help from team. The distance is taken from NpcThinkParam's "callHelp_CallValidRange". | |
| float | TeamHelp_GetMaxWaitTime () |
| Returns NPCThinkParam's "callHelp_MaxWaitTime" * 0.1. | |
| float | TeamHelp_GetMinWaitTime () |
| Returns NPCThinkParam's "callHelp_MinWaitTime" * 0.1. | |
| bool | TeamHelp_IsValidCall () |
| Returns true if there are any valid teammates that can respond to your call, otherwise false. Based on NPCThinkParam. | |
| bool | TeamHelp_IsValidReply () |
| Returns true if there are any valid teammates that you can reply to, otherwise false. Based on NPCThinkParam. Used to end GoalNonBattleAct in case a teammate calls. | |
| void | TeamHelp_Reply () |
| Handles answering call logic, including setting as target? | |
| void | TeamHelp_ReserveCall () |
| void | TeamHelp_ValidateCall () |
| void | TeamHelp_ValidateReply () |
| void | TurnTo (TARGET target) |
| Sets the given target as the turn target/target to turn to. The turn target can be considered the "main target" of the AI in many cases. | |
Represents the AI of a character.
This is for Elden Ring, while most functions retain their implementation over games, some functions are "emptied" becasue they are no longer used. "character"/"the character" = the AI's character (ChrIns)
Definition at line 37 of file AiFunc.hpp.
| void AiFunc::AddFriendAttackedTarget | ( | ) |
Notifies targeting system that someone in the team attacked target.
| void AiFunc::AddNPCActProb | ( | int | npcAiBehaviorParam | ) |
Add the probabilities in the given NpcAiBehaviorProbability param to the NPC's probabilities array.
| npcAiBehaviorParam | ai behavior param id |
| void AiFunc::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.
Each "observer" in the "area observers" observes some region and interrupts the AI via "INTERUPT_Inside_ObserveArea" and "INTERUPT_Outside_ObserveArea". In the technical sense each observer contiuously checks some condition/s and returns true or false, all fromsoft made observers using this list are ofcourse tied to checking regions/areas on some "observed target". There is no meaningful limit to the amount of observers you can make.
| observeSlot | area observer slot |
| targetOrigin | origin of the spherical sector |
| targetObserved | target to observe |
| directionStart | direction from the origin with which the spherical sector is aligned |
| angleWidth | angle width of the spherical sector |
| distance | radius of the spherical sector |
| void AiFunc::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.
Each "observer" in the "area observers" observes some region and interrupts the AI via "INTERUPT_Inside_ObserveArea" and "INTERUPT_Outside_ObserveArea". In the technical sense each observer contiuously checks some condition/s and returns true or false, all fromsoft made observers using this list are ofcourse tied to checking regions/areas on some "observed target". There is no meaningful limit to the amount of observers you can make.
| observeSlot | area observer slot |
| targetOrigin | origin of the spherical sector |
| targetObserved | target to observe |
| directionStart | direction from the origin with which the spherical sector is aligned |
| angleWidth | angle width of the spherical sector |
| angleHeight | angle height of the spherical sector |
| distance | radius of the spherical sector |
| void AiFunc::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 character with the specified radius.
Each "observer" in the "area observers" observes some region and interrupts the AI via "INTERUPT_Inside_ObserveArea" and "INTERUPT_Outside_ObserveArea". In the technical sense each observer contiuously checks some condition/s and returns true or false, all fromsoft made observers using this list are ofcourse tied to checking regions/areas on some "observed target". There is no meaningful limit to the amount of observers you can make.
| observeSlot | area observer slot |
| targetObserved | target to observe |
| dummyPolyId | poly origin |
| radius | radius of the sphere |
| void AiFunc::AddObserveObjBreak | ( | unsigned int | observeObjectId | ) |
Observes an object, interrupts when it is broken. There can be only 4 of these at once. This is not an area observer.
| observeObjectId | object id to observe |
| void AiFunc::AddObserveRegion | ( | int | observeSlot, |
| int | targetObserved, | ||
| unsigned int | regionId ) |
Adds an observer to the area observers. This area is defined by the given event region.
Each "observer" in the "area observers" observes some region and interrupts the AI via "INTERUPT_Inside_ObserveArea" and "INTERUPT_Outside_ObserveArea". In the technical sense each observer contiuously checks some condition/s and returns true or false, all fromsoft made observers using this list are ofcourse tied to checking regions/areas on some "observed target". There is no meaningful limit to the amount of observers you can make.
| observeSlot | area observer slot |
| targetObserved | target to observe |
| regionId | event region id |
| void AiFunc::AddObserveSpecialEffectAttribute | ( | TARGET | targetObserved, |
| int | specialEffectId ) |
Adds an observer to the special effect observers. Interrupts the AI when the given special effect is applied to the target and when it is cleared (INTERUPT_ActivateSpecialEffect and INTERUPT_DeActivateSpecialEffect respectively).
Each "observer" in the "area observers" observes some region and interrupts the AI via "INTERUPT_Inside_ObserveArea" and "INTERUPT_Outside_ObserveArea". In the technical sense each observer contiuously checks some condition/s and returns true or false, all fromsoft made observers using this list are ofcourse tied to checking regions/areas on some "observed target". There is no meaningful limit to the amount of observers you can make.
| targetObserved | target to observe |
| specialEffectId | special effect to observe for |
| void AiFunc::AddTeamRecord | ( | int | recordId, |
| TARGET | target, | ||
| float | distance ) |
| recordId | |
| target | |
| distance | notify distance |
| void AiFunc::AddTeamTimeRecord | ( | int | recordId, |
| TARGET | target, | ||
| float | distance ) |
| recordId | |
| target | |
| distance | notify distance |
| GoalFunc * AiFunc::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.
| goalId | goal to add |
| life | life of goal in seconds |
| goalParam0 | 0th goal param |
| goalParam1 | 1st goal param |
| goalParam2 | 2nd goal param |
| goalParam3 | 3rd goal param |
| goalParam4 | 4th goal param |
| goalParam5 | 5th goal param |
| goalParam6 | 6th goal param |
| goalParam7 | 7th goal param |
| goalParam8 | 8th goal param |
| goalParam9 | 9th goal param |
| void AiFunc::BeginWalkAroundFree | ( | ) |
| int AiFunc::CalcGetNearestLadderActDmyIdByLadder | ( | ) |
Returns 192 if the bottom of the ladder is closer than the top, otherwise 191.
| int AiFunc::CalcNearMovePointOnRoute | ( | int | p1, |
| int | p2, | ||
| float | p3, | ||
| float | p4 ) |
Does nothing.
| p1 | |
| p2 | |
| p3 | |
| p4 |
| bool AiFunc::CalcSetPointWaitAndSee | ( | ) |
Calcs the info for the target POINT_WaitAndSee?
| bool AiFunc::CanLadderGoalEnd | ( | ) |
Returns true if not on a ladder.
| bool AiFunc::CannotMove | ( | ) |
Returns true if the character determines it cannot move based on its hit capsule and position's proximity to objects, and if the navigate manager determines it so.
| bool AiFunc::CanShootMagicByType | ( | int | equipWeaponParam, |
| int | magicType ) |
Returns true if the weapon can cast the specified magic type. See GetMagicCategory(int) for magic type.
| equipWeaponParam | equipWeaponParam weapon param id |
| magicType | magicType magic type (ezStateBehaviorType) |
| bool AiFunc::CanStartLadderAttach | ( | ) |
Returns true if the character can attach to ladders, which is true when the character is touching solid ground.
| bool AiFunc::CanWeaponEnhance | ( | int | equipWeaponParam | ) |
Returns true if the specified weapon can be buffed.
| equipWeaponParam | equipWeaponParam weapon param id |
| void AiFunc::ChangeEquipItem | ( | int | slot, |
| ITEM_SLOTTYPE | slotType ) |
Changes current selected item to the given slot's item.
| slot | slot index |
| slotType | item slot type |
| void AiFunc::ChangeEquipMagic | ( | int | slot | ) |
Changes current selected magic to the specified slot's magic.
| slot | magic equip slot |
| void AiFunc::ChangeEquipMagicByMagicParamId | ( | int | magicParam | ) |
Changes the current selected magic to the specified magic by param.
| magicParam | magic param id |
| void AiFunc::ChangeWalkAroundFreePoint | ( | ) |
Recalculate POINT_WalkAroundPosition_Free using randomness? But it adds to a list? Extremely unsure.
| bool AiFunc::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 the stop distance.
| moveTarget | target to move to |
| directionFromTarget | direction from the target's front to approach to |
| stopDistance | distance from target at which to stop moving |
| bool AiFunc::CheckTurnAngleDiff | ( | TARGET | target, |
| bool | isAntiClockwise, | ||
| float | angleThreshold ) |
Check if the target is within the circular sector (with infinite radius) defined by the character as the origin, starting direction is set by SetTurnReferenceDirection(TARGET) and the perimeter is the given angle to 180. Additionally TARGET_ENE_0 (regardless of the target argument) must be in the character's 30 degree view (IsInsideTarget(TARGET_SELF, TARGET_ENE_0, AI_DIR_TYPE_F, 30)).
| target | target to check |
| isAntiClockwise | whether to measure from front to the right or left |
| angleThreshold | angle to cross |
| bool AiFunc::ChkNearCorpsePos | ( | float | maxAlertDistance | ) |
Returns true if there is a teammate within the given distance that is dead.
| maxAlertDistance | maximum valid distance from teammate |
| bool AiFunc::ChkNearLowHpFriend | ( | float | maxHpRate, |
| float | maxAlertDifference ) |
Returns true if there is a teammate within the given distance that has less than or equal hprate to the one given.
| maxHpRate | hp ratio upper bound on what is defined as low hp |
| maxAlertDifference | maximum valid distance from teammate |
| void AiFunc::ClearEnableEndureCancel_forGoal | ( | ) |
Used in DS3/Sekiro for StabCounterAttack/EndureAttack, effect unknown. Unused in ER.
| void AiFunc::ClearEnableStabCounterCancel_forGoal | ( | ) |
Used in DS3/Sekiro for StabCounterAttack/EndureAttack, effect unknown. Unused in ER.
| void AiFunc::ClearFinishObjAct | ( | ) |
Set finish obj act.
| void AiFunc::ClearForceBattleGoal | ( | ) |
Sets IsForceBattleGoal() to false. Used in common_logic_func.lua to clear IsForceBattleGoal after handing its logic.
| void AiFunc::ClearMoveRequest | ( | ) |
Stop moving. Must not be on a ladder or moving to a jumping point (mid jump).
| void AiFunc::ClearMoveToSomewhereSmoothMemory | ( | ) |
Clears GoalMoveToSomewhere_SwitchRouteMove's memory (e.g point positions).
| void AiFunc::ClearTeam_Support | ( | ) |
Clear request for team support. See ReqTeam_Support(float).
| float AiFunc::DbgAutoRemo_GetWaitCommandTime | ( | ) |
Does nothing.
| bool AiFunc::DbgAutoRemo_IsWaitCommand | ( | ) |
Does nothing.
| void AiFunc::DbgAutoRemo_ResetWaitCommand | ( | ) |
Does nothing.
| int AiFunc::DbgGetForceActIdx | ( | ) |
Returns the force act index, used in common_battle_func.lua -> Common_Battle_Activate to force enemies to repeat an act. No set function (original use is through Debug Menu), but still functions properly.
| void AiFunc::DbgSetLastActIdx | ( | int | actIndex | ) |
Sets the last act index, used in common_battle_func.lua -> Common_Battle_Activate. No get function, but still functions properly.
| actIndex | actIndex last act index |
| void AiFunc::DecideWalkAroundPos | ( | ) |
Recalculate POINT_WalkAroundPosition_Home using randomness? But it adds to a list? Extremely unsure.
| void AiFunc::DeleteObserve | ( | int | observeSlot | ) |
Deletes the area observer in the given slot.
| observeSlot | area observer to delete |
| void AiFunc::DeleteObserveObjBreak | ( | unsigned int | objectId | ) |
Stop observing the given object.
| objectId | object to stop observing |
| void AiFunc::DeleteObserveSpecialEffectAttribute | ( | TARGET | targetObserved, |
| int | specialEffectId ) |
Delete the given special effect observer.
| targetObserved | target being observed |
| specialEffectId | special effect being observed |
| void AiFunc::DeleteTeamReacor | ( | int | recordId | ) |
Delete the given team record.
| recordId | team record to delete |
| bool AiFunc::DoAdmirer_ThinkAttr | ( | ) |
Returns the NpcThinkParam's thinkAttr_doAdmirer. Usually used to determine whether the character should behave in a different way when fighting with a team.
| unsigned char AiFunc::DoAdmirer_ThinkAttr_ | ( | ) |
Returns the NpcThinkParam's thinkAttr_doAdmirer. Usually used to determine whether the character should behave in a different way when fighting with a team.
| void AiFunc::DoEzAction | ( | float | actionLife, |
| int | ezActionId ) |
Request the given action for the given amount of time.
| actionLife | amount of time to do action |
| ezActionId | action to do |
| void AiFunc::EnableUnfavorableAttackCheck | ( | unsigned int | animationIdOffset, |
| unsigned int | animationId ) |
Adds the given attack to the unfavorable attacks list, interrupting the AI when used under certain conditions.
| animationIdOffset | offset to add to the animation id |
| animationId | animation id to enable unfavorable attack check on |
| void AiFunc::EndDash | ( | ) |
Stops forcing run. See StartDash().
| void AiFunc::EndGuard | ( | ) |
Does nothing.
| void AiFunc::EndWalkAroundFree | ( | ) |
Clears WalkAroundFree list?
| float AiFunc::EvaluateAttackDist | ( | ) |
Does nothing.
| float AiFunc::EvaluateAttackRangeH | ( | ) |
Does nothing.
| bool AiFunc::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. See <see cref="FollowPath(TARGET, AI_DIR_TYPE, float, bool, float, bool, bool, bool)" xzDistanceOnly = false defaultOrientationAndDirDist = false closeProximityMode = false.
| moveTarget | origin of the sphere |
| directionFromTarget | direction from the target's front with which the spherical sector is aligned |
| stopDistance | radius of the sphere |
| isWalk | is walk or run |
| directionalDistance | unknown, used for IsArrived? |
| bool AiFunc::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. The sector's angle width depends on the direction from the target: AI_DIR_TYPE_CENTER = 360 (full sphere) otherwise 180.
| moveTarget | origin of the sphere |
| directionFromTarget | direction from the target's front with which the spherical sector is aligned |
| stopDistance | radius of the sphere |
| isWalk | is walk or run |
| directionalDistance | unknown, used for IsArrived? |
| xzDistanceOnly | should the sphere be a circle instead (ignore vertical distance) |
| defaultOrientationAndDirDist | default orientation is center and default stop distance is 0, |
| closeProximityMode | unknown |
| bool AiFunc::FollowPathToPoint | ( | TARGET | moveTarget, |
| int | directionFromTarget, | ||
| float | stopDistance, | ||
| bool | isWalk ) |
Use pathing to move towards a spherical sector defined by the following parameters. See <see cref="FollowPath(TARGET, AI_DIR_TYPE, float, bool, float, bool, bool, bool)" directionalDistance = 0 xzDistanceOnly = false defaultOrientationAndStopDist = false closeProximityMode = false.
| moveTarget | |
| directionFromTarget | |
| stopDistance | |
| isWalk |
| void AiFunc::ForceClanFormationMove | ( | ) |
Does nothing.
| float AiFunc::GetAbsoluteAngleFromTarget | ( | TARGET | target | ) |
Returns the angle from the character's left to the target, clockwise.
| target | target to measure to |
| int AiFunc::GetActTypeOnFailedPathEnd | ( | ) |
Returns the NpcThinkParam's actTypeOnFailedPath. Used to determine what to do on battle act pathing failure.
| int AiFunc::GetActTypeOnNonBattleFailedPathEnd | ( | ) |
Returns the NpcThinkParam's actTypeOnNonBtlFailedPath. Used to determine what to do on non battle act pathing failure.
| int AiFunc::GetAIUsageParam | ( | int | paramUsageType, |
| int | rowId ) |
Returns the ai usage judgement id (aiUsageId or aiUseJudgeId) of the given param. paramUsageType: 0 = Magic 1 = EquipParamGoods 2 = SwordArtsParam.
| paramUsageType | param type |
| rowId | row id |
| int AiFunc::GetAnimIdOffset | ( | ) |
Returns the character's animation id offset.
| int AiFunc::GetAreaHour | ( | ) |
Returns the world's hour in the current day.
| int AiFunc::GetAreaMinute | ( | ) |
Returns the world's minute in the current hour.
| int AiFunc::GetAreaObserveSlot | ( | int | areaObserveInterruptState, |
| int | matchingObservesCount ) |
Returns the nth observe slot that matches the area observe interrupt state (No change, inside, outside). For example if there are 2 area observers that check if the target is inside the front of the character, the first with a distance of 10 in the 7th slot and the second with a distance of 5 in the 12th slot. Walking from behind to the front will (for that frame) mean that GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 0) will return 7, and GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 1) will return 12. Walking forwards towards a distance of 5 will (for that frame) mean that GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 0) will return 12, and GetAreaObserveSlot(AI_AREAOBSERVE_INTERRUPT__INSIDE, 1) will return -1.
| areaObserveInterruptState | the area observe interrupt state to check for |
| matchingObservesCount | matchingObservesCount number of observes that match the given state until you return the observe slot |
| int AiFunc::GetAreaObserveSlotNum | ( | int | areaObserveInterruptState | ) |
Returns the amount of area observes that match the given interrupt state.
| areaObserveInterruptState | the area observe interrupt state to check for |
| int AiFunc::GetAreaSecond | ( | ) |
Returns the world's second in the current minute.
| int AiFunc::GetArtsID | ( | ARM | arm | ) |
Returns the SwordArtsParam id of the weapon in the given arm.
| arm | arm to get the weapon from |
| float AiFunc::GetAttackPassedTime | ( | int | animationId | ) |
Returns the time passed since the last time the character started the given animation.
| animationId | animation to check the passed time for |
| int AiFunc::GetBehaviorStateId | ( | PLAN_IDX_AINOTE | planIndex | ) |
Returns the current plan style/state based on the given plan index. Either PLAN_IDX_AINOTE_STYLE to get guard related behaviors or PLAN_IDX_AINOTE_STATETYPE for attack related behaviors.
| planIndex | plan index to get the behavior for |
| float AiFunc::GetBuddyActiveRange | ( | ) |
Returns the NpcThinkParam's overwriteReturnRange if it's non negative, otherwise the activateRange.
| int AiFunc::GetBuddyFollowType | ( | ) |
Returns the character's pcFollowType (defined in BuddyParam). Used to determine how and if a summon should follow the player.
| int AiFunc::GetChangeBattleStateCount | ( | ) |
Returns the amount of times the AI went into battle goal (going into battle goal adds 1, going into non battle goal doesn't add).
| int AiFunc::GetChangeStateActionParam | ( | ) |
Does nothing.
| int AiFunc::GetChangeStateActionType | ( | ) |
Does nothing.
| float AiFunc::GetChrHitRadius | ( | int | target | ) |
Returns the target's chr hit radius.
| target | target |
| int AiFunc::GetClanMemberNum | ( | ) |
Does nothing.
| int AiFunc::GetCurrentEquipWeaponId | ( | ARM | arm | ) |
Returns the character's current equipped weapon id in the given arm.
| arm | arm to get the weapon from |
| int AiFunc::GetCurrEquipMagicID | ( | int | target | ) |
Returns the target's currently selected magic.
| target |
| AI_TARGET_STATE AiFunc::GetCurrTargetState | ( | ) |
Returns the AI's current target-state. In what state is the AI in in regards to targeting/searching for target.
| AI_TARGET_TYPE AiFunc::GetCurrTargetType | ( | ) |
Returns the AI's current target-type. What type is the target the AI is currently looking for/found.
| float AiFunc::GetDamageLastFrame | ( | ) |
Returns the damage taken by the character in the last frame.
| float AiFunc::GetDist | ( | TARGET | target | ) |
Returns the distance between the character and the target, taking into account the hit capsules.
| target | target to measure distance to |
Returns the distance between targetA and targetB, taking into account the hit capsules.
| targetA | point 1 |
| targetB | point 2 |
| float AiFunc::GetDistParam | ( | DIST | distanceType | ) |
Converts distance type into distance. DIST_Near = 3 DIST_Middle = 6 DIST_Far = 15 DIST_Out = 999 DIST_None = 3.402823e+38 (MAX FLOAT) else = -1.
| distanceType | distance type to convert into distance |
| float AiFunc::GetDistXZ | ( | TARGET | target | ) |
Returns the strictly horizontal distance between the character and the target, taking into account the hit capsules.
| target | target to measure distance to |
| float AiFunc::GetDistY | ( | TARGET | target | ) |
Returns the strictly vertical distance between the character and the target.
| target | the strictly vertical distance between the character and the target |
| float AiFunc::GetDistYSigned | ( | TARGET | target | ) |
Returns the strictly vertical distance between the character and the target, signed as such (targetY - characterY)
| target |
| int AiFunc::GetEquipArrowBoltId | ( | TARGET | target, |
| ARROW_OR_BOLT | arrowOrBolt, | ||
| int | slot ) |
Returns the arrow or bolt equipment id in the given target and slot.
| target | target to get equip data from |
| arrowOrBolt | arrow or bolt slot type |
| slot | slot index |
| int AiFunc::GetEquipItemId | ( | TARGET | target, |
| int | slot, | ||
| ITEM_SLOTTYPE | slotType ) |
Returns the item equipment id in the given target and slot.
| target | target to get equip data from |
| slot | slot index |
| slotType | item slot type |
| int AiFunc::GetEquipMagicId | ( | TARGET | target, |
| int | slot ) |
Returns the magic id in the given target and slot.
| target | target target to get equip data from |
| slot | slot slot index |
| int AiFunc::GetEquipMagicIndex | ( | ) |
Returns the character's currently selected magic slot.
Returns the weapon equipment id in the given target and slot.
| target | |
| arm | target to get equip data from |
| slot | arm to get weapon from |
| int AiFunc::GetEquipWeaponIndex | ( | ARM | arm | ) |
Returns the currently active weapon slot index in the characterar's given arm.
| arm | arm to get the currently active weapon index from |
| int AiFunc::GetEventRequest | ( | ) |
Returns the event request value in slot 0. This is used to let events communicate with the AI via INTERUPT_EventRequest.
| int AiFunc::GetEventRequest | ( | int | slot | ) |
Returns the event request value in the given slot. Slots are 0-3. This is used to let events communicate with the AI via INTERUPT_EventRequest.
| slot | slot |
| int AiFunc::GetExcelParam | ( | AI_EXCEL_THINK_PARAM_TYPE | excelParam | ) |
Returns the first active SpecialEffect's overwitten excel param if there is one, otherwise NpcThinkParam's given excel param value.
| excelParam | excel param to get from NpcThinkParam |
| float AiFunc::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 line. If none are found returns -1. Equivalent to GetExistMeshOnLineDistEx(target, directionFromTarget, maxDistance, GetHitRadius(), 0).
| target | line origin |
| directionFromTarget | line direction |
| maxDistance | line length |
| float AiFunc::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 line. If none are found returns -1.
| target | line origin |
| directionFromTarget | line direction |
| lineEndDistance | distance until the line ends |
| lineWidth | width (3D) of the line |
| lineStartDist | distance until the line begins |
| float AiFunc::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 line. If none are found returns -1. Equivalent to GetExistMeshOnLineDistSpecifyAngleEx(target, angle, maxDistance, spatialDirectionStart, GetHitRadius(), 0)
| target | line origin |
| angle | line direction offset, clockwise |
| maxDistance | distance until the line ends |
| spatialDirectionStart | line starting direction |
| float AiFunc::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 line. If none are found returns -1.
| target | line origin |
| angle | line direction offset, clockwise |
| lineEndDistance | distance until the line ends |
| spatialDirectionStart | line starting direction |
| lineWidth | width (3D) of the line |
| lineStartDist | distance until the line begins |
| int AiFunc::GetFlyRouteState | ( | ) |
Does nothing.
| int AiFunc::GetHp | ( | TARGET | target | ) |
Returns the target's hp.
| target | target |
| float AiFunc::GetHpRate | ( | TARGET | target | ) |
Returns the target's hp to max hp ratio.
| target | target |
| float AiFunc::GetIdTimer | ( | int | timerId | ) |
Returns the timer's elapsed time since last accessed. Sets the timer to its starting offset (0 by default).
| timerId | id-timer's id |
| int AiFunc::GetInitStayId | ( | ) |
Returns the character's event defined idle animation.
| int AiFunc::GetInsidePlatoonMemberNum | ( | float | p1, |
| float | p2, | ||
| float | p3, | ||
| float | p4 ) |
Does nothing.
| p1 | |
| p2 | |
| p3 | |
| p4 |
| AI_AREAOBSERVE_INTERRUPT AiFunc::GetInterruptStatus | ( | int | observeSlot | ) |
Returns the interrupt status of the given area observer.
| observeSlot | area observer |
| int AiFunc::GetInvadeTriggerRegionCategory | ( | int | p1 | ) |
Does nothing.
| p1 |
| int AiFunc::GetInvadeTriggerRegionCategoryNum | ( | ) |
Does nothing.
| int AiFunc::GetLadderActState | ( | TARGET | target | ) |
Returns the target's ladder state.
-1 = Not on
0 = Enter from bottom 1 = Enter from top 2 = Climbing, left hand from bottom to top 3 = Climbing, right hand from bottom to top 4 = Descending, right hand from top to bottom 5 = Descending, left hand from top to bottom 6 = Leave from top 7 = Leave from bottom 8 = Idling on ladder, right hand on top 9 = Idling on ladder, left hand on top 10 = Attack up, right hand on top 11 = Attack up, left hand on top 12 = Attack down, right hand on top 13 = Attack down, left hand on top 14 = Sliding start 16 = Sliding stop 18 = Sliding 20 = Sliding reached bottom 21 = Hit flinch 22 = Hit hanging on.
| target | target |
| int AiFunc::GetLadderDirMove | ( | int | p1 | ) |
Retruns 1 if the ladder path is upwards, -1 if downwards.
| p1 | unused |
| int AiFunc::GetLatestAttackedDir | ( | ) |
Returns the atkDir_forSfx value of the last attack the AI detected.
| int AiFunc::GetLatestSoundBehaviorID | ( | ) |
Returns the last detected sound's (AiSoundParam) soundBehaviorId if its rank is "behavior" (7).
| int AiFunc::GetLatestSoundTargetID | ( | ) |
Returns the last detected sound's param id.
| AI_SOUND_RANK AiFunc::GetLatestSoundTargetRank | ( | ) |
Returns the last detected sound's rank.
| int AiFunc::GetLeaveTriggerRegionCategory | ( | int | p1 | ) |
Does nothing.
| p1 |
| int AiFunc::GetLeaveTriggerRegionCategoryNum | ( | ) |
Does nothing.
| int AiFunc::GetMagicCategory | ( | int | magicId | ) |
Returns the given magic's ezStateBehaviorType (0 = sorcery, 1 = incantation, 2 = pyromancy, 3 = vow type).
| magicId | magic param id |
| int AiFunc::GetMapHitRadius | ( | int | target | ) |
Returns the target's map hit radius (often simply called hitRadius in places like DSMS).
| target | target |
| float AiFunc::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.
| target | line origin |
| directionFromTarget | line direction |
| maxDistance | line length |
| float AiFunc::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.
| target | line origin |
| angle | line direction offset, clockwise |
| maxDistance | distance until the line ends |
| spatialDirectionStart | line starting direction |
| int AiFunc::GetMovePointActionId | ( | int | pointIndex | ) |
| pointIndex |
| float AiFunc::GetMovePointEffectRange | ( | ) |
| int AiFunc::GetMovePointNumber | ( | ) |
| int AiFunc::GetMovePointType | ( | ) |
| int AiFunc::GetMp | ( | TARGET | target | ) |
Returns the target's fp.
| target | target |
| int AiFunc::GetMsbPartsIdx | ( | ) |
Does nothing.
| int AiFunc::GetMyBlockID | ( | ) |
Does nothing.
| float AiFunc::GetNPCActProb | ( | int | actId | ) |
Returns the probability of the given act.
| actId | act id as defined by row 1 in NpcAiBehaviorProbability |
| int AiFunc::GetNpcThinkParamID | ( | ) |
Returns the character's NpcThinkParam id.
| float AiFunc::GetNumber | ( | int | index | ) |
Returns the number stored at the given index (0-63)
| index | index |
| int AiFunc::GetNumFriend | ( | float | distance | ) |
Returns the number of characters with friendly team type towards the character within the given distance.
| distance | max search distance |
| float AiFunc::GetObjBreakRate | ( | unsigned int | objId | ) |
| objId |
| float AiFunc::GetOffsetY | ( | TARGET | target | ) |
Returns the target's hitYOffset, the offset between the position (on the ground) and the character's actual position usually used for flying characters but not always (for example bats have 0.8).
| target | target |
| float AiFunc::GetOriginDist | ( | TARGET | target | ) |
Returns the distance to the target without taking into account hit capsule, meaning the distance to their exact physics position.
| target | target |
| int AiFunc::GetPartsDmg | ( | int | p1 | ) |
Does nothing.
| p1 |
| int AiFunc::GetPathResult | ( | ) |
Returns 0 if mid pathing, otherwise -1.
| AiPlatoonCommand * AiFunc::GetPlatoonCommand | ( | ) |
Returns the AI's platoon command object, if there is none return a default empty platoon command object.
| int AiFunc::GetPlatoonMemberNum | ( | ) |
Returns the amount of members/ais in the AI's platoon.
| int AiFunc::GetPlatoonRanking | ( | ) |
Does nothing.
| PLATOON_STATE AiFunc::GetPlatoonState | ( | ) |
Returns AI's platoon's state, if there is none then -1.
| int AiFunc::GetPrevMovePointNumber | ( | ) |
| AI_TARGET_STATE AiFunc::GetPrevTargetState | ( | ) |
Returns the AI's previous target-state. In what state is the AI in in regards to targeting/searching for target.
| float AiFunc::GetRandam_Float | ( | float | min, |
| float | max ) |
Returns a random float between the given bounds, uniform distribution, min inclusive max exclusive. = [0-1) * (max - min) + min.
| min | lower bound |
| max | upper bound |
| int AiFunc::GetRandam_Int | ( | int | min, |
| int | max ) |
Returns a random integer between the given bounds, inclusive. If min > max or min < 0 then behavior is poorly defined. = (int)([0-1) * (max - min + 1.0) + min) The casting to int as opposed to floor will make negative floats round upwards.
| min | lower bound |
| max | upper bound |
| float AiFunc::GetRelativeAngleFromTarget | ( | TARGET | target | ) |
Returns the angle from the target's front to the character, clockwise.
| target | target to measure from |
| float AiFunc::GetRemainingAttackCoolTime | ( | int | animationId | ) |
Returns the difference between the cooldown time set for the given animation and the time lapsed since its last usage, if it hasn't been used yet then 0. Animation ID offset is automatically added and does count as a different animation for cooldowns.
| animationId | animation to check |
| int AiFunc::GetReplanningGoalAction | ( | ) |
Returns NpcThinkParam's goalAction_ToCautionImportant if AI targeting search is currently "important", otherwise goalAction_ToCaution. Unused in ER where they instead directly get the params with GetExcelParam.
| int AiFunc::GetReplanningGoalID | ( | ) |
Returns NpcThinkParam's goalAction_ToCautionImportant if AI targeting search is currently "important", otherwise goalAction_ToCaution. Unused in ER where they instead directly get the params with GetExcelParam.
| unsigned int AiFunc::GetRideObjEntityID | ( | ) |
Returns map object that entity rides?
| float AiFunc::GetSA | ( | TARGET | target | ) |
Returns the target's poise rounded down.
| target | target |
| int AiFunc::GetSp | ( | TARGET | target | ) |
Returns the target's stamina.
| target | target |
| bool AiFunc::GetSpecialEffectActivateInterruptId | ( | int | specialEffectId | ) |
Returns true if the given special effect has been applied on any target that is being observed for the given special effect id, meaning this has been observed this frame. If the AI observes the same special effect on multiple targets, this will be true on activation regardless of the target.
| specialEffectId | special effect id to check |
| int AiFunc::GetSpecialEffectActivateInterruptNum | ( | ) |
Returns the amount of special effect observes that are in interrupt activate state. Meaning the amount of special effect observes that have been activated this frame. the amount of special effect observes that are in interrupt activate state.
| int AiFunc::GetSpecialEffectActivateInterruptType | ( | int | interruptsActivatedUntilReturn | ) |
Returns the special effect id of the nth special effect observe that is in interrupt activate state. I would not recommend using this method as the order of the special effect observe nodes depends on the order you added them which on many cases can be subject to change over development.
| interruptsActivatedUntilReturn | the number of special effect observes in an activated state to skip before returning the observe's special effect id |
| bool AiFunc::GetSpecialEffectDeActivateInterruptId | ( | int | specialEffectId | ) |
Returns true if the given special effect has worn off on any target that is being observed for the given special effect id, meaning this has been observed this frame.
| specialEffectId | special effect id to check |
| int AiFunc::GetSpecialEffectInactivateInterruptNum | ( | ) |
Returns the amount of special effect observes that are in interrupt deactivate state. Meaning the amount of special effect observes that have been deactivated this frame.
| int AiFunc::GetSpecialEffectInactivateInterruptType | ( | int | interruptsDeactivatedUntilReturn | ) |
Returns the special effect id of the nth special effect observe that is in interrupt deactivate state. I would not recommend using this method as the order of the special effect observe nodes depends on the order you added them which on many cases can be subject to change over development.
| interruptsDeactivatedUntilReturn | the number of special effect observes in a deactivated state to skip before returning the observe's special effect id |
| float AiFunc::GetStringIndexedArray | ( | char * | arrayName, |
| int | index ) |
Returns the number that is stored in the given array's given index. The structure of these is questionable, having 1 big (1024) float array buffer where each "array" is a pointer to somewhere in this buffer.
| arrayName | arrayName array to use |
| index | index in array |
| float AiFunc::GetStringIndexedNumber | ( | char * | variableName | ) |
Returns the number that has been set for the given string.
| variableName | variable name whose value to return |
| float AiFunc::GetTargetApproachSpeed | ( | ) |
Does nothing.
| float AiFunc::GetTargetSARate | ( | TARGET | target | ) |
Returns the target's poise to max poise ratio.
| target | target |
| int AiFunc::GetTeamCommand | ( | ) |
Does nothing.
| unsigned int AiFunc::GetTeamDefeatEntityId | ( | ) |
| float AiFunc::GetTeamIdTimer | ( | int | p1 | ) |
Does nothing.
| p1 |
| int AiFunc::GetTeamInterruptCommand | ( | ) |
Does nothing.
| float AiFunc::GetTeamNumber | ( | int | p1 | ) |
Does nothing.
| p1 | 0 |
| float AiFunc::GetTeamOrder | ( | ORDER_TYPE | orderType | ) |
Returns the AI's role type/call help type (?).
| orderType | orderType get Role or CallHelp |
| int AiFunc::GetTeamRecordCount | ( | int | p1, |
| TARGET | target, | ||
| float | p3 ) |
| p1 | |
| target | |
| p3 |
Returns the target's team type.
| target | target |
| float AiFunc::GetTimer | ( | int | index | ) |
Returns the given timer's remaining time.
| index | timer index |
| GoalFunc * AiFunc::GetTopGoal | ( | ) |
Returns the AI's top goal.
| float AiFunc::GetToTargetAngle | ( | TARGET | target | ) |
Returns the angle (-180, 180) from the character's front to the target, clockwise.
| target | target |
| int AiFunc::GetTouchBreakableObjectDefense | ( | ) |
Returns the defense/health of the object the AI is touching, used to determine if the AI is strong enough to break the object (see top_goal.lua).
| AI_DIR_TYPE AiFunc::GetTurnAroundOptimizedDirection | ( | TARGET | target, |
| AI_DIR_TYPE | direction ) |
Returns AI_DIR_TYPE_L if the given direction from the target is pointing beyond the AI, otherwise AI_DIR_TYPE_R. Let the AI be at (0, 0, 0) If the vector "targetPos + directionFromTargetForwardsNormal * 10" is closer to "selfNormalForwards" than "selfNormalBackwards" then the direction is right, otherwise left.
| target | target |
| direction | direction |
| int AiFunc::GetWeaponBehaviorVarID | ( | int | equipWeaponId | ) |
Returns the behaviorVariationId of the given EquipParamWeapon.
| equipWeaponId | EquipParamWeapon id |
| int AiFunc::GetWeaponBothHandState | ( | TARGET | target | ) |
If the target is 2 handing return the arm that is doing so, otherwise return -1.
| target | target |
| AI_TARGET_WEIGHT_TYPE AiFunc::GetWeightType | ( | TARGET | target | ) |
Returns the weight type of the target.
| target | target |
| int AiFunc::GetWepCategoryNo | ( | ARM | arm | ) |
Returns the wepmotionCategory of the weapon in the character's given arm.
| arm | arm |
Returns the left hand's AI weapon's category. 1 = Torch 2 = Bow 3 = Crossbow 4 = Staff 0 = Other.
| target | target |
Returns the right hand's AI weapon's category. 1 = Torch 2 = Bow 3 = Crossbow 4 = Staff 0 = Other.
| target | target |
| int AiFunc::GetWepSpAtkCategoryNo | ( | ARM | arm | ) |
Returns the spAtkcategory of the weapon in the character's given arm.
| arm | arm |
| bool AiFunc::HasConnectionReserve | ( | ) |
Does nothing.
| bool AiFunc::HasGoal | ( | int | goalId | ) |
Returns true if the AI has the given goal in queue (regardless of child depth), otherwise false.
| goalId | goal to check for |
| bool AiFunc::HasParalysis | ( | TARGET | target | ) |
Returns true if the target has a special effect with stateInfo 32 (Middle of Paralysis).
| target | target |
| bool AiFunc::HasPathResult | ( | ) |
Returns true if the AI has results for the current pathing attempt, otherwise false.
| bool AiFunc::HasSpecialEffectAttribute | ( | TARGET | target, |
| int | stateInfo ) |
Returns true if the target has a special effect with the given stateInfo, otherwise false.
| target | target |
| stateInfo | state info to check for |
| bool AiFunc::HasSpecialEffectCategory | ( | TARGET | target, |
| int | category ) |
Returns true if the target has a special effect with the given category, otherwise false.
| target | target |
| category | category to check for |
| bool AiFunc::HasSpecialEffectId | ( | TARGET | target, |
| int | specialEffectId ) |
Returns true if the target has a special effect with the given id, otherwise false.
| target | target |
| specialEffectId | special effect id to check for |
| bool AiFunc::HasTopSubgoal | ( | ) |
Returns true if the top goal has a subgoal, otherwise false.
| bool AiFunc::IsActiveGoal | ( | int | goalId | ) |
Returns true if the given goal is currently active/running, otherwise false.
| goalId | goalId goal to check for |
| bool AiFunc::IsAiJumping | ( | ) |
Returns true if the character is mid/ending a jump, otherwise false.
| bool AiFunc::IsAiJumpProcessing | ( | ) |
Returns true if the character is: about to start/mid/ending a jump, otherwise false.
| bool AiFunc::IsApparentAnyFriend | ( | ) |
Returns true if the AI has a friend in its targeting system (TARGET_FRI_0 has a target), otherwise false.
| bool AiFunc::IsApparentDeath | ( | ) |
Returns true if the character is dead/dying (player only?), otherwise false.
| bool AiFunc::IsArrived | ( | ) |
Returns true if arrived to the position specified by current pathing, otherwise false.
| bool AiFunc::IsBattleState | ( | ) |
Returns true if in battle state (usually battle goals). Equivalent to GetCurrTargetState() == AI_TARGET_STATE__BATTLE.
| bool AiFunc::IsBothHandMode | ( | TARGET | target | ) |
Returns true if the target is two handing, otherwise false.
| target | target |
| bool AiFunc::IsCautionState | ( | ) |
Returns true if in caution state (usually represented by slowly walking around a sound/last remembered target's position). Equivalent to GetCurrTargetState() == AI_TARGET_STATE__CAUTION.
| bool AiFunc::IsChangeState | ( | ) |
Returns true if the previous state is different from the current state.
| bool AiFunc::IsChrAroundLadderEdge | ( | float | distance, |
| int | ladderDmyId ) |
Returns true if the character is within the given distance to the given ladder edge, otherwise false.
| distance | max distance |
| ladderDmyId | 191 for top of ladder, 192 for bottom |
| bool AiFunc::IsClanLeader | ( | ) |
Does nothing.
| bool AiFunc::IsEnableCancelAttack | ( | ) |
Returns true if the character has EnableCancelAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 86 known as "End if AI Attack Queued", otherwise false.
| bool AiFunc::IsEnableCancelAttack_CheckAttackNo | ( | int | actionRequestId | ) |
Returns true if the AI's current request equals the given request id and the character has EnableCancelAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 86 known as "End if AI Attack Queued", otherwise false.
| actionRequestId | ez action request id that the current request id must match |
| bool AiFunc::IsEnableCancelMove | ( | ) |
Returns true if the character has EnableCancelMove enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 78 known as "Cancel - AI Move", otherwise false.
| bool AiFunc::IsEnableCancelMove_CheckAttackNo | ( | int | actionRequestId | ) |
Returns true if the AI's current request equals the given request id and the character has EnableCancelMove enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 78 known as "Cancel - AI Move", otherwise false.
| actionRequestId | ez action request id that the current request id must match |
| bool AiFunc::IsEnableCancelStep | ( | ) |
Returns true if the character has EnableCancelStep enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 79 known as "Cancel - AI Step", otherwise false.
| bool AiFunc::IsEnableCancelStep_CheckAttackNo | ( | int | actionRequestId | ) |
Returns true if the AI's current request equals the given request id and the character has EnableCancelStep enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 79 known as "Cancel - AI Step", otherwise false.
| actionRequestId | ez action request id that the current request id must match |
| bool AiFunc::IsEnableComboAttack | ( | ) |
Returns true if the character has EnableComboAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 23 known as "Cancel - AI ComboAttack", otherwise false.
| bool AiFunc::IsEnableComboAttack_CheckAttackNo | ( | int | actionRequestId | ) |
Returns true if the AI's current request equals the given request id and the character has EnableComboAttack enabled, enabled through TAE 0 "ChrActionFlag"/"JumpTable" 23 known as "Cancel - AI ComboAttack", otherwise false.
| actionRequestId | ez action request id that the current request id must match |
| bool AiFunc::IsEnableNewLadderAct | ( | ) |
Does nothing.
| bool AiFunc::IsEventFlag | ( | unsigned int | eventFlagId | ) |
Returns the given event flag's value.
| eventFlagId | eventFlagId event flag to check |
| bool AiFunc::IsEventRequestReceived | ( | int | slot | ) |
Returns true if there is an event request in the given slot, otherwise false. See GetEventRequest(int)
| slot | slot |
| bool AiFunc::IsExecChangeStateAction | ( | ) |
Returns ttrue if the current state isn't AI_TARGET_STATE__CAUTION or if the last state is AI_TARGET_STATE__NONE.
| bool AiFunc::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. Width is hit radius of the target.
| target | line origin and width |
| angle | line direction offset, clockwise |
| maxDistance | line length |
| spatialDirectionStart | line starting direction |
| bool AiFunc::IsExistChrSelfToTarget | ( | TARGET | target | ) |
Returns true if there exists a character on the line between self and the target, otherwise false.
| target | target to measure to |
| bool AiFunc::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. Width is hit radius of the target.
| target | line origin and width |
| directionFromTarget | line direction |
| maxDistance | line length |
| bool AiFunc::IsExistReqObjAct | ( | ) |
| bool AiFunc::IsExistTargetTeamDefeat | ( | ) |
Equivalent to GetTeamDefeatEntityId() != -1.
| bool AiFunc::IsExistTeamNumber | ( | ) |
Does nothing.
| bool AiFunc::IsExistTeamRecord | ( | int | recordId | ) |
Returns true if the given team record exists, otherwise false.
| recordId | recordId |
| bool AiFunc::IsFindState | ( | ) |
Does nothing.
| bool AiFunc::IsFinishAttack | ( | ) |
Returns true if attack is over.
| bool AiFunc::IsFinishAttack_CheckAttackNo | ( | int | actionRequestId | ) |
| actionRequestId | ez action request id that the current request id must match |
| bool AiFunc::IsFinishAttackCoolTime | ( | int | animationId | ) |
Returns true if the cooldown time set for the given animation is smaller than the time lapsed since its last usage, otherwise false.
| animationId | animation to check |
| bool AiFunc::IsFinishObjAct | ( | ) |
| bool AiFunc::IsFinishTimer | ( | int | index | ) |
Returns true if the given timer's remaining time is less than or equal to 0, otherwise false.
| index | timer index |
| bool AiFunc::IsFlyState | ( | ) |
Returns the character's fly state.
| bool AiFunc::IsForceBattleGoal | ( | ) |
Returns force battle goal. Set manually by AI functions. If true then battle goal will be priortized (see _COMMON_SetBattleActLogic in common_logic_func.lua)
| bool AiFunc::IsForgettingMemoryTarget | ( | ) |
Returns true if the AI's targeting system's memory target is being forgotten, otherwise false. For example the time until forgetting an enemy memory is 30 seconds from losing your target.
| bool AiFunc::IsForgettingSoundTarget | ( | ) |
Returns true if the AI's targeting system's sound target is being forgotten, otherwise false. For example the time until forgetting an enemy sound is 30 seconds from hearing it.
| bool AiFunc::IsForgettingTopSearchTarget | ( | ) |
| bool AiFunc::IsGotHome | ( | ) |
Returns true if the AI arrived to its home location using the path described by BackToHome goal, otherwise false. This value starts as false, but once true it stays so until the AI is no longer doing regular route actions.
| bool AiFunc::IsHitAttack | ( | ) |
Returns true if the character hit an attack within the current goal, otherwise false. Does not matter which character the AI hits, iframes prevent this from activating.
| bool AiFunc::IsHoleFlag | ( | TARGET | target, |
| AI_DIR_TYPE | directionFromTarget, | ||
| float | distance ) |
| target | line origin |
| directionFromTarget | line direction |
| distance | line length |
| bool AiFunc::IsHorseCall | ( | ) |
Returns true if the local player has SpEffect 3039, otherwise false.
| bool AiFunc::IsHoverType | ( | ) |
| bool AiFunc::IsHugeEnemy | ( | ) |
Returns true if the character's NpcParam's chrHitGroupAndNavimesh is 5, otherwise false.
| bool AiFunc::IsInsideBattleArea | ( | ) |
| bool AiFunc::IsInsideMovePoint | ( | ) |
Returns true if the character is near its move point, otherwise false. Default distance is 0.5, can vary based on MsbPoint data?
| bool AiFunc::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, otherwise false.
| target | line origin |
| direction | line direction |
| length | line length |
| regionId | event region id |
| bool AiFunc::IsInsideObserve | ( | int | observeSlot | ) |
Returns true if the given observer's target is inside the observer's area, otherwise false.
| observeSlot | area observer slot |
| bool AiFunc::IsInsideTarget | ( | TARGET | target, |
| AI_DIR_TYPE | directionStart, | ||
| float | angleWidth ) |
Returns true if the given target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite.
| target | target to check |
| directionStart | direction from the character's front with which the circular sector is aligned |
| angleWidth | angle width of the circular sector |
| bool AiFunc::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. The origin of the spherical sector is the character. The radius of the spherical sector is infinite.
| target | target to check |
| directionStart | direction from the character's front with which the spherical sector is aligned |
| angleWidth | angle width of the spherical sector |
| angleHeight | angle height of the spherical sector |
| bool AiFunc::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.
| targetOrigin | origin of the spherical sector |
| target | target to check |
| directionStart | direction from the character's front with which the spherical sector is aligned |
| angleWidth | angle width of the spherical sector |
| angleHeight | angle height of the spherical sector |
| distance | radius of the spherical sector |
| bool AiFunc::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.
| targetOrigin | targetOrigin origin of the circular sector |
| target | target to check |
| directionStart | direction from the character's front with which the circular sector is aligned |
| angleWidth | angle width of the circular sector |
| distance | radius of the circular sector |
| bool AiFunc::IsInsideTargetRegion | ( | TARGET | target, |
| unsigned int | regionId ) |
Returns true if the given target is within the given region, otherwise false.
| target | target to check |
| regionId | event region id |
| bool AiFunc::IsInterupt | ( | INTERUPT | interruptType | ) |
Returns true if the given interrupt type is currently active. List of the interrupt types and their activation conditions: INTERUPT_FindEnemy - Activates INTERUPT_FindAttack - Activates when a target attacks, called through HKS script, act(143, 0). INTERUPT_Damaged - Activates when hit by a typical attack / hitbox(e.g not poison). INTERUPT_Damaged_Stranger - Activates when hit by a typical attack / hitbox(e.g not poison) whose source isn't in the AI's targeting system. INTERUPT_SuccessGuard - Activates when hit by a typical attack / hitbox(e.g not poison) that caused a successful guard(not guard broken, while guarding in general ? ). Exclusive with INTERUPT_Damaged, INTERUPT_AIGuardBroken. INTERUPT_MissSwing - Activates when a target missed a swing(DS1 only with its unique miss animations). INTERUPT_GuardBegin - Activates when a target begins guarding. INTERUPT_GuardFinish - Activates when a target finishes guarding. INTERUPT_GuardBreak - Activates when a target is guard broken. INTERUPT_Shoot - Activates when a target shoots a bullet, bullets with no damage that have isAiInterruptShootNoDamageBullet row disabled will not activate this interrupt. INTERUPT_UseItem - Activates when a target uses an item, called through HKS script, act(143, 1). INTERUPT_EventRequest - Activates when "RequestCharacterAICommand" (2004[17]) is called in an event script(EMEVD).Interrupt info functions: GetEventRequest. INTERUPT_AIGuardBroken - Activates when hit by a typical attack / hitbox(e.g not poison) that caused a guard break (while guard broken in general ? ).Exclusive with INTERUPT_Damaged, INTERUPT_SuccessGuard, INTERUPT_AIReboundByOpponentGuard. INTERUPT_AIReboundByOpponentGuard - Activates when hit by a typical attack / hitbox(e.g not poison) that caused a successful guard(not guard broken, while guarding in general ? ) and caused the opponent to "rebound" (weapon / arm recoiled back).Exclusive with INTERUPT_Damaged, INTERUPT_AIGuardBroken. INTERUPT_CANNOT_MOVE_DisableInterupt - Activates INTERUPT_UnfavorableAttack - Activates at the end of an attacking goal if the animation is marked as UnfavorableAttack by EnableUnfavorableAttackCheck and the path from the ai to the target is obstructed.This happens in CSGoalCommonAttack::Update.
| interruptType | interruptType interrupt type to check for |
| bool AiFunc::IsLadderAct | ( | TARGET | target | ) |
Returns true if the given target is on a ladder, otherwise false. Equivalent to GetLadderActState(TARGET) != -1.
| target | target |
| bool AiFunc::IsLand | ( | ) |
Returns true if the character is touching the ground, otherwise false.
| bool AiFunc::IsLocalPlayer | ( | ) |
Returns true if the character is the local player (main player), otherwise false.
| bool AiFunc::IsLookToTarget | ( | ) |
Returns true if the turning target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. The starting direction of the circular sector is the character's front. Meaning of angle width to each side: (180 = full circle, 90 = semicircle, etc.). Turning target can be seen as the "main target", it is referenced/set with many of the goals (using TurnTo(TARGET)). Equivalent to IsLookToTarget(10)
| bool AiFunc::IsLookToTarget | ( | float | angleWidth | ) |
Returns true if the turning target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. The starting direction of the circular sector is the character's front. Meaning of angle width to each side: (180 = full circle, 90 = semicircle, etc.) Turning target can be seen as the "main target", it is referenced/set with many of the goals (using TurnTo(TARGET)).
| angleWidth | angle width of the circular sector, to each side |
| bool AiFunc::IsLookToTarget | ( | TARGET | target, |
| float | angleWidth ) |
Returns true if the given target is within the given circular sector, otherwise false. The origin of the circular sector is the character. The radius of the circular sector is infinite. The starting direction of the circular sector is the character's front. Meaning of angle width to each side: (180 = full circle, 90 = semicircle, etc.)
| target | target |
| angleWidth | angle width of the circular sector, to each side |
| bool AiFunc::IsMemoryState | ( | ) |
Returns true if in memory state, otherwise false. Equivalent to GetCurrTargetState() == AI_TARGET_STATE__MEMORY.
| bool AiFunc::IsNpcPlayer | ( | ) |
Returns true if the character is a player npc, otherwise false.
| bool AiFunc::IsOmissionLevel30 | ( | ) |
Returns true if the character is at omission level 30. Used to determine how much effort the AI should make in certain calculations and operations, as the character is far/offscreen for this omission level.
| bool AiFunc::IsOnGround_FlyRoute | ( | ) |
Does nothing.
| bool AiFunc::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?
| target | line origin |
| directionFromTarget | line direction |
| maxDistance | line length |
| p4 | unknown |
| bool AiFunc::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?
| target | line origin |
| directionFromTarget | line direction |
| maxDistance | line length |
| bool AiFunc::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? Identical to IsOnNearMeshByPos(TARGET, AI_DIR_TYPE, float).
| target | |
| directionFromTarget | |
| maxDistance |
| bool AiFunc::IsOnRideCostMesh | ( | ) |
| bool AiFunc::IsOptimalAttackDist | ( | ) |
Does nothing.
| bool AiFunc::IsOptimalAttackRangeH | ( | ) |
Does nothing.
| bool AiFunc::IsOptimalAttackRangeV | ( | ) |
Does nothing.
| bool AiFunc::IsPlatoonLeader | ( | ) |
Retruns true if the AI is the leader of its team, otherwise false.
| bool AiFunc::IsProcessingFadeWarpToInitPos | ( | ) |
Returns true if the character is currently fade warping, otherwise false. Set by RequestFadeWarpToInitPos and used in the similary named goal.
| bool AiFunc::IsRideEdgeFlag | ( | TARGET | target | ) |
| target |
| bool AiFunc::IsRideLargeSpaceFlag | ( | TARGET | target | ) |
| target |
| bool AiFunc::IsRiding | ( | TARGET | target | ) |
Returns true if the target is riding, otherwise false.
| target | target |
| bool AiFunc::IsRouteEnd | ( | ) |
Returns true if the AI finished its route, otherwise false. This stays true until the AI reaches the start of its route cycle again. If the AI has no route this returns true.
| bool AiFunc::IsSearchHighState | ( | ) |
Returns true if in search high state, also known as "search2". Equivalent to GetCurrTargetState() == AI_TARGET_STATE__SEARCH2.
| bool AiFunc::IsSearchLowState | ( | ) |
Returns true if in search low state, also known as "search". Equivalent to GetCurrTargetState() == AI_TARGET_STATE__SEARCH.
| bool AiFunc::IsSearchState | ( | ) |
Returns true if in search low state, also known as "search". Equivalent to GetCurrTargetState() == AI_TARGET_STATE__SEARCH Equivalent to IsSearchLowState()
| bool AiFunc::IsSearchTarget | ( | TARGET | target | ) |
Returns true if the given target can be accessed, otherwise false. For example if IsSearchTarget(TARGET_ENE_0) returns false, then the AI has no knowledge of TARGET_ENE_0.
| target | target |
| bool AiFunc::IsSleepSpecialEffectId | ( | TARGET | target, |
| int | specialEffectId ) |
Returns true if the given target has the given special effect id but the effect is incompatible via vow type, otherwise false.
| target | target |
| specialEffectId | special effect id to check |
| bool AiFunc::IsStartAttack | ( | ) |
Returns true if currently executing an animation requested by the AI, otherwise false. (Read the name as "Has started the attack yet?" instead of "Is at the beginning of an attack?").
| bool AiFunc::IsStartAttack_CheckAttackNo | ( | int | actionRequestId | ) |
Returns true if currently executing the given animation as requested by the AI, otherwise false. (Read the name as "Has started the attack yet?" instead of "Is at the beginning of an attack?").
| actionRequestId | ez action request id that the current request id must match |
| bool AiFunc::IsTargetGuard | ( | TARGET | target | ) |
Returns true if the given target is guarding, otherwise false. Given from ChrActionFlagModule.
| target | target |
| bool AiFunc::IsTargetOutOfAngleInterruptSlot | ( | int | angleObserveSlot | ) |
Dose nothing in ER. Previously used along with GoalFunc function SetTargetAngle to determine whether the target is out of the angle width.
| angleObserveSlot | angle observer slot |
| bool AiFunc::IsTargetOutOfRangeInterruptSlot | ( | int | rangeObserveSlot | ) |
Does nothing in ER. Previously used along with GoalFunc function SetTargetRange to determine whether the target is out of the distance range.
| rangeObserveSlot | range observer slot |
| bool AiFunc::IsTargetWeakSoulCoin | ( | int | p1 | ) |
Does nothing.
| p1 |
| bool AiFunc::IsTeamCommandExist | ( | ) |
Does nothing.
| bool AiFunc::IsTeamLeader | ( | ) |
Does nothing.
| bool AiFunc::IsThrowing | ( | ) |
Returns true if the character is in the middle of a throw (e.g grab, riposte, etc.)
| bool AiFunc::IsTouchBreakableObject | ( | ) |
Returns true if the character is touching a breakable object, otherwise false. Used to determine if the enemy needs to break an object around them to get free.
| bool AiFunc::IsTrueLand | ( | ) |
Returns true if the character is standing on even, non sloped ground, otherwise false.
| bool AiFunc::IsUpdateFirstAnimation | ( | ) |
| bool AiFunc::IsUseFlyRoute | ( | ) |
Does nothing.
| bool AiFunc::IsValidPlatoon | ( | ) |
Returns true if the AI is part of a team/platoon, otherwise false.
| bool AiFunc::IsVisibleCurrTarget | ( | ) |
Returns true if the current target (as referenced by the AI's target search system) is visible to the AI (that is, in the visibility cone, unobstructed), otherwise false. It seems sound targets are always visible?
| bool AiFunc::IsVisibleTarget | ( | TARGET | target | ) |
Returns true if the current target is visible to the AI, or the given target is one of the speicifed options, otherwise false. This function is identical to IsVisibleCurrTarget() beyond the following target exceptions that always return true: TARGET_NONE, TARGET_SELF, TARGET_EVENT, TARGET_LOCALPLAYER, TARGET_LowHp_Friend, TARGET_HOSTPLAYER, target > 133.
| target |
| void AiFunc::KickEvent | ( | int | eventIndex | ) |
| eventIndex | door 0, lever 1? |
| bool AiFunc::KickLuaCall | ( | int | p1, |
| int | p2, | ||
| int | p3 ) |
Does nothing.
| p1 | |
| p2 | |
| p3 |
| bool AiFunc::LastPathFindingIsFailed | ( | ) |
Does nothing.
| bool AiFunc::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, If we center and align our axes with the target the resulting position would be: result = direction vector from "self+angleStart" to "target" result = (result.x * cos(angle), result.y * sin(angle), result.z * -cos(angle))
| target | target |
| angleStart | direction offset |
| angle | angle direction offset, clockwise |
| spatialDirectionStart | starting direction |
| int AiFunc::Mod | ( | int | dividend, |
| int | divisor ) |
Returns dividend % divisor.
| dividend | |
| divisor |
| bool AiFunc::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.
| moveTarget | initial position origin and direction alignment |
| directionFromTarget | direction from the target's front with which the spherical sector is aligned |
| stopDistance | length from the origin |
| isWalk | is walk or run |
| directionalDistance |
| bool AiFunc::MoveToEventPoint | ( | unsigned int | regionId, |
| int | p2, | ||
| float | p3, | ||
| bool | isWalk ) |
Use pathing to move towards the given event region.
| regionId | point to move to |
| p2 | unused |
| p3 | unused |
| isWalk | is walk or run |
| void AiFunc::NotifyBuddyUnsummon | ( | ) |
| void AiFunc::OnEndLadderGoal | ( | ) |
Used on the termination of the LadderMove goal to clear some data. Does nothing by itself.
| void AiFunc::OnStartLadderGoal | ( | ) |
Used on the activation of the LadderMove goal to clear some data. Does nothing by itself.
| void AiFunc::OnUpdateLadderGoal | ( | ) |
Used on the update of the LadderMove goal to update both ladder specific and pathing data.
| void AiFunc::PrintText | ( | char * | p1 | ) |
Does nothing.
| p1 |
| float AiFunc::RegistAttackTimeInterval | ( | int | animationId, |
| float | cooldown ) |
Registers a cooldown to the given animationId. Animation offset is automatically added and does count as a different animation for cooldowns.
| animationId | animation to register cooldown to |
| cooldown | the cooldown in seconds |
| bool AiFunc::RegisterBoidsUnit | ( | int | p1 | ) |
Does nothing.
| p1 |
| bool AiFunc::RegisterTriggerRegion | ( | int | p1, |
| int | p2, | ||
| float | p3, | ||
| float | p4, | ||
| int | p5, | ||
| int | p6, | ||
| float | p7 ) |
Does nothing.
| p1 | |
| p2 | |
| p3 | |
| p4 | |
| p5 | |
| p6 | |
| p7 |
| bool AiFunc::RegisterTriggerRegionCylinder | ( | int | p1, |
| int | p2, | ||
| float | p3, | ||
| float | p4, | ||
| float | p5, | ||
| int | p6, | ||
| int | p7, | ||
| float | p8 ) |
Does nothing.
| p1 | |
| p2 | |
| p3 | |
| p4 | |
| p5 | |
| p6 | |
| p7 | |
| p8 |
| bool AiFunc::RegisterTriggerRegionObserver | ( | int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::RemoveBoidsUnit | ( | int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::RemoveTriggerRegionObserver | ( | int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::Replaning | ( | ) |
Resets/clears/reintializes a signifcant amount of data from the AI (e.g all observers, goals (with termination), walking type, re-executing goal logic funcs).
| void AiFunc::ReqPlatoonState | ( | PLATOON_STATE | platoonState | ) |
Attempt to set platoon state?
| platoonState |
| void AiFunc::ReqTeam_Support | ( | float | maxDistance | ) |
Call for help for teammates within range.
| maxDistance | maximum distance for allies search |
| void AiFunc::RequestChangeFlyState | ( | bool | enable | ) |
Set fly state.
| enable | enable |
| void AiFunc::RequestEmergencyQuickTurn | ( | ) |
Requests emergency turn, possibly forcing a turn animation that otherwise wouldn't have happened because the turn angle was too small. See usage in c9997.hks, env(330).
| void AiFunc::RequestFadeWarpToInitPos | ( | float | fadeTime, |
| float | p2 ) |
Requests to warp to init pos while fading.
| fadeTime | time to fully fade |
| p2 | unknown, common_logic_func.lua uses 4 |
| void AiFunc::RequestLadderWait | ( | ) |
Requests LadderWait, triggering the same named interrupt which is used in top_goal.lua.
| void AiFunc::RequestParallelMove | ( | ) |
Requests parallel move type. See usage in c9997.hks, env(327).
| bool AiFunc::ReserveObjAct | ( | int | objActIndex | ) |
| objActIndex |
| bool AiFunc::ReserveRide | ( | float | maxDistance | ) |
Attempts to find and reserve a ride target within the given distance.
| maxDistance | max valid distance between the character and a potential riding target |
| void AiFunc::ResetInitialPosition | ( | ) |
Sets the character's initial position to their current position.
| void AiFunc::ResetInitialPositionByEventRegion | ( | unsigned int | regionId | ) |
Sets the character's initial position to the given event region position.
| regionId | event region id |
| void AiFunc::ResetNPCActProb | ( | ) |
Resets all NPC act probabilities to 0.
| int AiFunc::SearchGetEnemyNumAround | ( | TARGET | target, |
| float | maxDistance ) |
Returns the number of enemies (of the AI, not the target) around the given target within the given distance.
| target | target location |
| maxDistance | circle radius |
| void AiFunc::SendTeamMemberMessage | ( | int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::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 point of the given line.
| targetOrigin | line origin |
| directionFromTarget | line direction |
| lineLength | line length |
| void AiFunc::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 point of the given line.
| targetOrigin | line origin |
| angle | line direction offset, clockwise |
| lineLength | line length |
| spatialDirectionStart | line starting direction |
| void AiFunc::SetAIPredictionMoveTargetSpecifyAngle | ( | float | p1, |
| float | angle, | ||
| float | lineLength ) |
SetAIPredictionMoveTargetSpecifyAngle(p1, angle, lineLength, 0)
| p1 | |
| angle | |
| lineLength |
| void AiFunc::SetAIPredictionMoveTargetSpecifyAngle | ( | float | p1, |
| float | angle, | ||
| float | lineLength, | ||
| float | p4 ) |
| p1 | |
| angle | |
| lineLength | |
| p4 |
| void AiFunc::SetAIPredictionMoveTargetSpecifyTargetDir | ( | float | predictionFactor, |
| int | directionFromEnemy, | ||
| float | lineLength, | ||
| float | p5 ) |
| predictionFactor | |
| directionFromEnemy | |
| lineLength | |
| p5 |
| void AiFunc::SetAllowTriggerNearObjAct | ( | ) |
Does nothing.
| void AiFunc::SetAttackRequest | ( | unsigned int | ezStateId | ) |
Request action. Animation offset is included automatically in this function.
| ezStateId | ezStateId action/animation id |
| void AiFunc::SetBoidsCohesionRange | ( | float | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::SetBoidsSearchConnectorRange | ( | float | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::SetBoidsSeparateRange | ( | float | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::SetBoidsSpeedRateRange | ( | float | p1, |
| float | p2 ) |
Does nothing.
| p1 | |
| p2 |
| void AiFunc::SetCurrentMovePointIndex | ( | int | pointIndex | ) |
Sets the point to move to to the one in the given index.
| pointIndex | point index |
| void AiFunc::SetEnableEndureCancel_forGoal | ( | ) |
| void AiFunc::SetEnableInterrupt_LookedTarget | ( | bool | enable | ) |
Enables/disables the interrupt "INTERUPT_LookedTarget".
| enable | enable |
| void AiFunc::SetEnableStabCounterCancel_forGoal | ( | ) |
| void AiFunc::SetEnableUsePath | ( | bool | enable | ) |
Use map patrol path?
| enable | enable |
| void AiFunc::SetEventFlag | ( | unsigned int | eventFlagId, |
| bool | value ) |
Sets the given flag to the given value.
| eventFlagId | event flag |
| value | value to set flag to |
| void AiFunc::SetEventMoveTarget | ( | unsigned int | regionId | ) |
Set POINT_EVENT to the given region.
| regionId | region to set POINT_EVENT to |
| void AiFunc::SetIsForceBattleGoal | ( | ) |
Sets IsForceBattleGoal() to true.
| void AiFunc::SetMoveAllDirection_LegWalk2And4 | ( | bool | enable | ) |
Allows the character to use all movement directions when moving. Overwritten by move left right only and move back to home.
| enable | enable |
| void AiFunc::SetMoveLROnly | ( | bool | enable | ) |
Forces the AI to only use left/right movement directions when moving.
| enable | enable |
| void AiFunc::SetNumber | ( | int | index, |
| float | value ) |
Store the given number in the given index.
| index | number index |
| value | value |
| void AiFunc::SetPassiveMoveModifier | ( | float | modifier | ) |
Sets a root motion factor in all directions for all animations.
| modifier |
| bool AiFunc::SetPosAngBy1stNearLadderDmyId | ( | int | p1 | ) |
| p1 |
| void AiFunc::SetRouteInfoByEntityId | ( | unsigned int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::SetStringIndexedArray | ( | char * | arrayName, |
| int | index, | ||
| float | value ) |
Sets the given number in the given array's given index. The structure of these is questionable, having 1 big (1024) float array buffer where each "array" is a pointer to somewhere in this buffer.
| arrayName | array to use |
| index | index in array |
| value | value |
| void AiFunc::SetStringIndexedNumber | ( | char * | variableName, |
| float | value ) |
Sets the given variable to the given value.
| variableName | variable to set |
| value | value |
| void AiFunc::SetSuperClimbingMode | ( | bool | enable | ) |
Enables super climbing mode for the character, increasing their ability to step up inclines. Character must be categorized as huge enemy and have a hit radius smaller than 5 to have an effect.
| enable | enable |
| void AiFunc::SetTeamNumber | ( | int | p1, |
| float | p2 ) |
Does nothing.
| p1 | |
| p2 |
| void AiFunc::SetTeamNumber | ( | int | p1, |
| float | p2, | ||
| float | p3 ) |
Does nothing.
| p1 | |
| p2 | |
| p3 |
| void AiFunc::SetTimer | ( | int | index, |
| float | value ) |
Sets the given timer to the given value. Timers constantly tick down until they reach 0.
| index | timer index (0-15) |
| value | time [seconds] |
| void AiFunc::SetTurnReferenceDirection | ( | TARGET | target | ) |
Store the direction to the given target's current position as the turn reference. The turn reference direction is used at the beginning of SidewayMove storing the target's position, to know when to end the goal.
| target | turn reference target |
| void AiFunc::SetUserInterupt | ( | unsigned int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::ShiftCurrTargetBattleState | ( | ) |
| void AiFunc::StartAttackPassedTimer | ( | int | animationId, |
| float | time ) |
Sets the animation cooldown timer for the given animation to the given time. Animation offset is included automatically in this function.
| animationId | animationId animation to set timer for |
| time | time [seconds] |
| void AiFunc::StartDash | ( | ) |
Forces run.
| void AiFunc::StartGuard | ( | ) |
Does nothing.
| void AiFunc::StartIdTimer | ( | int | index | ) |
Starts id timer.
| index | id timer index (0-127) |
| void AiFunc::StartIdTimerSpecifyTime | ( | int | index, |
| float | startingTime ) |
Starts id timer with the given time.
| index | id timer index (0-127) |
| startingTime | time to start at [seconds] |
| void AiFunc::StartTeamIdTimer | ( | int | p1 | ) |
Does nothing.
| p1 |
| void AiFunc::StepNextMovePoint | ( | ) |
Cycle to the next point on your path. Used in the common pathing goals' Terminate function when the move target is a move point.
| void AiFunc::TeamHelp_Call | ( | ) |
Call for help from team. The distance is taken from NpcThinkParam's "callHelp_CallValidRange".
| float AiFunc::TeamHelp_GetMaxWaitTime | ( | ) |
Returns NPCThinkParam's "callHelp_MaxWaitTime" * 0.1.
| float AiFunc::TeamHelp_GetMinWaitTime | ( | ) |
Returns NPCThinkParam's "callHelp_MinWaitTime" * 0.1.
| bool AiFunc::TeamHelp_IsValidCall | ( | ) |
Returns true if there are any valid teammates that can respond to your call, otherwise false. Based on NPCThinkParam.
| bool AiFunc::TeamHelp_IsValidReply | ( | ) |
Returns true if there are any valid teammates that you can reply to, otherwise false. Based on NPCThinkParam. Used to end GoalNonBattleAct in case a teammate calls.
| void AiFunc::TeamHelp_Reply | ( | ) |
Handles answering call logic, including setting as target?
| void AiFunc::TeamHelp_ReserveCall | ( | ) |
| void AiFunc::TeamHelp_ValidateCall | ( | ) |
| void AiFunc::TeamHelp_ValidateReply | ( | ) |
| void AiFunc::TurnTo | ( | TARGET | target | ) |
Sets the given target as the turn target/target to turn to. The turn target can be considered the "main target" of the AI in many cases.
| target | target |