Triggers and Events
Wahnsinniger has compiled this extensive list of all the triggers and events available in the Stronghold 2 map editor, along with descriptions of the more non-obvious ones. For examples of scripted events, please look here.
Note: Banners and Markers are interchangeable terms. They are those things you put down in the map editor. They come in 4 different colors (Red Green Blue Yellow), and can be of numbers 1-8.
Always: This will always happen. In truth, it will happen AS SOON as possible. Thus if you set 'Win' to Always, you will as soon as you start the map.
However upon testing, Sir Vet finds that "adding always did not make any difference, the triggers only happened once."
Goods Acquired: Happens as soon as you have all the goods specified.
Gold Acquired: Just like goods, only gold.
Honor Acquired: Just like gold, only honor.
No Food in a Granary: Happens if there is no food in the Granary in the Estate specified by the Banner.
No Gong in Your Estates
No Rats in Your Estates
No Criminals in Your Estates
Enemy Goods Acquired: Happens if the specified enemy gathers the specified goods. (I.e. in the Path of Peace you have to build 100 swords before Edwin does).
Enemy Gold Acquired
Enemy Honor Acquired
No People Left
No Enemy on Map
No Enemy Troops on Map: Happens if none of your "Enemies'" troops are left on the map.
No Enemy or Invasions Left
All Your Troops Dead
Percent of Troops Lost: Happens if the specified player has lost x% of their Troops. I don't know if this includes scripted invasions.
Recruit Archers: Happens if you recruit x number of archers. (In mission 3 of the Path of Peace?)
Your Lord Dies: Well this one is quite obvious.
All the Enemy Lords are Dead
Enemy Lord Dead
Multiple Lords Dead
Player Kills Lord X
Other Lord Kills Lord Y
Lord X Kills Lord Y
Destroy Outlaw Camp: Despite that fact that it's singular, this happens if the player destroys ALL outlaw camps on the map.
Breach Enemy's Castle Walls
Get Some Troops Close to Enemy Lord
Get Many Troops Close to Enemy Lord
Enemies are Near a Marker: Happens if any enemy troops are near the specified marker (and specified radius).
Current Quest Status: Happens if the specified quests (A B and/or C) have been completed
Quest Not Complete: Happens if the specified quest is not complete. (Also includes failed quests)
Single Quest Complete: Happens if the specified quest was successful.
Number of Quests Complete: Happens if the specified number of quests is complete (0-3?)
Quest Failed: Happens if the specified quest has failed (excluding "Not Complete").
No Messages Playing
Building Site Complete: Comprehensive Guide to Using Building Sites.
Building Site Percent Complete: Comprehensive Guide to Using Building Sites.
Control a Number of Estates: Happens if you control the specified number of estates (or more)
No Bears Left on Map: Happens if there are no bears left on map, durrr......
No Wolves Left on Map: Happens if there are no wolves left on map.
Win: You Win the Map. YA! Callooh! Callay!
Lose: You lose the map. Loser.
Invasion: Allows you to create a custom invasion. You can specify the near-exact numbers of troops you want, which player owns it, where it begins and attacks, who it is attaching/reinforcing, and whether or not the invasion repeats.
Stop Invasion: This stops all specified invasions. (Which player, and repeating or not). I do not believe it prevents any future invasions from occurring (if triggered)
Bear Attack: Will spawn 1-40 bears at any marker flag you designate. Choose 'any' for the bears to appear at a random marker flag. All bears will appear at the same flag wander a little and commence napping. Bears do not actually attack unless confronted by troops and pose no threat to unarmed villagers although they will kill sheep. -DS,
Wolf Invasion: The specified number of wolves appear at the specified marker, and attack the other specified marker.
Set Wolves to Defensive: This makes all the wolves pacify. They will not move around unless an intruder is very close to them, only then will they attack (or if they're shot with arrows).
Mad Cow Disease
Maintain Minimum Food Level: This keeps the granary in the specified estate at the indicated minimum level. This is useful in invasion/battle maps so that during the battle you don't hear "no food distributed this month" and such.
Plague of Rats
Set all Buildings on Fire
Redirect Village Output
Stop Resource Production
Set Allies: This allows you to set who your friends, enemies, and neutral characters are. I don't know what neutral exactly does. Normally, any characters grouped in "enemies" together will not be hostile towards each other. But, if you right-click on a portrait, it will send them to a 'second' enemies list (right hand of screen in Enemies Row). Enemies in the first list will be hostile towards the second list (and vice-versa)
Take Enemy's Castle: You will now be in control of the enemy's castle estate. The enemy moves to your castle and becomes friendly. As a bonus sometimes your new friend will help you attack your remaining enemies.
Convert Estate to Village: When you convert the enemy castle estate to a village it becomes yours, now you can treat it as though you just acquired it.
Quest (Complete): This causes the specified quest to be considered successful/complete.
Quest Failed: This causes the specified quest to be failed.
Enter Briefing: You can use this to remind the player of the objectives. For Example, when time is close to up, you can trigger the event to remind the player that time is almost up, or what ever else you want.
Set Available Troop Types: Here, you can specify which troops you want the player to be able to recruit. If the player gains them through other means, this has no effect on them.
Gong Production: Here you can set gong production from very high to off. Off is for making the player not have to deal with gong.
Rat Production: This works the same as gong production.
Frequency of Disease
Crime Rate: This works the same as gong production, but instead it's in percentages.
Outlaw Production: This specifies how fast outlaws are created from "Outlaw Camp" buildings.
Wolf Spawn Rate: This specifies how fast wolves breed. NOTE: If this is set to OFF, then DON'T attack Wolves. Wolves with spawn rate of OFF will spawn EXPLOSIVELY when attacked. I don't know if this is a bug or a feature.
Limit Weapon Production: This is useful for limiting which weapons the player can Produce (i.e. the player can only create spearmen, so you don't want them wasting time by having pole turners producing halberds).
Set Number of Campfire Peasants: You can use this set the maximum number of peasants that can gather around a campfire. Several people have noticed, however, that setting this to "Zero" doesn't work. Peasants will continue to gather, so you cannot use this to disable population.
Building Sites: Comprehensive Guide to Using Building Sites.
Give Lord Full Peasants
Kill Off all Wolves
Kill Off all Lords Troops
Control Lord's AI: Use this to disable a Lord for a set amount of time. Then use it again to set the lord to enable so they will do their job like they are supposed to.
AI Troops Charge if Aggressive
AI Troops Retreat
Set Rank: Obviously this sets the player's rank during the mission/campaign. However, since you (the designer) can specify which building the player can build, it seems rather unnecessary.
Set Honor: Sets the players honor to a specific amount.
Give Honor: Gives the player a specific amount of honor (in addition to what he already has).
Give Gold: Same as previous, but with gold.
Move Ship Moves a ship across the map, instructions can be found here.
Make Troops Super Aggresive
Time until Final Invasion: Simply set the months in the script. If you want a time limit for a timed game, set the months in the script and set it to lose.
Special Thanks to Sir Vet and Doomsword for adding and editing in more content!
*) denotes a former staff member.