REQUEST: max number of units per tile

mattpilot

Warlord
Joined
Jan 29, 2004
Messages
184
Would it be possible for some genius' here to create a mod that would limit the amount of units in one tile, excluding Cities (and perhaps forts)?


Perhaps do a check on "def onUnitMove" and disallow movement if the square has more than X units, unless its a city or a fort.

Furthermore, this should include all neutral units too - not just friendly. ..... or whatever is easier to make :)

Since i'm clueless about python i was wondering if someone here could help out :)


Primary purpose of such a mod would be to prevent stack of dooms. Secondary purpose would be to encourage more tactical game play.



One might ask what number should X be set too? Well, personally i think it should be around 10-15, while another good choice is 20 since thats the maximum number of units that can be displayed on the mouse-over list. But i suppose that would easily modified in the python file, should someone decide to create such a mod.


kthxbai... :)
 
onUnitMove is triggered after the move, so you couldn't use it to stop moves.
 
Kael said:
onUnitMove is triggered after the move, so you couldn't use it to stop moves.
Though you could make a bodge which would make the plot the unit moved to impassable if the plot had the max amount of units on it.
 
The Great Apple said:
Though you could make a bodge which would make the plot the unit moved to impassable if the plot had the max amount of units on it.


So it is possible?
:)
 
I was actually looking into this, but the other way around - limit units in cities. Basically, I wanted it to prevent you from stacking too many units to defend a town, on the logic that you could really only fit so many men into a castle/fort.

Even better yet would be the ability to increase the number - so many with a barracks (say, 4), so many more with a wall (bring the total to 8 or so), more still if you had a castle (maybe for a total of 12 defenders with all three).
 
The Great Apple said:
Though you could make a bodge which would make the plot the unit moved to impassable if the plot had the max amount of units on it.

That would be a bad idea - basically that would make all the units on that square invulnerable to attack.

Bh
 
Bhruic said:
That would be a bad idea - basically that would make all the units on that square invulnerable to attack.

Bh
Good point.

It's something you could probably get around, though it wouldn't be as nice as I first thought....
 
Hmm, I suppose as long as you didn't mind if you could stack more from 'friendlies', you could set the 'Impassable' flag during your turn, and turn it off immediately after your turn ends. It wouldn't work with MP (turns are synchronous), but should work for SP. The biggest difficulty would be checking all the possible scenarios that remove a unit from a square.

Bh
 
.......So did anyone ever work out a fix/limit to the Stack of Doom issue in CivIV? I'm looking for something that could be simply integrated into any mod/CivIV version etc.

Currently playing FFH2(CivIV BTS) and i have the mother of all SoD's, Jonas Endain's orc army stack is unbeatable by anyone else in the game:

Roughly about 500 units in it(could be more like 600 as the read out sticks on the 20 odd lines of display info), stuff like 150 Ogres, 150 longbow, 20 catapluts, 120 tigers, 40 priest of leaves etc. I'm facing a serious horde that i can't do anything about and well when SoD's get like that they feel a bit wrong(like how can he support this many units AND keep his cities garisoned?).

I know the Total Realism mod had some way to limit the SoD problem, but if anyone came up with a nice simple way to limit a stacks size i'd love to have a go at trying to convert it to work in my FFH2(and other CivIV mods) game.
 
ok, it's looking like a more recent approach(i had searched through the first 7-8 pages or so but not seen a thread about solving the SoD problem in CivIV). I'll go move my posts to that linked thread, so thanks for that :)
 
Back
Top Bottom