Jump to content

[Discussion] Alternate attacks


Recommended Posts

I'm going to implement alternate attacks, that is units which have more than one attack. e.g. Mauryan Maiden Guards are both swordsmen and archers; currently we have two units for that but they should be merged into one. There are a few other examples as well.

Here's my current design:

  • Basic case: primary/secondary attacks (e.g. Maiden Guard)
    • Right clicking a target uses the primary attack - this is how it is currently; you can't use secondary attacks at all.
    • Alt-right clicking a target uses the secondary attack.
    • Clicking a button in the GUI or using a hotkey toggles between the two, so clicking the button and then right clicking would use the secondary attack.

    [*]Advanced case: initial/primary attacks (e.g. Roman swordsmen, which throw a javelin before they attack with swords)

    • Alt-right clicking a target uses the initial attack. After the maximum number of initial attacks is used, UnitAI switches to attacking with the primary attack.
    • Right clicking a target uses the primary attack.
    • The primary attack must be used at least once (maybe more) before the initial attack can be used again.

I like this proposal (naturally... I came up with it :P) but I'd like all your feedback on how this should work, especially initial/primary attacks (I'm still trying to sort this out; primary/secondary attacks are pretty well thought out).

Link to comment
Share on other sites

Your first case sounds about right.

Hmm, with the Roman swordsmen (and whoever uses an 'initial' attack), I was thinking that they'd just automatically throw the pilum if the target is at the proper range, and then just close with sword. If the target is too far, they'd close within pilum range, throw, then close with sword. If target is too close, they'd just skip the pilum throw and just close with sword. Thoughts?

Two other cases I can see:

- Defensive secondary attack: Some ranged units will switch to knives or swords if they are attacked by a melee unit. I'm thinking this could be a bonus to using formations--when in formation they would be courageous and stand up to a fight, but when the formation breaks they would flee to min range distance (or min range + 50%) like they do now.

- Passive secondary attack: This might need 'turrets' to be implemented. A good example would be a war elephant with archers on its back. The primary attack of the unit is the elephant's crush power, but the archers on its back would fire arrows at random nearby units for a "passive" secondary attack. Like I said, this may need turrets to be implemented and could be applicable to things like warships and chariots and other units like this.

Link to comment
Share on other sites

For the advanced case: I figure it's more logical to have it fire the initial attack followed by the primary on a right click (since that's basically how yo expect the unit to attack). Using alt click should probably make it use the primary attack directly.

Link to comment
Share on other sites

Isn't that all a bit too much of micro management?

Are the attacks always ranged vs melee? In that case, I would say always prefer ranges first, and if the unit you're fighting comes into the minimum range circle, switch to melee.

An alt+right click could use the melee attack directly.

I think differencing between primary/secondary and initial/primary would be a bit difficult for the user to get. And hard to control if you're fighting with a complete army.

Link to comment
Share on other sites

Can't the units have a regeneration rate for the number of secondary attacks? Because in some cases, i'd rather see them using only once the secondary attack and engage. This way one could control how many secondary attacks a unit should use before engaging and how much time they'll spend 'til they can use it again...

Edited by Pedro Falcão
Link to comment
Share on other sites

Hmm, with the Roman swordsmen (and whoever uses an 'initial' attack), I was thinking that they'd just automatically throw the pilum if the target is at the proper range, and then just close with sword. If the target is too far, they'd close within pilum range, throw, then close with sword. If target is too close, they'd just skip the pilum throw and just close with sword. Thoughts?

That would be fine too. When would their pilum "reload"? Or I guess it doesn't need to, since it would sort of automatically reload as soon as it's far away enough to use the pilum.

- Defensive secondary attack: Some ranged units will switch to knives or swords if they are attacked by a melee unit. I'm thinking this could be a bonus to using formations--when in formation they would be courageous and stand up to a fight, but when the formation breaks they would flee to min range distance (or min range + 50%) like they do now.

OK, this shouldn't be too difficult. I don't like the formation idea though. IMO it's unnecessarily complicated, also if they defend out of formation the units won't try to run all over the map chasing each other, like they do now.

- Passive secondary attack: This might need 'turrets' to be implemented. A good example would be a war elephant with archers on its back. The primary attack of the unit is the elephant's crush power, but the archers on its back would fire arrows at random nearby units for a "passive" secondary attack. Like I said, this may need turrets to be implemented and could be applicable to things like warships and chariots and other units like this.

So it would work a bit like a siege tower with a melee attack (and without having to garrison to get the ranged one)? The arrows would just kind of target anything nearby, while the main attack works normally. This might be possible currently.

This doesn't need turrets to be implemented, but it needs turrets to look good. :P

For the advanced case: I figure it's more logical to have it fire the initial attack followed by the primary on a right click (since that's basically how yo expect the unit to attack). Using alt click should probably make it use the primary attack directly.

That was my initial thought, but I wasn't really sure how to handle reloading then. Mythos's idea of making it all range based solves that pretty nicely though.

Can't the units have a regeneration rate for the number of secondary attacks? Because in some cases, i'd rather see them using only once the secondary attack and engage. This way one could control how many secondary attacks a unit should use before engaging and how much time they'll spend 'til they can use it again...

