The requirements for AI_STRATEGY_DAGGER are:
general:
- not AI_STRATEGY_MISSIONARY
- "early" in the game ( iCurrentEra <= (2+(iNonsense%2)) which means upto Medieval / Renaissance )
- must have met others
- must have iParanoia > 0 (due to the self-closeness bug this is always true after the AI has made contact with someone it is cautious or lower with)
Leader's personality:
- MWR = MaxWarRand, FM = AI_FLAVOR_MILITARY, NF(NonsenseFactor) = (iNonsense % 11)/10 :
- iDagger = 120 * 100/(MWR+50) * NF + 5 * Min(8, FM);
Example: Ragnar MWR = 50, FM = 10, Nidaros @ (X=30,Y=31) --> iNonsense = 30+31 = 61; NF = (61 % 11) / 10 = 0.6
iDagger = 120 * 100/(50+50) * 0.6 + 5 * Min(8, 10) = 72 + 40 = 112;
iDagger is further modified for military Unique Units (all except Indian Fast Worker):
AggAi off? +5 / +10 / +15 for Prince / Monarch / Emperor+
already at war (AREAAI_OFFENSIVE, AREAAI_DEFENSIVE)?
- +40 if capital can build offensive units (UnitAIs: RESERVE, ATTACK_CITY, COUNTER, PILLAGE)
- +20 if capital cannot build offensive units (-->AI_STRATEGY_GET_BETTER_UNITS)
CHECK: iDagger >= AI_DAGGER_THRESHOLD (100) --> AI_STRATEGY_DAGGER!
So all the warmongers with strong offensive UUs are likely to follow Dagger strategy until medieval/renaissance era.
Example1: Ragnar from above can build Berserkers in Nidaros, AggAI off Immortal difficulty, not at war
iDagger = 112 + 40 + 20*0 + 15 = 167 >= 100 --> AI_STRATEGY_DAGGER
Example2: Willem (MWR=100, FM=0), Amsterdam @(44,12) can build East Indiaman, AggAI off Deity difficulty, not at war
iDagger = 120 * 100/(100+50) * 0.1 + 5 * Min(8, 0) = 8 + 0 = 8; for personality
iDagger = 8 + 40 + 20*2 + 15 = 103 >= 100 --> AI_STRATEGY_DAGGER
Example3: Gandhi (MWR=400, FM=0), Delhi @(22,21), AggAI off Prince difficulty, currently fighting defensive war, can build Musketmen (UNITAI_RESERVE)
iDagger = 120 * 100/(400+50) * 1 + 5 * Min(8, 0) = 13 + 0 = 13; for personality
iDagger = 13 + 5 + 40 = 58 < 100 --> no Dagger
When it comes to war, IMHO the main effect of AI_STRATEGY_DAGGER is the skipping of the preparation phase, which means that Dagger-AIs that changed war plans to Limited or Total Wars will never call those plans off again (so Saladin was no Dagger in ALC#24). I'm not really sure about what determines the interval between the war plan change and the actual DoW (=you get WHEOOHRN before the war). I guess it depends on where their SoD is located and how long it takes to march it to your borders (DoW = crossing borders). If there are any obstacles in the SoD's path (like impassable mountains) it could be that the AI is locked in WHEOOHRN forever.