Withdrawal chances and mounted units.

/from Revolution for FF thread/

... a cavalry special-ability idea:

If the cavalry unit attacks and takes little or no damage it gets back its ability to attack, and maybe even a movement point too.

This is supposed to represent the cavalry's extreme effectiveness against out-classed foes - mostly via scaring them away. Charge in, route 'em, and you've still got the whole day ahead of you. If you're lucky you didn't even get your lance dirty.

I like the flavor, and it'd be just the thing for peasant rebellions.

I *think* this could be handled via a post-combat python function. I'm sure of the movement point part. I suspect "has attacked?" can be toggled. It's probably the important part. If nothing else the unit could be destroyed and a duplicate that hasn't attacked put in it's place. Hopefully that won't be necessary.

BTW - I like the flanking damage idea, too. I miss that from BTS, against cannons and the like. (We might apply it to mages and priests, too.)
I like
and appart from this think the system is fine.
 
I realized the charge/route thing would be easy - it seems to work, at least. Below is code you can add to UnitInfos and Spellinterface to try it out. It's set to allow allow extra attacks if damage is below 10% and give back the first move. So 1 attack can be completely free, the others will cost move points but not use up the unit's ability to attack - all assuming the damage remains below 10%.

10% could easily be too high, but it was easier than testing 5 or 0. It'd be simple to add level or promotion prereqs. (I'd suggest something unavailable to Chariots and Wolfriders (Heroes, Armageddon Horseman?), but free for some high-end cav. units like Knights, or "cav" units like War Elephants and Ogres.)

The xml needs to be added to each unit you want to have the ability. It'll probably go at the end of the unit's entry. (You can check "Test" unit to be sure of the order.) The python is placed - just once - in the named file.

EDIT: "Flanking" damage now too. I'm not sure if this'll activate if the cav. withdraws rather than kills it's target. Anyway:
Python version 1: No flanking damage.
Version 2: Every Siege and Arcane unit hit for ~15% damage, cap 30%.
Version 3: 1 Siege or Arcane units hit for ~40% damage, cap 100%. (I think this is the most "realistic" version.)

Spoiler :

CIV4UnitInfos.xml
Code:
<PythonPostCombatWon>postCombatCavalry(pCaster,pOpponent)</PythonPostCombatWon>


CvSpellInterface.py

Version 1
Code:
def postCombatCavalry(pCaster, pOpponent):
	if pCaster.getDamage() < 10:
		pCaster.setMadeAttack(false)
		pCaster.changeMoves(-1)


Version 2
Code:
def postCombatCavalry(pCaster, pOpponent):
	if pCaster.getDamage() < 10:
		pCaster.setMadeAttack(false)
		pCaster.changeMoves(-1)
		pPlot = pOpponent.plot()
		iAdept = gc.getInfoTypeForString('UNITCOMBAT_ADEPT')
		iSiege = gc.getInfoTypeForString('UNITCOMBAT_SIEGE')
		for i in range(pPlot.getNumUnits()):
			pUnit = pPlot.getUnit(i)
			if (pUnit.getUnitCombatType() == iAdept or pUnit.getUnitCombatType() == iSiege):
				pUnit.doDamage(15, 30, pCaster, gc.getInfoTypeForString('DAMAGE_PHYSICAL'), false)

Version 3
Code:
def postCombatCavalry(pCaster, pOpponent):
	if pCaster.getDamage() < 10:
		pCaster.setMadeAttack(false)
		pCaster.changeMoves(-1)
		pPlot = pOpponent.plot()
		iAdept = gc.getInfoTypeForString('UNITCOMBAT_ADEPT')
		iSiege = gc.getInfoTypeForString('UNITCOMBAT_SIEGE')
		for i in range(pPlot.getNumUnits()):
			pUnit = pPlot.getUnit(i)
			if (pUnit.getUnitCombatType() == iAdept or pUnit.getUnitCombatType() == iSiege):
				pUnit.doDamage(40, 100, pCaster, gc.getInfoTypeForString('DAMAGE_PHYSICAL'), false)
				return


Hmm... Scion Ghastly Dragoons with Cursed Lances and Cannibalize...
 
I realized the charge/route thing would be easy - it seems to work, at least. Below is code you can add to UnitInfos and Spellinterface to try it out. It's set to allow allow extra attacks if damage is below 10% and give back the first move. So 1 attack can be completely free, the others will cost move points but not use up the unit's ability to attack - all assuming the damage remains below 10%.