I think you're confusing secondary attacks and initial attacks. Secondary attacks are for units that wield multiple weapons, like Maiden Guards, Immortals, or the Iberian champion cavalry. Initial attacks are pretty much what you're describing. There will be no regeneration rate though. Take Roman swordsmen as the example: if they're far enough away, they'll throw a pilum then attack with their swords. When they're far enough away again, they'll be able to use another pilum.

Edited by alpha123
Link to comment
Share on other sites

OK, this shouldn't be too difficult. I don't like the formation idea though. IMO it's unnecessarily complicated, also if they defend out of formation the units won't try to run all over the map chasing each other, like they do now.

The "run all over the map" thing is currently broken and should be fixed. If fixed, they won't run all over the map when fleeing (they'd tend to get cut down instead). The fix for this is to make the pursuer's melee attack "follow through" when initiated. This is a problem with melee attack range, not with fleeing. :)
Link to comment
Share on other sites

The "run all over the map" thing is currently broken and should be fixed. If fixed, they won't run all over the map when fleeing (they'd tend to get cut down instead). The fix for this is to make the pursuer's melee attack "follow through" when initiated. This is a problem with melee attack range, not with fleeing. :)

Either way it's unnecessarily complicated. If you want to make ranged units scared when not in formation, they should probably just flee really far when attacked, instead of trying to use their ranged weapon.

Link to comment
Share on other sites

Either way it's unnecessarily complicated. If you want to make ranged units scared when not in formation, they should probably just flee really far when attacked, instead of trying to use their ranged weapon.

"Courageous" was not meant to be taken literally. Just a cheap way to describe their behavior. They would stand ground instead of fleeing.

EDIT: Point is, I'd rather melee cavalry's usefulness against ranged units be a part of behavior and gameplay mechanics, rather than just simple attack bonuses. Using min range for ranged units does this, while always giving them knives and having them stand ground (AOE3) removes that mechanic.

Link to comment
Share on other sites

Point is, I'd rather melee cavalry's usefulness against ranged units be a part of behavior and gameplay mechanics, rather than just simple attack bonuses. Using min range for ranged units does this, while always giving them knives and having them stand ground (AOE3) removes that mechanic.

Hm. I like that mechanic. You've convinced me. As long as the fleeing problem is solved, I think formation breaks should remove the defensive secondary attack.

Link to comment
Share on other sites

Hm. I like that mechanic. You've convinced me. As long as the fleeing problem is solved, I think formation breaks should remove the defensive secondary attack.

Yeah, the fleeing problem really needs to be fixed (there's a Trac ticket around here somewhere!). Then it will work much better. When we have running, charging, and trample damage too, it'll be easier for melee cav to hunt down fleeing (e.g.) skirmishers.
Link to comment
Share on other sites

Yeah, the fleeing problem really need to be fixed (might need a new ticket). Then it will work much better. When we have running, charging, and trample damage too, it'll be easier for melee cav to hunt down fleeing (e.g.) skirmishers.

IMO, cavalry need to be faster even when not charging. Most cav are only 1 speed faster than Macedonian skirmishers, for example, and 1.5 faster than Celtic skirms. It takes a while for them to catch light units, which definitely isn't realistic (a horse, even when not charging, can catch a person on foot pretty easily).

Link to comment
Share on other sites

IMO, cavalry need to be faster even when not charging. Most cav are only 1 speed faster than Macedonian skirmishers, for example, and 1.5 faster than Celtic skirms. It takes a while for them to catch light units, which definitely isn't realistic (a horse, even when not charging, can catch a person on foot pretty easily).

Agree completely.

Link to comment
Share on other sites

IMO, cavalry need to be faster even when not charging. Most cav are only 1 speed faster than Macedonian skirmishers, for example, and 1.5 faster than Celtic skirms. It takes a while for them to catch light units, which definitely isn't realistic (a horse, even when not charging, can catch a person on foot pretty easily).

Agree completely.

Pretty sure we all already agree on this, guys. :)
Link to comment
Share on other sites

Note that it wouldn't really fix the fleeing issue. That's mostly because an attack anim starts, stopping the attacking unit, and then by the time the actual hit should be there… The unit is gone. Rinse, repeat.

That's all in the ticket.

This is very true. The real issue is that melee attacks, once initiated, get "interrupted" once the target moves out of range.

Why Not make an attack Animation that gives cavalry the possibility to move ( at least fast enough to have the Enemy unit within Range When Finishing the attack Animation) while attacking? Would also be more realistic, I Guess.

This interests me (units attacking while moving, makes sense and is realistic), but I wonder about the difficulty of implementation.
Link to comment
Share on other sites

I don't know if it's possible (easily), but I think it could work along the lines:

Cavalry reaches target -> performs check if target flees -> if no, play the not-moving attack animation, if yes play the move-attack animation.

It's slightly more complicated than that--the move-attack animation needs to play but also the attacking entity needs to move position as well (to shadow the movement of the target), which affects the simulation.
Link to comment
Share on other sites

an AOM design for initial attacks would be good and easy to use

in "battle for middle earth 1" there was a button to switch between weapon(could be placed in the formation/stance UI) : i think it's the most efficient way to deal with units having more than a single weapon, you can easily swich depending of what you need in the battle

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...