Giving the Caravanserai's speed boost ability to other buildings with AGE

Suppose you want to give Farms the Caravanserai speed boost aura and that you want military units to move 30% faster when they walk over Farms. To do that,

  1. Go to the Units tab in Genie, look for Farms (50) and scroll down to the Obsolete Variables section.
  2. Set Break off Combat to 32.
  3. Scroll down to the Tasks section.
  4. In the Tasks box to the left, click the Add button. This will create a new task entry below the existing Make and Deselect When Tasked entries. You will need to create new entries for each class you want to apply speed boosts to.
  5. Set Action Type to 155. Genie will tell you that this is an Unused Ability/Invalid Ability, but don’t worry about that. Task 155 is actually the task that allows Caravanserais and Centurions to effect other units.
  6. Let’s first give foot archers a speed boost. To do that, set Class to 0.
  7. Set Work Value 1 to 1.3 to give foot archers that 30% speed boost.
  8. Not exactly sure what Work Value 2 does, but that should be set to 1.
  9. Work Range refers to the distance from the building edge the speed boost aura will be in effect. Because units can walk on top of Farms, we can simply set Work Range to 0. Otherwise, if we were giving this ability to something such as a Castle, then we would need to set Work Range to a higher value
  10. Target Diplomacy determines whose foot archers the speed boost will apply to. If you want the speed boost to apply to your and your allies’ foot archers, then set Target Diplomacy to 4. Otherwise, if you don’t want to boost your allies’ foot archers, then set Target Diplomacy to 1.
  11. Set Search Wait Time to 5.
  12. Repeat steps 4 through 11 for all other unit classes you want to give speed boosts. This can easily be quickened by using the Add, Copy and Paste buttons under the Tasks box.

Overall, your Obsolete Variables and Tasks section should look something like this:

Other Notes
If you want to target a specific unit to boost, you also need to set Class to -1 or else the boost will target all units in that class. Also, speed boosts applied to the least upgraded unit will carry over to their upgraded versions. For example, if you give a 30% speed boost to a Militia (74), Champions will also be given a 30% speed boost. Unfortunately, this also means that any speed boosts that target Champions will not be work (eg you won’t be a be able to give Champions a 50% speed boost).

For Caravanserais, the Unused Flag box has a value of 5. This causes the unit speed to be squared before being multiplied by Work Value 1. In other words, Boosted Unit Speed = (Base Unit Speed x Speed Bonuses)^2 x Work Value 1. I have no idea why the Caravanserai does this, but it definitely confused me when I first started looking at all this Task 155 stuff.