The Decompiled Logic of a Billion-Dollar War: Inside plutoniummod/t6-scripts

How 25MB of GSC scripting defines the game feel, AI ethics, and architectural soul of Black Ops II.

plutoniummod/t6-scripts

A massive clockwork war machine with a transparent outer shell revealing GSC code etched into its gears.
The logic behind the game is a massive, interconnected event-driven machine.

These are unedited decompiled scripts the base game uses nothing else.

JezuzLizard, Plutonium Staff · [Resource][T6] Stock Scripts | Plutonium

Key Takeaways

The 0.05-Second Consciousness

The source code of a AAA masterpiece is rarely locked in a vault. It often sits in a GitHub repository, readable and moddable. The plutoniummod/t6-scripts repository is the decompiled brain of Call of Duty: Black Ops II. It serves as an autopsy of peak game design from 2012. We are looking at the literal scripts that defined a generation's game feel.

Consider the bots. How does a script simulate a vibe and reaction time? In the file _bot_combat.gsc, bots operate on a continuous loop that evaluates the environment every 0.05 to 0.5 seconds depending on difficulty. Difficulty scaling is literally just a wait command. An easy bot waits 0.75 seconds after a kill to react, while a hard bot waits only 0.25 seconds.

A hedcut portrait of JezuzLizard.

The anatomy of an AI decision in Black Ops II.

The Callback Bridge

This repository relies on several engine-level abstractions. The file _callbacksetup.gsc acts as the primary interface between the C++ game engine and the GSC script layer. It defines code callbacks that the engine calls directly when specific events occur. If a player connects, takes damage, or a host migration begins, this file handles the handshake.

Without this file, the script environment would be blind to engine-level events. It heavily uses level callbacks (like [[ level.callbackplayerdamage ]]), allowing different gametypes to swap out damage handling logic without modifying the engine-facing function.

level.callbackStartGameType = ::Callback_StartGameType;
level.callbackPlayerConnect = ::Callback_PlayerConnect;
level.callbackPlayerDisconnect = ::Callback_PlayerDisconnect;
level.callbackPlayerDamage = ::Callback_PlayerDamage;
level.callbackPlayerKilled = ::Callback_PlayerKilled;

The Invisible Heat Map

Spawning in a multiplayer game is not random. It is governed by a strict set of mathematical rules. The _spawning.gsc file manages the Influencer system. It calculates where players should spawn based on the positions of enemies, claymores, and active killstreaks.

A close-up of a robotic eye with a wait command in the iris.
The game engine constantly evaluates the safety of every coordinate on the map.

The system uses a bitmask-based approach to categorize threats. It defines shapes (spheres and cylinders) and curves (linear and steep) to calculate a score for every potential spawn point. The highest score wins.

Survival of the Persistent

A player's lifecycle is managed by _globallogic_player.gsc. It bridges the gap between persistent data stored on servers and volatile data active in the current match. This ensures that when a player joins, their rank, challenges, and unlocks are correctly loaded.

The most elegant aspect is state persistence. The self.pers array survives player deaths and round transitions, while the self object is often wiped or reset. This distinction allows the game to handle complex round-based logic without losing track of earned medals or scorestreaks.

From GSC to the Modern Era

The ecosystem represents the modernization era of Call of Duty modding. While legacy GSC remains the native way to mod, the shift toward Lua-based wrappers provides a more robust, performant, and accessible environment. It lowers the barrier to entry for new creators.

Plutonium T6 now supports loading source scripts so compiling them isn't needed anymore

Future, Maintainer (Plutonium-T6-Scripts mirror) · Future/Plutonium-T6-Scripts - Plutonium-T6-Scripts - AlterWare Git
FeaturePlutonium T6-Scripts (Lua)Legacy GSC
LanguageLua 5.1 / LuajitGSC (Proprietary C-like)
ApproachPlugin-based wrapper/VMNative engine execution
Ease of UseHigh (Modern syntax, tables)Medium (Quirky, limited types)
PerformanceHigh (Luajit is very fast)Native (Optimized for engine)