-
May 30, 2011, 05:45 AM
#1
Creating a Citadel script?
Recently, I had the idea that armies in cities should be able to have the choice to retreat to a citadel deeper inside the city if the city itself is untennable should a seige assault occur.
The Pro's of this for the defender would be:
Can last longer in a siege
Gain a more easily defendable position (rather that the huge expanses of a city when being held by only a few units).
Obviously, this is most useful for undermanned garrison armies.
There will, of course be negatives:
The enemy are able to enter the city, sacking it, destroying buildings etc. They may choose not to, but while the defenders are in the citadel, the population will be rather unimpressed (low public order) and the new owners will gain no or negligable income.
So, my question is how would I go about doing this.
At the moment, my plan is to have a fort next to the city on the campaign map (I don't think it works if the two objects are right next to each other though). Once placed under seige, the defenders would be have the choice to hold the city or retreat to the citadel(fort) and lose the city (resulting in the city having no garrison, so instawin for the attackers.
A problem with this however, is that the fort would be attackable from any direction, whereas theoretically the citadel should be inside the city. Perhaps impassable terrain and an extended city strat- map model would do the trick.
Both the city and the "citadel" or fort would be upgradable. Aka, somehow I'd try to give the fort castle status, probably by changing the battle map set for that fort. Through ingenious scripting (perhaps python, which I'm trying to teach myself) I'd try and make it possible for the strat-map model of the for to be upgraded through the city build panel.
Custom settlements are of course an option, but would be beyond my ability at the moment.
AI scripting will also be needed for this type of event, but it should be a relatively straightforward if statement (ie if attacker >> defender, move to x,y, (fort location)).
The attacking AI will also need to be told to attack the fort once the city is taken. (pehaps a seige command upon capture of city?)
Which files need modifying to do this, as I don't know them by the back of my hand. I'm think descr_strat for fort placement, but I don't know how I'd go about doing something like:
if enemy army at x,y, (fort) city income = 0.
That is all I can think of at the moment- any advice would be appreciated, as I feel this would be quite a neat feature in any mod.
Cheers for reading
Last edited by Magefsx; May 31, 2011 at 08:39 AM.
-
May 30, 2011, 06:31 AM
#2
Re: Creating a Citadel script
I was looking for something similar as well. The only thing that I found was in the Rusichi TW mod. Take a look.
They put another small region inside the existing one and closed other paths except from the city.
Last edited by Henry of Grosmont; May 30, 2011 at 06:35 AM.
-
May 30, 2011, 09:03 AM
#3
Re: Creating a Citadel script
Not quite the same effect then... what I'm looking for is which files need the attention to do this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules