Results 1 to 4 of 4

Thread: Can you make garrisons disappear after a siege?

Hybrid View

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

    Default Can you make garrisons disappear after a siege?

    Ok, so I think I finally figured out how I could realistically accept a garrison script. If the garrison that appears is purely militia. Because it would be realistic for a city to have a call to arms of the town's population to man the walls, but not have the benefit of having their very best soldiers (like knights and stuff)

    But with that said, it doesn't seem realistic that every time you attack a city and a 20 unit stack appears in a city, that say you leave the city, that country gets a free 20 unit stack army.

    Is it possible to make it so that garrisons disappear as soon as the siege is lifted? Thus preventing a free army from appearing after every siege you do.

  2. #2

    Default Re: Can you make garrisons disappear after a siege?

    Yes and no . i say both as well scripting can do many things but it has its limitations you are unable to give a label to standard units only generals and this is where the problem then happens with the solution i could have for you .

    Ok what i mean is well you can make a script that will remove men (militia if you have changed the scripts to spawn them ) but it has to have something to target (as in where the men are) so if you have sieged and they dont sally out to attack then it is no trouble to have a script then remove x amount of militia from the garrision(ps if going this path i would then remove the time limit trigger of garrision spawn eg the current will only fire every 10 turns so once sieged they wont spawn again till more than 10 turns later, where as if your removing these men eg they head back to there farms they would be available any time someone attacks)

    But if the spawn army believes itself stronger than your sieging army it will sally out and if they win they will then appear on the strat map outside the city so again without being able to give them a label of any kind you cant script there removal .

    Hope this helps limitations i know they suck but maybe a better scripter than myself can think of a solution to this problem (its still a resonable working solution just far from perfect but the sieged army doesnt often sally out unless your army sieging is pretty weak so it will work alot of the time.)
    Last edited by Soul Firez; October 07, 2010 at 09:34 PM.

    Heroes Hordes & beyond The official submod of KGCM (click the sig)

  3. #3

    Default Re: Can you make garrisons disappear after a siege?

    This is very informative. Btw, I'm not sure if you're thinking about including these ideas in your next patch, but I could feasibly see this as a more realistic option for garrison scripts in the future.

    Especially if you tie the creation of garrison to a % of the population of a town/city up to a maximum of 20 units of course. This is possible right?

    This is how I'd envision it. All cities when they reach a certain size would activate their garrison script. When besieged, they would spawn X units of militia in proportion to a certain point in population size, while simultaneously reducing the population of the city by the amount of soldiers called.

    That way the script is not tied to turns, but tied to existing population. Theoretically, every time you besiege (assuming you failed the last time), another call to arms would be raised by the town until they were reduced in population to the point where they could no longer field the same size militia army. Which would give you a reason to sack towns, reduced population so they'd be unable to field a garrison militia if the city is taken back and you have to retake.

    If the besieging army doesn't take the city, and the garrison doesn't sally, it is disbanded and that population is added back to the city. If the garrison does sally, then lets pretend that this militia army got a taste of victory and is now going off to war. Either way, that population has been removed from the city, perhaps lowering future militia spawning ability, thus making it more realistic.

    Obviously the most ornerous part of this is you'd have to manually code in every town to decide at what point they begin spawning units. The simpler option is to just use existing designated garrison script cities and rather than X militia spawned as a % of population, just have a fixed number of militia spawned provided population is over say 20,000. Assuming demographically that a city of 20,000 has a population of 10,000 males of which 7,000 are probably militia-worthy. You could probably even use that formula to determine at what point a militia would cease to spawn.

    Whaddaya think?

  4. #4

    Default Re: Can you make garrisons disappear after a siege?

    You cant base a script on population directly but it can have a condition based on the type of city (which is related to population ) yes you could even have it add and remove population as you suggested but again as a script wont use a population number as a condition (well its not in the official list of scrripting conditions that are known atleast ) it wouldnt affect size of respawn of this militia garrision.

    BUT the biggest problem i see with this idea sadly is the rather complex nature of tthe scrriptingg that would slow turns down badly and will decrease stability of the game(specially for those with lower end rigs

    PS i dont mean to be ngative i like the ideas it is merely i have to look at possible flaws before diving in although sometimes when i do i see a way around them.

    PS.S damn new key board seems a little touchy i am getting to many double letters have to open its settings up and reset it hope you can still read what i wrote.
    Last edited by Soul Firez; October 08, 2010 at 07:17 AM.

    Heroes Hordes & beyond The official submod of KGCM (click the sig)

Posting Permissions

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