Age of Mythology: Retold

Age of Mythology: Retold

37 ratings
Norse Favor and Loki Myth spawn mechanics
By Loggy
How Norse favor gain and Loki myth spawns work.
2
   
Award
Favorite
Favorited
Unfavorite
Intro
I did this testing on 6th September 24, build 481060.

Updated to 10th October 24 (herdable favor income doubled)
The good stuff
Favor

Hersir and Godi produce 0.01 favor per second simply by existing. Thor's Hammer of Thunder tech doubles this for the Hersir to 0.02.

The base rate for gaining favor from combat is based on damage dealt. Attacks from different unit types generate favor at different rates:

  • Human soldiers, Heroes, Villagers: 1 per 80 damage dealt
  • Ships: 1 per 160 damage dealt
  • Odin only: Great Hall units (Hersir, Jarls, Godi, Raiding Cavalry): 1 per 64 damage dealt
  • Norse Myth Units that can be made at Temple/Dock: 1 per 160 damage dealt.
  • Nidhogg: 1 per 160 damage dealt.
  • Anything else (this notably applies to buildings, god powers, Walking Woods, Fimbulwinter wolves) does not generate favor from dealing damage.

Different target types also have their own multipliers when damaged:

  • Huntables - animals that contain food (does not include Anubis Serpents, even though villagers can use bows on them): 2x
  • Herdables (Pigs, Goats, Cows): 20x
  • Chickens ("NonConvertableHerdable"): 20x
  • Buildings that shoot (Sentry Towers don't count until upgraded): 0.5x
  • Wall pieces and gates: 0x
  • Other buildings: 0.1x

This does mean that Hersir don't generate favor at a higher rate from actually damaging things - this was the case in the older games, and the Norse tutorial cutscene could be interpreted as suggesting this.

Additionally, once you've gathered 100 total favor from combat, the rate of gain starts to slow down. This reduction increases linearly between 100 and 300 total favor gathered, reducing the rate to 0.5x at 300+ total gathered. This reduction happens regardless of whether you spent the favor or left it banked.

Overkill damage seems not to be counted.

Loki Myth spawns

When you reach Classical, the game silently picks a random Classical Norse myth unit. The total amount of "points" needed to make this spawn appear is the total resource cost of the unit, with Favor multiplied by 10.

Every time a Godi or human soldier does damage to anything that isn't a building or myth unit, they add 0.1x the damage they dealt to the point counter. Hersir also contribute this way, but they do 5x as much (so 0.5x of the damage dealt).

Once the points count is met, the myth unit spawns next to the unit that passed the threshold. The game then picks a different myth unit to spawn next time - first, it picks the age to get a unit from (up to your current age, not including Archaic) at equal odds, and then picks a myth unit from that age at equal odds. Because Mythic has only 3 possibilities (Fenris Wolf, Fire Giant, Fafnir) and both of the other ages have four, these units are slightly more likely to be chosen.

This process keeps repeating, giving you independently picked random myth units forever, spawning a new one once its "point cost" is reached by damage.

Unlike the old games, you do not need population capacity for myth units to spawn.
Less interesting stuff
Where is this defined

This lives in Data.bar's major_gods.xml. Here's Loki's entry:
<bountyresourceearning> <excludedtarget>AbstractWall</excludedtarget> <bountydamagegoal>80.0</bountydamagegoal> <bountyreductionstart>100.0</bountyreductionstart> <bountyreductionend>300.0</bountyreductionend> <bountyreductionstrength>0.5</bountyreductionstrength> <bountyreward type="Ship" resourcetype="Favor">0.5</bountyreward> <bountyreward type="AbstractVillager" resourcetype="Favor">1.0</bountyreward> <bountyreward type="HumanSoldier" resourcetype="Favor">1.0</bountyreward> <bountyreward type="Hero" resourcetype="Favor">1.0</bountyreward> <bountyreward unit="RaidingCavalry" resourcetype="Favor">1.0</bountyreward> <bountyreward type="LogicalTypeMythUnitThatGeneratesFavor" resourcetype="Favor">0.5</bountyreward> <bountytargetmultiplier type="Huntable" resourcetype="Favor">2.0</bountytargetmultiplier> <bountytargetmultiplier type="Herdable" resourcetype="Favor">30.0</bountytargetmultiplier> <bountytargetmultiplier type="NonConvertableHerdable" resourcetype="Favor">30.0</bountytargetmultiplier> <bountytargetmultiplier type="Building" resourcetype="Favor">0.1</bountytargetmultiplier> <bountytargetmultiplier type="LogicalTypeBuildingsThatShoot" resourcetype="Favor">0.5</bountytargetmultiplier> </bountyresourceearning> <bonusunitspawning> <spawnable>MythUnit</spawnable> <excludedspawnable>Dryad</excludedspawnable> <excludedspawnable>Kraken</excludedspawnable> <excludedspawnable>JormunElver</excludedspawnable> <excludedtarget>Building</excludedtarget> <excludedtarget>MythUnit</excludedtarget> <spawnpointdamagegoal>1.0</spawnpointdamagegoal> <unitspawnpointcost resourcetype="Food">1.0</unitspawnpointcost> <unitspawnpointcost resourcetype="Wood">1.0</unitspawnpointcost> <unitspawnpointcost resourcetype="Gold">1.0</unitspawnpointcost> <unitspawnpointcost resourcetype="Favor">10.0</unitspawnpointcost> <spawnpointearningfactor unit="Hersir">0.5</spawnpointearningfactor> <spawnpointearningfactor type="HumanSoldier">0.1</spawnpointearningfactor> <spawnpointearningfactor type="Godi">0.1</spawnpointearningfactor> </bonusunitspawning>

Most of this is hopefully sort of self explanatory.

The "bountyreduction" lines are clearly what is responsible for the falloff described above.

Despite being listed twice (as they are HumanSoldiers), Raiding Cavalry still generate favor at the normal rate. I'm going to guess that this came from a copy/paste from Thor's bonus, or they once had their own modifier that wasn't 1, or this is needed for Vikings to function correctly as its functioning is also related to these numbers.

Testing

I did most of this in the editor. My methodology (without getting into painful levels of detail) went like this:
  1. Make a target (I used a priest) have 0% hack armor and a few hundred thousand hitpoints via modify protounit, and have various units (hersir, berserk, hill fort, fire giant) attack it, and see how much damage was done when favor went up by 2 or 3.
  2. Alter the damage of the unit attacking - I used a berserk with +1000 attack - and observe the amount of favor awarded per swing start to go down beyond 100 and 300.
  3. As 2, except autoqueuing trolls to use up favor until I had spent 300 favor, to check whether it goes off total earned or just unspent.
  4. Have the buffed berserk attack other things: Sentry towers, fortress, wall pieces...
  5. Placed a few hundred hersir and waited for them to passively generate ~300 favor, then delete them, then repeat 2. Confirmed that hersir favor trickle doesn't count towards the falloff.
  6. Put some trees next to the priest and forest fired it, to confirm god powers don't contribute.

And for Loki spawns:

  1. Some preliminary stuff with the +1000 damage berserk - but this does damage in too big chunks to really be sure of the exact numbers.
  2. Unmodified Hersir spawned a troll (310pts) after 783 damage, draugr (365pts) after 747 damage, einheri (325pts) after 675 damage...
  3. Switch to mythic age and get berserks in to test the distribution, and ramped up their attack rate a lot too. This started to spawn so many myth units that the game started to place them at 0,0 due to lack of room, I did some counting manually but the distribution I got was (to my surprise) not even, so I thought I'd get a much bigger sample with the help of a script...


rule SpawnCounter
active
minInterval 0
{
static int query = -1;
static int lastReport = 0;
static int[] counts = default;
xsSetContextPlayer(1);
if (query == -1)
{
query = kbUnitQueryCreate("LokiSpawnCounter");
counts = new int(cNumberProtoUnits, 0);
}
kbUnitQuerySetPlayerID(query, 1);
kbUnitQueryResetResults(query);
kbUnitQuerySetUnitType(query, cUnitTypeMythUnit);
kbUnitQuerySetState(query, cUnitStateAlive);
kbUnitQueryExecute(query);
int[] results = kbUnitQueryGetResults(query);
trUnitSelectClear();
for (int i=0; i<results.size(); i++)
{
int proto = kbUnitGetProtoUnitID(results[i]);
counts[proto] = counts[proto]+1;
trUnitSelectByID(results[i]);
}
trUnitDelete(true);
int now = xsGetTimeMS();
if ((now - lastReport) > 10000)
{
lastReport = now;
for (int proto=0; proto<cNumberProtoUnits; proto++)
{
if (counts[proto] > 0)
trChatSend(1, kbDefaultGetProtoStatString(proto, cProtoStatName) + ": " + counts[proto]);
}
}
}

This counts and rapidly clears all the spawns, so the lag problems go away. I gave all the units involved a lot of regen and went away with the setup running for a bit over an hour. My results were:
  • Troll: 135634
  • Einheri: 135719
  • Valkyrie: 136020
  • Draugr: 136273
  • BattleBoar: 135758
  • MountainGiant: 135182
  • RockGiant: 135828
  • FrostGiant: 135986
  • FireGiant: 181627
  • FenrisWolfBrood: 181037
  • Fafnir: 180798

With a sample size like this, I think it's safe to say without doing more statistics that odds for each spawn are quite clearly not equal. There's some age banding apparently happening here with the mythic age units, so let's try again in Heroic...

  • Troll: 157217
  • Einheri: 157514
  • Valkyrie: 157168
  • Draugr: 157135
  • BattleBoar: 157417
  • MountainGiant: 157243
  • RockGiant: 156998
  • FrostGiant: 157424

So the weighting is only towards the mythic age units, and only while in mythic. Maybe because there's only three of them?

  • Classical: 543646
  • Heroic: 542754
  • Mythic: 543462

That looks better.

Comparisons to Legacy

Favor

In the old games, favor bounty was set on a per-unittype basis. This was the amount of favor gained from damaging them 100% of their maximum hitpoints, and it would be gained proportionally as you partly damaged the unit. Hersir and Longboats had a favor multiplier of 2x and 2.5x respectively.

Loki Myth spawns

Only Hersir spawned myth units, and the "points" were tied to their favor generation from combat instead of raw damage. The spawn chances seemed uniform, despite there being fewer mythic age units than the other ages. The amount of points per unit varied in a way I never managed to decipher, though I didn't consider nonfavor resource costs...

You also used to need population space for the myth unit to appear. If you didn't have this, the spawn would just not happen until the next time a Hersir dealt damage with enough population capacity to spawn the chosen unit.
9 Comments
Blazecatcher2 17 Mar @ 10:46pm 
thank you for sharing!
Salgore 6 Feb @ 3:43pm 
thanks amigoo
bobbyj 21 Sep, 2024 @ 2:04am 
I spawned 3 fanir's in 2 battles vs a Frayer player, it was the only unit that was spawned in mythic age, do you think ageing up reduces the chance of spawning lower age's myth units?
MERC 20 Sep, 2024 @ 4:27am 
I think they must add another way to gain this points. Other factions have big advantage with this, and can easy spawn many units and powers. They must add some rituals, like animals sacrifice, or something.
Whatnot Awot 16 Sep, 2024 @ 11:08pm 
This is awesome thanks, I was wondering the exact details of how this worked.
Wintermute 16 Sep, 2024 @ 6:17am 
Doing god's work here. Had to dig for that info through different sources, good to see it brought together in a single cohesive guide.
NumberTwelve 14 Sep, 2024 @ 10:20am 
Thank you for good quality testing
Diahborne 12 Sep, 2024 @ 6:35pm 
You are pretty smart! This is amazing testing and knowledge on how Loki and Norse Favor gathering works!
jt 12 Sep, 2024 @ 2:06am 
Damn this is crazy, thanks for doing the testing!