This page explains exactly how to use each tab of SCAR Toolkit: Online (overlays, ESP, AI assistant), Offline (sandbox tools), SCAR / Lua Runner (custom scripts) and Settings.
SCAR Toolkit is a PC companion for Age of Empires IV focused on practice, testing and scripting. Use it like a lab:
The goal is not to “play the game for you”, but to test builds, train macro and debug scripts faster than a normal ladder match would allow.
As this is all Lua/SCAR code, you must wait about 3–4 seconds between activating features.
If you spam toggles (for example: enabling multiple functions instantly back-to-back), the AoE4 SCAR engine can overload and crash the game.
Late game warning: in 3v3 or 4v4 with huge armies, avoid turning on new features in the middle of big fights – the game is already heavy, and adding new Lua logic at that moment increases the chance of a crash.
Online mode is your real-time HUD: it reads the current game state and overlays information on your screen or minimap while you play. It includes:
Score & Score HUD
You can pick whichever style you prefer – it’s the same score logic, just a different way of displaying it.
Team HUD
1v1 HUD
Auto Villager Macro needs to know which group your Town Centers are on. SCAR Toolkit assumes control group 4.
Once all your TCs are on group 4, Auto Villager Macro can safely manage TC-related logic.
The ESP system is a visual debug + awareness tool bound to Online mode. It can:
Performance rules
Sheep tools are simple: you toggle them ON/OFF. However:
AoE4World overlay shows opponent ladder info inside your HUD.
When a match starts, it will attempt to display:
You still control your army and villager. The AI Assistant is only for macro helpers.
The AI Assistant in Online mode does not play the whole game for you. You keep full control over military and decisions – the assistant only handles:
Very important behaviour warnings
These warnings matter mostly if you try to use the AI Assistant in competitive matches. For pure testing or memes, you can ignore them – but don’t be surprised by weird water/stone spending.
If you want the built-in AoE4 AI to take full control of your player instead of just assisting, you can run this script in the Custom Script – SCAR / Lua Runner tab:
function Configure()
Game_AIControlLocalPlayer()
AI_SetDifficulty(Game_GetLocalPlayer(), 6)
end
Rule_AddOneShot(Configure)
This hands your player slot to the game AI at difficulty 6. Use it only if you genuinely want to watch AI play for you (e.g. testing or fun runs).
The Offline tab is where you go to mess around freely: spawn units, give yourself resources, buff armies, test late-game fights, etc. Almost everything here is intended for single-player / vs AI / custom only.
Do not spam buttonsMost Offline tools are “one-shot” Activate buttons.
The (i) tooltip next to each button explains what it does. Because everything still runs through the AoE4 Lua engine, do not spam multiple buttons at once:
If you activate too many heavy features in the same second, the game can crash.
The Offline tab contains a large collection of experiments. If one does not work on a particular patch or scenario, you can simply try a different one. Typical tools include:
How to use Rate Modifiers correctly
For the four main modifiers:
You must have units selected before applying these. They are not global toggles.
The SCAR / Lua Runner tab is for users who are comfortable writing or editing code. You can:
Most simple scripts follow this structure:
function CustomScript()
-- your SCAR / Lua code here
end
Rule_AddOneShot(CustomScript)
SCAR Toolkit injects this into the game and executes it once. From there you can add additional rules, timers and logic.
Force Loader
Force Loader is designed for large scripts (roughly 200+ lines). Instead of sending one giant string directly to the game, it:
This can be more reliable for big projects or complex modules.
Run (Safe)
Run (safe) wraps your code in pcall(). That means:
Run (Raw)
Run (raw) sends your script directly to the game with no pcall, no safety net. If there is a serious bug or infinite loop, it can crash the game instantly.
Use Run (raw) only if you know exactly what your script does.
Show Entity Info
Distance Checker
Player Info
As mentioned in the Online tab, you can hand full control of your player to the AI using this code in the Script Runner:
function Configure()
Game_AIControlLocalPlayer()
AI_SetDifficulty(Game_GetLocalPlayer(), 6)
end
Rule_AddOneShot(Configure)
Run it with your preferred mode (Safe/Raw/Force Loader) and the game AI will take over your slot.
The Settings tab includes 5 slots where you can save your favourite Online features. Think of them as presets for the tools you use every session.
You can customise the built-in code editor to match your taste:
SCAR Toolkit includes basic UI localisation for the editor and some labels. Currently supported languages are:
Select your preferred language in Settings. Some advanced debug strings and script names may remain English.
Depending on your build, Settings may also expose:
Spend a few minutes here at the start. A good setup (theme, quick slots, language) makes the rest of SCAR Toolkit feel much smoother.