Always snap to grid
The Bot class contains most of the details of the AI implementation, except for team-related functions which are mostly handled by the SquadAI. It also has some game-specific code, referencing TransLauncher for translocator hopping (that is, using the translocator just to get you somewhere faster), and BallLauncher for self-passing in Bombing Run.
- 1 Properties
- 2 Team AI Attributes
- 3 Enums
- 4 Known Subclasses
- 5 Related Topics
- 6 Related Classes
- 7 Discussion
Nearly all Bot properties are hidden. (exception: OrderNames)
AI Magic Numbers
- AngleConvert = 0.0000958738 (const)
- bool bCanFire
- used by TacticalMove and Charging states
- bool bStrafeDir
- bool bCanLeadTarget
- Lead target with projectile attack.
- bool bChangeDir
- Tactical move boolean.
- bool bFrustrated
- Being attacked in certain states causes frustration, and a frustrated bot is more aggressive.
- bool bInitLifeMessage
- Keeps track of whether the bot has sent messages like "I've got your back" or "I'm in position". Used by squad AIs.
- bool bReachedGatherPoint
- Used for gathering a squad at an AlternatePath. Used by squad AIs.
- bool bFinalStretch
- True if the bot is almost at its destination objective (ie a flag base). Set by squad AIs.
- bool bJumpy
- Likes to jump around if true.
- bool bHasTranslocator
- bool bHasImpactHammer
- bool bTacticalDoubleJump
- True when the bot is going to double jump.
- bool bWasNearObjective
- Used by GameObjective.BotNearObjective.
- bool bPlannedShot
- Used for self-passing in Bombing Run.
- bool bHasFired
- The bot has recently fired its weapon.
- bool bForcedDirection
- Keeps the bot moving in the same direction for tactical moves.
- bool bFireSuccess
- Determined by the Weapon's BotFire method, which indicates if the weapon actually fired.
- bool bStoppedFiring
- Set to true in the StopFiring method.
- bool bEnemyIsVisible
- bool bTranslocatorHop
- Used during a translocator hop maneuver. Also referenced by TransLauncher.
- bool bEnemyEngaged
- Used by SquadAI when finding defense scripts.
- bool bMustCharge
- Used in FightEnemy to determine if the bot should charge the enemy while attacking.
- bool bPursuingFlag
- Used by CTFSquadAI.
- bool bJustLanded
- The bot has just recently landed from a fall.
- bool bSingleTestSection
- Used in ReviewJumpSpots
- bool bRecommendFastMove
- One of the factors in deciding whether to do a translocator hop in FaceActor. May also be set by the squad AI (as in BombingRunSquadAI).
- actor TranslocationTarget
- The actor at which the bot is shooting its translocator. Used for translocator hopping, and also set by JumpSpot. Not to be confused with the TransBeacon property of the same name.
- actor RealTranslocationTarget
- There doesn't seem to be any instance where this is set differently from TranslocationTarget.
- actor ImpactTarget
- Used for impact/shield jumping.
- float TranslocFreq
- Set by TransLauncher to help bots keep from exceeding its charge.
- float NextTranslocTime
- name OldMessageType
- Type of last message sent. Used in the SendMessage function to keep from repeating the same message too much.
- int OldMessageID
- Last message ID, as with OldMessageType.
Advanced AI Attributes
- vector HidingSpot
- Used to track down enemies after losing sight of them.
- float Aggressiveness
- 0.0 to 1.0 (typically)
- float LastAttractCheck
- NavigationPoint BlockedPath
- float AcquireTime
- time at which current enemy was acquired
- float Aggression
- float LoseEnemyCheckTime
- Used in LoseEnemy to keep from calling Squad.LostEnemy() too often.
- actor StartleActor
- The last actor passed to Startle()
- float StartTacticalTime
- Set in TacticalMove.PickDestination
Modifiable AI Attributes
- float BaseAlertness
- float Accuracy
- -1 to 1 (0 is default, higher is more accurate)
- float BaseAggressiveness
- 0 to 1 (0.3 default, higher is more aggressive)
- float StrafingAbility
- -1 to 1 (higher uses strafing more)
- float CombatStyle
- -1 to 1 = low means tends to stay off and snipe, high means tends to charge and melee.
- float Tactics
- float TranslocUse
- 0 to 1 - higher means more likely to use.
- float ReactionTime
- class<Weapon> FavoriteWeapon
Team AI Attributes
- string GoalString
- For debugging - used to show what bot is thinking (with 'ShowDebug').
- string SoakString
- For debugging - shows problem when soaking.
- SquadAI Squad
- The SquadAI that the bot is in.
- Bot NextSquadMember
- Linked list of members of this squad
- float ReTaskTime
- Time when squad will retask bot (delayed to avoid hitches).
- int FormationPosition
- Determined by the squad's RestingFormation.
- UnrealScriptedSequence GoalScript
- UnrealScriptedSequence bot is moving toward (assigned by TeamAI).
- UnrealScriptedSequence EnemyAcquisitionScript
- Determined by GoalScript.
- Vehicle FormerVehicle
- enum<EScriptFollow> ScriptedCombat
- See the EScriptFollow enum.
- int ChoosingAttackLevel
- Used to detect nested calls to WhatToDoNext.
- float ChooseAttackTime
- Used in WhatToDoNext to detect when it gets called too often (more than 3 times a second).
- int ChooseAttackCounter
- How many times WhatToDoNext has been called in the current level time second.
- float EnemyVisibilityTime
- The last time when the enemy became visible.
- Pawn VisibleEnemy
- Helps determine if the enemy is visible.
- Pawn OldEnemy
- Marked with "FIXME TEMP".
- float StopStartTime
- Time that the bot started standing still (sniping, waiting for mover, etc.).
- float LastRespawnTime
- Used by CTFSquadAI in determining whether to pursue an enemy flag carrier.
- float FailedHuntTime
- The last time that the bot could not find a path to its enemy.
- Pawn FailedHuntEnemy
- The last enemy to which the bot could not find a path.
- float LastSearchTime
- float LastSearchWeight
- float CampTime
- int LastTaunt
- int NumRandomJumps
- Attempts to free bot from being stuck.
- string ComboNames
- float LastFireAttempt
- float GatherTime
- name OrderNames
- name OldOrders
- Controller OldOrderGiver
1vs1 Enemy Location Model
- vector LastKnownPosition
- vector LastKillerPosition
- NavigationPoint TestStart
- int TestPath
- name TestLabel
- Bot Support – Main topic for bot support
- Bot Pathing – Concepts and elements of a bot path network
- Basic Bot Pathing – A tutorial for basic bot pathing
- Strategic Bots – Advanced bot support
- Bot Mind – Understanding the bots
- Testing Botplay – Ensuring reliable bot support
- Bot Pathing – Concepts and elements of a bot path network
Related Bot AI Classes
The following classes and subclasses thereof are involved in UT200x bot support AI. Certain game objects have AI components telling bots what to do with them.
- TeamAI - Creates squads, assigns bots to them and changes the objectives of squads based on the objectives of the gametype.
- SquadAI - Team of bots following a Squad Leader.
- GameObjective - Immobile (though possibly destructible) markers for relevant places in a map: CTF flag bases, Bombing Run bomb spawn points, goal hoops, Domination control points and so on.
- Weapon - Weapon inventory items.
- NavigationPoint - Various NavigationPoints, like Door, LiftExit, etc., have code or critical properties that work with other bot support actors.
SuperApe: Removed "function description links" to other pages. Only Bot/Weapon Management was made and it was utterly useless. Added To Do tag. Filled in all property variable types.
Category:Legacy To Do – Add functions definitions.