Halo Script
The Lisp-inspired, S-expression scripting language embedded in Bungie's Blam! engine, used to script missions, cutscenes, and AI behavior across the Halo series since 2001.
Created by Bungie
Halo Script — sometimes referred to in the community as HaloScript, HSC, or BlamScript — is the domain-specific scripting language embedded in Bungie’s Blam! engine, which powers the Halo series of first-person shooters. First shipped with Halo: Combat Evolved in November 2001, the language uses a Lisp-style S-expression syntax to describe mission logic, scripted events, AI behaviors, cinematic pacing, and dialogue triggering. Although Halo Script is not a general-purpose programming language and has never run outside the Halo engine and its derivatives, it has scripted the campaigns of one of the most commercially and culturally significant video game franchises of the twenty-first century.
History & Origins
Born inside Bungie
Halo Script was created internally at Bungie during the development of Halo: Combat Evolved in the late 1990s and early 2000s, as part of the broader toolchain that would become known as the Blam! engine. The exact internal history of the language has not been published in detail by Bungie, but by the time Halo shipped on the Xbox in November 2001 the engine already had a mature scripting subsystem capable of driving the entire single-player campaign. Mission designers wrote .hsc script files that were compiled by Bungie’s tool and Sapien editor utilities into binary script blocks stored inside scenario tag files.
The choice of a Lisp-like S-expression syntax was unusual for a game scripting language at the time — most of Halo Script’s contemporaries (UnrealScript, QuakeC, Lua) used C-influenced syntax — but it gave the language a simple, regular grammar that was easy to parse, easy to extend with new engine functions, and well-suited to expressing the kind of declarative mission logic Bungie’s designers needed.
Exposure through Halo Custom Edition
Although Bungie never published a formal language reference for Halo Script, the language became broadly known to the public through the Halo Editing Kit (HEK), released alongside Halo Custom Edition in 2004. The HEK shipped with the same compiler and editor tools Bungie used internally, allowing community modders to write and compile their own Halo Script. The resulting community — built around sites such as Halomaps and later the Open Sauce project — produced extensive reference material, tutorials, and documentation of the language’s syntax, available functions, and quirks.
Continuation under 343 Industries
When 343 Industries took over the Halo franchise after Halo: Reach (2010), they inherited Bungie’s scripting toolchain and used it for Halo 4 (2012) and subsequent campaign content. Halo: The Master Chief Collection, released on Xbox One in 2014 and rolled out on PC starting in 2019, brought the original mission scripts forward into modern hardware. Subsequent official mod tools for the MCC on PC made Halo Script editing officially supported on PC for the first time in the series’ history. Halo Infinite, released in December 2021, runs on 343 Industries’ newer Slipspace engine, but uses a scripting system descended in spirit from the original Halo Script lineage.
Design Philosophy
A declarative DSL for mission designers
Halo Script’s design reflects its origin as a tool for mission designers and scripters, not for programmers writing engine code. The language’s primary purpose is to let designers express, in a relatively concise way, statements like “when the player enters this trigger volume, spawn this encounter, play this dialogue, and wait until these enemies are dead before advancing the mission stage.” The S-expression syntax keeps the surface of the language small, while the real power comes from the large library of engine-provided functions that the script can call.
A two-tier extension model
The language itself is intentionally minimal: it provides a fixed set of primitive types, a small set of control-flow forms, and the ability to define scripts (named blocks of code) and globals (named typed values). Everything game-specific — spawning AI, controlling cameras, triggering cinematics, playing sounds, querying world state — is exposed as a built-in function implemented inside the engine in C/C++. This two-tier model is similar to the way many embedded scripting languages (Lua, Tcl, Emacs Lisp) are used: the language provides the glue, and the host application provides the verbs.
Strong, static typing for a dynamic feel
Although the syntax superficially resembles dynamically typed Lisps, Halo Script is actually statically and strongly typed. Globals and script parameters must be declared with an explicit type (such as short, real, boolean, string, unit, ai, vehicle, object, cutscene_flag, device, team, and many others), and the compiler enforces type compatibility at compile time. This catches a large class of errors at build time rather than during a midnight mission playtest.
Key Features
S-expression syntax
Every Halo Script construct is an S-expression: a parenthesized list with an operator at the head and arguments following. A trivial example:
| |
The first line declares a script named main with a startup script type, meaning the engine will run it automatically when the mission loads. Inside, the script calls two built-in functions: print, which writes a debug string, and sleep, which pauses the script for the given number of game ticks (Halo runs at 30 ticks per second).
Script types
A Halo Script can be declared with one of several script types that tell the engine how to schedule it:
- startup — runs once when the mission loads.
- continuous — restarts every tick (used for ongoing conditions that should be checked constantly).
- dormant — does not run unless explicitly woken with
wake. - static — a callable subroutine that returns a value.
- stub — a placeholder script that can be overridden at the scenario level.
This vocabulary directly mirrors the way Bungie’s designers thought about mission logic: some things happen once at the start, some things need to be true forever, some things sit idle until another script wakes them up, and some things are reusable helpers.
Strong type system with engine-specific types
In addition to primitive types like boolean, short, long, real, and string, Halo Script exposes a rich set of engine-specific types representing things in the game world:
unit— a biped or vehicle that can be commanded.ai— an AI squad or actor reference.object— any in-world object.vehicle— a vehicle reference.cutscene_flag,cutscene_camera_point,cutscene_title— cinematic primitives.device— a switchable in-world device (doors, machines).trigger_volume— a region in space.team— a faction.
A function like (unit_set_enterable_by_player some_warthog true) is type-checked: passing an ai reference where a unit is expected is a compile error.
Hundreds of engine functions
The expressive power of Halo Script comes from its library of engine-provided functions, numbering in the hundreds across the series. Function families cover AI command and querying, camera and cutscene control, sound and dialogue playback, object spawning and despawning, HUD and UI control, scenario state, scripted physics, and debugging. The exact function set varies between games — Halo 2 added many functions over Halo 1, Halo 3 added more, and so on — so script written for one title typically does not compile cleanly against another without adaptation.
Compilation into tag data
Halo Script source files (.hsc) are not interpreted at runtime as text. Instead, the engine’s editing tools compile them into binary script and global blocks stored inside the scenario tag alongside other mission data such as object placements and AI squads. At runtime the engine executes the compiled bytecode against an internal script virtual machine. This means script changes require a rebuild of the scenario tag, but it also means scripts run efficiently and ship as part of the same data pipeline as the rest of the level.
Evolution
Halo Script has evolved across the games of the series, with each title adding new functions for new gameplay systems:
| Game | Year | Notable scripting additions |
|---|---|---|
| Halo: Combat Evolved | 2001 | Initial language and core function set; vehicles, basic AI commands, cinematics |
| Halo 2 | 2004 | Expanded function library, dual-wielding hooks, expanded AI orders, additional cutscene controls |
| Halo 3 | 2007 | Functions for new gameplay systems (equipment, Forge interoperability), refined AI scripting |
| Halo: Reach | 2010 | Functions supporting space combat, Firefight wave logic, and expanded cinematic control |
| Halo 4 / MCC era | 2012 onward | Continued under 343 Industries, with the toolchain inherited from Bungie |
The core syntax of the language has remained remarkably stable since 2001 — a Halo: CE designer reading a Halo 4 script would recognize the language immediately — even as the available functions and supported engine features have grown substantially.
Current Relevance
Halo Script is not used outside the Halo engine and its derivatives, and it is not a language anyone learns for general-purpose programming. Its current relevance comes from two places:
Active modding and preservation. With the release of official mod tools for Halo: The Master Chief Collection on PC, Halo Script editing is now officially supported for end users on the original Halo titles, Halo 2, Halo 3, Halo: Reach, and Halo 4. A modding community continues to build custom campaigns, missions, and scripted experiences using the language. The community-maintained tools and documentation that grew up around Halo Custom Edition since 2004 remain a major reference for working with the language.
A working example of an embedded DSL. For students of game-engine design and domain-specific languages, Halo Script is a well-known example of a Lisp-influenced embedded scripting language used at production scale to drive the campaigns of a major commercial franchise for more than two decades.
Why It Matters
Halo Script’s importance lies less in any particular technical innovation and more in what it demonstrates about scripting languages in shipped games:
Lisp-style syntax can ship in a blockbuster game. At a time when most game scripting used C-style or BASIC-style syntax, Bungie quietly shipped a Lisp-influenced S-expression language inside one of the best-selling console games of the early 2000s. The choice never seems to have hindered the game’s designers, and it remained the scripting interface for the series for the entirety of Bungie’s tenure on Halo.
A static type system for designers. Halo Script shows that strong static typing is not incompatible with a tool aimed at non-programmers. By tying types to in-engine concepts (
unit,vehicle,ai,device,cutscene_flag), the language gives designers compile-time safety without ever asking them to think about templates, generics, or polymorphism.Longevity through a tight host coupling. Halo Script is not a general-purpose language pushed into a game engine; it was built for the engine, evolves with the engine, and has survived two studio handoffs (Bungie to 343 Industries) and multiple console generations because the cost of replacing it has always been higher than the cost of extending it. This makes it a useful case study in how embedded DSLs can outlive much more famous general-purpose languages within their host applications.
A community-documented language. Because Bungie never published a formal language specification, nearly all of the public knowledge of Halo Script’s syntax and semantics comes from the modding community’s reverse engineering, tutorials, and wikis built up over more than two decades. It is one of the better-documented examples of a proprietary scripting language whose documentation lives primarily outside its creator.
Timeline
Notable Uses & Legacy
Halo: Combat Evolved (Bungie, 2001)
The original Halo's campaign was scripted in Halo Script. Mission triggers, AI encounters, vehicle behaviors, and the cinematic pacing of set pieces like the opening of the Pillar of Autumn or the discovery of the Flood were driven by .hsc scripts compiled into the game's tag data.
Halo 2 and Halo 3 (Bungie, 2004 and 2007)
Both sequels continued to use Halo Script for mission scripting on Xbox and Xbox 360. The scripting system handled gameplay flow, mid-mission cutscenes, dialogue triggering, and the choreography of large multi-stage encounters that became a hallmark of the series.
Halo: Reach (Bungie, 2010)
Bungie's final Halo title used Halo Script to drive its campaign, including the prologue, the orbital sequence in 'Long Night of Solace,' and Firefight wave pacing. Reach represented the most mature use of the Blam!-engine scripting pipeline under Bungie's direct stewardship.
Halo Custom Edition modding community
Following the 2004 release of the Halo Editing Kit for Halo PC, a large community of mappers and modders used Halo Script (compiled with Bungie's Sapien and tool.exe utilities) to build custom singleplayer campaigns, scripted multiplayer maps, and machinima sets. Much of the publicly available documentation of the language comes from this community's reverse-engineering and tutorials.
Halo 4 and the Master Chief Collection (343 Industries, 2012 onward)
343 Industries inherited the scripting toolchain from Bungie and used it to author Halo 4's campaign and to maintain the campaigns of the older titles within Halo: The Master Chief Collection. With the MCC's official mod tools on PC, Halo Script editing became sanctioned for end users for the first time.