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.
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.
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.
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).
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.
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.
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).
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.
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.