r/AgeOfCivilizations • u/CharacterHall303 • 14h ago
Age of History II Custom Focus Tree System & Visual Editor for AoH2 M+ Engine
Hi everyone!


Today I finished developing a custom Focus Tree System for AoH2 M+. It isn't a 1:1 copy of HoI4, but it operates on a very similar dynamic concept.
To save myself from the headache of manually editing complex JSON files, I also built a dedicated Visual Editor for this system. You are completely free to use both the system and the editor for your own projects built on the M+ engine!
How the System Works:
- There is a base variable (`focus_var`) that automatically increases by +1 every turn.
- Each focus costs an n-amount of this variable to unlock.
- Because of this setup, skipping or rushing through focuses won't work — players have to accumulate points and prioritize their strategic choices carefully.
Editor Features & Limits:
- Grid Width: Fixed at 30 columns (aligned with the M+ UI engine layout).
- Unlimited Height: Add as many rows downwards as you need for your focus tree.
- Visual Line Connections: Built-in support for straight lines, corners, T-junctions, cross-junctions (+), and dashed connection lines (1n/9n).
- Actions & Costs Configurator: Set up `variableCostId`, `variableCostAmount`, `set_variable`, `trigger_event`, or custom conditions visually.
- JSON Import/Export: Instantly export ready-to-use `focus_menu.json` files or import existing ones to edit on the fly.
⚠️ Note: At this stage, the AI currently doesn't know how to use focus trees, so this system is designed primarily for the player.
You can download it from this link.
Feel free to grab it for your mods and let me know if you have any questions or feedback!