Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: Spawning armies

  1. #1

    Default Spawning armies

    So I made a script to spawn in armies so the Ai would have an easier time to garrison their settlements without losing them.

    Code:
     
     monitor_event FactionTurnEnd
            if not I_LocalFaction france
                add_money france, 2000
                increment_kings_purse france 750
                spawn_army
    {line 712}   faction france
                    character    random_name, named character, age 18, x 53, y 103, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 97, y 90, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0    
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 167, y 91, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 141, y 67, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
                end
    Is the script I created. Don't mind the general since it's a copy-paste from the Mongols just to test if it works, which it doesn't and this is what the system.log has to say about it;

    Quote Originally Posted by System.log
    18:27:51.146 [game.script] [error] Script parsing error at line 712, column 17 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    don't recognise this token: faction
    18:27:51.146 [game.script] [error] Script parsing error at line 715, column 17 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Which puts me at a loss since in all the spawn scripts I've taken a look at, there usually is faction *factionname* before you put down the rest. Yet for some reason the game doesn't seem to recognise faction before factionname....

    For comparison, here's a part from the Mongol invasion script;

    Code:
            spawn_army 
                faction mongols
                character    Jebe, named character, age 30, x 292, y 166, 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
    which clearly shows that the same aspects are in the script I created and those that are present in the Mongol script...

    Anyone with a clue on what is going on here, or rather, isn't going on?

  2. #2

    Default Re: Spawning armies

    what are you editing the file with?

    I'd suggest if you're not using it maybe trying notepad++ and checking to see if you've got anything odd going on with line breaks or tabs etc. (that should show the additional characters in the text file)

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Spawning armies

    Agree with Mak - compress and attach your script for a format check.










  4. #4

    Default Re: Spawning armies

    You do realise that script will spam units every single turn, right?

  5. #5

    Default Re: Spawning armies

    @makanyane I'm already using Notepad++

    @Gigantus The file added is the script as I've created it, before I tried my hand at fixing it. It's just this script.

    @QuintusSertorius I am aware that this is currently an issue that needs to be addressed. Yet before I can address that issue of the armies spawning each turn, I do need the armies to spawn the first turn. Then I can turn my attention on making them spawn only once and also to make 'm spawn more dependant on the difficulty the player has chosen.
    Attached Files Attached Files

  6. #6

    Default Re: Spawning armies

    I just make this new post since the forum seems to be on an infinite loading loop when I want to edit.

    Here's the full campaign_script currently being used in testing.
    Attached Files Attached Files

  7. #7

    Default Re: Spawning armies

    I haven't looked deeply into the line 712 issue but a couple of things jump out about that whole script

    the campaign_script.txt should have the first uncomented line
    script
    and the last line
    end_script

    each spawn_army section should have an
    end
    after the army list and before you get to the next spawn_army

    everywhere you have an 'if' you need an
    end_if
    at the end of it, in your case the not I_LocalFaction france section needs an
    end_if
    before you get to the if not I_LocalFaction milan etc

    try fixing those bits and see what happens and report back please

  8. #8

    Default Re: Spawning armies

    Ok, I've ammended some things;

    Code:
    ;#####################ARMY SPAWN SCRIPT######################
    ;####################CREDIT TO INARDESCO#####################
    ;#######################DOES NOT WORK########################
    
    script
        monitor_event FactionTurnEnd
            if not I_LocalFaction france
                add_money france, 2000
                increment_kings_purse france 750
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 53, y 103, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
            end
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 97, y 90, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0    
            end
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 167, y 91, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
            end
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 141, y 67, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
            end
        end_if
                 if not I_LocalFaction milan
                add_money milan, 2000
                increment_kings_purse milan 750
                spawn_army
                    faction milan
                    character    random_name, named character, age 18, x 51, y 59, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        Genoese CrossbowGuard                exp 2 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Rhodok Crossbow Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Crossbow Militia            exp 1 armour 0 weapon_lvl 0
            end
                spawn_army
                    faction milan
                    character    random_name, named character, age 18, x 81, y 38, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        Genoese CrossbowGuard                exp 2 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Rhodok Crossbow Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Crossbow Militia            exp 1 armour 0 weapon_lvl 0    
            end
                spawn_army
                    faction milan
                    character    random_name, named character, age 18, x 117, y 72, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        Genoese CrossbowGuard                exp 2 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Rhodok Crossbow Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Crossbow Militia            exp 1 armour 0 weapon_lvl 0
            end
                spawn_army
                    faction milan
                    character    random_name, named character, age 18, x 137, y 37, family ;command 8, dread 9, loyalty 7, piety 1
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        Genoese CrossbowGuard            exp 2 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Lanciere Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Rhodok Crossbow Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Rhodok Crossbow Militia            exp 1 armour 0 weapon_lvl 0
            end
        end_if
                if not I_LocalFaction egypt
                add_money egypt, 2000
                increment_kings_purse egypt 750
                spawn_army
    {taken out for size but layout is the same}
     end_script

  9. #9

  10. #10

    Default Re: Spawning armies

    Nothing happened when I gave it a test run and the system.log comes with the following;

    14:54:56.995 [game.script] [error] Script parsing error at line 966, column 5 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    don't recognise this token: end_monitor
    14:54:56.995 [game.script] [error] Script parsing error at line 986, column 2 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    14:54:56.995 [game.script] [error] Script parsing error at line 986, column 2 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    So, I've spotted the lines and they're currently as follows

    Code:
            end
                terminate_monitor
        end_monitor
    end_script
    I assume I can get rid of the end_monitor and that should then....Hopefully, run the script.

    Nope, now it says it doesn't recognize the end_script command?

    18:28:37.607 [game.script] [error] Script parsing error at line 966, column 1 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    don't recognise this token: end_script
    18:28:37.607 [game.script] [error] Script parsing error at line 985, column 2 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    18:28:37.608 [game.script] [error] Script parsing error at line 985, column 2 in mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/calradia/data/world/maps/campaign/imperial_campaign/campaign_script.txt

  11. #11

    Default Re: Spawning armies

    erm, I think you might have something 'open' further up that shouldn't be, so it thinks those things are part of the conditions for something and therefore not recognising them

    can you post the whole script again as it now is please?

  12. #12

    Default Re: Spawning armies

    Here is the campaign_script with the additions I made with your additions to it.
    Attached Files Attached Files

  13. #13

    Default Re: Spawning armies

    script and end_script are meant to be 'bookends' to the whole script - you had a spare end_script in the middle and script was just before your new section - it should have been right at the beginning - you were also missing an end_if on your last if.
    & I think the add_money command should also actually be console_command add_money

    I've made those changes and it now loads in Geomod without error message - can't tell if it fires or not, but try this;campaign_script.rar

  14. #14

    Default Re: Spawning armies

    Skimming through the system.log I can't find any error messages but...there are no extra armies on the campaign map. So the script runs, they just don't spawn on the map?

  15. #15

    Default Re: Spawning armies

    Just out of interest, if you're concerned with garrisons, why are you spawning armies nearby, rather than using console_command create_unit to put units directly into the garrisons?
    Last edited by QuintusSertorius; April 01, 2019 at 07:22 AM.

  16. #16

    Default Re: Spawning armies

    Because its easier to give a few armies to the AI which it can then garrison as it sees fit instead of having to find the coordinates to all settlements and giving them units like that.

  17. #17

    Default Re: Spawning armies

    Quote Originally Posted by Tyranno85 View Post
    Because its easier to give a few armies to the AI which it can then garrison as it sees fit instead of having to find the coordinates to all settlements and giving them units like that.
    Firstly, chances are high the AI won't use them for garrisons at all. Secondly, you don't need co-ordinates for settlements to spawn units there directly, just the settlement name.

    Code:
    console_command create_unit [settlement name] [unit name] [number of units] [experience] [armour] [weapon]
    You can do a whole load with ease, like this:

    Code:
        monitor_event FactionTurnEnd FactionType slave
            ; --- Roma ----
            if I_IsFactionAIControlled f_rome
                and I_SettlementOwner sett_040 = f_rome        ; is owned by Rome
                and I_SettlementUnderSiege sett_040            ; makes sure the settlement (not a fort)
                if I_EventCounter Roma_spawn < 1               ; checking for cool down period
                    if I_EventCounter ecCamillanEra > 0
                        console_command create_unit sett_040 "roman cavalry equites camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry principes camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry hastati camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry leves" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry triarii camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry principes camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry hastati camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry leves" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry hastati camillan" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry leves" 1 0 0 0
                        set_event_counter Roma_spawn 10       ; setting cool down period
                        inc_counter unitlimit_f_rome 10
                    end_if
                    if I_EventCounter ecPolybianEra > 0
                        console_command create_unit sett_040 "roman cavalry equites polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry principes polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry hastati polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry velites" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry triarii polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry principes polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry hastati polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry velites" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry hastati polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry velites" 1 0 0 0
                        set_event_counter Roma_spawn 10       ; setting cool down period
                        inc_counter unitlimit_f_rome 10
                    end_if
                    if I_EventCounter ecMarianEra > 0
                        console_command create_unit sett_040 "roman cavalry equites polybian" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry cohors reformata" 1 0 0 0  ; replace half of these with Cohors Tumultaria when done
                        console_command create_unit sett_040 "roman infantry cohors reformata" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry cohors reformata" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry antesignani" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry cohors evocatae" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry cohors reformata" 1 0 0 0  ; replace half of these with Cohors Tumultaria when done
                        console_command create_unit sett_040 "roman infantry cohors reformata" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry cohors reformata" 1 0 0 0
                        console_command create_unit sett_040 "roman infantry antesignani" 1 0 0 0
                        set_event_counter Roma_spawn 10       ; setting cool down period
                        inc_counter unitlimit_f_rome 10
                    end_if
                end_if
                if I_EventCounter Roma_spawn > 0        ; checking for cool down period
                    inc_event_counter Roma_spawn -1     ; reducing cool down period
                end_if
            end_if
        end_monitor
    This is a garrison script which has one set of loops like the above for each settlement concerned, all in one monitor (so negligible performance impact).
    Last edited by QuintusSertorius; April 01, 2019 at 08:41 AM.

  18. #18

    Default Re: Spawning armies

    Considering the current behaviour of the AI; withdrawing troops from garrisoned cities and moving them into settlements that aren't garrisoned, I can tell with certainty that if the AI gets a few armies dotted around their territory they will be continueing that behaviour till they are in a sufficient position to expand.

    The amount of villages would make even a garrison script like yours an extreme pain to set up due to the amount of them on the map.

  19. #19

    Default Re: Spawning armies

    So...I had a bit of a think. I've got 4Zumi's debt script and he uses a different method of signaling the AI factions. Instead of the if not I_LocalFaction he uses the IsFactionAIControlled.

    With that, I've amended the script to the following. I can't test it now since I'm editing the script on a tablet that can't run Medieval 2 but is perfect for text editing. It is build further on the edits made by Makanye. I'm wondering if there are any edits that have to be further made or if this should run without issue.

    Code:
        monitor_event FactionTurnEnd FactionType france
            and IsFactionAIControlled france
                console_command add_money france, 2000
                increment_kings_purse france 750
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 53, y 103, family
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
            end
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 97, y 90, family 
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0    
            end
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 167, y 91, family
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
            end
                spawn_army
                    faction france
                    character    random_name, named character, age 18, x 141, y 67, family
                    traits        GoodCommander 2 , Bloodthirsty 2 , BattleDread 4 , StrategyDread 2 , PublicFaith 1 , Loyal 2 
                    unit        NE Bodyguard                exp 2 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Spear Militia            exp 1 armour 0 weapon_lvl 0                
                    unit        Swadian Peasant Archers        exp 1 armour 0 weapon_lvl 0
                    unit        Swadian Peasant Archers            exp 1 armour 0 weapon_lvl 0
            end
    end_monitor
    Last edited by Tyranno85; April 23, 2019 at 06:32 AM.

  20. #20

    Default Re: Spawning armies

    That will spawn a load of units every single turn. Do you not want any element of randomness, or a timer that stops it happening every turn?

Page 1 of 2 12 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
  •