Emergent Factions - M2TW
General Information
In the vanilla Medieval II - Total War game two factions the Mongols and the Timurids emerge after the start of the game. There are some similarities in the mechanism used to do this as to the way the Slavs emerge in Barbarian Invasion - see here for description of that, however there are a number of important differences.
The most important and useful difference is that in M2TW a faction can be made to emerge in a region which is in the middle of the map, simply use it's internal region name in the emergence trigger. (In BI only regions that bordered the edge of the map could be used)
When and where the Mongols and Timurids enter game is controlled within the campaign_script.txt file and the descr_events.txt file.
A randomly timed warning event is included in the descr_events.txt file
; ------------ CORE GAME EVENT -------------- event historic mongols_invasion_warn date 128 144
that event triggers a new event in the campaign script
;-- Mongols invasions -- monitor_event EventCounter EventCounterType mongols_invasion_warn and EventCounter > 0 ; ADD SCOUTING INVASION add_events event counter mongols_invasion date 4 8 end_add_events if I_EventCounter mongols_invasion_warn == 2 terminate_monitor end_if end_monitor
the counter related to that then triggers the emergence in the next piece of script.
Making Other Factions Emerge
Factions other than the Mongols and Timurids can be made to emerge in M2TW, to do so they must be included in descr_strat.txt without settlements, armies or family trees; all that is required there is similar entry to Mongols eg:
faction mongols, balanced henry ai_label default dead_until_resurrected denari 10000 denari_kings_purse 3000
Note they must have the 'dead_until_resurrected' line and should be placed in the non-playable section at the top of the descr_strat file.
They must also have similar entry to Mongols in descr_sm_factions.txt
faction mongols, spawned_on_event culture middle_eastern religion islam ........ custom_battle_availability yes horde_min_units 10 horde_max_units 20 horde_max_units_reduction_every_horde 10 horde_unit_per_settlement_population 250 horde_min_named_characters 2 horde_max_percent_army_stack 80 horde_disband_percent_on_settlement_capture 0 horde_unit Mongol Infantry horde_unit Mongol Foot Archers horde_unit Mongol Heavy Archers horde_unit Mongol Heavy Lancers can_sap yes prefers_naval_invasions no can_have_princess no has_family_tree yes
the relevant sections needed are marked in bold. Unlike BI the units used, Mongol Infantry etc, do not have to be separately defined as 'horde_units', any units the faction has ownership of can be used.
The time and place of emergence has to be triggered either by descr_events.txt or the campaign_script.txt.
Triggering Emergence from descr_events.txt only
The easiest way to trigger emergence of a new faction is to use descr_events.txt directly without altering the script.....'WIP'