LONG POST BUT WITH GREAT INFO`s ON GUILDS!!!!
From perusing the contents of export_descr_guilds.txt i have determined the following:
Each guild type has 3 levels, to get a guild at each level the player has to score a certain number of points for either their faction overall, or for that particular settlement.
Guild: 100 points
Masters Guild: 250 points
Guild HQ: 500 points
The player gains (and loses) points for each guild for each settlement, and for their entire faction, by performing certain deeds. In general, settlements will gain more per deed (typically 10, 15, 20, 25, 30 points) than the overall faction score (typically 2, 3, 4, 5 points per deed).
Not sure how the overall faction score works, presumably if your overall faction score exceeds the required amount you will get offered a guild even if none of your individual settlements qualify - thus you can still get guilds by, say, training lots of priests all over the place - but it will still be far quicker if you train them all in the same settlement.
Agents can also gain points. Assume that this is once per agent, and that these points add to the overall faction score.
General
Upgrade a guild (+20 settlement bonus for that guild type, +10 faction)
Destroy a guild building (huge penalty for that guild type, -100 settlement, -20 faction)
Upgrade a settlement (+10 settlement bonus for all guild types)
Every 25 turns every settlement loses 1 point for all guilds
Missions
Bonuses are also given for successfully completing a guild mission, but failing to complete the guild mission will incur a penalty for that guild type.
The following guilds offer missions:
Assassin's Guild
Merchant's Guild
Explorer's Guild
Theologian's Guild
Thieves Guild
Assassin's Guild
Train assassins: +10 settlement
Succesful Assassinations: +20 agent bonus
Governor with dread >4: +4 settlement bonus (per turn?)
Build brothel series buildings: +10/15/20/25/30 settlement, +0/0/0/2/5 faction
Succeed/Fail Assassin guild mission: +/-10 agent
Alchemist's Guild
Train Cannons etc: +10/15/20 settlement
Train handgunners etc: +15 settlement
Build cannon maker series: +10/15/20/25/30 settlement, +1/2/3/4/5 faction
Explorer's Guild
Train merchants: +10 settlement
Build shipbuilding buildings: +15/20/25/30 settlement, +0/0/2/5 faction
Build merchants wharf series: +20/25/30 settlement, +0/2/5 faction
Fleet distance from capital 50-99: +3 agent
Fleet distance from capital >100 : +5 agent
Succeed/Fail Explorer guild mission: +/-30 agent
Horse Breeder's Guild
Train cavalry: +10 settlement, +1 faction
Build stables series: +10/15/20/25/30 settlement, +1/2/3/4/5 faction
Build racetrack/sultan's ractrack +50/75 settlement, +5 faction
Governor throws races: +5 settlement
Mason's Guild
Build Stone wall series: +10/15/20 settlement, +2/2/3 faction
Build mustering halls series: +10/15/20/25/30 settlement, +2/2/2/2/3 faction
Build town watch series: +10/15/20/25/30 settlement +2/2/2/2/3 faction
Build armourer series: +10/15/15/20/25/30 settlement +2/2/2/2/2/3 faction
Build bowyer series: +10/15/20/30 settlement +2/2/2/3 faction
Merchant's Guild
Train merchants: +10 settlement
Build merchants wharf series: +20/25/30 settlement, +0/2/5 faction
Build market series: +10/15/20/25 settlement, +0/0/2/5 faction
Make trade agreement: +10 agent
Successful aquisition: +10 agent
Income > 1000/2000/5000/10000: +1/2/3/4 agent (per turn?)
Succeed/Fail merchant's guild mission: +/- 10/20 agent (depending on difficulty?)
Swordsmith's Guild
Build armourer series: +10/15/15/20/25/30 settlement, +0/0/0/1/2/5 faction
Train sword unit: +15 settlement
Units: Sword and Buckler Men, Sudanese Tribesmen, Swordsmen Militia, Armored Swordsmen, Highland Nobles, Zweihander, Noble Swordsmen, Forlorn Hope, Byzantine Infantry, Battlefield Assassins, Norse Swordsmen, Dismounted Feudal Knights, Dismounted Chivalric Knights, Dismounted Gothic Knights, Dismounted Conquistadores, Dismounted Italian MAA, Dismounted Broken Lances, Dismounted Norman Knights, Dismounted Polish Knights, Dismounted E Chivalric Knights, Dismounted Byzantine Lancers, Dismounted Latinkon, Hashishim, Urban Militia, Dismounted Christian Guard
Theologian's Guild
Train Priests: +10 settlement
Build church/masjid series: +10/15/20/25/30 settlement, +0/0/1/2/5 faction
Get your cardinal elected pope: +30 agent
Governor's piety >5: +5 settlement (per turn?)
Succeed/Fail theologian's guild mission: +/-10 agent
Priest becomes a heretic: -5 agent
Thieves Guild
Train spies: +10 settlement
Build brothel series: +10/15/20/25/30 settlement
Governor with dread >4: +2 settlement (per turn?)
Spy in a settlement: +2 agent (per turn?)
Succeed/Fail theives guild mission: +/-10 agent
Woodsman's Guild
Recruit archers (England only!): +10/15/20 settlement (depending on unit)
Build brother seri >4: +5 settlement (per turn?)
Various Knight's Chapter Houses
General joins crusade: +25 agent
General abandons crusade: -25 agent
Recruit Specialist Knight: +10 settlement, +1 faction (knight type tied to guild type)
Governor Chivalry >4: +5 settlement
St. John's guild get a +10 settlement, +1 faction bonus when the settlement has muslim neighbours
St. John's guild get a +10 agent bonus when you declare war on a muslim faction.
Teutonic guild get a +10 settlement, +1 faction bonus when the settlement has muslim neighbours