-
Notifications
You must be signed in to change notification settings - Fork 47
Custom Content
AMAI can support custom melee maps and total conversions, but it must be taught every unit, building, item, upgrade, hero, and ability that its strategies use.
Before changing AI data, set a custom melee map to Scenario → Map Options → Game Data Set → Melee (Latest Patch). Scripted maps may need Commander disabled to avoid conflicts.
- Choose the closest version directory:
REFORGED,TFT, orROC. - Make source changes in that directory and in
.eaifiles—not in generatedScriptsoutput. - Use the Strategy Manager for strategies, profiles, global settings, racial settings, and racial builds.
- Build the selected version.
- Install into a copy of the custom map and test each race through all tech tiers.
Keep tables as tab-separated text. Their first row is the schema and existing rows are the best examples. When using spreadsheet software, verify that booleans remain lowercase and that fields containing commas were not wrapped in literal quote characters.
| File | Purpose |
|---|---|
StandardUnits.txt |
Units, buildings, heroes, abilities, upgrades, and items known to AMAI, including prerequisites, costs, combat strengths, and buildability. |
Races.txt |
Race name, generated AMAI script, and Blizzard AI script used for comparison builds. |
GlobalSettings.txt |
Cross-race behavior and version capabilities. Edit through Strategy Manager where possible. |
Profiles.txt |
Personality profiles. Edit through Strategy Manager. |
HeroAbilities.txt / HeroLevels.txt
|
Learnable hero abilities and level ranges. |
NeutralHeroSkills.txt |
Skill orders for neutral heroes. |
HealingItems.txt / ItemCheck.txt / NeutralShops.txt
|
Item use, item recognition, and neutral shop data. |
Mercs.txt / MercTypes.txt
|
Neutral mercenary availability and categories. |
UnitConversions.txt / UnitEquivalence.txt
|
Morphs, combined units, upgraded forms, and equivalences. |
NeededExtra.txt |
Additional prerequisites that do not fit the standard unit row. |
Strengths.txt / StrengthPredictionRules.txt
|
Composition scoring and prediction rules. |
Upkeep.txt |
Food thresholds and resource-saving behavior. |
Units produced only through a morph or another unit should be marked mutated so Strategy Manager does not offer them as directly buildable. Record their relationship in the appropriate conversion/equivalence table.
Each race directory (Elf, Human, Orc, and Undead) contains:
| File | Purpose |
|---|---|
Strategy.txt |
Strategy-selection metadata. |
BuildSequence.ai |
Global and strategy tier build goals. Prefer Strategy Manager. |
Settings.txt |
Race behavior and automatic-building settings. Prefer Strategy Manager. |
Heroes.txt / HeroSkills.txt
|
Hero priorities and skill builds. |
RaceAggression.txt |
Race match-up aggression. |
CommandBuilds.txt |
Build goals requested by Commander orders. |
Tiers.txt |
Available tech tiers. |
Hero skill data is positional: keep heroes and their skill blocks in matching order and provide the acquisition-tier variants expected by the current file.
Languages.txt registers each language and hotkey. Translation text lives under Languages\<Language>. Use the English files as the complete template and preserve identifiers, placeholders, and tab-separated columns.
See Language and Translation for chat variables, conditions, alternate word forms, encodings, and the translation test checklist.
Commands.txt defines Commander command words, parameters, menu labels/hotkeys, and success messages. Changing it affects all languages and should be tested both through chat and the Commander menu.
Reusable AI logic belongs in source .eai files. Scheduled behaviors are split into Jobs\*.eai and registered in Jobs.txt; follow an existing job rather than creating a second scheduler. Warcraft AI has a limited thread model, so avoid natives that spawn extra threads.
When changing JASS-style code:
- Declare local variables at the start of the function.
- Define/import functions before they are called.
- Fix shared behavior in its common implementation after checking all callers.
- Rebuild every supported target affected by the shared source.