Propagating the stats of a unit among the different variations of that unit, such as a basic spearmen versus more advanced spearmen, is not done automatically. Instead this is achieved through propagating the unit's stats among its variations.
In the previous exercise, we modified the cost of the a Spearman from 60 food to 40 food.
If we want this change to also exist on the other levels of the spearman, we need to clone those assets and duplicate the changes there.
1) Filter the Data
Age of Empires 4 is filled with a large amount of unit data, which can sometimes make it difficult to navigate and find what you need.
To streamline your searches, use the Data Filter to see only the attributes relevant to your potential changes.
Open the Races > French > Units folder and type "Spearman" into the filter field.
Only spearman units will now appear in the list.
2) Clone the Remaining Assets
Right-Click on each remaining asset in the series and select Clone from the drop-down menu.
Do this for each of the assets you wish to change.
In this example, we are changing all four versions of the spearman.
3) Propagate Costs
With the additional tiers of spearman assets now cloned, hold Ctrl and Left-Click on each of the different types of spearmen to select them all.
Changing the value in the Common column from 60 to 40 will update all others to that value.
In the example below, our new food cost of 40 has now been applied to all the versions of the Spearman.
Advanced Cloning: Mass Propagation
The workflow shown above covers how to modify a single spearman manually across the different spearman tiers for the French civilization. This method can become unwieldy if you are modifying a large number of units across all civilizations.
It is possible to more efficiently make similar changes to units on a larger scale.
Using this method makes it much easier to make changes to many units at a time, and reduces the risk of missing something by mistake.
To propagate changes over a large number of units, you can use the steps below:
- Clone all the individual units for each civilization, checking Clone Override Parent Settings for each one.
- Clone the Core version of that unit checking Clone Override Parent Settings. Make sure the name of the core unit matches the unit (including the unit number, eg: unit_horeseman_1, unit_archer_2, etc) you wish to propagate to.
- Make your desired changes to the Core unit. Doing this will make that change to all the other units you have cloned.
- Check the units you cloned to assure they are now inheriting the desired values.
- If any units are not inheriting the desired values, you can manually change them as normal.
Alternately, you can Right-Click the unit and select Inherit from Parent to force it to inherit from the core version.
- Your units should now have all the changes you set them to inherit from the core.
Troubleshooting Mass Propagation
If the heck the following areas
- If a value is listed in BOLD, that means the is currently being overridden from somewhere else and not the core unit. In thie case, any changes to the core unit will not propagate to the desired unit.
- Make sure you clone the Core unit AFTER you clone all the other units you wish to change.
- Make sure your mod name in the first thing in the parent_pbg list.
To continue this tutorial, proceed to: Example 4 - Modifying Unit Stats