The combat tactics work just like regular triggers.
They only apply if you validate for the trigger conditions.
MTTH is the chance weight that this tactic has. You could compare it to the regular modifiers which increase or decrease the AI's decision to take an option.
See here for an explanation on combat tactics...
Code:
volly_harass_tactic = {
days = 18 #amount of days this tactic lasts, this tactic lasts 18 days
sprite = 4 #picture used when viewing when this tactic is used in combat screen
group = harass #groups are used to determine a strategic concept
#a certain group has an advantage over another,(see below)
trigger = { #when can this tactic be used?
phase = skirmish #during skirmish phase
light_cavalry = 0.01 #army has atleast 1% cavalry
archers = 0.01 #army has atleast 1% archers
}
mean_time_to_happen = { #what are the odds of this tactic being picked?
days = 3 #base weight/chance of picking this tactic
modifier = {
factor = 1.5 #multiply the chance by 1.5 if...
flank_has_leader = yes #the flank has a leader
leader = {
martial = 8 #leader has atleast 8 martial
}
light_troops = { #light cavalry is atleast 70% of the army (very unlikely unless its a retinue army)
who = light_cavalry
value = 0.7
}
light_troops = { #horse archers are atleast 30% of the army (very unlikely unless ur the mongols)
who = horse_archers
value = 0.3
}
}
modifier = {
factor = 1.5
flank_has_leader = yes
leader = {
martial = 12
}
light_troops = {
who = light_cavalry #light cavalry is 60% of army
value = 0.6
}
light_troops = {
who = horse_archers #horses archers are 30% of army
value = 0.3
}
}
modifier = {
factor = 1.5
flank_has_leader = yes
leader = {
martial = 16
}
light_troops = {
who = light_cavalry
value = 0.5
}
light_troops = {
who = horse_archers
value = 0.3
}
}
}
light_cavalry_offensive = 1.8 #light cavalry offensive +180%
horse_archers_offensive = 0.6 #horses archies offensive + 60%
archers_offensive = -1.8 #archers offensive -180%
enemy = {
group = swarm #if enemy is using swarm strategy group
factor = 1 #+100% bonus damage vs enemy
}
}
A general overlook.
There's 3 strategic groups for each phase and an extra defensive group. Skirmish phase has these 3 groups and they work like a rock paper scissors system. Each group is usualy linked to a favored unit type.
Harass (light cavalry) > Swarm (horse archers) > Volley (archers),
Defensive group, (includes shieldwall tactic), has no weakness to any group.
Melee phase is initiated whenever atleast 10 days of skirmish have passed and an army decides to pick a tactic which engages the enemy force directly (changes phase to melee).
The strategic groups of melee are:
Advance (hvy inf) > Stand Fast (pikemen) > Charge (knights),
Defensive group, generic tactic with no pros or cons vs other groups
The pursuit phase has only one tactic which is to pursue and is part of the charge group, it is also the best time for light infantry and light cavalry to shine.
P.S
Let's say there are only 6 tactics which are valid for your general to pick. Each one has 3 days as MTTH. That is 18 MTTH total. Now lets say you add an extra tactic for a total of 7 tactic to be chosen and it has a MTTH of 18. Now the total MTTH is 36 of which 18 are the new tactic. The odds of getting the new tactic are thus 50%.
P.P.S
Alot of people are miscalculating the bonus from tactics when going above the 1.0 threshold. The bonus for example 3.0 is not base * 3.0 but base * (1+3.0).
Max light cavalry attack in all phases are...(with +60% offensive boost) (not counting special tactics and/or culture tactic, since iberians have none, its easy)
6.4 skirmish (base = 1, * (1+0.6 cultural bonus * (1+3 for harass tactic)
10.2 for melee (base = 3, * (1+0.6 cultural bonus * (1+2.6 for raid tactic)
16.0 for pursuit (base = 10, * (1+0.6 cultural bonus * (1+0 no tactic bonus for pursuit)
But these damage potentials are not realistic at all unless your army is atleast +50% light cavalry. Otherwise your odds are 1/6 to get these attack values. Under normal circumstances, light cavalry does not do more damage than its base stats during all phases of combat, so 1 skirmish, 3 melee, 10 pursuit.
Compared to heavy infantry max dmg
1.12 skirmish (base = 0.25 * (1+0.6 cultural bonus) * (1+1.8 for feint tactic)
38.4 melee (base = 6 * (1+0.6 cultural bonus) * (1+3 for advance tactic)
3.2 for pursuit (base = 2 * (1+0.6 cultural bonus) * (1+0 no tactic bonus for pursuit)
Quite a sucky skirmish stat there, but if ur lucky u pick the shieldwall tactic and mitigate most of the damage. The hvy infantry really shines in the fact that you get so much of them early game from castles that they make up a high portion of your troops and allow you to trigger the awesome heavy infantry boosting tactics. The odds of getting these tactics are roughly 1/2, compared to the 1/6 of light cavalry, that is quite a bit better! Not to mention their melee damage is huge!