Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Lesson 2 - Difficulty/Spawning Army Scripts

  1. #21
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Lesson 2 - Difficulty/Spawning Army Scripts

    Can't seem to figure out how to get that M2TW language working in Notepad++, put the M2TW.api and the userdefinelang.xml in the root Notepad++ folder, and then selected User Defined Language in laguages, but it doesn't seem to be working.

    Another thing to note, the script listed by J@mes in the lesson uses I_CompareCounter, so if that isn't intended to work perhaps that should be changed, or the difference between the two more clearly explained :hmmm:.

    Anyways, here's my script (finally). I haven't got a chance to test it yet, but wanted to make sure I got it in today since J@mes said he'd check it on Monday.

    Code:
    ; 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
    		
    		declare_counter_difficulty
    		declare_counter_diificulty_easy
    		declare_counter_difficulty_medium
    		declare_counter_difficulty_hard
    		declare_counter_difficulty_very_hard
    		
            
            ; ---------------------
            ; start up
    
            freeze_faction_ai aztecs
    
            ;----------------------
            ; monitors
    
    	;------------ Scripting Class Customs ------------
    
    	;-- Difficulty Script
    	
    	monitor_event FactionTurnStart FactionIsLocal
    		and CampaignDifficulty = easy
    
    			set_event_counter difficulty_easy 1
    			set_event_counter difficulty_medium 0
    			set_event_counter difficulty_hard 0
    			set_event_counter difficulty_very_hard 0
    
    	terminate_monitor
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and CampaignDifficulty = medium
    
    			set_event_counter difficulty_easy 0
    			set_event_counter difficulty_medium 1
    			set_event_counter difficulty_hard 0
    			set_event_counter difficulty_very_hard 0
    	terminate_monitor
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and CampaignDifficulty = hard
    
    			set_event_counter difficulty_easy 0
    			set_event_counter difficulty_medium 0
    			set_event_counter difficulty_hard 1
    			set_event_counter difficulty_very_hard 0
    	terminate_monitor
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and CampaignDifficulty = very_hard
    
    			set_event_counter difficulty_easy 0
    			set_event_counter difficulty_medium 0
    			set_event_counter difficulty_hard 0
    			set_event_counter difficulty_very_hard 1
    	terminate_monitor
    	end_monitor
    
    	;-- End of Difficulty Script
    
    	;-- England - Challenge Scripts (Basic Assignment)
    	
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType england
    
    		if I_EventCounter difficulty_easy = 1
    
    			set_kings_purse england 3000
    
    		end_if
    
    		if I_EventCounter difficulty_medium = 1
    
    			set_kings_purse england 2500
    
    		end_if
    
    		if I_EventCounter difficulty_hard = 1
    
    			set_kings_purse england 2000
    
    		end_if
    
    		if I_EventCounter difficulty_very_hard = 1
    
    			set_kings_purse england 1500
    
    		end_if
    
    	terminate_monitor
    	end_monitor
    	
    	monitor_event GeneralCaptureSettlement SettlementName Paris
    		and FactionType england
    
    		spawn_army
    
    		faction france
    		character Godfrey Mauvoisin, named character, age 35, x 99, y 124
    		traits GoodCommander 2
    		unit NE Bodyguard exp 1 armour 0 weapon_lvl 0
    		end
    	
    	terminate_monitor
    	end_monitor
    	
    	;-- End of England - Challenge Scripts (Basic Assignment)
    
    	;-- Portugal - Challenge Scripts (Advanced Assignment)
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType portugal
    
    		if I_EventCounter difficulty_easy = 1
    
    			set_kings_purse portugal 2500
    
    		end_if
    
    		if I_EventCounter difficulty_medium = 1
    
    			set_kings_purse portugal 2000
    
    		end_if
    
    		if I_EventCounter difficulty_hard = 1
    
    			set_kings_purse portugal 1500
    
    		end_if
    
    		if I_EventCounter difficulty_very_hard = 1
    
    			set_kings_purse portugal 1000
    
    		end_if
    
    	terminate_monitor
    	end_monitor
    
    	monitor_event EventCounter EventCounterType portugese_insurrection_imminent
    		and EventCounter > 0
    
    		if I_EventCounter portugese_insurrection_imminent == 1
    		add_events
    			event	counter portugese_insurrection
    			date	5
    		end_add_events
    		end_if
    
    		if I_EventCounter portugese_insurrection_imminent == 2
    			terminate_monitor
    		end_if
    
    	end_monitor
    
    	monitor_event EventCounter EventCounterType portugese_insurrection
    		and EventCounter > 0
    
    		if I_EventCounter difficulty_easy = 1
    
    		spawn_army
    			faction slave
    			character	Milorad Cavic, named character, age 24, x 63, y 93
    			traits FearsPortugal 2 , GoodCommander 3 , BadRiskyAttacker 2 , 
    
    HaleAndHearty 2 , Intelligent 2 , BattleChivalry 2 , Gregarious 1 , TourneyKnight 4
    			unit		SE Bodyguard		exp 2 armour 0 weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    		spawn_army
    			faction portugal
    			character	Michael Phelps, named character, age 23, x 63, y 92
    			traits Disciplinarian 1 , GoodDefender 5 , Energetic 4 , 
    
    StrategicSkill 2 , VictorVirtue 3 , Stoic 1 , GoodCommander 3 , Fertile 3 , HaleAndHearty 3 
    
    , Intelligent 3 , Genocide 3 , BattleDread 1 , Gregarious 3 , FactionKiller 4, 
    
    TourneyKnight 5			
    			unit		SE Late Bodyguard		exp 5 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    
    		end_if
    
    		if I_EventCounter difficulty_medium = 1
    
    		spawn_army
    			faction slave
    			character	Milorad Cavic, named character, age 24, x 63, y 93
    			traits FearsPortugal 2 , GoodCommander 3 , BadRiskyAttacker 2 , 
    
    HaleAndHearty 2 , Intelligent 2 , BattleChivalry 2 , Gregarious 1 , TourneyKnight 4
    			unit		SE Bodyguard		exp 2 armour 0 weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    		spawn_army
    			faction portugal
    			character	Michael Phelps, named character, age 23, x 63, y 92
    			traits Disciplinarian 1 , GoodDefender 5 , Energetic 4 , 
    
    StrategicSkill 2 , VictorVirtue 3 , Stoic 1 , GoodCommander 3 , Fertile 3 , HaleAndHearty 3 
    
    , Intelligent 3 , Genocide 3 , BattleDread 1 , Gregarious 3 , FactionKiller 4, 
    
    TourneyKnight 5
    			unit		SE Late Bodyguard		exp 5 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    
    		end_if
    
    		if I_EventCounter difficulty_hard = 1
    
    		spawn_army
    			faction slave
    			character	Milorad Cavic, named character, age 24, x 63, y 93
    			traits FearsPortugal 2 , GoodCommander 3 , BadRiskyAttacker 2 , 
    
    HaleAndHearty 2 , Intelligent 2 , BattleChivalry 2 , Gregarious 1 , TourneyKnight 4
    			unit		SE Bodyguard		exp 2 armour 0 weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    		spawn_army
    			faction portugal
    			character	Michael Phelps, named character, age 23, x 63, y 92
    			traits Disciplinarian 1 , GoodDefender 5 , Energetic 4 , 
    
    StrategicSkill 2 , VictorVirtue 3 , Stoic 1 , GoodCommander 3 , Fertile 3 , HaleAndHearty 3 
    
    , Intelligent 3 , Genocide 3 , BattleDread 1 , Gregarious 3 , FactionKiller 4, 
    
    TourneyKnight 5
    			unit		SE Late Bodyguard		exp 5 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    
    		end_if
    
    		if I_EventCounter difficulty_very_hard = 1
    
    		spawn_army
    			faction slave
    			character	Milorad Cavic, named character, age 24, x 63, y 93
    			traits FearsPortugal 2 , GoodCommander 3 , BadRiskyAttacker 2 , 
    
    HaleAndHearty 2 , Intelligent 2 , BattleChivalry 2 , Gregarious 1 , TourneyKnight 4
    			unit		SE Bodyguard		exp 2 armour 0 weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Jinetes		exp 0 armour 0 weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    		spawn_army
    			faction portugal
    			character	Michael Phelps, named character, age 23, x 63, y 92
    			traits Disciplinarian 1 , GoodDefender 5 , Energetic 4 , 
    
    StrategicSkill 2 , VictorVirtue 3 , Stoic 1 , GoodCommander 3 , Fertile 3 , HaleAndHearty 3 
    
    , Intelligent 3 , Genocide 3 , BattleDread 1 , Gregarious 3 , FactionKiller 4, 
    
    TourneyKnight 5
    			unit		SE Late Bodyguard		exp 5 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Knights of Santiago		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Pavise Crossbowmen		exp 0 armour 0 
    
    weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Portugese Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    			unit		Dismounted Feudal Knights		exp 0 
    
    armour 0 weapon_lvl 0
    
    		end
    
    		end_if
    	
    		terminate_monitor
    	end_monitor
    
    	;-- End of Portugal - Challenge Scripts (Advanced Assignment)
    
    	;-- End of Scripting Class Customs
    My script uses a historic event in order to trigger the insurrection, and then spawns armies for Portugal and Slave factions based on the difficulty counter. I tried to spawn the portugal faction on a river crossing and the slave one north, so they'd battle quickly. For the basic script you'll want to play as England for the desired effect, and you'll want to play as Portugal for the advanced effect(though it should trigger for any faction). Also, the code tags on the forum may or may not be wrongly separating my traits/army lines, obviously if they copy-paste wrong, then it was code reformatting that messed up the syntax. You might also notice some easter eggs if you check the character names and the event description .

    Since it uses a historical event, to test the script you'll also need:

    Add this to descr_events.txt
    Code:
    event	historic	portugese_insurrection_imminent
    date	3 10
    Add this to historic_events.txt
    Code:
    {PORTUGESE_INSURRECTION_IMMINENT_BODY}My lord, there is urgent news!  It appears the citizens of your realm have become unsatisfied with the way that you govern it, and have risen in armed revolt.  The revolt instigator, Milorad Cavic, has sent an envoy demanding that Michael Phelps give him back his gold medal, or he will attack.  Sir, if you pardon me asking... what is a gold medal, and who in the world is this Michael Phelps?
    {PORTUGESE_INSURRECTION_IMMINENT_TITLE}Serb Gains Revolt Support
    And for the event picture, I used the faction_destroyed.tga and renamed it to portugese_insurrection_imminent.tga and placed it in the same folder. Should only be needed for ui\southern_european\eventpics folder I believe, not entirely sure on this part though.

    Also, need to add the names Michael and Phelps, as well as Milorad and Cavic to the descr_names.txt and names.txt.

    Sorry for such a long script, wanted to work with the assignment in an area I know I'll be using a lot in mods to get comments on the syntax.

    Disclaimer: The generals represented by this script are by no means an accurate representation of the realistic figures that bear the name. The author of this script does not consider the portrayal of these figures to be anything more than an openly comedic and fictional gesture.

    Cheers,
    Augustus
    Last edited by Augustus Lucifer; August 28, 2008 at 07:33 AM.

  2. #22

    Default Re: Lesson 2 - Difficulty/Spawning Army Scripts

    A blank text page? I'll try that tomorrow, good idea.

    Devoirs The Empress
    The Lordz Modding Collective
    "The LMC expects every modder to do his Duty" - not by Lord Nelson
    "Blow it out your arse." - Halie Satanus
    The Eagle Standard

  3. #23
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: Lesson 2 - Difficulty/Spawning Army Scripts

    When you install Notepadd ++ theres a little checkbox you have to make sure is checked. I forget exactly what it says now.

    When you are starting with a blank script, it needs to say:

    script



    wait_monitors
    end_script

    All your code goes between script and wait_monitors.

  4. #24
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Lesson 2 - Difficulty/Spawning Army Scripts

    Quote Originally Posted by GrnEyedDvl View Post
    When you install Notepadd ++ theres a little checkbox you have to make sure is checked. I forget exactly what it says now.

    When you are starting with a blank script, it needs to say:

    script



    wait_monitors
    end_script

    All your code goes between script and wait_monitors.
    I just installed it onto another drive to see if I can find which it was. You have to have this option checked:

    Don't use %APPDATA%

    In order to be able to use the M2TW language.

    Cheers,
    Augustus

  5. #25
    sinople's Avatar These Romans are crazy!
    Join Date
    Apr 2007
    Location
    France
    Posts
    2,447

    Default Re: Lesson 2 - Difficulty/Spawning Army Scripts

    Hello,

    Sorry if I am still at the lesson 2, but I had trouble with my game and I wasn't able to test the scripts before.

    So, I still have problems with the difficulty script, may someone help me please ?

    Code:
           ; ---------------------
           ; counters
     
            declare_counter Opened_Faction_Overview_Scroll
            declare_counter Opened_Settlement_Scroll
            declare_counter timurids_yerevan
            declare_counter timurids_baghdad
     
     
            declare_counter difficulty
            declare_counter difficulty_easy 
            declare_counter difficulty_medium
            declare_counter difficulty_hard
            declare_counter difficulty_very_hard
     
     
           ; ---------------------
           ; start up
     
           ;freeze_faction_ai aztecs
            restrict_strat_radar false
     
           ;----------------------
           ; monitors
     
             monitor_event FactionTurnStart FactionIsLocal
                                   and CampaignDifficulty = very_hard
                    set_event_counter difficulty_easy 0
                    set_event_counter difficulty_medium 0
                    set_event_counter difficulty_hard 0
                    set_event_counter difficulty_very_hard 1
     
                    terminate_monitor
            end_monitor
     
             monitor_event FactionTurnStart FactionIsLocal
                                   and CampaignDifficulty = hard
                    set_event_counter difficulty_easy 0
                    set_event_counter difficulty_medium 0
                    set_event_counter difficulty_hard 1
                    set_event_counter difficulty_very_hard 0
     
                    terminate_monitor
            end_monitor
     
             monitor_event FactionTurnStart FactionIsLocal
                                   and CampaignDifficulty = medium
                    set_event_counter difficulty_easy 0
                    set_event_counter difficulty_medium 1
                    set_event_counter difficulty_hard 0
                    set_event_counter difficulty_very_hard 0
     
                    terminate_monitor
            end_monitor
     
             monitor_event FactionTurnStart FactionIsLocal
                                   and CampaignDifficulty = easy
                    set_event_counter difficulty_easy 1
                    set_event_counter difficulty_medium 0
                    set_event_counter difficulty_hard 0
                    set_event_counter difficulty_very_hard 0
     
                    terminate_monitor
            end_monitor
     
            monitor_event GeneralCaptureSettlement SettlementName Paris
            if I_CompareCounter difficulty_very_hard = 1
            spawn_army 
                faction france
                character    Casin, named character, age 30, x 112, y 131 
                traits GoodCommander 2
                unit        NE Bodyguard        exp 2 armour 0 weapon_lvl 0
                unit        Crossbow Militia        exp 1 armour 0 weapon_lvl 0
                unit        Peasant Archers        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Peasant Archers        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Peasant Archers        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Peasant Archers        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
            end_if
     
            if I_CompareCounter difficulty_hard = 1
            spawn_army 
                faction france
                character    Casin, named character, age 30, x 112, y 131 
                traits GoodCommander 2
                unit        NE Bodyguard        exp 2 armour 0 weapon_lvl 0
                unit        Crossbow Militia        exp 1 armour 0 weapon_lvl 0
                unit        Peasant Archers        exp 0 armour 0 weapon_lvl 0
                unit        Spear Militia        exp 0 armour 0 weapon_lvl 0
            end_if
     
            if I_CompareCounter difficulty_medium = 1
            spawn_army 
                faction france
                character    Casin, named character, age 30, x 112, y 131 
                traits GoodCommander 2
                unit        NE Bodyguard        exp 2 armour 0 weapon_lvl 0
                unit        Crossbow Militia        exp 1 armour 0 weapon_lvl 0
            end_if
     
            if I_CompareCounter difficulty_easy = 1
            spawn_army 
                faction france
                character    Casin, named character, age 30, x 112, y 131 
                traits GoodCommander 2
                unit        NE Bodyguard        exp 2 armour 0 weapon_lvl 0
            end_if
                    terminate_monitor
            end_monitor
    I can't get it working.

    Thanks

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

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