10% could easily be too high, but it was easier than testing 5 or 0. It'd be simple to add level or promotion prereqs. (I'd suggest something unavailable to Chariots and Wolfriders (Heroes, Armageddon Horseman?), but free for some high-end cav. units like Knights, or "cav" units like War Elephants and Ogres.)

The xml needs to be added to each unit you want to have the ability. It'll probably go at the end of the unit's entry. (You can check "Test" unit to be sure of the order.) The python is placed - just once - in the named file.

EDIT: "Flanking" damage now too. I'm not sure if this'll activate if the cav. withdraws rather than kills it's target. Anyway:
Python version 1: No flanking damage.
Version 2: Every Siege and Arcane unit hit for 10-20% damage.
Version 3: 1 Siege or Arcane units hit for 5-100% damage. (I think this is the most "realistic" version.)

Possible issues with movement into tiles with a move cost greater than 1 (you gain one move back regardless of how much it cost to move in the first place).

Also, the 10-20% and 5-100% are a little misleading. It's an average of 10% to a cap of 20% or an average of 5% to a cap of 100%.

The other thing is that it doesn't really address the problem that was brought up originally. The initial concern was to do with the jump in effectiveness with withdrawal chance - low levels are too unreliable to consider useful, high levels can make units incredibly hard to stop. Is this designed as a replacement system for that altogether, or an additional system?

Hmm... Scion Ghastly Dragoons with Cursed Lances and Cannibalize...

If post-combat healing kicks in before the postCombatPython checks damage to allow an additional attack, this would almost certainly be too powerful when combined with certain other promotions (anything giving first strikes).

====

If we're looking for a flanking mechanic for horsemen, the BtS one can be adapted fairly easily. I'm not sure where the infinite-blitz mechanic is going to be honest though. It would be potent enough if it were just the "reset hasMadeAttack" part, without giving back additional movement - the horses get to run down as many as they can, but are still limited in a way that is hard to exploit.
 
Possible issues with movement into tiles with a move cost greater than 1 (you gain one move back regardless of how much it cost to move in the first place).

I think that's for the best - attacking into a forest *should* have a movement cost no matter what.


Also, the 10-20% and 5-100% are a little misleading. It's an average of 10% to a cap of 20% or an average of 5% to a cap of 100%.

Thanks. Something didn't seem right... I'll correct the post above.

The other thing is that it doesn't really address the problem that was brought up originally. The initial concern was to do with the jump in effectiveness with withdrawal chance - low levels are too unreliable to consider useful, high levels can make units incredibly hard to stop. Is this designed as a replacement system for that altogether, or an additional system?

Designed as an additional - fits my ideas of how to make mounted units more like RL cav.

But, OTOH, it might be used as a fix. Reduce withdrawal chances but add this system. Have the Flanking promotions enable it, for example, so rather than boosting withdrawal chances too high you get extra attacks/damage sometimes.

Here's a list of all the promotions that increase Mounted withdrawal:
Spoiler :

Superior Horses or (not and) Battle Mounts (Equipment) +10
Excellent Tack (Equipment) +10
Horselord's Tack (Equipment) +15 (not with Excellent Tack.)
Sacred Horses (Equipment) +10
Misdirection +100 (Once/30 gold, Esus)
Hauntstalk +15 (Undead, Haunted Lands)
Homeland +10
Horselord +10 (Hippus)
Light +10 (Via spell/effect)
Deceitful +5 (Esus)
Fade Away +10 (Esus)
Flanking I +20
Flanking II +20
Flanking III +10
Tactics I +5
Tactics II +5
Tactics III +10

Flanking line gives up to +50
Equipment up to +30 (+35 Hippus)
Tactics line up to +20
Esus line up to +15

+10 more for Hippus
+15 more for Undead (in Haunted Lands)
+10 more for "Light" (not sure of all the sources)

Looking at that list... Maybe replace Flanking II's withdrawal bonus with enabling "Route Blitz", and Flanking III makes it significantly easier.

Tactics II could enable "Flanking Damage" for any units using it - not just mounted. (So Infantry with good "Tactics" would have a shot at getting behind the lines and damaging siege equipment on a successful attack.) Tactics III (available only to Recon and Mounted) could give a significant bonus.

Doing that would remove up to +45 of the most easily available Withdrawal bonuses.

