Agency

An Agency is an outpost available at certain Locations on the Map that can be governed by the player to great benefit. They are unlocked by completing the Secret Rebuild Agency which unlocks 15 days after the sect creation. They use and generate and are crucial for unlocking Shendao Cultivation and an important source of valuable sect and cultivation resources (disciples, Inspiration, Faith).
==Uses== 
*Main source of Inspiration in this game when collecting Belief or Hatred with Xiandao Cultivators
*Unlocks , usually the first Shendao Law.
*Recruiting Disciples in Cities
*Resources in Districts
*Building Agency Wonders
*Shendao Cultivation:
**Followers and belief through the "help others" option (mainly useful before the establishment of the Divine Realm)
**Assigning a cultivator who established their Divine Realm
***Needs at least an Intermediate Main Hall
***Automatically gain a lot of Followers and Belief
***In exchange, you won't be able to gather Inspiration or Belief for other cultivators here
==Establishing agencies ==
The Secret Rebuild Agency on Day 15 requires you to adventure to Nanping Village, it will then add the possibility to make an Agency in Mt. South. Opening all 11 agencies has high priority as they take a while to grow yet their benefits are irreplaceable. 
=== Costs ===
* One Outer Disciple must be sent as Abbot semi-permanently (can be switched but one NPC must always be present) to the location
* 100 , except for Mt. South, which doesn't require any, 
* 100 
===Abbot===
*The Outer Disciple chosen to spearhead an Agency becomes an Abbot (or AgentBoth agent and Abbot are being used very inconsistently, for the position of Abbot.).
*The Abbot (Agent) can be called back to your Sect, by replacing them in the agency overview with a different disciple in your sect.
**This enables you to buy time for YaoGuai Outer Disciples close to their Shapeshifting Tribulation.
**The other disciples sent may NOT be called back to the Sect, though they may be removed from the Agency. (marked in red on the right are the disciples you CANNOT recall)
===Travel to the Agency===
Despite being an outer disciple, the Abbot will travel using their Adventure Fly Speed BonusXiaWorld.OutspreadMgr.GetCost(), so they can be sped up with a Talisman of Spiritual Travelling. This however can be counterproductive if you intend to benefit from the travelling events detailed below.
====Agency Travel Resources====
Upon departure you can give s to the AbbotWnd_World.OpenRegion():
*Not giving any will send him with 0 resources,
*100 s gives 1 resource,
*1000 s gives 2 resources.
Those resources have no use once the Abbot arrives and are exclusively spent during event encounters.
====Agency Travel Events====
An eventSettings/MapStories/MapStory_Outspread.xml & Settings/Outspread/GoOutspread.xml is first triggered 300 seconds after departure, then between 210 and 390 seconds after the last eventXiaWorld.ToilGotoOutspread.OnStepToil(), until the Abbot arrives. Note that under typical circumstances, the Abbot for Mt. South reaches the Agency before the first trigger. A random event is chosen among the three available and they can be repeated, with the first option always offering to spend a resource if one is available.
Event 	Resource effect 	Second option 	Third option (if applicable)
Robbing 	Nothing 	Slows down 30s	
Refugees 	+1000-2000 followers	Slows down 30s	
Bullied Farmers	+1000-2000 followers	Slows down 30s	Nothing
After the arrival of the disciple and the establishment of the Main Hall in the location, the new location can be managed.
===Naming Agencies===
You can rename your Agencies once, and only once, when they're created.
==Cities vs Districts ==
Cities and Districts have different buildings and different uses outside of generating inspiration. 
=== Cities ===
Cities have 4 buildings, 3 of which add a different possible Policy for the city, and Spirit Master Hall, which is used to recruit disciples. Each cities buffs one specific stat for the disciple recruited, like Snaketail Village boosting Luck. Preaching attracts more followers, abstinence improves city stability and trust, plotting decreases rival sect followers and appeal.
=== District Resources ===
Districts have buildings that generate resources passively, and this can be be increased at the cost of influence via the policy manual labor. The yield from Manual Labor (not the passive yield) can also be buffed by having a higher stat for said activity, like farming or mining from the agents sent. Rarer resources can be acquired with the Treasure Hunt policy, although it can require higher stats.
Location 	 	 	 	
Mt. South 	40	15	15	
Central Plain 	20	15	45	
Riverbank Plains 	80	 	15	
The Great Snowland	 	 	15	40
Great Desert 	 	 	15	40
Wild South 	 	30	 	
=== Incorporate ===
Once your Agencies are developped, it is possible to incorporate Agencies, which means removing the rival sects and leave you as the sole owner of the place. It is recommended to do it first for villages before cities, as villages have less events to decrease the appeal and population of rival sects so incorporating to kick out other sects can help significantly in order to get a majority. In cities however, plotting can reliably be used to impede the other sects, making it less of a priority. They will also continue helping with disaster events even if they have little to no followers, so incorporating a city may not be worthwile.
==Management of an Agency==
You can manage different aspects of an Agency.
* Setting the Policy
*Claiming Stored goods
*Construction and upgrade of different buildings
* Setting Agency on Watch to double the frequency of policy events
*View Population of followers
*Replacing the Abbot
*Sending Outer Disciples as Agents to help in this Agency
*Viewing the current Agency Stats
*Viewing the appeal of the sect
*Viewing the city population and stability
*View Belief status
===Policy===
The recommended first step to take in a new Agency is to select a Policy, as otherwise you lose 5% of Followers daily. The only available policy from the start is Charity. 
=== Policy Events ===
Each Policy enables a different set of Policy Events to be triggered from time to time that require player input.
The base game does not give any indication on how likely you are to succeed with your Policy Event choices. See: #Mods#City Event Helper (Mod)
===Replacing the Abbot===
Replacing the abbot can be used to improve upon the Sect stats, or to benefit from the replacement mechanic. Indeed, the Attractiveness of the Agency in the city is multiplied by 1.5x upon the Abbot's arrivalXiaWorld.JobGoOutspread.OnToilFinish.
When replaced, the Abbot will travel back to the sect and be reintegrated as an outer disciple. Neither sending a new abbot nor the previous one coming back will trigger the agency establishment travel events.
==Upgrading Agencies ==
If the sect's population is high enough, agencies can be upgraded up to 2 times for a large number of resourcesSettings/Outspread/Build/Build_Region.xml. Upgrading agencies unlocks new Policies, adds new building slots including Agency Wonders. It also can trigger some Secrets and has a number of numerical improvements detailed below.
Agency level	daily Settings/Outspread/Region/region_District.xml [BasicProduct] & XiaWorld.OutspreadMgr._Product()	Min. Sect Population	Upgrade cost	Max Sect membersNot counting the Abbot	Belief multiplier	Max Belief	Storage size	Effect
1 	10 	0 	
* 100 Except Mt. South
* 100	10 	1 	5,000,000 	10,000 	Base agency setup
2 	15 	25,000 	
* 500 
* 500 
* 500	20 	2 	10,000,000	15,000 	Unlocks all base building slots
Unlocks Treasure Hunt Policy
3 	20 	100,000 	
* 1,000 
* 1,000 
* 1,000	30 	3 	20,000,000	20,000 	Unlocks Wonders
Unlocks Incorporate Policy
== Disasters==
Disasters are agency-specific emergencies, randomly happening throughout the year, with a maximum of 2 simultaneous disasters. It unlocks the Disaster Relief Policy and starts a countdown of 20 days where a counter of 1000 resources has to be filled before it ends. It is also possible to end the emergency prematurely by filling up the counter earlier. Disasters are not linked to Events and changing the difficulty settings for events doesn't affect their frequency.
They are however linked to seasons, and require different resources to resolveSettings/Outspread/Disaster/Disaster.xml:
* Earthquake happens all year round and needs 
* Drought happens in Summer and needs 
* Flood happens in Autumn and needs 
* Cold wave happens from Winter to the 10th of Spring and needs 
===Disaster triggers===
Agencies are linked to certain disasters, and can only have those happen to themSettings/Outspread/DisasterTrigger/Trigger.xml. Moreover, disasters except Earthquake depend upon Season. Every dayXiaWorld.OutspreadMgr.DisasterTriggerUpdate(), as long as 2 disasters aren't already happening, the chance for a season-acceptable disaster to trigger is checked in each relevant agency. The values can be found in the following table.
Agency 	EarthQuake	Flood 	Cold wave 	Drought
Agency 	All 	Autumn	Winter → 10 Spring	Summer
Mt. South 	0.7% 	 	 	0.7%
Riverbank Plains 	 	0.7% 	0.7% 	
Central Plains 	 	 	 	1%
Great Desert 	 	 	 	1%
The Great Snowland	 	 	1% 	
Wild South 	1% 	 	 	
City of Abundance 	 	1% 	 	
City of Desolation	1% 	 	 	
Seascape 	 	0.7% 	0.7% 	
Snaketail Village 	 	1% 	 	
Riverback City 	0.7% 	0.7% 	 	
=== Disaster help===
In case you're using the Disaster Relief policy and have enough resources, your sect contributes 20 help towards the total everyday. Watching the city doesn't increase the amount contributed (but still helps to lower the time between policy events). In case there are other sects present, they also contribute each by 10 to 40 everydayXiaWorld.OutspreadMgr.RegionUpdate(). Policy events from the policy also help in case of successful resolution. 
====Adventure====
Once per disaster, you can contribute by sending a cultivator to help with the disaster (it's also possible to worsen the situation). The amount of help contributed depends on whether you send a Shendao Cultivator or not, and on their Cultivation stage.
Cultivation stage 	Xiandao / Body	Shendao
Qi Shaping / Remold / Ascetic 	100 	50
Core Shaping / Marrow-Cleaning / Pilgrim	250 	125
Golden Core / Incubation / Divine 	400 	200
Primordial Spirit / Chaos / Attainment 	600 	300
Moreover, Shendao cultivators will earn randomly between 5,000 and 8,000 Faith, as well as between 10,000 and 20,000 Followers, which is the best source of followers, notably to prepare for the Divine Realm breakthrough. This doesn't affect your Agency followers count or the Region population.
=== Resolution ===
In all cases, the region loses a portion of the population, which is the lowest between RegionPopulation - 50000 and a random number equal on average to 5% (success) or 33% (failure) of the Region population . This reduces all sects followers count by the percentage reduction of the total region population.
* Success: In case the total 1000 help needed is contributed, the Region also gains 75 Stability. Moreover, the sect with the most contribution will earn 15% of the region population as Followers, first from the Unbelievers population and then from the other sect's followers count as usual. However, contrary to other population gains, it ignores any attractiveness reduction, so the sect with the most contribution always earns the total amount of 15% of the region population as followers.
* Failure: In case the total 1000 help needed isn't contributed before the end, the Region also loses 40 Stability.
==Region and Agency stats==
The Region (city or district) the Agency is in as well as the Agencies present have a few stats governing their daily changes and reflecting the result of Policy Events.
Agency 	Type 	Population	Stability	Sects 	Sects 	Sects
Agency 	Type 	Population	Stability	Name 	Followers	Attr.
Mt. SouthOurPlace 	District	60,000 	25 	Player sect 	15,000 	10
Central Plainzhongyuan 	District	350,000 	25 	Evenfall Abode 	175,000 	75
Central Plainzhongyuan 	District	350,000 	25 	Sunshade Abode 	70,000 	50
Central Plainzhongyuan 	District	350,000 	25 	Mystic Unity Sect 	35,000 	50
Central Plainzhongyuan 	District	350,000 	25 	Seven-Slaughtering Sect	35,000 	20
Riverbank PlainsJiangAnWoYe	District	350,000 	25 	Sunshade Abode 	140,000 	50
Riverbank PlainsJiangAnWoYe	District	350,000 	25 	Exultant Sect 	105,000 	40
Riverbank PlainsJiangAnWoYe	District	350,000 	25 	Seven-Slaughtering Sect	70,000 	40
The Great SnowlandDaXueYuan	District	50,000 	-25 	Seven-Slaughtering Sect	20,000 	75
The Great SnowlandDaXueYuan	District	50,000 	-25 	Kunlun Palace 	5,000 	20
The Great SnowlandDaXueYuan	District	50,000 	-25 	Skydome Palace 	5,000 	20
Great DesertDaMo 	District	70,000 	-25 	Kunlun Palace 	28,000 	75
Great DesertDaMo 	District	70,000 	-25 	Skydome Palace 	14,000 	20
Great DesertDaMo 	District	70,000 	-25 	Evenfall Abode 	7,000 	20
Great DesertDaMo 	District	70,000 	-25 	Pit of Doom 	7,000 	20
Wild SouthNanHuang 	District	50,000 	-25 	Mt. Hundred Insects 	10,000 	75
Wild SouthNanHuang 	District	50,000 	-25 	Blue Lotus Temple 	5,000 	20
Riverback CityHeYin 	City 	350,000 	25 	Purple Cloud Temple 	140,000 	75
Riverback CityHeYin 	City 	350,000 	25 	Exultant Sect 	87,500 	50
SeascapeGuanHai 	City 	350,000 	25 	Blue Lotus Temple 	140,000 	75
SeascapeGuanHai 	City 	350,000 	25 	Purple Cloud Temple 	70,000 	50
SeascapeGuanHai 	City 	350,000 	25 	Exultant Sect 	35,000 	20
SeascapeGuanHai 	City 	350,000 	25 	Sunshade Abode 	35,000 	20
Snaketail VillagePanShe 	City 	100,000 	-75 	Pit of Doom 	40,000 	75
Snaketail VillagePanShe 	City 	100,000 	-75 	Mt. Hundred Insects 	40,000 	50
City of AbundanceFeng 	City 	350,000 	75 	Blue Lotus Temple 	140,000 	50
City of AbundanceFeng 	City 	350,000 	75 	Evenfall Abode 	105,000 	20
City of AbundanceFeng 	City 	350,000 	75 	Purple Cloud Temple 	70,000 	20
City of DesolationDaLiang 	City 	100,000 	75 	Mystic Unity Sect 	40,000 	75
City of DesolationDaLiang 	City 	100,000 	75 	Skydome Palace 	25,000 	50
City of DesolationDaLiang 	City 	100,000 	75 	Kunlun Palace 	10,000 	20
City of DesolationDaLiang 	City 	100,000 	75 	Pit of Doom 	10,000 	20
=== Population===
====Region====
The population of a region (city or district) varies from 50.000 to 400.000, it influences the amount of believers to be converted and has an influence on the Incorporate Policy, as you need to convert more than 70% of the total population to incorporate it.
It naturally grows depending on StabilityXiaWorld.OutspreadMgr.GetRegionPopulationAddPerDay():
*Stability >= 50: 40*(\sqrt{40000 - 0.1*CurrentPopulation}- 1), which grows the population by around 5000 per day, decreasing slowly until the max population of 400.000 is reached.
*Between 0 and 49 Stability: 20*(\sqrt{40000 - 0.1*CurrentPopulation}- 1), around 2500 population growth.
*Between -50 and -1 Stability: No population change.
*Stability < -50: -40*(\sqrt{40000 - 0.1*CurrentPopulation}- 1), ~5000 population loss per day.
The City Housing Wonder also doubles population effects (in either direction).
====Agency====
The agencies population (followers) is the main hurdle for upgrading agencies, and affects the earned Belief per dayXiaWorld.OutspreadMgr.GetAddFaithPerDay(). It also is a factor for Shendao Belief TribulationsXiaWorld.OutspreadMgr.GetFaithNpcTianJieAbout().
It is mostly affected by Policy Events and Disasters. In case a sect has 40% of more of the city's entire poulation it also varies proportionally with the region population growthXiaWorld.OutspreadMgr.Region.AddPopulation(): if the population of a region with 100.000 people has high stability, its population will grow from 100.000 to 106.888 , which is a 6.89% growth. As a result, a sect having 40,000 or more followers will also acquire 6.89% followers.
When undergoing a Shendao Belief Tribulation, if the Shendao cultivator is currently assigned to Agencies with high Population and high Attractiveness, their Tribulation strength decreases.
====Unbelievers====
The game keeps track of the population of unbelievers, which is the difference between the region population and the sum of all sect populations. As long as it is positive, every sect will earn a daily amount of followers equal to their attractivenessXiaWorld.OutspreadMgr.Region.ReligonAttracive2Population(). It is also the primary pool from which extra followers are earned through events, so once it is dried these events have significantly reduced effect.
=== Belief / Hatred===
Belief or Hatred is the main resource generated by agencies. In case a Shendao built a Statue in the agency (requires Agency level 2) and the Agency uses the "Miracle" Policy, it is automatically collected. Otherwise, you can collect it by sending a Xiandao or Shendao here as an Adventure. Xiandaos cultivators will convert any amount of belief or hatred present into the same quantity of Inspiration.
In case Belief is negative, it is called Hatred. The maximum Belief or Hatred an Agency can store and its generation speed depends on the agency level (see #Upgrading Agencies section), from (-)5 millions to (-)20 millions.
The formula is: 0.2 * Followers*AgencyLevel*(1+PagodaOfEnigmaBonus) * StabilityFactor, where: 
*Followers is the followers count of the agency
*AgencyLevel is the upgrade level of the agency,
*PagodaOfEnigmaBonus is 1 if the Pagoda of Enigma Agency Wonder is built in that Agency, 0 otherwise,
*StabilityFactor depends on current Stability
Stability	Stability	Factor
>= 	< 	Factor
50 	 	2
0 	50 	1
-50 	0 	0.5
 	-50 	-1
At most, an agency level 3 with 400,000 followers, 50+ Stability will generate 160,000 Inspiration per day, or 320,000 with Pagoda of Enigma, which means all agencies maxed would bring 1,920,000 Inspiration per day without Shendao collecting it. It would take years to reach such a point however.
===Stability ===
Stability is a region-specific stat varying from -100 to 100. It is only affected by its region's starting valueSettings/Outspread/Region/region_City.xml & Settings/Outspread/Region/region_District.xml and Policy Events. As seen above, it influences population changes. It has an effect on the positive results of Policy EventsScripts/MapStory/MapStory.lua: 
*if it adds region population, a multiplier of 1.5 is applied if the stability is between 1 and 49, 0.5 if it's under -51, 1 otherwise,
*if it adds sect attractiveness, the effect is doubled if the Stability is between -49 and -1.
It also applies a factor to the amount of Belief earned per day, detailed above.
===Attractiveness ===
Attractiveness is an agency-specific stat, varying from 0 to 100. It is a factor for Shendao Belief Tribulations and Followers population growth as described above. By default It remains constant for NPC sects, whereas the player's sect loses 2 Attractiveness per day. Outside of that, it is affected by Policy Events, replacing the Abbot, and the Auspicious Signs spell from the Phoenix pet.
When the result of an event gives extra followers, the followers are first taken from the unbelievers population (which isn't affected by attractiveness). However, once there's no more believers left the game tries to take followers from other sects equally. If the event was a disaster, attractiveness is ignored, otherwise you only gain followers in the proportion of \frac{yourAttractiveness}{yourAttractiveness + sectAttractiveness} . Given that your attractiveness tends to be 0, this makes those event results less important unless you freed some population from other sects beforehand (for example through the Plotting policy).
==Sect stats ==
An Agency's sect stats are affected by both the Abbot's as well as the other Disciples' Skill Level (not Ability Rating) and Five Attributes. It is equal to the Abbot's skill levels or attributes, plus 10% of the sum of all Disciples' score. These stats are used to optimize the Policy Events outcomes. In case the agents sent were outer disciples, the stats used will be the one they had when they left the sect map, which means you can use s and other items improving Five Attributes to help (though the latter is not particularly recommended). Temporary buffs also never expire. 
*Battle: helps with Stability. 15 Battle is enough for policy events related to Stability. More than 15 battle does not give more stability.
* Intelligence: required for some Policy Events and Treasure Hunt. >7 (slightly more than 7) Intelligence is usually required for policy events. 11 Intelligence is required for Treasure Hunts in Great Desert and Central Plain.
*Charisma: required for some Policy Events and increases follower gains during Policy Events. >7 (slightly more than 7) Charisma is required for policy events. With 9.73 Charisma, you can on average reach 25k followers with 2 to 3 policy events raising your number of followers, provided you resolve them successfully and there's enough Unbelievers available.
*Mining: improves theoutput of and during Manual Labor and result of the Treasure Hunt.
*Farming: improves the output of Manual Labor and result of the Treasure Hunt.
*Disciples number: improves the Help provided by Disaster Relief events during Disasters (from 7) and improves the output of during Manual Labor and result of the Treasure Hunt.
*Social: improves the Influence gains during Policy Events by 6.67% per skill level above 15 (no effect for 15 and less skill level). It is never required for policy events. Influence is a relatively unimportant resource past early game (once the agencies are all opened), and 16 skill level to start having a meager effect is a lot, so it is generally recommended to ignore Social Skill level despite what wrong and terribly outdated guides may say.
TLDR: To never fail policy events outside of Treasure Hunt: 7.01 charisma, 7.01 intelligence, 15 battle
===Mt. South===
Mt. South is particular as there are no other Factions at Mt. South, and you start with 15,000 followers here, which lowers a little while building the Main Hall as you don't have a Policy at this point so you always lose 5% population. This means that you can have slightly different abbot stats:
*Intelligence is not needed until you want to use Treasure Hunt as the Policy Events related to Intelligence are linked to interaction with rival sects.
*8.56 charisma is the breakpoint to reach 25k Followers with only one event raising population resolved successfully, which allows to directly upgrade the Agency to level 2 (allowing to obtain the ). Doing so immediately might not be worthwile tho, as opening all 11 agencies first would usually take priority.
*15 Battle for Stability is slightly more important as no rival sects removes one of the events raising Stability.
==Mods ==
===City Event Helper===
City Event Helper displays the outcome of Policy Events choices.
===SkillLevelInRecruitment===
SkillLevelInRecruitment shows the actual skill level of recruitable disciples instead of the aggregated values, which is valuable as it is the value considered for Agency stats. It also allows to order disciples by Skill Levels.
See also: Mods
==References==
4 levels of Agency upgrades are defined, but the level 3 is never used and the level 2 directly upgrades to level 4.
Category:Agency
Category:Game Mechanics