Help create or edit upgrades civs on content editor

I need help, no matter what, I’ll even pay. I need to understand how I can modify or even create a technology or an upgrade, either by cloning an existing one and modifying it, or creating it from scratch.

For example, a damage bonus upgrade for cavalry:

+10 damage for current and future units.

I tried to do this, but the state tree is a major obstacle; I couldn’t manage it. The most I achieved was cloning the bonus from another civilization, but that’s not what I want.

1 Like

Try to ask on AoE4 Modding Discord

I have actually done this in my private scenario.

Two ways to do this: Attribute Editor (data-driven) or SCAR script. For a permanent cavalry damage tech, go with the Attribute Editor — it’s the “correct” way and is how every vanilla tech works.

Method 1: Attribute Editor (Tuning Pack) — recommended

  1. Find a reference tech to clone. Don’t build from scratch — find an existing upgrade that’s structurally similar to what you want (e.g. any cavalry attack/armor tech like a blacksmith cavalry upgrade). Cloning preserves all the required fields you’d otherwise miss.
  2. Duplicate the PBG. Right-click the tech in the Attribute Editor → Duplicate. Give it a new unique name (this matters — reusing an existing PBG name, even for something “new,” can cause lookup failures).
  3. Edit the modifier. Every tech has a modifiers extension. Add/edit a modifier entry:
    • Modifier type: Attribute modifier (Addition or Multiply)
    • Attribute: weapon_damage (or the specific attribute your damage source uses)
    • Value: +10
    • Filter: apply it by unit class (e.g. class_cavalry, class_hussar) rather than a specific unit ID — filtering by class is what makes it apply to current AND future units, since it’s evaluated per-unit, not baked in at spawn.
  4. Attach it to research. Set the tech’s building requirement (e.g. Blacksmith/Stable), cost, research time, and prerequisite tech chain so it shows up as a normal researchable upgrade in-game.
  5. Give it an icon and name. Add a locstring entry for the tech name/description, and point it at an icon (clone an existing icon reference if you don’t have custom art).
  6. Build and test. Tuning Pack changes need to be built/exported separately from any scenario — if nothing changes in-game, that’s almost always because the build step was skipped, not because the tech is wrong.

Method 2: SCAR script (for dynamic/conditional bonuses)

If you want the bonus to be conditional (only after a trigger, only for one player, scales with something), use SCAR instead:

local dmg_mod = Modifier_Create(MAT_Player, MD_Player, "weapon_damage", MUT_Addition, false, 10, "class_cavalry")
Modifier_ApplyToPlayer(PLAYER.player1, dmg_mod, "cav_dmg_bonus")

Applying it to the player with a class filter (not to individual squads) is what makes it retroactively affect existing units and automatically apply to units built afterward — SCAR modifiers re-evaluate per-unit against the filter, they’re not a one-time stat write.

Practical tips

  • Always clone from a vanilla PBG rather than typing one from scratch — brand-new tech/ability names sometimes silently fail lookups even when everything else is configured correctly, while renamed clones of existing entries work reliably.
  • Test the damage change with a debug tech that has zero cost/time first, so you’re not waiting through research just to see if the number applied.
  • If it’s a total-conversion mod, do it in the Tuning Pack (Method 1). If it’s a single-scenario/campaign gimmick, SCAR (Method 2) is faster to iterate on.