Then just cut down on the bonuses available from Equipment? (Though it'd make sense for Battle Mounts to give Rout Blitz and/or Flanking Damage boosts.) Cut them in half and that's another +15 removed.


If post-combat healing kicks in before the postCombatPython checks damage to allow an additional attack, this would almost certainly be too powerful when combined with certain other promotions (anything giving first strikes).

Yep.

If we're looking for a flanking mechanic for horsemen, the BtS one can be adapted fairly easily.

Good - it's probably better.

I'm not sure where the infinite-blitz mechanic is going to be honest though. It would be potent enough if it were just the "reset hasMadeAttack" part, without giving back additional movement - the horses get to run down as many as they can, but are still limited in a way that is hard to exploit.

It's not actually infinite-blitz - only the first attack gets a move back. (I don't know why.) While that's not what I described as my idea back several posts I do think it's for the best. And in most situations I expect damage would keep attacks below 2-3. But, anyway, I agree: The conditional-Blitz itself - no movement bonus - is still a significant ability. And even a 1/turn movement bonus without the blitz-like effect is non-trivial. Would probably want to make the damage threshold higher.

Here's a proposal summing up the above:
Flanking I down to +15% withdrawal
Flanking II down to +5% withdrawal bonus and instead enables "Rout Blitz" - if the unit suffers 15% or less damage it can attack again.
Flanking III loses withdrawal bonus and instead allows a Rout Blitz at %25 or less damage.
Tactics II loses withdrawal bonus and instead enables "Flanking Damage" - either via BTS system (but add Arcane units)... or requires 25% or less damage and does (%25, cap 50%) damage.
Tactics III loses withdrawal bonus and instead gives Flanking Damage boost - perhaps 50%, cap 100%.
Battle Mounts lose withdrawal bonus and instead enable Rout Blitz at 10% or give 5% damage threshold improvement.
Sacred Horses has withdrawal bonus removed.
Tack bonus reduced by 5%. (May need to change/drop lower-level tack.)
Hauntstalk reduced by 5%.
If the Esus bonus needs to be lowered:
Deceitful withdrawal bonus replaced by in-borders only +10% defense increase. (Ambush Lite.)

None of that is playtested so the #s for Rout Blitz and Flanking Damage are sheer guesswork.
 
It's not actually infinite-blitz - only the first attack gets a move back. (I don't know why.) While that's not what I described as my idea back several posts I do think it's for the best. And in most situations I expect damage would keep attacks below 2-3. But, anyway, I agree: The conditional-Blitz itself - no movement bonus - is still a significant ability. And even a 1/turn movement bonus without the blitz-like effect is non-trivial. Would probably want to make the damage threshold higher.

I can't see why that would be the case from the code either - does the Python only trigger once, or is it just the move-part that doesn't repeat? If it did work as intended, I think it would be quite feasible for a highly promoted knight to kill 20 or more lesser units in a single turn - the chances to take damage are fairly low, especially if the unit has a number of first strikes.

====

I'm still not sure it's a mechanic we need however. It does represent something that is true from a realism point of view, but from a gameplay perspective it doesn't seem necessary - at least at the level of complexity (conditional based on damage level and handled in python). If the goal is to represent the ability of cavalry to deliver a powerful charge in open terrain, then giving them an ability (usable only once per turn) that grants a 1 turn, lost after combat promotion with a combat bonus of 20 or 30%, accompanied by a -50% penalty for features/city attacks would represent the same thing entirely in XML.

Alternatively, as the goal is to rebalance cavalry as a whole, designating "Light Cavalry" and "Heavy Cavalry" as promotions, with some unique features on each variety (Heavy being poor at attacking into features/cities for instance - but with strengths elsewhere). I'd be tempted to add a "heavy" variant at Stirrups (Cataphracts?) and an advanced "light" variant at Warhorses (Hussars/Lancers?)

Light Role - Faster, has flanking ability, good withdrawal chance, weaker
Heavy Role - Slower, penalized when attacking into features, powerful in the open field, possible collateral?

====

Just random ideas - but from the direction of gameplay rather than implementing a specific real-life scenario. Also avoids what could potentially be a lot of python work (a loop over all defending units in a stack for every Hippus horseman that attacks could stack up to be a lot) and would be entirely visible to players (the promotions show exactly what benefits are given).
 
I can't see why that would be the case from the code either - does the Python only trigger once, or is it just the move-part that doesn't repeat?

Just the move part. Although I was re-writing the python without leaving and reloading the game - that's had odd effects before.

