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

Thread: Looking for a Garrison Script template

  1. #21
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Looking for a Garrison Script template

    The second link's thread talks about why that probably can't work.

  2. #22

    Default Re: Looking for a Garrison Script template

    @QuintusSertorius

    hey man if you're willing to lend a hand again, i would like to make the script spawn different armies depending on year, well events actually like i've seen in some other scripts, in this case that event would be the full_plate, how do i make it so after that event happens newer and stronger units spawn ?

    what lines should i add to the script and where ?

    Quote Originally Posted by QuintusSertorius View Post
    Note this is a limited application script that only works for the faction capitals, when the starting faction owns them (and is AI-controlled); if you wanted it to only apply to the AI, but for other factions, you'd need to replicate the above for every other faction, changing the I_IsFactionAIControlled and I_SettlementOwner each time.
    i must have misunderstood something because the script is working for AI non capital settlements aswell, i sieged english settlemens with scotland but the script also worked when english settlements were sieged by France AI too so i am kinda confused what "I_IsFactionAIControlled and I_SettlementOwner" are for

  3. #23

    Default Re: Looking for a Garrison Script template

    You need to indent and make two loops per spawn, one with if I_EventCounter full_plate < 1 and the other if I_EventCounter full_plate > 0. What does your current script look like?

    I_IsFactionAIControlled means the script only activates when that faction is AI controlled, I_SettlementOwner triggers when the specified faction owns the settlement concerned.

  4. #24

    Default Re: Looking for a Garrison Script template

    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;   ENGLAND   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        monitor_event FactionTurnEnd FactionType slave
            ; --- London ----
            if I_IsFactionAIControlled england            ; script is 'AI only'
                and I_SettlementOwner London = england     ; is owned by Pahlava
                and I_SettlementUnderSiege London            ; makes sure the settlement (not a fort)
                if I_EventCounter London_spawn < 1         ; checking for cool down period
                    console_command create_unit London "Fyrd Spearmen" 5 0 0 0
                    set_event_counter LondonC_spawn 10       ; setting cool down period
                    inc_counter unitlimit_england 10
                end_if
                if I_EventCounter LondonC_spawn > 0
                    inc_event_counter LondonC_spawn -1
                end_if
            end_if
            ; add a loop for each subsequent settlement
        end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  5. #25

    Default Re: Looking for a Garrison Script template

    Here it is with a loop for before/after the event:

    Code:
        monitor_event FactionTurnEnd FactionType slave
            ; --- London ----
            if I_IsFactionAIControlled england            ; script is 'AI only'
                and I_SettlementOwner London = england     ; is owned by England
                and I_SettlementUnderSiege London            ; makes sure the settlement (not a fort)
                if I_EventCounter LondonC_spawn < 1         ; checking for cool down period
                    if I_EventCounter full_plate < 1       ; event hasn't happened yet
                        console_command create_unit London "Fyrd Spearmen" 5 0 0 0
                        set_event_counter LondonC_spawn 10       ; setting cool down period
                    end_if
                    if I_EventCounter full_plate > 0       ; event has happened
                        console_command create_unit London "[better, tougher unit]" 5 0 0 0
                        set_event_counter LondonC_spawn 10       ; setting cool down period
                    end_if
                end_if
                if I_EventCounter LondonC_spawn > 0
                    inc_event_counter LondonC_spawn -1
                end_if
            end_if
            ; add a loop for each subsequent settlement
        end_monitor

  6. #26

Page 2 of 2 FirstFirst 12

Posting Permissions

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