Applying retreat chance to defender

Milly

Warlord
Joined
Jan 15, 2008
Messages
182
I'm sorry if this was mentioned before, but would it be possible and balanced to have the retreat chance of units (submarines and horse units, mainly) apply when the unit is defending as well as attacking?
 
I would really like to find a method to do this also. Anyone?
 
They would be; I'd also like them for the calvary units, because I hate losing calvary despite investing in the Flank promotions. =/ ... It's even -worse- when I have a GG attached to said calvary unit.
 
You'd need specific rules for such a thing.

EG:
1. what happens when the defender is in a fort?
2. Or city?
3. can air units retreat?

And so on.

I'd rather see the idea fleshed out more before looking at what sort of code would be needed.

(Yes this concept is easily possible, and could be knocked up in one decent coding session).
 
Doesn't FfH2 have a retreat as well? I'm sure if a horseman is losing in defense he can flee (which is annoying).
 
You'd need specific rules for such a thing.

EG:
1. what happens when the defender is in a fort?
2. Or city?
3. can air units retreat?
The way I see it, forts and cities won't really matter, as the unit would run to the other side of the city/fort if injured and let the other, less damaged units get a shot at defending.

And air units can retreat, in a way - they can disengage from combat with other air units. Now, if you mean someone taking a city that has an air unit parked in it - I dunno.

And Woodelf, I dunno. I haven't tried that mod yet .
 
It's okay to say a unit can retreat from a fort / city, but what if it's the last one? Does the defender retreat to allow free entry for the attacker?

Also with air units, if they retreat what governs selecting which city they retreat to?

It's a pretty complex mess to add in defender retreat. :)
 
I dunno... I see where Dale is getting at. Just for the sake of nationalism and making it simple, would it be easier to make it to where they'll never retreat if inside a city or fort? Kinda like a last stand feature....

If you look at certain situations, its obvious that it should not retreat from cities... What if your unit is the last one, in an important city, and he retreats and your city gets razed.... maybe if he woulda stayed he might have won the battle..... see where I'm going?

I think Air units could just be left alone. They already kinda retreat.
 
Umm. By retreat I didn't particularly mean that the unit would move one square away like in SMAC. I just meant that the unit would disengage combat, but stay in the same square, and the attacker goes back to the square it was in.

And, Shiggs, by the standard retreat rules, the unit only retreats on the last round of combat in which it would have died. So if the unit retreats, but stays in the same square it is in, it makes it so the enemy has to throw one more unit at the defender before actually capturing the city.
 
The defender shouldn't have that option of disengaging and still keeping the tile. If it retreats, it should "retreat". Any other way is just nonsense.

oh yea... sorry I forgot about the retreat rules, I generally always play with animations off so I rarely see the combat phases.
 
I suppose, but I sorta want the withdraw thing in now, without the additional complication of adding in a "run the f@$k away" script... ^_^;;
 
I disagree that the defender should initiate a "disengage" and remain in the combat plot. To disengage, the defender is removing itself from the combat, which is on that plot. To not allow the attacker to remain on the combat plot defeats the purpose of the concept.
 
Well, if a unit is withdrawing, it means that it would've been killed if it couldn't withdraw. So it's not really an issue.

What frustrated me though was one mod where units had "morale" and my city was attacked and in spite of the fact that my Warrior was winning against a Barbarian Warrior, they fled the city and the barbs just moved in and took it, which then they were too tough to dislodge because on top of the city defense bonus, the warrior also got promoted from its "victory" over me.

The problem with defensive retreat is in choosing which tile the unit should flee to... there are a number of things to take into account here:

1) Does the unit have defensive bonuses on particular terrain/features? And if yes, do we want to move it to a tile with those characteristics?

2) Is the tile immediately adjacent to an enemy unit? If yes, we probably don't want to move it there.

3) Is there an adjacent tile with a stack of friendly units, do we want to move it there? Probably yes.

4) And what about the defensive bonuses of each possible tile? Forests, hills, forts, etc.?

5) What are the possible range of tiles to examine? If the unit is being attacked from North, should it be open to retreat E, W, SE, SW, and S? Or just SE, SW, or S? This is important because if the best plot choice happens to be due east, the unit will be moving to a tile that might be more precarious. And if the limited range of tiles are blocked by enemy units, sea tiles, etc. should the defending unit be able to move into one of the adjacent tiles outside the normal range?

6) Should the number of available tiles affect the withdrawal probability? If the unit has virtually any one of the five tiles to move to, should it get a higher withdrawal probability than if it only had one or two options?

EDIT: Also, if there are multiple units on the defense unit's tile, you might want a simple disengagement because why would the one engaged defensive unit simply bolt and run to a tile by itself instead of remaining within its stack.

Just some thoughts... cheers!
 
Darkhour, at least post the mod before you scrap it! DX

And Dom, you do raise good points, especially the last bit with the stack.

As for your questions about the particulars of retreat... well, I dunno how to really answer them, since I'm not a coder/modder and I'm unsure as to how feasible those considerations are.
 
As for your questions about the particulars of retreat... well, I dunno how to really answer them, since I'm not a coder/modder and I'm unsure as to how feasible those considerations are.

Well, any of those checks are feasible. It's pretty easy to run a check of all adjacent plots and develop a withdrawal value for each based on the criteria specified. The only one that becomes a little bit trickier is determining if there's an enemy unit adjacent to the tile you're checking. It's certainly doable without a lot of brainpower invested, but it does require more processing time. It probably won't be noticeable altogether, but I try to cut back where possible.

I'm thinking of making it so that it will only check to see if there's an adjacent enemy if the tile is the current best choice. If it's not going to be the best choice anyway, it will simply be bypassed.

The questions are: What other checks might be necessary? What checks aren't necessary?
 
Back
Top Bottom