I'm still not sure it's a mechanic we need however.

I'm sure it's not something we need. I have some concerns about withdrawal but I think the mounted units are fine otherwise. I just like the effect, it was something I could do, and it was easy... And I almost got it right. :)

If the goal is to represent the ability of cavalry to deliver a powerful charge in open terrain,...

Not for this - I'm shooting for the ability to occasionally completely overrun an opponent. (Though it doesn't grant that ability - it's supposed to show the results. Little/no damage taken = overrun = still ready.) I'd be uneasy about it in a wargame - more appropriate to WWII or later tanks - but I think it fits a fantasy game well enough.

an ability (usable only once per turn) that grants a 1 turn, lost after combat promotion with a combat bonus of 20 or 30%, accompanied by a -50% penalty for features/city attacks would represent the same thing entirely in XML.

For powerful blow in open terrain how about a promotion that adds +25% combat, -50% in forest, cities, etc. etc. But use the help-text-override to have it read just "+20% in open terrain." No need to click on an ability button.

Light Role - Faster, has flanking ability, good withdrawal chance, weaker
Heavy Role - Slower, penalized when attacking into features, powerful in the open field, possible collateral?

That'd be very good. I'd still have concerns about AI-cluelessness with the Heavy role, but adding collateral would help.

Hmm... another way to demonstrate that a Heavy unit has routed it's opponent would be to give it a conditional "Cannibalize". Say... Heal %10 if the damage is less than 20%. Easy fights are *very* easy for Heavy Cavalry. Poor withdrawal would already show that hard fights can easily be too hard.

It'd still require postcombatpython, I think, but no looping through a stack.
 
Light Role - Faster, has flanking ability, good withdrawal chance, weaker
Heavy Role - Slower, penalized when attacking into features, powerful in the open field, possible collateral?

I LOVE this idea.

Could these be similar to ship crews ?
Though perhaps some difference is needed. Heavy cavalry are obviously going to be wearing more armor, so maybe light should be the default, and changing to heavy could have a :gold: cost associated?

Ideas then

"Light Cavalry" (promotion)
+1 movement range
+x% against archers (fast and harder to hit)
100% withdrawal chance (but modified by terain, rivers, enemy stack composition, etc)
Able to use flanking attacks, hitting random units in the stack, instead of necessarily the weakest.

