Page 1 of 3 123 LastLast
Results 1 to 20 of 56

Thread: How to create an emerging faction

  1. #1
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default How to create an emerging faction

    here's how:

    (this was wrote to be for kingdoms but can be easly adaptable to med2tw vanilla (or non-vanilla))

    1st- go to descr_sm_faction and copy the mongols horde ability:


    it's looks like this:
    Code:
    faction                   mongols, spawned_on_event
    culture                   middle_eastern
    religion                   islam
    symbol                   models_strat/symbol_mongols.CAS
    rebel_symbol           models_strat/symbol_rebels.CAS
    primary_colour         red 244, green 231, blue 170
    secondary_colour     red 0, green 0, blue 0
    loading_logo    l       oading_screen/symbols/symbol128_mongols.tga
    standard_index        8
    logo_index              FACTION_LOGO_MONGOLS
    small_logo_index      SMALL_FACTION_LOGO_MONGOLS
    triumph_value         5
    custom_battle_availability        yes
    horde_min_units                     20
    horde_max_units                    40
    horde_max_units_reduction_every_horde            10
    horde_unit_per_settlement_population               100
    horde_min_named_characters                           1
    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
    horde_unit                Mongol Light Lancers
    horde_unit                Mongol Horse Archers
    can_sap          yes
    prefers_naval_invasions         yes
    can_have_princess          no
    has_family_tree              yes


    now copy all the phrase that beguins with HORDE

    Code:
    horde_min_units                     20
    horde_max_units                    40
    horde_max_units_reduction_every_horde               10
    horde_unit_per_settlement_population                  100
    horde_min_named_characters                              1
    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
    horde_unit                Mongol Light Lancers
    horde_unit                Mongol Horse Archers

    and paste it in the faction you want to make horde (between custom_battle_availability and can_sap)

    (in my case the moors)

    next rename the horde_unit to moors units (you have to go to descr_units and search for their units)

    the result will be like this (i choosed this units):

    Code:
    faction                        moors, spawned_on_event
    culture                        middle_eastern
    religion                    islam
    symbol                        models_strat/symbol_moors.CAS
    rebel_symbol                models_strat/symbol_rebels.CAS
    primary_colour                red 54, green 174, blue 158
    secondary_colour            red 239, green 239, blue 239
    loading_logo                loading_screen/symbols/symbol128_moors.tga
    standard_index                16
    logo_index                    FACTION_LOGO_MOORS
    small_logo_index            SMALL_FACTION_LOGO_MOORS
    triumph_value                5
    custom_battle_availability                  yes
    horde_min_units                10
    horde_max_units                40
    horde_max_units_reduction_every_horde          10
    horde_unit_per_settlement_population                 150
    horde_min_named_characters                  1
    horde_max_percent_army_stack                80
    horde_disband_percent_on_settlement_capture              0
    horde_unit                    Arab Cavalry
    horde_unit                    Desert Cavalry
    horde_unit                    Tuareg Camel Spearmens
    horde_unit                    Desert Archers
    horde_unit                    Dismounted Tuareg
    horde_unit                    Berber Spearmen
    horde_unit                    Lamtuna Spearmen
    can_sap                        yes
    prefers_naval_invasions        yes
    can_have_princess                no
    has_family_tree                    yes
    now go to the descr_events.txt (in imperial campaign folder and copy this) (this must match with the event you choosed to make the faction emerges in the campaign script - see below in the campaign_script part)

    Code:
    event    historic    timurids_invasion_warn
    date    2 4

    now go to descr_strat and paste this: (in my case the crusades campaign)

    Code:
    campaign        Crusades
    playable
        jerusalem
        antioch
        byzantium
        turks
        egypt
        milan
        russia
    end
    unlockable
    end
    nonplayable
        slave
        mongols
        venice
            moors
    end


    next go to the bottom and search for the mongols faction (important)

    copy the mongols faction details

    Code:
    faction    mongols, balanced smith
    ai_label    default 
    dead_until_resurrected
    denari    10000
    denari_kings_purse    3000
    and rename it (mongols to moors

    Code:
    [faction    moors, balanced smith
    ai_label    default 
    dead_until_resurrected
    denari    10000
    denari_kings_purse    3000

    now go to campaign_script (this is the most sensible thing ..pay atention)



    Script on the bottom, in the attachments




    and you're done


    for any problem just make a post and i'll try to explain you how to solve it...


    HAVE FUN


    credits:
    - Boicote - the script file was majorly made by him..
    Last edited by Swagger; January 07, 2009 at 07:20 PM.
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  2. #2
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    edited because cringe.
    Last edited by Swagger; January 04, 2020 at 04:00 PM.
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  3. #3
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    simplified it even more
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  4. #4

    Default Re: How to create an emerging faction

    congratulations, and patience is a virtue my friend.

    your tutorial is correct from what i can tell but I think personally the OMANI INVADES part is a little over done, you might want to edit it to have less 'other' features and try to stick to the goals of the tutorial.

    EDIT: you also need to add in the edu a hidden special ability 'can_horde' to each of the units that appear in the descr_sm_factions.txt

  5. #5
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    thanks..i spent 20 minutes writing this


    about the can_horde that's not necessary...

    the game is fine without put it..


    the horde appears even without it, or when it lots all their settlements...


    i'll edit it as you said..

    i'll remove the kings purse thing
    Last edited by Swagger; February 03, 2008 at 10:19 AM.
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  6. #6
    Arto's Avatar Praefectus
    Join Date
    Jan 2008
    Posts
    6,297
    Tournaments Joined
    1
    Tournaments Won
    0

    Default Re: How to create an emerging faction

    Question: I didn't read the tutorial good but how do you make the emerging army in the right place like Ireland
    Knowledge is a deadly friend, if no one sets the rules. The fate of all mankind I see, is in the hands of fools - King Crimson's Epitaph.
    תחי מדינת ישראל

  7. #7
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    Hi Arto


    here's what you have to do to get the coordinates:
    -In the campaign map go to the place you want to get the coordinates
    -then press Ç or ~ (depending to what keyboard you're using) and write thiswhile having the mouse in the place you want to get the coordinates)
    show_cursorstat


    then do what the tutorial says and instead of the old coordinates copy the one you get..

    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  8. #8

    Default Re: How to create an emerging faction

    I play at the time the ftw mod (falcomTW) and I have a big problem with that . Can you help me ?

    I play now get the invasion warn event but not the other . So that means the mongols will not appear. I played now (only for test) until the year 1240 when the gunpowder are dicovered but nothing no event abouit the mongol invasion.That makes me uggly and i checked that now several times with anew game and let the invasion warn come (as test) in year 2) Here i have the same problem I think in the campaign_script.txt the mongol invasion event would appear in a time period of-4-8 years from the invasion warn event. But Nothing the event doesnt occure. I checked the files sm_Factions,
    and also descr_strat and everything is fine. Also in descr_event.txt is the event. Now i checked the campaign_script.txt
    Here i found that the coordinates that was used for the armies and also for the cities was from vanilla map and because ftw uses a large map i think that is the error . Now i changed the coordinates (also of the cities ) and tested it again (new game not old saves) . But nothing this events doesnt occure. Only the first event (Mongol_Invasion_warn) occure. I think because Ftw use 2turns /year i get the invasion_warn event after 2 years so 1082 (Summer) and i testet if for several times to 1092 (winter) but nothing.
    I really dont know where the error is plz help im really disperate. The timurids has the same problem i tested it too. Here i will post the campaign_script.txt
    ;
    ; Campaign script
    ;
    script
    ; ---------------------
    ; counters

    declare_counter Opened_Faction_Overview_Scroll
    declare_counter Opened_Settlement_Scroll
    declare_counter mongols_sarkel
    declare_counter mongols_yerevan
    declare_counter mongols_baghdad
    declare_counter timurids_sarkel
    declare_counter timurids_yerevan
    declare_counter timurids_baghdad


    ; ---------------------
    ; start up

    ;freeze_faction_ai aztecs

    ;----------------------
    ; monitors

    ;-- 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

    monitor_event EventCounter EventCounterType mongols_invasion
    and EventCounter > 0
    if I_EventCounter mongols_invasion == 1
    add_events
    ;;; SCOUTING INVASION
    event emergent_faction mongols
    date 0
    ; region Tbilisi_Province
    region Yerevan_Province
    region Bulgar_Province
    region Sarkel_Province
    region Baghdad_Province
    movie event/mongols_invade.bik
    ;ADD MONGOL INVASION 1
    event counter mongols_invasion
    date 2
    end_add_events
    end_if
    if I_EventCounter mongols_invasion == 2

    ;Sarkel
    if I_CharacterTypeNearTile mongols named_character, 30 446, 240
    set_counter mongols_sarkel 1
    end_if
    ;Tbilisi / Yerevan
    if I_CharacterTypeNearTile mongols named_character, 20 481, 180
    set_counter mongols_yerevan 1
    end_if
    ;Baghdad
    if I_CharacterTypeNearTile mongols named_character, 30 503, 126
    set_counter mongols_baghdad 1
    end_if

    ;;; MONGOL INVASION 1 SCRIPT
    spawn_army
    faction mongols
    character Jebe, named character, age 30, x 493, y 282, family ;command 8, dread 9, loyalty 7, piety 1
    traits EasternWarlord 3 , GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3 ;command 8, dread 9, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Aradai, named character, age 22, x 499, y 286, family ;command 6, dread 7, loyalty 7, piety 1
    traits EasternWarlord 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3 ;command 6, dread 7, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Bayan, named character, age 21, x 493, y 291, family ;command 6, dread 7, loyalty 7, piety 1
    traits EasternWarlord 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1, Loyal 2, ContentGeneral 3 ;command 6, dread 7, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    end

    ;;; move them to location of first invasion
    if I_CompareCounter mongols_sarkel = 1
    reposition_character Jebe, 487, 262
    reposition_character Aradai, 489, 263
    reposition_character Bayan, 489, 262
    end_if
    if I_CompareCounter mongols_yerevan = 1
    reposition_character Jebe, 506, 181
    reposition_character Aradai, 510, 180
    reposition_character Bayan, 508, 181
    end_if
    if I_CompareCounter mongols_baghdad = 1
    reposition_character Jebe, 505, 132
    reposition_character Aradai, 503, 133
    reposition_character Bayan, 503, 131
    end_if

    ;ADD MONGOL INVASION 2
    add_events
    event counter mongols_invasion
    date 20 40
    end_add_events
    end_if

    if I_EventCounter mongols_invasion == 3
    ;;; MONGOL INVASION 2 SCRIPT
    spawn_army
    faction mongols
    character Batu, named character, age 26, x 493, y 282, family ;command 8, dread 9, loyalty 7, piety 1
    traits EasternWarlord 3 , GoodCommander 2 , Genocide 2 , BattleDread 2 , StrategyDread 1 , PublicFaith 1, Loyal 2, ContentGeneral 3 ;command 8, dread 9, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Subutai, named character, age 25, x 499, y 286, family ;command 9, dread 9, loyalty 7, piety 1
    traits EasternWarlord 2 , GoodCommander 3 , Anger 3 , BattleDread 3 , StrategyDread 3 , PublicFaith 1, Loyal 2, ContentGeneral 3 ;command 9, dread 9, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Berkei, named character, age 24, x 493, y 281, family ;command 7, dread 7, loyalty 7, piety 6
    traits EasternWarlord 3 , Anger 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 4, TouchedByTheGods 1 , Loyal 2, ContentGeneral 3 ;command 7, dread 7, loyalty 7, piety 6
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Orda, named character, age 23, x 500, y 286, family ;command 7, dread 7, loyalty 7, piety 1
    traits EasternWarlord 3 , StrategicSkill 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 1, Loyal 2, ContentGeneral 3 ;command 7, dread 7, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    end

    if I_CompareCounter mongols_sarkel = 1
    reposition_character Batu, 487, 262
    reposition_character Subutai, 489, 263
    reposition_character Berkei, 489, 262
    reposition_character Orda, 488, 262
    end_if
    if I_CompareCounter mongols_yerevan = 1
    reposition_character Batu, 506, 181
    reposition_character Subutai, 510, 180
    reposition_character Berkei, 508, 181
    reposition_character Orda, 507, 179
    end_if
    if I_CompareCounter mongols_baghdad = 1
    reposition_character Batu, 505, 132
    reposition_character Subutai, 505, 133
    reposition_character Berkei, 503, 133
    reposition_character Orda, 503, 131
    end_if

    ;ADD MONGOL INVASION 3
    add_events
    event counter mongols_invasion
    date 30 50
    end_add_events
    end_if

    if I_EventCounter mongols_invasion == 4
    ;;; MONGOL INVASION 3 SCRIPT
    spawn_army
    faction mongols
    character Hulegu, named character, age 25, x 493, y 282, family ;command 8, dread 9, loyalty 7, piety 0
    traits EasternWarlord 3 , Genocide 2 , NaturalMilitarySkill 2 , BattleDread 3 , StrategyDread 2 , Loyal 2, ContentGeneral 3 ;command 8, dread 9, loyalty 7, piety 0
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Kitbuqa, named character, age 24, x 499, y 286, family ;command 8, dread 9, loyalty 7, piety 0
    traits EasternWarlord 3 , Anger 3 , BattleDread 3 , StrategyDread 2 , Loyal 2, ContentGeneral 3 ;command 8, dread 9, loyalty 7, piety 0
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Abaqha, named character, age 23, x 493, y 291, family ;command 7, dread 7, loyalty 7, piety 0
    traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 1, Loyal 2, ContentGeneral 3 ;command 7, dread 7, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction mongols
    character Kuo_Kan, named character, age 22, x 495, y 292, family ;command 7, dread 7, loyalty 7, piety 0
    traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 1, Loyal 2, ContentGeneral 3 ;command 7, dread 7, loyalty 7, piety 1
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Infantry exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Foot Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Light Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Horse Archers exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    unit AS Trebuchet exp 6 armour 0 weapon_lvl 0
    end

    if I_CompareCounter mongols_sarkel = 1
    reposition_character Hulegu, 487, 262
    reposition_character Kitbuqa, 489, 263
    reposition_character Abaqha, 489, 262
    reposition_character Kuo_Kan, 490, 264
    end_if
    if I_CompareCounter mongols_yerevan = 1
    reposition_character Hulegu, 506, 181
    reposition_character Kitbuqa, 510, 180
    reposition_character Abaqha, 508, 181
    reposition_character Kuo_Kan, 507, 179
    end_if
    if I_CompareCounter mongols_baghdad = 1
    reposition_character Hulegu, 505, 132
    reposition_character Kitbuqa, 503, 133
    reposition_character Abaqha, 505, 133
    reposition_character Kuo_Kan, 503, 131
    end_if

    terminate_monitor
    end_if
    end_monitor

    ;-- Timurids invasion --
    monitor_event EventCounter EventCounterType timurids_invasion_warn
    and EventCounter > 0
    ; ADD SCOUTING INVASION
    add_events
    event counter timurids_invasion
    date 2 4
    end_add_events
    if I_EventCounter timurids_invasion_warn == 2
    terminate_monitor
    end_if
    end_monitor

    monitor_event EventCounter EventCounterType timurids_invasion
    and EventCounter > 0
    if I_EventCounter timurids_invasion == 1
    ;;; SCOUTING INVASION
    add_events
    event emergent_faction timurids
    date 0
    ; region Tbilisi_Province
    region Yerevan_Province
    region Voplga-Bulgar_Province
    region Sarkel_Province
    region Baghdad_Province
    movie event/timurids_invade.bik
    ; ADD TIMURID INVASION 1
    event counter timurids_invasion
    date 2
    end_add_events
    end_if
    if I_EventCounter timurids_invasion == 2

    ;Sarkel
    if I_CharacterTypeNearTile timurids named_character, 60 446, 240
    set_counter timurids_sarkel 1
    end_if
    ;Tbilisi / Yerevan
    if I_CharacterTypeNearTile timurids named_character, 40 481, 180
    set_counter timurids_yerevan 1
    end_if
    ;Baghdad
    if I_CharacterTypeNearTile timurids named_character, 60 503, 126
    set_counter timurids_baghdad 1
    end_if

    ;;; TIMURID INVASION 1 SCRIPT
    spawn_army
    faction timurids
    character Timur, named character, age 30, x 493, y 282, family ;Command 9 Dread 9 Loyalty 6 Piety 4
    traits EasternWarlord 3 , GoodCommander 3 , Bloodthirsty 2 , BattleDread 3 , StrategyDread 2 , PublicFaith 4 , Loyal 1 , ContentGeneral 3 ;command 9, dread 9, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction timurids
    character Husayn, named character, age 24, x 499, y 286, family ;Command 7 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 7, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction timurids
    character Umar_Shaykh, named character, age 23, x 493, y 291, family ;Command 6 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , Anger 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 6, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Naffatun exp 6 armour 0 weapon_lvl 0
    unit AS Grand Bombard exp 6 armour 0 weapon_lvl 0
    unit AS Grand Bombard exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction timurids
    character Miran, named character, age 22, x 499, y 291, family ;Command 6 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 6, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Naffatun exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    end

    ;;; move them to location of first invasion
    if I_CompareCounter timurids_sarkel = 1
    reposition_character Timur, 487, 262
    reposition_character Husayn, 489, 263
    reposition_character Umar_Shaykh, 489, 262
    reposition_character Miran, 488, 263
    end_if
    if I_CompareCounter timurids_yerevan = 1
    reposition_character Timur, 506, 181
    reposition_character Husayn, 510, 180
    reposition_character Umar_Shaykh, 508, 181
    reposition_character Miran, 507, 179
    end_if
    if I_CompareCounter timurids_baghdad = 1
    reposition_character Timur, 505, 132
    reposition_character Husayn, 503, 133
    reposition_character Umar_Shaykh, 503, 131
    reposition_character Miran, 504, 131
    end_if

    ; ADD TIMURID INVASION 2
    add_events
    event counter timurids_invasion
    date 12 24
    end_add_events
    end_if
    if I_EventCounter timurids_invasion == 3
    ;;; TIMURID INVASION 2 SCRIPT
    spawn_army
    faction timurids
    character Shahrukh, named character, age 22, x 493, y 282, family ;Command 7 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 7, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction timurids
    character Pir_Muhammed, named character, age 21, x 499, y 286, family ;Command 7 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 7, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephants exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    unit Elephant Artillery exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction timurids
    character Nayaga, named character, age 20, x 493, y 291, family ;Command 6 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 3 , StrategyDread 2 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 6, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Naffatun exp 6 armour 0 weapon_lvl 0
    unit AS Grand Bombard exp 6 armour 0 weapon_lvl 0
    unit AS Grand Bombard exp 6 armour 0 weapon_lvl 0
    end
    spawn_army
    faction timurids
    character Dayir, named character, age 19, x 496, y 287, family ;Command 6 Dread 7 Loyalty 6 Piety 4
    traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3 ;command 6, dread 7, loyalty 6, piety 4
    unit Mongol Bodyguard exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Lancers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Mongol Heavy Archers exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit Sabadar Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit ME Halberd Militia exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Turkomans exp 6 armour 0 weapon_lvl 0
    unit Naffatun exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    unit AS Rocket Launcher exp 6 armour 0 weapon_lvl 0
    end

    ;;; move them to location of first invasion
    if I_CompareCounter timurids_sarkel = 1
    reposition_character Shahrukh, 487, 262
    reposition_character Pir_Muhammed, 489, 263
    reposition_character Nayaga, 489, 262
    reposition_character Dayir, 488, 264
    end_if
    if I_CompareCounter timurids_yerevan = 1
    reposition_character Shahrukh, 506, 181
    reposition_character Pir_Muhammed, 510, 180
    reposition_character Nayaga, 508, 181
    reposition_character Dayir, 507, 179
    end_if
    if I_CompareCounter timurids_baghdad = 1
    reposition_character Shahrukh, 505, 132
    reposition_character Pir_Muhammed, 505, 133
    reposition_character Nayaga, 503, 133
    reposition_character Dayir, 503, 131
    end_if

    terminate_monitor
    end_if
    end_monitor
    Last edited by Cesare; February 08, 2008 at 07:54 PM.

  9. #9

    Default Re: How to create an emerging faction

    For the map I checked the provinces (names) and their are still there that the named provinces in campaign_script so thats not the error. Also i have a Question. Because i checked the coordinates manually . Why the second coordinates of the yerevan province are coordinates that are false ? that is also in the vanilla map so and in other mods too. Check the coordinates of the character Aradai in yerevan also in vanilla map (289,108) or bigmapmods like Regions & provinces 2.4 (499,193) . I put also here in ftw wrong coordinates (510,180) but also with good coordinates (506,180) is that not the error.
    the only thing that the campaign_script has more than the vanilla one or others is that contains this but i dont think because of that the event wouldnt occure
    here:
    ;;;;;;;;;;;;;;;;;;
    ;; MONEY SCRIPT ;;
    ;;;;;;;;;;;;;;;;;;

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType england
    and Treasury < 6000
    console_command add_money england, 6000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType france
    and Treasury < 5400
    console_command add_money france, 5400
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType hre
    and Treasury < 6600
    console_command add_money hre, 6600
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType spain
    and Treasury < 5800
    console_command add_money spain, 5800
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType venice
    and Treasury < 5000
    console_command add_money venice, 5000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType sicily
    and Treasury < 4400
    console_command add_money sicily, 4400
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType milan
    and Treasury < 4000
    console_command add_money milan, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType scotland
    and Treasury < 4000
    console_command add_money scotland, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType byzantium
    and Treasury < 5000
    console_command add_money byzantium, 5000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType russia
    and Treasury < 5000
    console_command add_money russia, 5000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType moors
    and Treasury < 9000
    console_command add_money moors, 12000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType turks
    and Treasury < 9000
    console_command add_money turks, 12000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType egypt
    and Treasury < 9000
    console_command add_money egypt, 12000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType denmark
    and Treasury < 4200
    console_command add_money denmark, 4200
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType portugal
    and Treasury < 4400
    console_command add_money portugal, 4400
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType poland
    and Treasury < 5000
    console_command add_money poland, 5000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType hungary
    and Treasury < 5400
    console_command add_money hungary, 5400
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType papal_states
    and Treasury < 1000
    console_command add_money papal_states, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType slave
    and Treasury < 2000
    console_command add_money slave, 7000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType lithuania
    and Treasury < 4000
    console_command add_money lithuania, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType normans
    and Treasury < 4500
    console_command add_money normans, 4500
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType saxons
    and Treasury < 4000
    console_command add_money saxons, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType khazars
    and Treasury < 4000
    console_command add_money khazars, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType bulgaria
    and Treasury < 4000
    console_command add_money bulgaria, 4000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType brabant
    and Treasury < 3000
    console_command add_money brabant, 3000
    end_monitor

    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType leinster
    and Treasury < 3500
    console_command add_money leinster, 3500
    end_monitor


    monitor_event FactionTurnStart not FactionIsLocal
    and FactionType serbia
    and Treasury < 4000
    console_command add_money serbia, 4000
    end_monitor

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; GROWTH BALANCE SCRIPT ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType city
    and SettlementBuildingExists = wooden_pallisade
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType city
    and SettlementBuildingExists = wooden_wall
    console_command add_money -100
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType city
    and SettlementBuildingExists = stone_wall
    console_command add_money -200
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType city
    and SettlementBuildingExists = large_stone_wall
    console_command add_money -400
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType city
    and SettlementBuildingExists = huge_stone_wall
    console_command add_money -800
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType castle
    and SettlementBuildingExists = motte_and_bailey
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType castle
    and SettlementBuildingExists = wooden_castle
    console_command add_money -100
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType castle
    and SettlementBuildingExists = castle
    console_command add_money -200
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType castle
    and SettlementBuildingExists = fortress
    console_command add_money -400
    end_monitor

    monitor_event SettlementTurnStart FactionIsLocal
    and I_TurnNumber > 0
    and SettlementType castle
    and SettlementBuildingExists = citadel
    console_command add_money -800
    end_monitor

    ; keep script unfinised until last monitor termination
    wait_monitors

    end_script
    So plz help me to bring the mongols and timurids as horde back into this mod as a new game and plz dont tell me that i need to start a new game for that also when its done and its impossible to do it for my saved one because i will collapse (I play after 2 months now)

  10. #10

    Default Re: How to create an emerging faction

    in M2TW you do not need 'console_command' or the comma, all that is needed is;

    add_money -800
    or
    add_money milan 200

    also do you have reemergant faction in the descr_strat.txt for the mongols and timurids?

  11. #11

    Default Re: How to create an emerging faction

    Quote Originally Posted by sounds like killing View Post
    in M2TW you do not need 'console_command' or the comma, all that is needed is;

    add_money -800
    or
    add_money milan 200

    also do you have reemergant faction in the descr_strat.txt for the mongols and timurids?
    I dont know this script was here in the mod so i founded it i didnt do nothing there and yes so i could see that in the descr_strat it looks good here the entries:
    faction mongols, balanced genghis
    ai_label default
    dead_until_resurrected
    denari 30000
    denari_kings_purse 3500

    faction timurids, religious mao
    ai_label default
    dead_until_resurrected
    denari 20000
    denari_kings_purse 3000

  12. #12

    Default Re: How to create an emerging faction

    also the entries in the descr_sm_factions are correctly . It looks like in the vanilla one also with spawned on event and includes also hordes and units.
    here the entries :
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    faction mongols, spawned_on_event
    culture middle_eastern
    religion islam
    symbol models_strat/symbol_mongols.CAS
    rebel_symbol models_strat/symbol_rebels.CAS
    primary_colour red 244, green 231, blue 170
    secondary_colour red 0, green 0, blue 0
    loading_logo loading_screen/symbols/symbol128_mongols.tga
    standard_index 8
    logo_index FACTION_LOGO_MONGOLS
    small_logo_index SMALL_FACTION_LOGO_MONGOLS
    triumph_value 5
    intro_movie faction/minor_intro.bik
    victory_movie faction/minor_win.bik
    defeat_movie faction/minor_lose.bik
    death_movie faction/minor_lose.bik
    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
    horde_unit Mongol Light Lancers
    horde_unit Mongol Horse Archers
    can_sap yes
    prefers_naval_invasions no
    can_have_princess no
    has_family_tree yes

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    faction timurids, spawned_on_event
    culture middle_eastern
    religion islam
    symbol models_strat/symbol_timurids.CAS
    rebel_symbol models_strat/symbol_rebels.CAS
    primary_colour red 0, green 0, blue 0
    secondary_colour red 215, green 0, blue 0
    loading_logo loading_screen/symbols/symbol128_timurids.tga
    standard_index 24
    logo_index FACTION_LOGO_TIMURIDS
    small_logo_index SMALL_FACTION_LOGO_TIMURIDS
    triumph_value 5
    intro_movie faction/minor_intro.bik
    victory_movie faction/minor_win.bik
    defeat_movie faction/minor_lose.bik
    death_movie faction/minor_lose.bik
    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 Heavy Lancers
    horde_unit Mongol Heavy Archers
    horde_unit Sabadar Militia
    horde_unit ME Halberd Militia
    horde_unit Turkomans
    can_sap yes
    prefers_naval_invasions no
    can_have_princess no
    has_family_tree yes

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    I dont think that the modders of this mod FTW changed something for the factions mongols and timurids . they let it so as they was in the vanilla .
    The only thing was that i found with the wrong coordinates but that i solved already. But the problem persists.
    I dont know what to say.
    I think about that....
    Can it be if you use this events in the descr_building.txt to limit a unit when it becomes buildable with this . here for example :
    recruit_pool "Halberd Militia" 1 0.5 4 0 requires factions { hre, papal_states, sicily, poland, hungary, serbia, brabant, } and event_counter mongols_invasion_warn 1
    than then the counter for the script event "Mongols_Invasion" wouldn´t work ?
    Also another question . for what stays the 1 after the event_counter mongols_invasion_warn ?? I tried to find that out but also the writer of the tutorial "Set units by era" doesnt know for what it is ? Can that be the error ??
    Last edited by Cesare; February 08, 2008 at 09:12 PM.

  13. #13
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    that is really a pain in the ass


    i don't think how can i help you, becouse you're using a mod, and i don't know what changes they made.


    the best you can do is to remake the re-emerge faction..using my tutorial...
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  14. #14

    Default Re: How to create an emerging faction

    @swagger
    the mod ia a improvement of the imperial campaign with 10 new factions and a map with 199 provinces. some new buildings and units. thats it. and i repeat i dont think the modders changed something into the vanilla factions for mongols or timurids they let it so as it was in the vanilla .Here take a look :Falcom Total War
    (That explain also why i found the wrong vanilla coordinates into their campaign_script.txt)
    and thats the uggly thing because they didnt changed something for the mongols and timurids but it still doesn´t works.

    Also now on your tutorial I have a Question why is that so in your tutorial :
    horde_min_units 20
    horde_max_units 40
    horde_max_units_reduction_every_horde 10
    horde_unit_per_settlement_population 100
    horde_min_named_characters 1
    horde_max_percent_army_stack 80
    horde_disband_percent_on_settlement_capture 0
    that are also not vanilla settings. Check that with my copy of posted descr_sm_factions.
    Do you can use 40 units in a army ?

  15. #15
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    Hi again

    no that's not from the vanilla, but that isn't important to how horde acts (it will not cause any problem if you don't change)

    Do you can use 40 units in a army ?
    no, that means that when a faction lots all the settlements, the maximum units they can recieve after get horde is 40 units, depending on how much population the last settlement has, it will affect how much units you'll recieve



    hope this helps
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  16. #16

    Default Re: How to create an emerging faction

    I tried it also now with a completely remake of the emergent factions in the campaign_script.txt but also with no result. The Mongol Invasion event will not occure after Mongol Invasion warn....

    hmmmm i dont know what factor else could determine that this event wouldnt occure.....
    If somebody can help i would appreciate this

  17. #17
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    try making a completly new event, and replace it in the event in the campaign_script mentioned above (in the 1st post)


    how to make new events:
    http://www.twcenter.net/forums/showthread.php?t=92185
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  18. #18

    Default Re: How to create an emerging faction

    it tried that but it doesnt worked but perhaps it must functioning also whitout a new event because thats the way it works also in vanilla, your tutorial and other mods too............
    (for mongols and timurids , ok for other factions you will incluide as horde you need than new events)

  19. #19
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: How to create an emerging faction

    can you explain more detailly ?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  20. #20

    Default Re: How to create an emerging faction

    ok the new event will appear as "second invasion warn" (Stupid title i know) but its working , but the mongols invasion will not come also not spawn armies.... I coupled also the mongol invasion event in the campaign_script to the new event but also whitout a positive result.....

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •