REFERENCE: BOT CONFIG VARIABLES
This table contains 56 FSM variables for you to customize. Any variables not on here are used by the bot for its own calculations and should not be modified unless you fully understand the system.
FSM Name | Variable Name | Type | Is Percentage? (0-100) | Description |
Attack | charSTAT_MuzzleFlash | GameObject | The muzzle flash effect to spawn per shot. | |
Attack | charFX_MeleeOnHitEffect | GameObject | The effect (usually particle object) to spawn when melee-attacking. | |
Attack | charROLE_EnhancedAim | Bool | If true, the bot will attempt to correct its aim on fast moving targets. This is not always accurate, and will not help with extremely fast targets or if the bot is using slow bullets. We wanted to minimize the number of Vector3 calculations per bot for performance reasons. | |
Attack | charSTAT_chanceOfPreshootAction | Int | Yes | From 0-100, the chance that the bot will perform a special action right before shooting. For example, if your bot has a very cocky personality, you can have him perform a dance right before he shoots. |
Attack | charSTAT_ammoRemaining | Int | Ammo remaining in the current clip. | |
Attack | charSTAT_BulletUseRaycast | Bool | Set to TRUE, if you want the bullet to use Raycast-based bullets. Set to FALSE if you want collider-based bullets. Raycast-based damage immediately sends out a raycast from the bullet position towards the enemy (good for sniper shots or laser beams). Collider-based bullets only cause damage after it flies through the area and hits something (good for non-sniper shots). The default is collider-based bullets. This bool setting is sent to the bullet itself, right after the bullet is spawned. This means that ALL bullets can become either a collider-based bullet, or a raycast-based one, at any time, allowing for maximum flexibility! | |
Attack | charSTAT_currentBullet | GameObject | The Bullet GameObject to be fired. This can be initially set during development time, AND dynamically set during run time (such as when switching weapons). | |
Attack | charSTAT_currentBulletSpd | Float | The Bullet GameObject’s traveling speed. This is the Rigidbody Force to be applied to the bullet right after spawning. | |
Attack | charSTAT_currentFirePos | GameObject | An invisible GameObject that determines where the bot’s bullet is spawned. For example, set this at the end of a gun barrel. | |
Attack | charSTAT_FireRange | Float | The range at which the bot can begin shooting. To prevent problems, this must always be LOWER than the bot’s charSTAT_SightRange! Because if your bot can’t see his target (sight range), then there’s no point of having a fire range beyond that. If you’re simply spraying random bullets, you don’t need this anyways. This stat can double as the current weapon’s minimum fire range and can be dynamically changed at runtime (weapon switching). | |
Attack | charSTAT_gunBurstSize | Int | The size of each shooting burst. Example: A burst size of 3 will shoot 3 bullets for every trigger pull. | |
Attack | charSTAT_MeleeDamage | Float | Melee damage | |
charSTAT_MeleeEnabled | Bool | Does the bot have melee capability? If true, the bot will perform a melee attack when in close range, instead of a ranged attack. | ||
Attack | charSTAT_MeleeRange | Float | The range at which the bot will melee attack. If he can shoot as well, he will pick the melee attack instead if it’s closer. | |
Attack | charSTAT_MeleeWaitSec | Float | The seconds to wait before initiating the next melee attack. | |
charSTAT_RangedEnabled | Bool | Does the bot have ranged attack capability? If true, this will execute whenever the bot is within range, up to the melee range. | ||
Attack | charSTAT_ResponseTime | Float | How fast, in seconds, your bot responds to a detected enemy. The lower this is, the faster his reflexes are. Typically, 0.1 is a good number for fast responses, while anything over 1 second makes this bot a very “dumb” opponent. | |
Attack | charSTAT_ShootWaitSec | Float | Determines weapon rate of fire. The seconds to wait before the bot can shoot again — This can be dynamically changed at runtime depending on weapon switches. | |
Attack | charSTAT_TurnToShootSpd | Float | How quickly the bot turns towards his target before shooting. | |
Attack | charSTAT_WeaponAmmoPerClip | Int | How much ammo is stored per clip, for the current weapon? | |
Attack | charSTAT_WeaponClips | Int | How many clips for this weapon is the bot carrying? | |
Attack | charSTAT_WeaponReloadTime | Float | How many seconds does it take to reload the current weapon? (Factor in your custom reload animation times too) | |
Awareness | charSTAT_AwarenessUpdateTime | Float | How fast, in seconds, your bot updates his data about his surroundings. The lower the number, the faster he receives the most updated information. Set this to 0.1 for typical FPS games unless you want easier bots or your bot is too far away from any action. | |
Awareness | charROLE_stopWhenAttacking | Bool | Set to TRUE, if you want the bot to stop moving when attacking (stops to shoot). Set to FALSE, if you want the bot to keep moving when attacking (example: for run and gun style). | |
Awareness | charSTAT_EnemyTag | String | The bot will recognize all GameObjects of this tag to be enemies and will take hostile actions accordingly. | |
Awareness | charSTAT_EnemyTag2 | Enemy tag team 2 | ||
Awareness | charSTAT_EnemyTag3 | Enemy tag team 3 | ||
Awareness | charSTAT_HearingRange | Float | The distance of the bot’s hearing senses. If a nearby enemy generates a noise factor within this range, the bot will spot him, even when he can’t see him (such as behind a wall). | |
Awareness | charSTAT_SightRange | Float | The distance of a bot’s sight. | |
HealthAndDamage | charSTAT_UseRagdoll | Bool | Enables procedural ragdoll death effects, overriding the Mechanim Animation | |
HealthAndDamage | CharSTAT_Armor | Float | Armor is deducted from incoming damage before damage is applied to charSTAT_Health. | |
HealthAndDamage | charSTAT_DodgeChance | Float | Yes | The chance, from 0 to 100, that the bot will perform a dodge animation each time he takes damage. This can be seen in the FPS demo, where the bots should have a 25% chance of dodging. |
HealthAndDamage | charSTAT_DodgeOnHit | Bool | If true, the bot will perform a dodge animation each time he takes damage. Based on charSTAT_DodgeChance | |
HealthAndDamage | charSTAT_Health | Float | The amount of health a bot has before he is destroyed. This is NOT a percentage. Can be changed at run time. | |
HealthAndDamage | charSTAT_GodMode | Bool | If true, the bot will never take damage. Dodge on hit will never execute. | |
HealthAndDamage | charROLE_RunAwayWhenLowHP | Bool | If true, the bot will attempt to move away from the battle, in random directions, while continuing to shoot. Currently, the Health threshold is set at 30%. This can be modified in the HealthAndDamage FSM States. | |
HealthAndDamage | charSTAT_SpawnDeathEffect | GameObject | The object to spawn, such as an explosion, when bot is destroyed. This is optional, especially if you already have a Mechanim animation for this purpose. | |
Identity | charSTAT_Bio | String | A short tidbit about the bot. Not used in the demo scenes, but is here to show the kinds of customizations you can do. | |
Identity | charSTAT_Gender | String | Male/Female? Not used in the demo scenes, but is here to show the kinds of customizations you can do. | |
Identity | charSTAT_Name | String | Name of the bot. This is not a unique ID and should not be used as one. Can be used as text for name labels above a character’s head. | |
Identity | charSTAT_Occupation | String | A short tidbit about the bot. Not used in the demo scenes, but is here to show the kinds of customizations you can do. | |
Identity | charSTAT_Race | String | A short tidbit about the bot. Not used in the demo scenes, but is here to show the kinds of customizations you can do. | |
Identity | charSTAT_SelfGameObject | GameObject | A GameObject reference to the bot’s own GameObject. This should never be null or you will have issues! Also, this must always reference the bot himself, and not another bot! Always doublecheck this before building! | |
Movement | charROLE_ObstacleAvoidance | Bool | Turns on NavMesh built-in obstacle avoidance. Auto sets to high quality. | |
Movement | charROLE_PatrolWaypoints | GameObject | The GameObject that contains a group of child waypoint objects. The bot will loop through this group when processing waypoints. | |
Movement | charROLE_ChaseUpdateTime | Float | How often, in seconds, to update the target’s position. If your target is frequently making sharp turns, this needs to be a low number. | |
Movement | charROLE_JumpPower | Float | Not yet implemented in the Movement FSM (future update!), this can be used by the other FSMs (such as health/attack for dodging) | |
Movement | charSTAT_NavMeshTurnSpd | Float | NavMesh angular speed. | |
Movement | charSTAT_PathColliderRadius | Float | The radius size of the NavMesh. A smaller radius will allow the bot to squeeze through smaller spots. This can be adopted for use with another Pathfinding system. | |
Movement | charSTAT_PathfindingStopDistance | Float | The bot will stop moving when this distance to its waypoint or MOVETO destination is reached. When chasing an enemy, this is not a higher priority distance, since the chase module uses Ranged/Melee Distance primarily. | |
Movement | charSTAT_RandomMoveRadius | Float | Used by the command, “PATROL_NEARBY_RANDOM” The bot will pick a random point within this radius, out from his current location to move to. This is great for NPCs that do not follow a given waypoint path. Works best at a lower number (5-25). Higher numbers can cause issues, especially when the random point isn’t available or unreachable. | |
Movement | charSTAT_RunSpd | Float | Sets the NavMesh movement speed if the bot is running. A number of 2-6 seems “natural” | |
Movement | charSTAT_WalkSpd | Float | Sets the NavMesh movement speed if the bot is walking. A number of 1-3 seems “natural.” | |
Movement | charSTAT_WaypointIdleTime | Float | Number of seconds to pause at a waypoint before moving to the next one. This is great for making security patrol bots or more realistic neutral NPCs (town people). | |
RandomizeStats | Do Not Randomize | Bool | Set this to true, to skip randomizing stats on bot init. | |
RandomizeStats | health_min (example) | Float | A provided example where you can set the minimum random health for the bot. You can randomize any stat – follow the examples. | |
RandomizeStats | health_max (example) | Float | ||
Tactics | TACTICS_CurrentCommand | String | The current command the bot is acting on. See the BASIC COMMAND CHART. Commands can be combined (one after the other) to create more complex commands. You can also roll your own once you’ve fully understood how the FSMs work. | |
Tactics | TACTICS_PatrolChase | Bool | Does the bot divert from its current destination path to pursue targets it detects? | |
CharacterNoise | charSTAT_Attack_Noise | Float | How much noise, from 0 to infinity, is the bot currently generating on each attack? Can be modified at run time. Nearby enemies with a hearing range within this threshold will be alerted to the noise location. | |
CharacterNoise | charSTAT_Movement_Noise | Float | How much noise, from 0 to infinity, is the bot currently generating on each movement? Can be modified at run time. Nearby enemies with a hearing range within this threshold will be alerted to the noise location. |