Results 1 to 2 of 2

Thread: Garrison script modification

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Garrison script modification

    Hey all,

    I hope this is the correct place to post this, since this is my first post.

    I love the units and maps and mechanisms of TATW, with the exception of the garrison script. So I wanted to change that. The user "Adjudant-Major" posted the code he uses in TATW, and that seemed like a script that suited my preferences better. I changed some of the numbers, removing the spawning of a certain type of unit here and generally changed it in a way that felt more realistic to me. This is what I ended up with:

    Spoiler Alert, click show to read: 
    ;#################### Garrison Script Version 3.0 #####################
    declare_counter Anorien_Siege
    declare_counter Imladris_Siege
    declare_counter Nan-Curunir_Siege
    declare_counter Udun_Siege
    declare_counter Morgul-Vale_Siege
    declare_counter Umbar_Siege

    monitor_event FactionTurnStart IsFactionAIControlled

    if I_SettlementUnderSiege Anorien
    and I_SettlementOwner Anorien = sicily
    and I_CompareCounter Anorien_Siege < 1

    create_unit Anorien, Dismounted Kofm Garrison, num 1, exp 1, arm 2, wep 0
    create_unit Anorien, Gondor Infantry Garrison, num 2, exp 1, arm 2, wep 0
    create_unit Anorien, Gondor Spearmen Garrison, num 2, exp 1, arm 2, wep 0
    create_unit Anorien, Gondor Archers Garrison, num 2, exp 1, arm 2, wep 0

    set_counter Anorien_Siege 1
    end_if

    if not I_SettlementUnderSiege Anorien
    and I_SettlementOwner Anorien = sicily
    and I_CompareCounter Anorien_Siege > 0

    destroy_units sicily Dismounted Kofm Garrison
    destroy_units sicily Gondor Infantry Garrison
    destroy_units sicily Gondor Spearmen Garrison
    destroy_units sicily Gondor Archers Garrison

    set_counter Anorien_Siege 0
    end_if

    if I_SettlementUnderSiege Imladris
    and I_SettlementOwner Imladris = egypt
    and I_CompareCounter Imladris_Siege < 1

    create_unit Imladris, Homeguard Warriors Garrison, num 1, exp 2, arm 0, wep 0
    create_unit Imladris, Elf Archer3 Garrison, num 1, exp 3, arm 3, wep 0
    create_unit Imladris, Elf Spear Garrison, num 1, exp 3, arm 3, wep 0

    set_counter Imladris_Siege 1
    end_if

    if not I_SettlementUnderSiege Imladris
    and I_SettlementOwner Imladris = egypt
    and I_CompareCounter Imladris_Siege > 0

    destroy_units egypt Homeguard Warriors Garrison
    destroy_units egypt Elf Archer3 Garrison
    destroy_units egypt Elf Spear Garrison

    set_counter Imladris_Siege 0
    end_if

    if I_SettlementUnderSiege Nan-Curunir
    and I_SettlementOwner Nan-Curunir = france
    and I_CompareCounter Nan-Curunir_Siege < 1

    create_unit Nan-Curunir, Uruk-Hai Infantry Garrison, num 3, exp 1, arm 1, wep 0
    create_unit Nan-Curunir, Uruk-Hai Crossbow Garrison, num 1, exp 1, arm 1, wep 0

    set_counter Nan-Curunir_Siege 1
    end_if

    if not I_SettlementUnderSiege Nan-Curunir
    and I_SettlementOwner Nan-Curunir = france
    and I_CompareCounter Nan-Curunir_Siege > 0

    destroy_units france Uruk-Hai Infantry Garrison
    destroy_units france Uruk-Hai Crossbow Garrison

    set_counter Nan-Curunir_Siege 0
    end_if

    if I_SettlementUnderSiege Udun
    and I_SettlementOwner Udun = england
    and I_CompareCounter Udun_Siege < 1

    create_unit Udun, Morannon Guard Garrison, num 3, exp 2, arm 1, wep 0
    create_unit Udun, Mordor Archers Garrison, num 2, exp 2, arm 1, wep 0
    create_unit Udun, Mountain Trolls Garrison, num 2, exp 2, arm 0, wep 0

    set_counter Udun_Siege 1
    end_if

    if not I_SettlementUnderSiege Udun
    and I_SettlementOwner Udun = england
    and I_CompareCounter Udun_Siege > 0

    destroy_units england Morannon Guard Garrison
    destroy_units england Mordor Archers Garrison
    destroy_units england Mountain Trolls Garrison

    set_counter Udun_Siege 0
    end_if

    if I_SettlementUnderSiege Morgul-Vale
    and I_SettlementOwner Morgul-Vale = england
    and I_CompareCounter Morgul-Vale_Siege < 1

    create_unit Morgul-Vale, Mordor Uruks Garrison, num 2, exp 1, arm 1, wep 0
    create_unit Morgul-Vale, Mordor Halberd Garrison, num 3, exp 1, arm 1, wep 0
    create_unit Morgul-Vale, Uruk Archers Garrison, num 2, exp 1, arm 1, wep 0

    set_counter Morgul-Vale_Siege 1
    end_if

    if not I_SettlementUnderSiege Morgul-Vale
    and I_SettlementOwner Morgul-Vale = england
    and I_CompareCounter Morgul-Vale_Siege > 0

    destroy_units england Mordor Uruks Garrison
    destroy_units england Mordor Halberd Garrison
    destroy_units england Uruk Archers Garrison

    set_counter Morgul-Vale_Siege 0
    end_if

    if I_SettlementUnderSiege Umbar
    and I_SettlementOwner Umbar = spain
    and I_CompareCounter Umbar_Siege < 1

    create_unit Umbar, Corsairs Garrison, num 2, exp 2, arm 0, wep 0
    create_unit Umbar, Hasharii Garrison, num 1, exp 3, arm 0, wep 0
    create_unit Umbar, Corsair Archers Garrison, num 1, exp 2, arm 0, wep 0

    set_counter Umbar_Siege 1
    end_if

    if not I_SettlementUnderSiege Umbar
    and I_SettlementOwner Umbar = spain
    and I_CompareCounter Umbar_Siege > 0

    destroy_units spain Corsairs Garrison
    destroy_units spain Hasharii Garrison
    destroy_units spain Corsair Archers Garrison

    set_counter Umbar_Siege 0
    end_if

    end_monitor


    Thing is, it doesn't seem to work. I first tried it in an old campaign, which didn't work; it simply used the old script (it's not supposed to be save-game compatible anyway). I then started a new campaign, attacked Isengard to see if it worked, and nothing happened (except one unit joined?).
    I don't see why it doesn't work (I have no experience with M2TW modding). Does anybody know?


    As to why I want to change it: I play TATW on H/H. I'm not playing total war games for the challenge, I play them for the experience of leading a great army in a somewhat realistic way. I never cared about RTS games like Warcraft or Starcraft since it's simply a completely artificial challenge. I don't like puzzle games but I love adventure games. I stopped playing Half Life 2 because the game didn't explain why I had to fight the combine. Generally speaking, I need a purpose, not a challenge, and immersion is extremely important for that purpose. The garrison script increases the challenge but destroys the immersion since it is such an extremely obvious way of cheating (i.e. ""). I get really frustrated by cheating AI. Also, I prefer not to play on VH/VH because it requires one to basically exploit the AI. At least, in many cases people say it's not difficult to be succesful at VH/VH, as long as in "situation X, you exploit the AI in this way, and in situation Y, you exploit them like that". Which is not at all how I like to play the game (again, arbitrary challenge vs. immersion/purpose). If people can play TATW on VH/VH with a tactic which would work in reality (like flanking, drawing enemies away, ambushing &c.) then I'd love to hear it.

  2. #2
    Emperor of Hell's Avatar SPA-NED 1-5
    Join Date
    Jul 2011
    Location
    Netherlands
    Posts
    5,747

    Default Re: Garrison script modification

    Please take this to the Medieval II Total War Mod Workshop instead of the TATW forum as it is a modding question . I am sure there will be enough people there able to help you .

    Closed

Posting Permissions

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