"Heavy Cavalry" (promotion) (replaces light cavalry, can't have both)
+1 attack strength
20% withdrawal chance (not light, harder to escape)
Causes collateral damage
+x% against melee units (smashes formations)


As to attacking into features, though. Forests/ jungles, and such. Seems to me that light cavalry are the ones who should be penalised more. They'd be dependant on open space and mobility, whereas heavy armored cavalry would be more capable of fighting it out in close quarters, if they get bogged down and can't manouevre. I'd certainly say all cavalry types should be penalized in non-open terrain, but I think light cavalry would be worse off than heavy.
 
Could these be similar to ship crews ?
Though perhaps some difference is needed. Heavy cavalry are obviously going to be wearing more armor, so maybe light should be the default, and changing to heavy could have a :gold: cost associated?

I'd much rather see no gold cost, but no switching back and forth.

Hmm... come to think of it, the unit progression currently assumes units go from light to heavy. We could make just "Light" available for the units after Horse Archer.

Knights, for example, without "Light" are what they are. Knights with "Light" have much better withdrawal/flanking but lower strength.

They'd be dependant on open space and mobility, whereas heavy armored cavalry would be more capable of fighting it out in close quarters, if they get bogged down and can't manouevre. I'd certainly say all cavalry types should be penalized in non-open terrain, but I think light cavalry would be worse off than heavy.

I agree with a lot of that. But I'd give Heavy Cavalry a greater close-terrain penalty for it's greater dependence on the charge, and the lighter units (presumably) greater experience with fighting in poor terrain. I'd expect them to be more adept with the quick raids/small unit tactics that'd work best.
 
As to attacking into features, though. Forests/ jungles, and such. Seems to me that light cavalry are the ones who should be penalised more. They'd be dependant on open space and mobility, whereas heavy armored cavalry would be more capable of fighting it out in close quarters, if they get bogged down and can't manouevre. I'd certainly say all cavalry types should be penalized in non-open terrain, but I think light cavalry would be worse off than heavy.

It's more a case that heavy cavalry tactics revolve around their charge - which requires the open space. Hiding behind a tree is a valid tactic against a line of heavy knights with lances as they thunder past, but might not work so well against light horse or horse archers who can wheel and turn more freely.

I would agree though that dense forest would be a problem for both types - light woodlands are more of problem for heavy formations than more nimble types though.

I'd much rather see no gold cost, but no switching back and forth.

Hmm... come to think of it, the unit progression currently assumes units go from light to heavy. We could make just "Light" available for the units after Horse Archer.

Knights, for example, without "Light" are what they are. Knights with "Light" have much better withdrawal/flanking but lower strength.

I was originally thinking of it in terms of using the promotions for specific unit types. Horsemen, Horse Archers and Hussars would always be light, Cataphracts and Knights would always be Heavy. It's feasible to have the promotions remove the need for 2 extra units by allowing units to opt to be "heavy" or "light" as desired though (with name changes as appropriate). All just theory for the moment though...
 
It's more a case that heavy cavalry tactics revolve around their charge - which requires the open space. Hiding behind a tree is a valid tactic against a line of heavy knights with lances as they thunder past, but might not work so well against light horse or horse archers who can wheel and turn more freely.

I would agree though that dense forest would be a problem for both types - light woodlands are more of problem for heavy formations than more nimble types though.

Yes, that is their primary tactic, but if for some reason, the enemy are still standing, they draw swords and cut them down. mounted knights would always carry a sidearm or two, because a lance just isn't a practical weapon for close combat.

When it comes to a close batle, the armor on your horse is the difference between sitting atop it and cutting down those around you, or your horse getting shanked in the hind leg and falling to the ground, with you trapped in the stirrups.
 
Designing things similar to ship crews is quite pathetically simple with the FF framework. They are entirely XML driven, no supporting python required, and all you need is PromotionInfos, n fo them o SpellInfos to much about with. And if I remember how I set things up for the AI, they will understand them automatically and always choose whatever they feel is the best for the unit (without causing infinite loops of swapping between them)
 
I was originally thinking of it in terms of using the promotions for specific unit types. Horsemen, Horse Archers and Hussars would always be light, Cataphracts and Knights would always be Heavy. It's feasible to have the promotions remove the need for 2 extra units by allowing units to opt to be "heavy" or "light" as desired though (with name changes as appropriate). All just theory for the moment though...

Two extra units would work too, though I don't think they - are any significant changes - are really necessary. Lots of improvements could be made... if you want to go simple I think there'd be a lot of bang-to-buck in:

a) Bring back BTS flanking - it's a clear difference between Mounted and Recon+Mobility I (other than Mounted's defense problems.).

b) Add a high-end light-role unit: Lower strength than Knights, higher withdrawal.
 
I gotta say I love the idea of having light cavalry and heavy cavalry promotions. and BTS style flanking attack would be great as well :)
 
I'd like to see knights be able to flank catapults AND do some stack damage to mages or archers. Right now the only person who builds catapults are the AI or me if I'm without fire mana for some Bhall-forsaken reason. Usually, though, my seige equipment is a bunch of guys in long robes with pointy hats.
 
I have an idea for the charging mechanic.

How about, a % strength bonus applied, only on the attack, to cavalry. Light cavalry could get a 15% bonus, heavy cavalry a 40% bonus (much better chargers)

This bonus would only apply in open terrain, ie not forests, ungles, ancient forst, or deep jungle. I don't think making it not apply in "features" in general is a good idea, because I don't see any reason it couldn't work in haunted lands, for instance.

Charging bonus would be nullified if attacking across a river also, or if attacking a unit which has the Formation promotion
 
I don't think it'd work in haunted lands because that's like a forest that's trying to eat you the whole time.
 
I don't think it'd work in haunted lands because that's like a forest that's trying to eat you the whole time.

Ah, I don't really know much about it. The civilopedia entries are kind of vague. I always imagined it as a barren, strange landscape. Though I suppose the creepers do kind of counterpoint that.

While we're on that subject actually, where are my watchful stones and knowledgeable darkness? I was looking forward to unique HL resources D:
 
Honestly, I'd love Haunted Lands to replace resources with new ones... Of course, that would be overkill. Scions would be able to trade all their new happiness resources for the original ones, and double their city sizes....

Who said anything about them necessarily being happiness resources?

Watchful Stones: Gives +5% city defence in cities with acess to this resource
Knowledgeable Darkness: +5% :science: in cities with it

etc. Be imaginitive.
 
Back
Top Bottom