Skip to content

AoE2Control: Lua Scripting Engine for Age of Empires II: Definitive Edition

AoE2Control Lua scripting engine documentation banner for Age of Empires II: Definitive Edition

AoE2Control is a Lua scripting engine and documentation hub for Age of Empires II: Definitive Edition. It reads live game state and sends commands directly without pixel scanning or mouse/keyboard simulation, making it suitable for automation, overlays, bots, and external AI agents.

Join Discord

Download Latest Release

What Is AoE2Control?

AoE2Control talks directly to the game, allowing developers to:

  • Read game state (units, resources, players, map tiles, fog-aware object visibility)
  • Send commands (train units, move armies, research technologies)
  • Render custom overlays (HUD elements, minimap markers, world-space indicators)
  • Configure one or more module instances via a built-in settings interface

Key Features for AoE2 Lua Scripting

Feature Description
AoE2Control - Launcher Attaches the engine to the game
Extensive API 100+ Commands, facts, render functions, and strategic components
Per-Player Modules Configure one module slot for each player and run different modules in the same session
Custom Rendering Draw shapes and text in screen, world, or minimap space
Menu Settings Add checkboxes, sliders, dropdowns, keybinds, and color pickers
Multi-file Projects Use require() for modular Lua code (depth limit: 3)
IPC for ML Named pipes + JSON with module routing for external agents
Encrypted Modules Precompiled .module files for code protection
VS Code Plugin Available on Marketplace — IntelliSense, snippets, and API definitions
AI Reference Script Copy or Download here — Provides formatted information about CONTROL, ready to be pasted into a Coding Agent Prompt

Who This Documentation Is For

  • Lua scripters — Build bots, overlays, or automation
  • AI/ML developers — Connect external agents via IPC
  • AoE2 modders — Create custom in-game tools

Prerequisites

  • Age of Empires II: Definitive Edition
  • Basic Lua familiarity is helpful but not required
  • Windows (64-bit)