Overview
Custom Bots is a single-file GSC mod for Call of Duty: Black Ops 2 Zombies on the Plutonium T6 client. It spawns fully autonomous AI bots that play like real human teammates — not the scripted, predictable bots you see in other mods.
These bots don't follow you around like bodyguards. They make their own decisions. They roam the map independently, train zombies into hordes, open doors, buy perks and weapons, pick up buildable parts, revive downed teammates, save the last zombie at the end of every round, knife in early rounds to maximize points, and fight their way through high rounds entirely on their own.
Every bot runs an autonomous decision engine that evaluates all available actions each tick and picks the smartest one based on current context: ammo count, health percentage, point balance, current round number, nearby threats, teammate status, and its own personality traits. No two bots make the same choices, even on the same map with the same rank.
The combat system uses triple line-of-sight verification to ensure bots never shoot through walls. The training AI builds actual navigation circuits and runs them with turn-and-burn tactics. The economy system weighs every purchase against the bot's current financial situation and immediate needs. Every system is interconnected, creating behavior that feels genuinely human.
The entire system is contained in a single file: custom_bots.gsc. No compilation. No dependencies. No external tools. No additional files. Drop it in one folder and play.
At a Glance
| Metric | Value |
|---|---|
| Lines of Code | 11,066 |
| Supported Maps | All 6 |
| Easter Eggs | All 6 |
| Default Config | 3 bots, Shotguns rank |
| Rank Tiers | 5 (Bones → Shotguns) |
Core Capabilities
What's New in v5.0.0
Version 5.0.0 is a ground-up overhaul of every major system. The combat engine was rebuilt with triple line-of-sight verification. The decision engine now evaluates all actions simultaneously instead of using priority chains. Training AI uses validated navigation circuits. Every stat scales logarithmically with round progression.
Combat Engine Overhaul
- Triple LOS Verification — Every shot checks centroid, feet, and final aim point. If any check fails, the bot stops shooting entirely. No more shooting through walls.
- Reaction Jitter — Each new target acquisition adds random variation (±50ms) to reaction time, preventing the robotic consistency that makes AI obvious.
- Focus Accuracy — When a bot stays locked on the same target, aim scatter tightens by 15% after 1 second and 25% after 2 seconds. Simulates real players "locking in" on a target.
- Weapon-Class Burst Fire — LMGs spray long continuous bursts. Shotguns fire 1–2 precise shots. SMGs burst 4–8 rounds. Snipers take 1–3 careful shots. Each weapon class feels authentic.
- Magazine-Aware Training — Before turning to shoot during a train, bots check their clip. If below 30%, they reload first instead of turning with 2 rounds left.
- Directional Flee — When overwhelmed, bots calculate the zombie cluster's center of mass and flee directly away from it, preferring paths that break line of sight.
Decision Engine Overhaul
- Utility AI Scoring — Every tick, all possible actions (combat, revive, flee, buy perks, buy weapons, use box, PaP, open doors, grab powerups, train) are scored and ranked. The highest score wins.
- Dynamic Perk Priority — Quick Revive gets +200 when a teammate is downed. Speed Cola gets +100 when using an LMG. Perks adjust to the situation instead of following a static list.
- Max Ammo Awareness — If a Max Ammo powerup is sitting on the ground, bots skip ammo purchases entirely to save points.
- Anti-AFK Leader — Bots track each human's velocity. If a human has been stationary for 10+ seconds, bots reduce their desire to follow that player by 50%.
- Smart Early Weapons — Instead of buying the nearest wallbuy, bots score available weapons and pick the best affordable one. They prefer the M14 over the Olympia.
- Launcher Avoidance — Launchers, RPGs, and War Machines receive a score of -999, effectively blacklisted. AI and splash damage don't mix well.
- Resource Lock Safety — All resource locks (Box, PaP, debris) are automatically cleared when a bot dies or enters last stand, preventing permanent lockouts.
Positioning & Navigation
- Smart Dodge — When blocking a player's path, bots step perpendicular to the player's movement direction instead of teleporting to a random point. Looks like a natural "step aside."
- Rank-Scaled Stuck Detection — Shotguns bots detect they're stuck after 2.5 seconds. Bones bots get 4.5 seconds of tolerance. Higher-ranked bots react faster to navigation problems.
- Door/Debris Stuck Prevention — After 4 seconds of no movement toward a door goal, the goal is automatically cancelled and a different action is selected.
- Elite Early-Game Skip — Rank 3+ bots skip the window-camping phase at round 3+ and go straight to opening doors. Elite bots don't waste time.
Round Scaling
- Logarithmic Curve — Stats improve via
0.10 * log2(round), capped at 0.40 around round 16. Fast improvement early, diminishing returns later. - Elite Scaling (R40+) — A secondary linear factor of
(round - 40) * 0.005(capped at 0.15) kicks in for headshot chance, crowd flee count, and powerup range. Keeps bots viable through round 70+ without breaking early balance.
Communication & Safety
- Randomized Callouts — 4+ variants per status category ("LOW AMMO" / "RUNNING DRY" / "NEED AMMO" / "ALMOST EMPTY") so bots sound like different personalities.
- Dynamic Headshots — Uses the
j_headbone tag for accurate headshots on crawlers (lower head), standing zombies, and tall bosses (higher head). - EE Health Gate — If a bot drops below 30% health during an Easter Egg objective, the goal pauses for 3 seconds so combat and flee systems can take over.
- Revive Danger Scaling — Bots without Juggernog use a lower danger threshold (4 vs 8 nearby zombies) before attempting revives. No more suicide revive attempts.
Why Custom Bots
BO2 Zombies is designed for 4 players. Solo, you miss out on revives, the points economy is tighter, doors take forever to open, and Easter Eggs that require multiple players are impossible. Existing bot mods either give you bots that stand in corners doing nothing, or they follow you like shadows with no independent thought.
Custom Bots solves this by creating AI teammates that actually play the game. They don't just react to what you do — they make their own plans.
Before vs. After
Without Custom Bots
- Solo = no revives, instant game over on down
- Full game economy designed for 4 players
- Easter Eggs requiring 4 players are impossible
- No one to train zombies while you do objectives
- Last zombie dies while you buy perks
- Boring solo gameplay loop
With Custom Bots
- Bots revive you with danger awareness
- Full lobby economy with 4 players earning points
- Easter Eggs fully assisted (all 6 maps)
- Bots train zombies, defend generators, fill soul chests
- Last zombie always saved, AFK-safe anchor system
- Full multiplayer experience with AI teammates
Installation
Installation takes less than 30 seconds. You need Plutonium T6 installed on your PC. If you don't have it, download it from plutonium.pw and follow their setup guide first.
Locate Your Plutonium T6 Folder
Open your Plutonium launcher and find your T6 installation directory. The default location is usually in your local app data folder. You can also right-click your Plutonium shortcut and open the file location.
Navigate to the Scripts Folder
Inside the T6 folder, navigate to (or create if it doesn't exist) the zombie scripts directory. This is where all custom GSC scripts for zombie mode are loaded from.
Drop the File
Copy custom_bots.gsc into the zm folder. That's it. No other files needed. No compilation. No dependencies.
Launch and Play
Start Plutonium and begin a Custom Games Zombies match on any map. Bots spawn automatically at round 1 with a welcome banner showing their names, ranks, and personalities.
File Paths
%LOCALAPPDATA%\Plutonium\storage\t6\scripts\zm\custom_bots.gsccustom_bots.gsc with a newer version, you must fully restart Plutonium (close and reopen the launcher). Restarting only the match will cause a "Client/Server game mismatch" error because GSC scripts are compiled and loaded at startup, not per-match.Quick Start
No configuration is needed. By default, the mod spawns 3 bots at Shotguns rank (the highest tier) the moment you start any Zombies map. This fills your lobby to 4 players (you + 3 bots), which is the intended player count for BO2 Zombies.
The bots will immediately begin playing: buying weapons at wall locations, defending windows in the early rounds, knifing zombies for bonus points, opening doors when they have enough money, buying perks, and scaling their behavior as rounds progress.
Want to customize? Open the in-game console (~ tilde key) and type any command from the Configuration Reference.
Common Scenarios
Casual Game
Just install and play. Default 3 Shotguns bots handle everything. You can focus on having fun while they cover your back, open doors, and keep the last zombie alive between rounds.
Challenge Run
set bo2_zm_bots_rank "bones"
set bo2_zm_bots_count 1One terrible bot. It panics, sprays wildly, and walks into lava. Good luck keeping it alive.
Easter Egg Run
set bo2_zm_bots_ee 1
set bo2_zm_bots_rank "shotguns"Full EE assistance on all 6 maps. Bots handle every step except the final one. That's always yours.
Full House
set bo2_zm_bots_count 7On 8-player servers, fill the lobby with 7 AI teammates for absolute chaos.
Configuration Reference
All settings are DVars (dynamic variables) entered in the in-game console. Press ~ (tilde) to open the console, type the command, and press Enter. Every setting has a sensible default — you never need to change anything unless you want to.
DVars persist for the current Plutonium session. If you want settings to apply every time, add them to your Plutonium configuration file.
Core Settings
| DVar | Default | Range | Description |
|---|---|---|---|
bo2_zm_bots_count | 3 | 1–7 | Number of bots to spawn. 3 fills a standard 4-player lobby. Up to 7 on 8-player servers. |
bo2_zm_bots_rank | "shotguns" | See Rank System | Bot skill tier. Controls aim accuracy, reaction time, decision quality, and whether bots can train zombies. |
Feature Toggles
Set to 1 to enable (default) or 0 to disable.
| DVar | Default | Description |
|---|---|---|
bo2_zm_bots_revive | 1 | Revive downed teammates. Bots check danger levels before attempting and prioritize human players over other bots. |
bo2_zm_bots_perks | 1 | Purchase perks from machines. Priority order: Juggernog → Speed Cola → Double Tap → Stamin-Up → Deadshot → Mule Kick. Dynamic boosts for Quick Revive and Speed Cola based on situation. |
bo2_zm_bots_wallbuys | 1 | Purchase wall weapons. Bots scan 1500 units for available wallbuys and score them against their current loadout. |
bo2_zm_bots_box | 1 | Use the Mystery Box. Activated from round 10+ (earlier for aggressive personalities). One bot at a time to prevent crowding. |
bo2_zm_bots_pack | 1 | Use Pack-a-Punch. Bots select their best weapon to upgrade (not necessarily current weapon) and need 5000+ points. One bot at a time. |
bo2_zm_bots_doors | 1 | Open doors and clear debris. Debris lock system prevents multiple bots from trying to buy the same door simultaneously. |
bo2_zm_bots_powerups | 1 | Pick up powerup drops (Max Ammo, Insta-Kill, Double Points, Nuke, etc.). Range scales with round progression. |
bo2_zm_bots_ee | 1 | Assist with Easter Egg steps on all 6 maps. Safety-gated: bots never complete the final step. |
bo2_zm_bots_callouts | 1 | Chat callouts and HUD notifications. Throttled to 1 per bot per 3 seconds. Uses randomized message variants for natural feel. |
Cosmetic Settings
| DVar | Default | Description |
|---|---|---|
bo2_zm_bots_name_prefix | "BOT" | Name prefix for bots. Combined with a random name from a pool of 50+ zombie-themed names (e.g., "BOT_Dempsey", "BOT_Nikolai"). |
bo2_zm_bots_clan | "ZM" | Clan tag displayed next to bot names in the scoreboard. |
Console Examples
set bo2_zm_bots_count 2 // Two bots instead of three
set bo2_zm_bots_rank "skull" // Mid-tier difficulty
set bo2_zm_bots_ee 0 // Disable Easter Egg assistance
set bo2_zm_bots_callouts 0 // Disable chat callouts
set bo2_zm_bots_name_prefix "" // No prefix (just the name)
set bo2_zm_bots_clan "AI" // Change clan tagRank System
Every bot is assigned a rank that controls over 35 behavioral parameters. Ranks mirror the BO2 Zombies ranking icons and represent a spectrum from helpless to superhuman. The default rank is Shotguns (highest tier) because most players want competent teammates.
Rank doesn't just change accuracy — it affects everything: how quickly bots react, how well they dodge hazards, whether they can train zombies, how aggressively they push for weapons, and how reliably they revive teammates.
Rank Capability Matrix
| Capability | Bones | Crossed | Skull | Skull+K | Shotguns |
|---|---|---|---|---|---|
| Buy weapons | Yes | Yes | Yes | Yes | Yes |
| Open doors | Yes | Yes | Yes | Yes | Yes |
| Buy perks | Yes | Yes | Yes | Yes | Yes |
| Revive teammates | Yes | Yes | Yes | Yes | Yes |
| Train zombies | No | No | R6+ | R4+ | R3+ |
| Pack-a-Punch | Rarely | Sometimes | Yes | Yes | Always |
| Avoid hazards | 20% | 40% | 60% | 85% | 100% |
| Conserve ammo | Never | Rarely | Sometimes | Often | Always |
| Skip early windows | No | No | No | R3+ | R3+ |
| Easter Egg assist | Basic | Basic | Good | Good | Expert |
Autonomous Decision Engine
The decision engine is the brain of every bot. Every tick (approximately every 0.25 seconds), the engine evaluates all possible actions simultaneously and picks the one with the highest score. This is a utility AI system — not a priority list, not a state machine, not a behavior tree.
The key insight is that every action competes on the same scale. A revive opportunity scoring 1200 will always beat a perk purchase scoring 400, but a perk purchase scoring 400 will beat a routine roam scoring 50. Context changes scores dynamically: the same action can score 100 in one situation and 600 in another.
Action Scoring Overview
Dynamic Score Modifiers
- Point Reserve — Supportive bots maintain a 1500 point buffer for emergencies. Purchase scores are reduced when the bot would drop below this reserve.
- Weapon-Quality Urgency — Holding a pistol at round 10+ massively boosts Mystery Box and PaP scores. The bot knows it needs a real weapon.
- Cost-Aware Scoring — Expensive purchases are penalized when the bot is low on points. A 3000-point perk might score lower than a 1500-point wallbuy if the bot only has 4000 points.
- Round Pressure — PaP urgency scales exponentially in higher rounds. By round 20, the decision engine strongly pushes bots toward upgrading their best weapon.
- Personality Bias — Aggressive bots boost weapon, box, and PaP scores. Supportive bots boost revive scores by +200. Cautious bots boost perk, ammo, and flee scores.
- Ammo Emergency — When ammo drops below 10% of max capacity, ammo buy scores jump to 600 (urgent). Below 25%, scores are 300–500.
- Max Ammo Awareness — If a Max Ammo powerup is on the ground, ammo buy scores drop to 0. No point wasting money when free ammo is available.
- Smart PaP Selection — Bots don't just PaP their current weapon. They evaluate all held weapons and upgrade whichever one scores highest based on damage, magazine size, and fire rate.
- Launcher Blacklist — Any weapon with "launcher," "smaw," "rpg," or "war_machine" in the name receives a score of -999. AI bots and splash damage are a bad combination.
- Debris Lock — When a bot targets a door or debris, it's locked to prevent other bots from trying to buy the same one. Lock clears when the purchase completes, fails, or the bot dies.
Advanced Combat Engine
The v5.0.0 combat engine was rebuilt from scratch with one goal: bots should never shoot through walls, and they should feel human when they fight. Every aspect of target acquisition, aiming, and firing is controlled by rank-scaled parameters that produce realistic combat behavior.
Target Acquisition
When scanning for targets, bots evaluate all zombies within their weapon's effective range. Each potential target receives a composite score based on distance (closer = higher), clustering (splash weapons prefer groups), threat level (zombies running at teammates get priority), and line-of-sight quality. The highest-scoring target is selected.
A reaction jitter of ±50ms is added to every new target acquisition. This prevents the perfectly consistent snap-to-target timing that makes AI bots obvious. Combined with rank-based reaction time (800ms for Bones, 50ms for Shotguns), the result is targeting that looks human.
Focus Accuracy System
Real players get more accurate the longer they track a target. Custom Bots simulates this with a focus timer. When a bot stays locked on the same zombie:
- After 1 second — Aim scatter reduces by 15%. The bot is "dialing in" its aim.
- After 2 seconds — Aim scatter reduces by 25%. Full focus achieved.
- On target switch — Focus timer resets. The bot has to re-acquire its precision.
Weapon-Class Behavior
| Weapon Class | Burst Length | Cluster Bonus | Effective Range | Behavior |
|---|---|---|---|---|
| LMGs | Long spray | +200 | Extended | Sustained fire into groups. Turn-and-burn uses +800ms extended timing. |
| Shotguns | 1–2 shots | +400 | Close | Precise close-range blasts. Waits for targets to close distance. |
| SMGs | 4–8 rounds | +200 | Medium | Controlled bursts with quick target switching between kills. |
| Assault Rifles | 3–6 rounds | +200 | Medium-Long | Balanced fire with moderate burst pauses. |
| Snipers | 1–3 shots | +100 | Long | Precise single shots focused on individual high-value targets. |
| Splash Weapons | Varies | +600 | Medium | Wonder Weapons and explosives target the densest zombie clusters. |
Firing Discipline
- Range-Gated Firing — Maximum engagement range is 450 units (reduced from 600). Drops to 300 at 50% ammo, 200 at 25%. Bots won't waste ammo on distant targets that aren't threats.
- Ammo Conservation — Conservation activates at 60% ammo (not 40%). Range suppression kicks in at 350+ units even at full ammo (25% shot skip). Burst sizes capped to 2-3 shots at range. Pause between bursts doubled when low on ammo.
- No Scatter at Close Range — Within 150 units, aim scatter is completely removed. Direct aim at the zombie. Scatter only applies at distance where it simulates natural aiming variance.
- No Fallback Shooting — If the final aim point fails line-of-sight verification, the bot stops shooting entirely. No "shooting at the wall hoping to hit something."
- Dead Target Cutoff — Right before every trigger pull, the bot re-checks if the target is still alive. If the zombie died mid-burst (killed by another player or trap), the bot instantly stops firing. No more shooting at corpses or empty air.
Smart Grenades
The T6 engine's built-in bot grenade system is completely disabled (bot_AllowGrenades=0 for all ranks). All grenade decisions go through the script's intelligent system:
- Self-damage prevention — No grenade throws within 300 units of self. Bots won't kill themselves.
- Conservative cooldowns — Shotguns: 20s. Skull & Knife: 25s. Skull: 35s. Bones/Crossed Bones: grenades disabled entirely.
- Gun ammo gating — Will not throw if primary weapon ammo is below 50%. Grenades are not a substitute for gun ammo.
- High crowd threshold — Requires 6+ nearby zombies (Shotguns) to 10+ (Bones) before considering a throw. No throwing at scattered targets.
- Round gating — No grenades before round 5. Early rounds use knife/gun economy exclusively.
- Cluster targeting — Grenades aimed at zombie cluster centroids within 300-600 unit range for maximum effectiveness.
Triple Line-of-Sight Verification
The single most important technical feature in Custom Bots. Every shot a bot fires passes through three independent line-of-sight checks. If any check fails, the bot stops firing immediately.
Centroid Check
A trace is fired from the bot's eye position to the target zombie's centroid (center of mass). This verifies the bot can see the zombie's body. Walls, pillars, debris, and other solid geometry will block this trace.
Feet Check
A second trace is fired to the zombie's feet position. This catches edge cases where the centroid is visible but the zombie is actually behind a low wall, railing, or barricade. Both traces must pass for target validation.
Final Aim Verification
After scatter is applied and the actual aim point is calculated, a third trace verifies the final shot trajectory. Even if the zombie's body is visible, if the scattered aim point would hit a wall or obstacle, the shot is suppressed.
Additionally, at the moment of target acquisition (before any firing begins), a pathfinding validation check confirms the zombie is reachable and not trapped behind geometry. This eliminates the common AI behavior of fixating on zombies they can see through cracks but can't actually shoot.
Autonomy System
Autonomy is a per-rank value (0.15 for Bones, 0.95 for Shotguns) that controls how independently a bot behaves. Every decision has an autonomy threshold. When the bot's autonomy exceeds the threshold, it can make that decision on its own. Below the threshold, it defers to the leader or skips the action entirely.
This creates a natural spectrum: Bones bots are clingy followers that rarely act independently. Shotguns bots are almost entirely self-directed, only loosely tracking the leader's position while making their own plans.
Autonomy Thresholds
| Action | Threshold | Who Can Do It |
|---|---|---|
| Open doors independently | 0.40 | Skull, Skull & Knife, Shotguns |
| Buy weapons without leader nearby | 0.30 | Crossed Bones+ |
| Roam to distant map areas | 0.60 | Skull & Knife, Shotguns |
| Use Mystery Box independently | 0.50 | Skull+ |
| PaP without group | 0.70 | Skull & Knife, Shotguns |
| Train zombies | Rank-gated | Skull (R6+), Skull & Knife (R4+), Shotguns (R3+) |
| Full independent play | 0.90 | Shotguns only |
Leader Selection Intelligence
When a bot does follow a leader, it uses a scored selection system instead of just picking the nearest human. Each human player receives a leader score based on proximity and activity level. If a human has been stationary for 10+ seconds (velocity near zero), their leader score drops by 50%. This prevents bots from clustering around an AFK player while active players fight alone on the other side of the map.
Survivability System
Staying alive is a multi-layered system. Health, revive logic, flee behavior, and team defense all work together to keep bots in the fight.
Revive Logic
- Human Priority — Downed human players are always prioritized over downed bots. If two players are down, the human gets revived first.
- Danger Awareness — Before attempting a revive, bots count nearby zombies. With Juggernog, the threshold is 8 zombies. Without Juggernog, it drops to 4. If danger is too high, the bot fights its way to safety first.
- Clutch Revive — If a bot successfully revives someone while below 25% health, a special "CLUTCH REVIVE" splash displays on the HUD.
- Team Defense — Bots protect ALL teammates, not just their designated leader. If any teammate is in danger (multiple zombies closing in), nearby bots will engage those zombies.
Directional Flee
When the bot is overwhelmed (too many zombies within flee distance), it doesn't run to a random point. The flee system calculates the centroid of all nearby zombie positions, then moves in the opposite direction. It prefers paths that break line of sight with the zombie cluster, using nav nodes and cover positions.
Dynamic strafe distance scales with zombie count: fewer zombies = wider strafes (more evasive), many zombies = tighter strafes (more direct escape).
Elite Survivability (Shotguns Rank)
Shotguns-rank bots have several survival advantages: 700 HP (nearly 3x the base 250), faster health regeneration, and intelligent repositioning. When health drops below a critical threshold, elite bots break from their current action and seek a defensible position before re-engaging.
Early Game Flow
The first few rounds of a Zombies game have specific rhythms that experienced players follow. Custom Bots replicates this with a structured early game sequence that maximizes points and sets up the team for success.
Weapon Phase (Round 1)
Bots immediately move to the nearest affordable wall weapon. Instead of buying the closest one blindly, they score available wallbuys using the weapon scoring system and pick the best affordable option. An M14 scores higher than an Olympia because it's more effective for point-building. Once armed, they advance to window defense.
Window Phase (Rounds 1–3)
Bots claim windows and defend them to earn points. They knife zombies as they climb through for maximum point value (130 per knife kill vs. 60–70 for gun kills). The dynamic round cap ensures bots don't overstay — they move on when the round gets too chaotic for safe window camping.
Elite Skip: Rank 3+ bots (Skull & Knife and Shotguns) bypass this phase entirely at round 3+ and move straight to door buying. They're skilled enough to handle open areas immediately.
Door Phase (Rounds 2–5)
When bots accumulate enough points, they start opening doors to expand the playable area. The debris lock system ensures only one bot targets each door. Bots with door goals have a 4-second stuck timer — if they can't reach the door, the goal cancels and they pick a different action.
Transition to Main Loop
After the early phases complete, bots transition to the autonomous decision engine for the rest of the game. The decision engine handles all further purchases, combat, training, and objectives dynamically.
Early Round Knife Strategy
In Zombies, knife kills in early rounds award 130 points vs. 60–70 for gun kills. Experienced players knife as much as possible in rounds 1–3 to build their point economy. Custom Bots replicates this strategy.
When knife_mode is active, the combat engine respects it: bots switch to their knife and engage zombies in melee range. The system tracks the number of bullets needed to soften a zombie for a one-hit knife kill based on the current round. On round 1, zombies die to a single knife. On round 2, one bullet + knife. On round 3, two bullets + knife.
On Origins, bots with the Iron Fist perk extend their knife rounds through round 8, since the upgraded melee damage makes knifing viable much longer.
Training AI
Training (zombie kiting) is the core high-round survival strategy in Zombies. You run in circles, let zombies pile up behind you into a tight horde, then turn and shoot them all at once. It's the most efficient way to clear rounds and it's what separates good players from great ones. Custom Bots does it autonomously.
Who Can Train
| Rank | Start Round | Train Skill | Min Horde Size | Behavior |
|---|---|---|---|---|
| Bones / Crossed | Never | N/A | N/A | Cannot train. Fight and flee only. |
| Skull | Round 6+ | 0.50 | 5 zombies | Basic kiting with frequent mistakes. Gets cornered occasionally. |
| Skull & Knife | Round 4+ | 0.75 | 3 zombies | Reliable kiting with good route selection. Rarely gets trapped. |
| Shotguns | Round 3+ | 1.00 | 2 zombies | Perfect kiting with optimal routes. Almost never makes mistakes. |
Training Process
Zone Evaluation
The bot scans its surroundings for a suitable training zone: at least 8 navigation nodes within 500 units, with 2 or more exits. This ensures the circuit has enough room and the bot won't trap itself in a dead end.
Circuit Building
A ring of validated waypoints is constructed using nav nodes. Each connection between waypoints is checked for hazards using midpoint analysis — not just the endpoints but the path between them. Waypoints near lava, mud, or active traps are excluded.
Circuit Running
The bot runs the circuit, drawing zombies into a trailing horde. Movement speed and circuit radius adjust based on the current zombie count and round number.
Danger Detection
Dot product analysis detects when zombies approach from the front (angle between bot's forward vector and zombie direction). If a zombie is detected ahead, the bot reverses direction on the circuit instead of running into it.
Turn-and-Burn
Periodically, the bot turns around and fires into the trailing horde. Magazine-aware: if the current clip is below 30% capacity, the bot reloads before turning. Weapon-class timing: Wonder Weapons hold the turn for +1200ms, LMGs for +800ms, pistols keep short bursts.
Emergency Abort
If a zombie breaches melee range (too close for safe kiting), the bot abandons the circuit and enters flee mode. A 200-tick abort cap also triggers if the circuit has been running too long without completing. Lap counting triggers automatic circuit rebuilds after a set number of laps.
Economy System
Points are the lifeblood of Zombies. Every purchase, from a 500-point door to a 5000-point Pack-a-Punch, is weighed against the bot's current financial situation, immediate needs, and round pressure. The decision engine handles all economy decisions simultaneously — perks, weapons, doors, ammo, box, and PaP all compete for the same pool of points.
Perk Priority System
Perks follow a base priority order but are dynamically adjusted based on the current situation:
| Perk | Base Score | Dynamic Boost | Notes |
|---|---|---|---|
| Juggernog | 500 | — | Always first priority. 2x health is essential for survival. |
| Speed Cola | 350 | +100 if using LMG | LMGs benefit the most from fast reload. Dynamic boost recognizes this. |
| Quick Revive | 300 | +200 if teammate downed | Jumps to near-top priority when a revive is needed. |
| Double Tap | 300 | +50 for aggressive personality | More damage per bullet. Aggressive bots prioritize it. |
| Stamin-Up | 200 | — | Faster movement helps with training and escape. |
| Deadshot Daiquiri | 150 | — | Auto-aim assist. Less impactful for bots than humans. |
| Mule Kick | 100 | — | Third weapon slot. Low priority because bots manage 2 weapons well. |
Spending Priorities
- Emergency Ammo — Below 10% ammo = score 600 (urgent). Below 25% = score 300–500. Bots won't run dry if they can help it.
- Max Ammo Awareness — If a Max Ammo powerup is on the ground, ammo buy score drops to 0. Why spend points when free ammo is sitting right there?
- Weapon Upgrades — PaP is prioritized once the bot reaches
pap_min_roundwith 5000+ points. The bot selects its best weapon to upgrade — not necessarily the one currently held. - Door Investment — Doors are purchased when the bot has enough points AND the door leads somewhere useful (perk machine, Mystery Box, better training area).
- Point Reserve — Supportive personality bots keep a 1500-point buffer. They won't spend their last points on a non-essential purchase.
Weapon Scoring System
Every weapon in the game has a score that determines how desirable it is for bots. Scores are calculated from a combination of base weapon stats (damage, fire rate, magazine size), map-specific bonuses (some weapons are better on certain maps), and contextual modifiers (what the bot already has, how many points it has).
Scoring Factors
- Base Weapon Quality — Assault rifles and LMGs score higher than pistols and shotguns (with exceptions for wonder weapons and Pack-a-Punched weapons).
- Map Bonuses — Each map has a curated list of weapon preferences. The Sliquifier gets +80 on Die Rise. The Blundergat gets +80 on Mob. The Paralyzer gets +80 on Buried. See Map Weapon Preferences.
- Current Loadout — If the bot already has a strong primary, the urgency to acquire another weapon drops. If the bot only has a pistol at round 10+, weapon scores skyrocket.
- Cost Assessment — Expensive wallbuys are penalized when the bot is low on points. A 1500-point M14 might outscore a 3000-point Galil if the bot only has 3500 points.
- Launcher Blacklist — Launchers, RPGs, SMWAs, and War Machines receive -999. Self-damage weapons are too dangerous for AI.
- Ice Staff Reservation — On Origins, the Ice Staff is permanently reserved for human players. Bots will never pick up ice staff parts, crystals, or the completed weapon. This is hardcoded at every level of the weapon system.
Collectible & Buildable Pickup
Bots actively search for and collect buildable parts across all maps. They don't just stumble into parts — they route to known spawn locations and pick them up with purpose. After collecting enough parts, they navigate to the build table and craft the buildable.
TranZit
Parts for Turbine, Jet Gun, Electric Trap, and Zombie Shield. Bots prioritize the Turbine early since it's needed for power and EE steps.
Die Rise
Trample Steam parts, Sliquifier parts, Zombie Shield, and Nav Card Table. Bots know the elevator locations for each part spawn.
Mob of the Dead
Plane parts (5 total), Hell's Retriever, Acid Gat Kit, and Zombie Shield. Bots can locate plane parts across the prison map.
Buried
Head Chopper, Resonator, Turbine, and chalk weapon drawings. Bots place chalk drawings at wallbuy locations when found.
Origins
Shovels (8-method search), dig sites, staff parts (fire, wind, lightning — never ice), Zombie Shield, Maxis Drone, Gramophone, Vinyl Discs, and Staff Crystals. The most complex collectible system of any map.
bot_is_ice_staff_item() and bot_is_ice_staff_weapon() block all bot access.Proactive Part Seeking
Bots don't wait to stumble across parts. They actively scan for buildable pieces using dynamic entity queries (getentarray) across 15+ targetname patterns, finding every part the game engine has spawned. The seeking system runs during early game to ensure parts are collected before they're needed.
On Origins, the proactive seeking system is particularly sophisticated. Bots navigate to all 6 generator locations using a 6-method search system (bot_find_generators()). They seek shovels with an 8-method search that includes trigger_use fallback detection. They patrol dig site locations and staff part spawns (excluding ice staff).
After collecting enough parts for a buildable, bots automatically navigate to the build table and craft the item. Shovel reservation ensures at least 1 shovel is always left for the human player.
Last Zombie Save & AFK Training
One of the most important features in any Zombies mod. When 1–2 zombies remain at the end of a round, every bot stops shooting. No exceptions. This is hardcoded, not scored — the decision engine cannot override it.
Detection
When the zombie count drops to 2 or fewer, all bots receive the cease-fire signal. They holster weapons and stop engaging.
Anchor Assignment
One bot becomes the designated anchor. Its job is to kite the last zombie indefinitely, keeping it alive while other players do whatever they need.
AFK Training Pattern
The anchor runs a specific pattern: sprint away when the zombie gets close, circle at the sweet spot distance, walk back if the zombie falls too far behind. This runs indefinitely — you can walk away from your controller and the zombie will still be alive when you come back.
Economy Window
While the anchor keeps the zombie alive, other bots can buy perks, weapons, and use Pack-a-Punch. They just can't shoot. This gives the entire team a safe window for between-round preparation.
Bot Personality System
Every bot receives a randomly assigned personality at spawn that subtly influences all of its decisions. Personalities don't change fundamental capabilities (a Bones bot is still terrible regardless of personality), but they add variety and create situations where two Shotguns bots behave noticeably differently.
| Trait | Stat Effects | Decision Effects | Combat Style |
|---|---|---|---|
| Aggressive | Reduced kite distance, smaller backoff radius, +5% autonomy | Boosts weapon/box/PaP/training scores. Pushes for combat engagement. Earlier Mystery Box usage. | Closes distance faster. Uses grenades more frequently. Prefers high-damage weapons. |
| Supportive | +15% revive success chance, follows leader more closely | Revive score +200. Point reserve of 1500. Prioritizes Quick Revive purchase. Stays near teammates. | Defensive positioning. Prioritizes covering fire for teammates. Shares areas with other bots. |
| Cautious | Larger flee trigger count, +15% hazard awareness radius | Boosts perk/ammo/flee scores. Earlier ammo purchases. Higher danger threshold for revive attempts. | Keeps more distance. Flees earlier. Conserves ammo more aggressively. Avoids hazards at greater range. |
The dominant personality trait is displayed in the spawn notification when bots join the game (e.g., "BOT_Dempsey [Aggressive] joined"). All three traits exist on a spectrum — a bot is never purely one type. The dominant trait just has the strongest influence.
Bot Communication
Bots communicate through two channels: HUD notifications (visual splashes on screen) and chat messages. All callouts are throttled to 1 per bot per 3 seconds to prevent message spam.
Randomized Callout System
Instead of static strings, every callout uses a bot_random_callout() function that picks from an array of 4+ variants. This means the same situation produces different messages each time, making bots sound like distinct personalities.
| Situation | Possible Callouts |
|---|---|
| Low Ammo | "LOW AMMO" / "RUNNING DRY" / "NEED AMMO" / "ALMOST EMPTY" |
| Critical Health | "CRITICAL HEALTH" / "HURTING BAD" / "NEED HELP" / "BARELY ALIVE" |
| Covering Leader | "COVERING LEADER" / "GOT YOUR BACK" / "WATCHING YOUR SIX" / "COVERING YOU" |
| Training | "TRAINING ZOMBIES" / "GOT A HORDE" / "RUNNING TRAIN" / "KITING" |
| Downed | "IM DOWN" / "NEED REVIVE" / "DOWN - HELP" / "MAN DOWN" |
Communication Categories
| Category | Display Method | Color | Examples |
|---|---|---|---|
| Action | HUD overlay | White | "Buying Juggernog", "Opening door", "Using Pack-a-Punch" |
| Status | Notification bar | Red | "LOW AMMO", "CRITICAL HEALTH", "NEED REVIVE" |
| Combat | HUD overlay | Orange | "COVERING YOU", "TRAINING ZOMBIES", "FLEEING" |
| Easter Egg | Notification bar | Cyan | "Standing on symbol", "Feeding dog head", "Defending generator" |
| Milestone | HUD splash | Gold | "50 KILLS", "100 KILLS", "200 KILLS", "500 KILLS" |
Round-Based Scaling
Bot stats aren't static. They improve as rounds progress using a carefully tuned logarithmic curve that provides fast improvement in early rounds and diminishing returns later. This mirrors how real players "warm up" and improve their play as a session goes on.
Logarithmic Curve
The primary scaling formula is 0.10 × log2(round), capped at 0.40 (reached around round 16). This curve is applied to:
- Aim Scatter — Reduces over time, making bots more accurate in later rounds.
- Headshot Chance — Increases, reflecting improved target selection.
- Reaction Time — Decreases, making bots faster to acquire targets.
- Burst Pause — Shorter pauses between bursts in later rounds.
- Revive Delay — Faster response to downed teammates.
- Crowd Flee Count — Higher tolerance before fleeing (bots get braver).
- Powerup Range — Wider search radius for powerup drops.
- Training Skill — Smoother, more reliable kiting patterns.
Elite Scaling (Round 40+)
After round 40, a secondary linear factor kicks in: (round - 40) × 0.005, capped at 0.15 (maxed at round 70). This is applied only to three stats to keep bots viable in ultra-high rounds without breaking early game balance:
- Headshot Chance — Higher headshot rate needed because zombie health scales exponentially.
- Crowd Flee Count — Higher tolerance because zombie spawns increase dramatically.
- Powerup Range — Wider search because powerups become critical for survival.
Downed Bot Behavior
When a bot goes down, it doesn't just lie there waiting. Downed bots have their own behavioral system that maximizes their chances of survival and contribution even while incapacitated.
Downed Actions
- Crawl Toward Teammates — Downed bots slowly crawl toward the nearest living teammate, reducing the distance the reviver needs to travel.
- Downed Combat — Using their pistol, downed bots scan for zombies within 500 units and engage them. This provides covering fire for teammates attempting the revive.
- Dynamic Headshots — Rank 3+ bots land headshots 70% of the time while downed, using the
j_headbone tag for accurate aiming. This works correctly for crawlers (lower head), standing zombies, and tall bosses like the Panzer. - Resource Lock Cleanup — The moment a bot goes down, all resource locks (Mystery Box, Pack-a-Punch, debris) are automatically cleared. This prevents permanent lockouts that could cripple the team.
Announcer System
The announcer provides dramatic HUD splashes at key moments throughout the game. These milestones celebrate progress and give the experience a polished, production-quality feel.
Round Milestones
| Round | Splash | Significance |
|---|---|---|
| 5 | Round milestone | Early game phase complete |
| 10 | Round milestone | Mid-game begins |
| 15 | Round milestone | Zombies start getting serious |
| 20 | Round milestone | High round territory |
| 25 | Round milestone | Quarter century |
| 30 | Round milestone | Experienced player territory |
| 40 | Round milestone | Elite scaling kicks in |
| 50 | Major milestone | Half century achievement |
| 60 | Major milestone | Deep into high rounds |
| 75 | Major milestone | Expert-level gameplay |
| 100 | Legendary milestone | Triple digits. Legendary achievement |
| 115 | Ultimate milestone | The Zombies number. Maximum prestige |
Special Splashes
- BOTS DEPLOYED — Displayed when all bots have spawned and initialized successfully.
- Clutch Revive — Special splash when a bot revives someone while below 25% health. Celebrates the heroic play.
- Kill Milestones — Individual bot callouts at 50, 100, 200, and 500 kills. Shows which bots are carrying their weight.
HUD System
The HUD system provides real-time visual feedback about bot status, actions, and events. Every element is carefully positioned to avoid overlapping with the game's existing UI.
Element Positioning
| Element | Position | Duration | Description |
|---|---|---|---|
| Bot Names | Bottom-right (y -105, -84, -65) | Persistent | Colored names (Blue/Gold/Green) with fontScale 1.4. Displayed next to score numbers. |
| Welcome Banner | Center (y -60 to +40) | 10 seconds | Title, version, rank info. Fades in on game start. |
| Milestone Splash | Center (y -30 to 0) | 3.5 seconds | Round milestone celebrations with dramatic styling. |
| Squad Alert | Center-low (y +50) | 9 seconds | "BOTS DEPLOYED" confirmation after initialization. |
| Notification Bar | Bottom-center (y 160) | 3 seconds | Status updates (low ammo, critical health, etc.). |
| Event Feed | Top-right (step 18px, max y 200) | 4 seconds per entry | Scrolling feed of bot actions (buying, opening, reviving). |
Clean Lifecycle
All HUD elements follow a strict lifecycle: create, fade in, display, fade out, destroy. Elements are properly cleaned up on game end. The system handles edge cases like rapid succession events, simultaneous displays, and game-ending mid-animation.
Map-Specific Logic
Every BO2 Zombie map has unique mechanics that require specialized AI behavior. Custom Bots has dedicated logic for all 6 maps.
TranZit
- Lava damage detection and avoidance pathfinding
- Bus stop awareness and route tracking
- Turbine and power interactions
- Fog zone hazard detection with Denizen awareness
- Galvaknuckle and Bowie Knife locations
- Buildable part locations across all areas
Nuketown Zombies
- Population counter tracking
- Bunker door timing and positioning
- Compact map with adjusted training zones
- Mannequin Easter Egg positioning
- Shelter defense coordination
Die Rise
- Elevator awareness and safe positioning
- Falling hazard detection
- Sliquifier priority weapon scoring (+80)
- Trample Steam part collection
- Multi-floor navigation management
- Elevator symbol positioning for Easter Egg
Mob of the Dead
- Afterlife mode awareness (don't interact with ghosts)
- Plane part collection across the prison
- Bridge defense coordination and positioning
- Active trap detection and avoidance (fan traps, acid traps)
- Cerberus head feeding for Easter Egg
- Blundergat/Acid Gat priority scoring (+80)
Buried
- Leroy (The Giant) pathfinding avoidance
- Chalk weapon placement and activation
- Witch (Ghost Lady) avoidance zones
- Paralyzer priority weapon scoring (+80)
- Ray Gun Mark II debut map (+85 highest priority)
- Unique underground maze navigation
Origins
- 6 generators with defense and activation logic
- Mud zone detection and avoidance
- Panzer Soldat timing and targeting priority
- Giant Robot foot stomp zone avoidance
- Staff part collection (fire, wind, lightning — never ice)
- Shovel seeking (8-method search) with dig site awareness
- Crazy Place navigation and defense
- Iron Fist extended knife rounds through R8
Map Weapon Preferences
Each map has a curated weapon preference list that adds bonus scores to certain weapons. These bonuses stack with the base weapon quality score to guide bots toward the best weapons available on each map. Higher bonus = higher priority.
| Map | Top Weapons (Bonus Score) |
|---|---|
| TranZit | Ray Gun (+70), Galil (+50), HAMR (+45), AK74u (+45), RPD (+45), MP5 (+40) |
| Nuketown | Galil (+50), AK74u (+45), MP5 (+40) |
| Die Rise | Sliquifier (+80), AN-94 (+55), PDW-57 (+45), SVU (+40) |
| Mob of the Dead | Blundergat/Acidgat (+80), Ray Gun (+70), Thompson (+50), PDW-57 (+45) |
| Buried | Ray Gun Mk II (+85), Paralyzer (+80), AN-94 (+55), LSAT (+50) |
| Origins | Staffs (+90), STG-44 (+50), MP40 (+45), MG08 (+40) |
Easter Egg Support
Custom Bots provides step-by-step Easter Egg assistance on all 6 BO2 Zombie maps. Toggled via bo2_zm_bots_ee (enabled by default). The core philosophy is simple:
Health Gate Safety: If a bot drops below 30% health during an active Easter Egg objective, the EE goal pauses for 3 seconds. The combat and flee systems take over until the bot stabilizes, then the EE goal resumes. This prevents bots from standing on an EE position while being overwhelmed by zombies.
TranZit — Tower of Babble
Bots assist with the pylon activation sequence, position at lamp posts, and target the Avogadro when it spawns. They provide covering fire during the critical activation window.
Never: Interact with the pylon, place turbines on activation points, or touch the NavCard Table. These final steps are left entirely to the human player.
Nuketown — Mini Easter Eggs
Bots knife Marlton's bunker door (population count step), shoot mannequin heads for the mushroom cloud EE, and provide cover at the bunker entrance during critical moments.
Never: Complete the final mannequin sequence. The finishing blow is always the player's.
Die Rise — High Maintenance
Bots stand on gold symbols in elevators with a sticky 8-second minimum stay (prevents flickering if the human briefly steps off). They prioritize buying the SVU sniper rifle which is needed for a step. They provide roof coverage during the dragon head sequence.
Never: Place trample steams on specific locations or interact with the final activation device.
Mob of the Dead — Pop Goes the Weasel
Bots feed Cerberus dog heads by killing zombies near them, cover plane part locations while the player collects them, and provide heavy suppressive fire during the rooftop sequence and bridge confrontation. They coordinate positioning for maximum coverage.
Never: Sit in electric chairs or participate in the final Weasel confrontation. The endgame choice is always the player's.
Buried — Mined Games
Bots take sharpshooter positions for the target shooting steps, shoot targets when they appear, and charge soul lanterns by killing zombies near them. They protect the player during vulnerable lantern charging moments.
Never: Place final items in the witchcraft locations or activate the Guillotine step. The resolution belongs to the player.
Origins — Little Lost Girl
The most complex Easter Egg support in the mod. Bots fill all 4 soul chests by killing zombies near them (scan interval drops from 5s to 1.5s when a player is near an active chest). They defend all 6 generators during activation. They provide Crazy Place coverage and prioritize Panzer Soldat targeting when it spawns.
Never: Place staffs in their pedestals, interact with the Maxis tablet, or press the final button in the Crazy Place. The Little Lost Girl is saved by you, not the AI.
Hazard Detection
Each map has environmental hazards that damage or slow players. The hazard detection system identifies these zones and routes bots around them. Hazard awareness scales with rank — Shotguns bots always avoid every hazard, while Bones bots stumble through them regularly.
| Hazard | Map | Effect | Bot Response |
|---|---|---|---|
| Lava Pools | TranZit | Contact damage (burns health rapidly) | Pathfind around lava. Cancel any goal that would require crossing lava. |
| Mud Zones | Origins, Buried | 60% movement slow | Avoid mud when possible. If forced through, sprint to minimize exposure. |
| Fog & Denizens | TranZit | Denizen spawns on head | Stay on paths. Avoid lingering in fog zones. Knife denizens off head. |
| Robot Feet | Origins | Instant down on stomp | Detect robot approach. Move to safe zone during stomp window. |
| Active Traps | Mob of the Dead | Fan traps, acid traps damage | Detect active trap triggers within 300 units. Route around active traps. |
Hazard Avoidance by Rank
- Shotguns (100%) — Perfect avoidance. Never touches a hazard.
- Skull & Knife (85%) — Occasional misstep in tight areas.
- Skull (60%) — Usually avoids hazards, sometimes walks through mud.
- Crossed Bones (40%) — Regularly takes unnecessary hazard damage.
- Bones (20%) — Basically ignores hazards. Walks straight through lava.
Safety & Stability
Custom Bots is engineered for crash-free long sessions. When you're going for round 100+, stability isn't optional — it's the most important feature. Every system has redundant safety guards and graceful failure modes.
Loop Safety
- 76
endonguards — Every threaded function includes endon guards for death, disconnect, and game_ended events. If the game state changes, all bot threads terminate cleanly instead of erroring out. - 637
IsDefinedchecks — Before accessing any entity, variable, or reference, the code verifies it still exists. Entities can be destroyed by the game engine at any time — every access is guarded. - 68
isAlivechecks — Dead bots don't try to act. Every action entry point verifies the bot is alive before proceeding. - 200-tick training abort — Training circuits have a maximum iteration counter. If a circuit runs for 200 ticks without completing, it aborts to prevent infinite loops.
Resource Management
- Resource Locks — Mystery Box, Pack-a-Punch, generators, and doors each have a lock system preventing multiple bots from accessing the same resource simultaneously. All locks auto-clear on disconnect, laststand, or game end.
- 61-Label Goal Sweep — On every stuck reset and respawn, all 61 possible goal labels are cleared from the bot. No stale goals survive a recovery cycle.
- Ghost Player Kick — Every 10 seconds, a sweep checks for invalid player references and removes them. Prevents crashes from disconnected clients.
Combat Safety
- Triple LOS — Every shot is verified against three independent line-of-sight checks. Zero wall-shooting.
- 3-Frame Stale Clearing — If a target fails LOS for 3 consecutive frames, it's dropped. No fixating on invisible targets.
- No Scatter <150u — At close range, aim scatter is disabled entirely. Direct aim only.
- No Fallback Shooting — If the final aim point fails LOS, the bot stops shooting. No hopeful wall-spraying.
takeweapon()Only — Weapon swaps always usetakeweapon(), nevertakeallweapons(). This preserves the bot's knife, grenades, and tactical equipment.
Anti-Crash Engineering
The T6 GSC engine has many undocumented limitations and crash triggers. Custom Bots handles all of them.
Known T6 GSC Pitfalls
| Issue | Cause | Custom Bots Solution |
|---|---|---|
| Server crash on entity access | Entity destroyed between check and use | 637 IsDefined guards on every entity access |
| Orphaned threads | Bot dies/disconnects during threaded function | 76 endon guards terminate threads cleanly |
| Infinite loops | Goal never reached, path never completes | 200-tick abort counters on all loops |
| Resource deadlock | Bot dies holding a resource lock | Automatic lock cleanup on death/laststand |
| Ghost players | Client disconnect without cleanup | 10-second ghost sweep loop |
| Stale goals | Goals persist after context changes | 61-label full goal sweep on recovery |
| HUD overflow | Too many HUD elements created | Strict lifecycle: create, display, destroy |
Functions That Don't Exist in T6 GSC
Many common scripting functions from other CoD titles don't exist in the T6 engine. Using them causes silent failures or crashes:
exec(),setname(),setclantag()— Not available in T6pressusebutton(),pressuse(),pressfrag()— Not available in T6pressmelee()with parameters — Exists but parameters are ignoredtakeallweapons()— Exists but strips everything including knife. Custom Bots usestakeweapon()instead to preserve loadout.
File Architecture
The entire codebase lives in a single file with 44 clearly delineated sections using Unicode box-drawing borders. Each section has a standardized header format with its number, name, and a brief description.
| # | Section | Description |
|---|---|---|
| 1 | Entry Point | init() function. DVar loading, spawn manager initialization, level-scope variable setup. |
| 2 | Rank Profiles | 5 rank definitions with 35+ parameters each. All behavioral stats configured here. |
| 3 | HUD | Welcome banners, bot names, notifications, milestones, event feed, squad alerts. |
| 4 | Spawn Manager | Bot spawning, testclient management, connection handling. |
| 5 | Bot Init | Profile assignment, personality generation, stat initialization. |
| 6 | Main Loop | Decision engine integration. 0.25s tick rate. Action selection and execution. |
| 7 | Leader/Follow | Leader scoring, AFK detection, follow distance, stuck detection. |
| 8A | Knife Strategy | Early round knifing for point optimization. Round-scaled softening. |
| 8B | Early Game Flow | Weapon → Window → Door sequential startup. Elite skip logic. |
| 9 | Combat | Triple LOS engine, target acquisition, burst fire, focus accuracy, reaction jitter. |
| 10 | Training | Circuit building, kiting, turn-and-burn, magazine awareness, lap counting. |
| 11 | Revive | Danger-aware reviving, human priority, clutch detection, crawl-toward behavior. |
| 12 | Powerups | Powerup detection, scoring, collection, Max Ammo awareness. |
| 13 | Perks | Dynamic perk priority, Quick Revive boost, Speed Cola LMG boost. |
| 14 | Wall Weapons | Wallbuy scanning, weapon scoring, cost assessment, launcher blacklist. |
| 15 | Mystery Box | Box detection, single-bot lock, weapon evaluation, lock cleanup. |
| 16 | Pack-a-Punch | Best weapon selection, single-bot lock, upgrade execution, lock cleanup. |
| 17 | Doors | Door/debris detection, debris lock, stuck prevention, cost evaluation. |
| 18 | Ammo | Ammo monitoring, emergency buying, Max Ammo awareness, conservation. |
| 19 | Map Logic | Map-specific behaviors for all 6 maps. Hazard zones, special mechanics. |
| 19A | Collectibles | Part pickup across all maps. Build table navigation. Shovel reservation. |
| 19B | Proactive Seeking | Active routing to part spawns. Generator seeking. Dig site patrol. |
| 20 | Hazards | Lava, mud, fog, robot feet, active traps. Rank-scaled avoidance. |
| 21 | Danger Check | Zombie counting, threat assessment, flee triggering. |
| 22 | Player Blocking | Smart dodge system. Perpendicular step-aside behavior. |
| 23 | Cleanup | Goal sweep, resource lock cleanup, stuck recovery, respawn handling. |
| 24 | Utilities | Helper functions. Distance calculations, entity validation, safe accessors. |
| 25 | Name Pool | 50+ zombie-themed bot names. Random selection with prefix. |
| 26A | Communication | Randomized callouts, chat messages, HUD feeds, throttling. |
| 26B | Decision Engine | Utility AI scoring. All actions evaluated simultaneously. |
| 27 | Personality | Aggressive/Supportive/Cautious trait generation and application. |
| 28A | Smart Positioning | Spread-out system, cover angles, facing distribution. |
| 28B | Window Defense | Window claiming, dynamic round cap, 1200-unit search. |
| 29 | Round Scaling | Logarithmic curve + elite R40+ scaling. 10 stats affected. |
| 30 | Downed Behavior | Crawl toward teammates, downed combat, j_head headshots, lock cleanup. |
| 31 | Announcer | Round milestones, clutch revive splashes, kill milestones, squad alerts. |
| 32 | EE Core | Easter Egg management, health gate, step tracking, completion guard. |
| 33 | TranZit EE | Tower of Babble: pylon, lamp posts, Avogadro, NavCard. |
| 34 | Nuketown EE | Mini EEs: bunker door, mannequins, shelter cover. |
| 35 | Die Rise EE | High Maintenance: gold symbols, SVU buying, sticky timer. |
| 36 | Mob EE | Pop Goes the Weasel: Cerberus heads, plane parts, bridge/rooftop. |
| 37 | Buried EE | Mined Games: sharpshooter positions, targets, soul lanterns. |
| 38 | Origins EE | Little Lost Girl: soul chests (1.5s scan), generators, Crazy Place, Panzer. |
| 39 | Map Weapons | Per-map weapon preference bonuses. 6 maps with curated lists. |
Border Formatting
Every section uses Unicode box-drawing characters for visual clarity. Three border widths are used consistently throughout:
- Section Headers — 76
═characters (81 total including║and spacing) - Medium Functions — 74
═characters (79 total) - Small Functions — 71
═characters (76 total)
Technical Deep Dive
For modders and developers who want to understand how the code works under the hood.
GSC Engine Details
GSC (Game Script Code) is Treyarch's proprietary scripting language for Call of Duty. It runs server-side, is single-threaded with cooperative multitasking (using wait statements), and has access to the game's entity system, animation system, and AI navigation mesh.
Key technical constraints:
- No arrays of structs — arrays can only hold primitives or entity references
- No string concatenation at runtime without
+operator - No try/catch — every error is a server crash
- No modules or imports from custom files (only game-provided includes)
- No dynamic function calls or reflection
- All bot commands are fire-and-forget — no confirmation of execution
Trigger Interaction System
T6 uses a complex trigger hierarchy for interactive elements. bot_trigger_entity() implements a 4-path fallback system to interact with any trigger type:
unitrigger_stub→use_trigger(primary path)triggerproperty (secondary path)trigger_stubproperty (tertiary path)- Direct entity notify (last resort)
This layered approach ensures bots can interact with doors, perk machines, buildable tables, and other interactive elements across all maps, regardless of how each map's triggers are structured.
Entity Search Methods
Finding entities (parts, weapons, triggers) in T6 requires multiple approaches because different maps use different naming conventions. The collectible system uses a 10-target entity name search. The shovel finder uses an 8-method search. The generator finder uses a 6-method search. Each method tries progressively broader searches until the target is found.
Navigation & Pathfinding
T6 provides a navigation mesh that bots can query for pathfinding. Custom Bots uses nav nodes for training circuit construction, hazard checking (midpoint analysis between waypoints), and safe position finding. When the nav mesh fails (common in complex geometry), the stuck detection system kicks in and teleports the bot to a known safe position.
Frequently Asked Questions
bot_is_ice_staff_item() blocks all ice staff parts and crystals, and bot_is_ice_staff_weapon() blocks the completed weapon. Bots will never touch it.bo2_zm_bots_count to any number from 1 to 7. The default is 3 because standard BO2 lobbies hold 4 players (you + 3). On 8-player servers, you can run up to 7 bots for a full lobby.custom_bots_addon_template.gsc) is provided. It auto-detects and hooks into spawned bots, with 7 documented examples covering state management, callouts, movement, targeting, weapons, map logic, and round-specific behavior. You never need to touch the main script.Addon Development Guide
A complete template file (custom_bots_addon_template.gsc) is included for developers who want to add custom behaviors without modifying the main script. The addon system hooks into spawned bots automatically and provides a clean interface for extending behavior.
What You Can Do
- Custom State Logic — Add new behavioral states that trigger under specific conditions
- Custom Callouts — Add new chat messages and HUD notifications
- Movement Overrides — Modify bot movement in specific situations or map areas
- Targeting Rules — Add custom target priorities or exclusions
- Weapon Preferences — Override weapon scoring for specific scenarios
- Map-Specific Logic — Add behaviors for custom map areas or mechanics
- Round-Based Events — Trigger actions at specific round numbers
Setup
Copy the Template
Copy custom_bots_addon_template.gsc and rename it (e.g., custom_bots_addon_mymod.gsc).
Place in Scripts Folder
Place the renamed file in storage/t6/scripts/zm/ alongside custom_bots.gsc.
Edit Your Behavior
Modify the addon_custom_behavior() function with your custom logic. The 7 documented examples in the template show exactly how to access bot state, weapons, goals, and more.
Restart Plutonium
Fully restart Plutonium to load the new addon. It hooks into bots automatically at spawn.
Credits
Created by Astroolean
11,066 lines of autonomous zombie-killing intelligence, built from the ground up for the Plutonium T6 community.
Inspired by osmnbtrclk/bo2_zm_bots. Completely independent rewrite with different architecture, different AI systems, and different features. Credit where due for the original concept and inspiration.
Version 5.0.0 — 2026 Edition