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

Thread: Lesson 2 - Difficulty/Spawning Army Scripts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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

  2. #2

    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. #3
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    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. #4
    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

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
  •