Jump to content

The Problem with Sword/Spear Units


Recommended Posts

1 hour ago, Genava55 said:

I think the best is to enable new mechanics for the modders, in time there will be several approaches explored. Some people prefer AoE like gameplay, some others prefer Total War battles, some prefer soft city builders with warfare gameplay like Dawn of Man and other prefer more tactical aspects like BFME or Ancestors Legacy.

Battalions, switchable weapons, area damage etc. those will be useful and really appreciated anyway.

Right. I think as long as the engine supports hard battalions and other tactical features, it's okay for Empires Ascendant to go with a softer approach. The major mods can experiment with hard battalions, etc. and offer other approaches as long as the engine support is there. 

Link to post
Share on other sites
1 hour ago, wowgetoffyourcellphone said:

Right. I think as long as the engine supports hard battalions and other tactical features, it's okay for Empires Ascendant to go with a softer approach. The major mods can experiment with hard battalions, etc. and offer other approaches as long as the engine support is there. 

Just to let my opinion on the battalion idea be heard since I might have come off as a skeptic to it, I think that it is a great way of streamlining an otherwise micro-intensive genre and would fully support its use in the main game.  Despite that fact, I think that having some of the aspects such as flanking could and should be represented even without that kind of feature.  Since its beginning 0 A.D. has embraced the idea of proper tactics being in place instead of a mosh pit style of fighting represented in many RTS games, and I want to push towards that goal as best as possible... by just posting my opinions in the forums.  

  • Like 2
Link to post
Share on other sites
9 hours ago, badosu said:

This could be doable on an experiment mod, I would expect performance to be incredibly poor. Another issue is defining the start quadrant, I'm not sure it's well defined (nerfs are the same regardless the initial unit).

I made that mod and posted it on this forum sometime in 2018.

Performance was alright, nothing intensive was needed to be done.

I am not sure whether defining quadrants will be an issue. What I did was take the relative rotation of two entities in attack, translate for attack direction if needed and just take the circle quadrants based on angles.

I recall having to revise it to only take the relative rotation of attacked and the attack, because missile attacks can have vastly different attacker and attack orientation depending on projectile speed.

  • Thanks 1
Link to post
Share on other sites

For battalions etc. to work, the engine needs to be able to comfortably support thousands of soldiers, like in Cossacks. That's currently not the case in 0 A.D.

A battalion is a military unit in between a company and a regiment or brigade.

Greeks liked doubling (1, 2, 4, 8, 16, etc.). In Macedonian armies, sixteen pikemen formed a lochos (file), sixteen lochoi a syntagma (square, i.e. 16×16=256 men, plus five supernumeraries), which was the smallest tactical unit. Light infantry was organized in files of eight, the smallest tactical unit was a hekatontarchia (nominally 128 men plus five supernumeraries). The smallest tactical unit for cavalry was the ilē (squadron), the textbook example is 64 horsemen, though the number could range from a few dozen to over a hundred, depending on how much cavalry was available in the army (rarely over 10%). Following Aelian, a full phalanx would be 64 syntagmata or 1024 lochoi, i.e. 16384 phalangites. Add to that half that number in light infantry, and a quarter of that in cavalry, and you get an army of c. 30 thousand. In practice the numbers could be even larger; e.g. at the Battle of Raphia (217 BC), both sides fielded armies of c. 70 thousand.

The smallest tactical unit of Roman infantry was a centuria (century) of 60–80 soldiers or a manipulus (maniple) of twice that (except for triarii). A cohors (battalion) nominally consisted of 120 velites, 120 hastati, 120 principes, 60 triarii, i.e. c. 450 soldiers. The smallest tactical unit for cavalry was a turma (squadron) of 30. A Roman legiō (brigade) consisted of ten cohorts and ten squadrons, i.e. c. five thousand men. An auxiliary āla (brigade) had (at least) the same number of infantry as a legion, but three times as much cavalry. A Roman army consisted of two legions and two alae, i.e. c. 25 thousand men.

While I agree companies, battalions, brigades, etc. would be great to have, I sincerely doubt 0 A.D. could achieve that in the forseeable future, given that entities are not simple sprites, but three-dimensional actors with lots of variation.

Even if we reduce the numbers by a factor five, i.e. squadrons of 6, centuries of 12, and squares of 50, then it would still be something for late game only. An early rush with a dozen or so unorganized men could already win a game.

Link to post
Share on other sites
7 hours ago, Nescio said:

For battalions etc. to work, the engine needs to be able to comfortably support thousands of soldiers, like in Cossacks. That's currently not the case in 0 A.D.

"Battalion" is shorthand here for a group of units. We could have used the term "platoon" or "file" or something closer to an accurate number of men, but what they represent are essentially battalions within an army (the game's scale is representative, not simulation; authenticity, not accuracy). We're talking about something like 18 (cavalry)-24 (infantry) soldiers per "battalion" (not counting officers and bannermen) and perhaps max 30 such possible units per player (typically between 15-25). Call it 10 pop cost per battalion (1 large house), 1 pop cost per support/civilian unit. 

 

7 hours ago, Nescio said:

While I agree companies, battalions, brigades, etc. would be great to have, I sincerely doubt 0 A.D. could achieve that in the forseeable future, given that entities are not simple sprites, but three-dimensional actors with lots of variation.

 

This has been achieved by other (much older) games, including the variation bit. In fact, I think because of 0 A.D.'s actor variation it's kind of imperative that they be grouped into battalions for visual verification reasons. 

  • Like 2
Link to post
Share on other sites
8 hours ago, Genava55 said:

I was thinking about something realistic/credible as in BFME reforged, Praetorians, Ancestors Legacy, Manor Lords etc.

Everything in that video looks great! The pair of oxen ploughing a field and the click-drag-click road construction and plot assignment are things I'd love to see in 0 A.D. as well. :) I suspect that game has much higher requirements, though.

2 hours ago, wowgetoffyourcellphone said:

"Battalion" is shorthand here for a group of units. We could have used the term "platoon" or "file" or something closer to an accurate number of men, but what they represent are essentially battalions within an army (the game's scale is representative, not simulation; authenticity, not accuracy). We're talking about something like 18 (cavalry)-24 (infantry) soldiers per "battalion" (not counting officers and bannermen) and perhaps max 30 such possible units per player (typically between 15-25). Call it 10 pop cost per battalion (1 large house), 1 pop cost per support/civilian unit.

This has been achieved by other (much older) games, including the variation bit. In fact, I think because of 0 A.D.'s actor variation it's kind of imperative that they be grouped into battalions for visual verification reasons. 

To be clear, I'm not opposed to unit battle groups, in fact, I'd love to see them in 0 A.D. too. (Though I'd recommend sticking with the historically attested 4:2:1 ratio for heavy infantry, ranged infantry, and cavalry; the Macedonian 256, 128, 64 and the Roman 120, 60, 30 are probably a bit too much; 40, 20, 10 is probably reasonable.)

However, competitive players are able to win well before 100 population is reached, and currently the 0 A.D. noticeably slows down in the mid- to late-game, often before 300 population is reached.

Anyway, we're drifting off-topic:

On 01/11/2020 at 8:33 PM, Thorfinn the Shallow Minded said:

At the moment, units are arbitrarily divided into sword and spear melee categories.  I would argue that this distinction is bad for the following reasons:

Few soldiers equipped exclusively swords, which were primarily a side arm.  

The representation of sword units being a counter to spear units is ludicrous for our purposes during the ancient times.  Instead, disciplined all infantry formations should always be able to withstand frontal cavalry assaults.  Any differentiation between spear and sword wielding is similarly arbitrary.  

The spearman, a unit type that is countered by sword and ranged units, is largely ineffective against cavalry due to a lack of adequate mobility.

Thus, there should instead just be melee infantry and melee cavalry, with subtypes based more around armour and training yet still retaining the core functions of their parent categories.  This would greatly streamline one of the game's more unintuitive aspects.

I agree the “sword beats spear” situation doesn't really make much sense; if anything, it ought to be the other way around. While you're right in stating a disciplined formation ought to be able to resist a cavalry assault, I do believe a rigid pike formation with weapons extending over 6 m in front is more effective in this than a loose formation of swordmen with blades of 0.6 m.

Regardless, what I think is needed is more differentiation, not less. Make heavier troops cost more metal, while ranged troops are cheaper but have longer training times. Moreover, introduce more unit subtypes, with different values. Instead of just spear cavalry, have doratophoroi (spear, no shield), thyreophoroi (spear, long shield), and xystophoroi (very long two-handed lances); split slingers in stone-slingers and lead-slingers (longe range, little damage); separate crossbowman ( https://code.wildfiregames.com/D2886 ), camels ( https://code.wildfiregames.com/D2900 ), and chariots ( https://code.wildfiregames.com/D2965 ); make scythed chariots melee units; etc.

[EDIT] And another one: https://code.wildfiregames.com/D3080 gives pikemen a bit more range and other melee infantry a bit less.

Another idea is giving higher ranking pikemen even more range (e.g. b 8, a 9, e 10), though that requires an artist to model a few pikes of longer lengths.

Edited by Nescio
pikemen patch
Link to post
Share on other sites
18 hours ago, Nescio said:

Regardless, what I think is needed is more differentiation, not less. Make heavier troops cost more metal, while ranged troops are cheaper but have longer training times. Moreover, introduce more unit subtypes, with different values. Instead of just spear cavalry, have doratophoroi (spear, no shield), thyreophoroi (spear, long shield), and xystophoroi (very long two-handed lances); split slingers in stone-slingers and lead-slingers (longe range, little damage); separate crossbowman ( https://code.wildfiregames.com/D2886 ), camels ( https://code.wildfiregames.com/D2900 ), and chariots ( https://code.wildfiregames.com/D2965 ); make scythed chariots melee units; etc.

Mainly what I am getting at is unnecessary differentiation.  Trying to shoehorn stuff, like sword versus spear, in a way that doesn't even work from a gameplay perspective let alone a historical one is meaningless.  I agree that there should be different types of spear cavalry, but effort shouldn't be on trying to wedge them into a particular tactical niche beyond what makes sense.  I don't wish to imply that you are trying to say that; in fact I would say that your patch work have helped the game immensely.  

Edited by Thorfinn the Shallow Minded
Link to post
Share on other sites

Just my 2 cents, unless something dramatically changes more differentiation won't bring much improvement to both gameplay and historicity, in my humble opinion. AoE2 has a wide variety of counters, well defined rocks-paper-scissor, and I feel it's kinda boring/spammy/mechanical.

Focusing on mechanics, I wouldn't say an extreme change - maybe flanking, ranged recharge, trampling, melee focus could both make it more interesting from a tactical pov and historically.

Lake trasimene, cannae, Alexanders numerous hammer and anvil with wedge cav formation all could be easily recreated (not that it should be the end-goal but would be awesome nonetheless).

Edited by badosu
  • Like 1
Link to post
Share on other sites

Indeed. If we want to depict what combat looked like, melee infantry should be about 70% of each player's force, 20% cavalry, 10% ranged infantry. The percentages fluctuate a from faction to faction, but those are generally accurate numbers (I'msure someone will correct me). The Macedonian player should be making hundreds of phalangites instead of whatever ranged unit is OP this alpha.

  • Like 1
Link to post
Share on other sites
8 hours ago, Thorfinn the Shallow Minded said:

Mainly what I am getting at is unnecessary differentiation.  Trying to shoehorn stuff, like sword versus spear, in that doesn't even work from a gameplay perspective let alone a historical one is meaningless.  I agree that there should be different types of spear cavalry, but effort shouldn't be on trying to wedge them into a particular tactical niche beyond what makes sense.  I don't wish to imply that you are trying to say that; in fact I would say that your patch work have helped the game immensely.  

Indeed, with differentiation I do not mean enforcing specialization; hard bonus attacks are ugly and ought to be avoided. With differentiation and more unit types I simply mean units with different values; e.g. Rome ought to be able to train both hastati and principes, the latter of which has higher resistance and metal costs (chain mail), but is otherwise identical; likewise, Macedon ought to have Macedonian (lancers), Thessalian (spearmen), Paeonian (javelineers with shields), and Odrysian (javelineers without shields) cavalry; they all have different statistics, yet perform the same function.

Currently all soldiers have the same costs and training time (infantry 50 food, 50 other resources, 10 seconds; cavalry 100 food, 50 other resources, 15 seconds), despite very high differences in damage per second: javelineers 12.8, swordsmen 7.3, spearmen 5.5, pikemen only 2. Add to that a 20% cost and time reduction of Celtic structures and it is no wonder people want to play Britons and not Macedonians.

To facilitate a systematic approach it is important to start from a clean and consistent situation; that's what my patches have mostly focussed on. (Getting people to review, accept, and commit them is the hard part.)

Another simple idea is keeping units trained at the civic centre of basic rank, while increasing those from the barracks to advanced rank.

5 hours ago, badosu said:

Just my 2 cents, unless something dramatically changes more differentiation won't bring much improvement to both gameplay and historicity, in my humble opinion. AoE2 has a wide variety of counters, well defined rocks-paper-scissor, and I feel it's kinda boring/spammy/mechanical.

In my opinion Age of Empires II is a great example of what 0 A.D. shouldn't do. :)

5 hours ago, badosu said:

Focusing on mechanics, I wouldn't say an extreme change - maybe flanking, ranged recharge, trampling, melee focus could both make it more interesting from a tactical pov and historically.

Lake trasimene, cannae, Alexanders numerous hammer and anvil with wedge cav formation all could be easily recreated (not that it should be the end-goal but would be awesome nonetheless).

What would already be a great first step is if the formations already present in 0 A.D. would give minor bonuses; e.g. a square or line would increase resistance by one level, while a compact syntagma or testudo adds two levels, but reduces movement speed.

4 hours ago, wowgetoffyourcellphone said:

Indeed. If we want to depict what combat looked like, melee infantry should be about 70% of each player's force, 20% cavalry, 10% ranged infantry. The percentages fluctuate a from faction to faction, but those are generally accurate numbers (I'msure someone will correct me). The Macedonian player should be making hundreds of phalangites instead of whatever ranged unit is OP this alpha.

Doubling the training time of ranged troops and twice the population for cavalry would already go a long way towards more realistic ratios.

  • Like 2
Link to post
Share on other sites
3 hours ago, Nescio said:

What would already be a great first step is if the formations already present in 0 A.D. would give minor bonuses

As long as we can also address the issue with formation and pathfinding with strangler trees/obstacles, I agree

Link to post
Share on other sites
11 hours ago, Nescio said:

Doubling the training time of ranged troops and twice the population for cavalry would already go a long way towards more realistic ratios.

DE uses 1 pop for civilians, 2 pop for infantry, and 3 pop for cavalry as an example. I don't think ranged units are OP in DE so I haven't increased their train time, but if we're using EA's stats then increasing their train time could do the trick. 

Link to post
Share on other sites
  • 2 weeks later...

Sorry to anyone itching to examine my code for multi-weapon units and ammo. Being a hopeless perfectionist, I've been obsessing over what appeared to be minor glitches and error notifications associated with my changes that would pop up once in a blue moon. Alas, some of them turned out to be not so minor after all. In particular, there seems to be a nasty interaction between the weapon switching in code and the ammo counting code. (Animations sometimes get desynced from the simulation and units forget how long weapon cooldowns and ammo reload cycles are supposed to be. Put them together and you have units occasionally vomiting out dozens of invisible projectiles like a machine gun. I didn't notice until in one very large test battle a lone surviving Hastatus mowed down a dozen enemies with what appeared to be three successive pila throws.)

That's just the fun of game development I guess... always a learning experience. I've made some initial improvements to try to fix it, but the problem appears to be somewhat intrinsic to the way I clumsily shoehorned my variables for tracking ammo and attack cycling into the preexisting architecture of the INDIVIDUAL.COMBAT.ATTACKING state. I basically need to go back to the drawing board with the attack cycling code. It's going to take a lot of work for me to fix, and right now I don't have the time.

But I don't want anyone to feel short changed, so tomorrow I'll work getting the repo semi-presentable and post the link here. I wouldn't recommend anyone try to build off my work just yet, but maybe it will provide some inspiration for what is possible.^_^

  • Like 2
Link to post
Share on other sites

Here ya go: https://github.com/ChronAb/Broken_Empire_-_Refined_Combat_mod

Is far as what's in there, the meat of the mod is in simulation/components (spoiler-ed for ugly wall of text) :

Spoiler
  • Auras.js and AurasManager.js has a nice (though unpolished) refinement to auras that lets you set minimum and maximum aura stack sizes. The aura effect wont start applying until more than the min stack height has been reached, and will stop stacking on after it reaches the max. See the massed_pikes and massed_shields auras for how these properties can be leveraged for powerful emergent formation effects.:)
  • Armour.js and and Dammage.js are probably ready to use as is. They contain:
    • A crude but effective system for defining directional armor bonuses or penalties that can be used to create gameplay based around flanking. (I gather this may be replicating the superior efforts of others.)
    • Some refinements to the linear splash damage code that I think makes it much more realistic and prevents some unintended adverse interaction with other parts of my mod. It also could potentially cause a tremendous amount of fratricide is, for instance, you tried to support troops in melee combat with a line bolt throwers firing through them from the rear...
    • Universal friendly fire for all ranged units (a one line change... for realism)
    • Experimental changes to how armour and damage get parsed into HP changes intended to simulate varying severity of injuries, and "critical hits." I don't think it's working quite the way I wanted, and I'll probably replace it with something else soon-ish. 
  • Attack.js contains some fairly well polished refinements relating to ranged combat. Mostly it places more realistic limits on the ability of units to lead their targets and how they can attack things moving around on the edges of their range. It also contains some critical components for the new ammo and multi-weapon / multi-stage attack system in UnitAI.js
  • Then there's UnitAI.js, which has most of the stuff I was talking about before. It all seems to work about 98% percent of the time, but that other 2% is enough to either break the game or at least throw off the balance severely. The key features:
    • Units can have both Ranged and Melee weapons defined in their template, and they will switch between them (semi)intelligently, based on distance to their target, combat stance, and available ammo. Currently I only have the Roman Hastatus (rome citizen infantry swordsman) and the Persian Immortal (pers spear/bow infantry champion) making use of it.
    • Units can have ammo for their ranged attack, as described previously. Staying out of combat for a prescribed length of time will rearm them. Ranged-only units who are out of ammo will play the capture animation to indicate they are empty and try to flee from enemies who deal damage to them or get too close.
    • Ranged units can have a "rest" time as part of their attack cycle, allowing slower (more authentic) attack rates without the need for special animations. They will also flee if hurt or approached by enemies while resting.
    • And I've messed with how units respond to being attacked. Among other things, if the attacker is closer than the target, the attacked will switch to fighting the.. (I believe this was on someone's wish list.) Unfortunately it is still a little buggy.
    • UnitAI.js also has some experiments I was doing with longer distance resource drop off before I started working on this. (Saves you building quite so many lumber camps.)
    • And a half-assed attempt by me to reduce problems of chronic overkill in ranged combat by adding some randomness to target selection (a big problem when units have ammo. This has the side effect of occasionally making a few units do suicidality stupid things (although in a way that probably benefits their comrades net survival). I've yet to decide whether this is an acceptable tradeoff, or I should try to devise a better system, or just scrap it.

Lastly, in simulation/data/pathfinder.xml I made an incredibly ham-fisted attempt to increase units' collision radius (for many reasons, foremost wanting to actually see what was going on in melee battles). The Pathfinder does not like this, and punishes me by making units get stuck to trees, buildings and each other. If anyone has any insights into how to do this properly I am all ears. (I'd also like to know if its possible to change the rotation speed of units in a mod.)

Other than that... the cavalry_fear, massed_pikes, and massed_shields auras in simulation/data/auras, are neat (but also transparently derivative of DE). And all the stuff in templates is basically my early proof of concept for what this threat is all about, but it's also taped together pieces of other experiments/abandoned mods, and it shows. So, yeah! 

 

If anyone wants to try to (re)use any of this in other mods or projects, then go for it. I'd appreciate it if you try to give me a heads up just to inflate my ego, but you don't need my permission.B)

Also if you have suggestions for how to fix any other problems I've identified drop me a comment (or a pull request) on GitHub. I don't always have the liberty to keep a watchful eye on these forums.

Edit: I added a copyright license affirming that this work is open source (and as close to public domain as I feel comfortable). Also, like I said I would, I've updated the armor system with some new parameters. I think its performing more like I intended now: very melee infantry favored.

Edited by ChronA
  • Like 2
  • Thanks 1
Link to post
Share on other sites

Nescio brought up a few really good points earlier that I wanted to explore in greater depth. I started a private conversation with them about it, but since our topics touched on some questions of general interest we agreed it might be better to continue things on the public forum instead (if anyone is still interested).

Quote

Everyone, a note on terminology: unless explicitly stated otherwise, “light” means “ranged” and “heavy” means “melee” (i.e. troops that fought in formation). The terms refer to their role on the battlefield, not to the heaviness of their arms and armour, as some people mistakingly assume.

Is there a preferred terminology then for the general durability of armament? I know there are some culture specific terms such as hoplite and cataphract that get to that idea. However, I think there is value in distinguishing the gameplay abstraction of armor strength for the historical metaphor it is supposed to represent. Perhaps you disagree though? By my own standard of evidence, armor strength was apparently not so big a deal in the ancient world.:laugh:

Quote

Me: "spear throwers have the fastest rate of fire"
Nescio: "Source, please? Picking a spear, wrapping a leather thong (the ἀνκύλε ankyle or āmentum) around it, holding it in the right place, choosing a target, lifting your arm, then throwing it, releasing the javelin while keeping hold of the strap—I fail to see how this is faster than picking a pebble from a purse and slinging it, or placing an arrow on the bow and pulling back the string."

My sources aren't great for this: mostly just comparing modern footage of archers, javelin throwers, and slingers at target practice. I do think your comparison above is somewhat unfair to the spear. At a similar granularity of action, I think slinging a stone and loosing an arrow are both about 9 distinct steps. Still it may be that you are right about the sling being as fast or faster than the spear when the aim is range and accuracy. (I feel pretty confident about the bow is the slowest of the three, although not by a tremendous amount.) Do you have any thoughts on where one could find authoritative sources about this?

Quote

Poorer people could volunteer, but were generally not expected to fight, except in emergencies (the same applies to slaves and children)—Sparta and its helots is an exception.

I think this gets to the root of our pseudo-disagreement. To me, these emergency conscripts are exactly what the weakest units in 0AD should represent. The engine clearly is neither designed nor capable of faithfully simulating large scale battles. 300 to a side is a relatively minor border skirmish, wouldn't you agree? Even the "cities" we get to build are little more than modest towns or forward garrisons. In this context I think calling out the slaves, field hands, and herdsmen to fight the enemy plundering their town makes sense (and as they gain experience or training they pick up better equipment and start looking more like proper soldiers). Your champion units are whatever combination of full-time mercenaries and local big wigs you can scrape together to fight your battle for you Seven Samurai style. To me this sort of abstracted town border-war simulator makes much more sense than insisting every fighting unit represents a proper military man out on campaign. (Just to clarify, this is my feeling based on the combat mechanics 0AD chooses to simulate. I readily acknowledge that the in game visual assets for the non-Celtic/Iberian civilization do not fit this concept so well--but that is much easier to change than reinventing the core simulation model.) I can see how most others might favor different metaphors though, as a matter of personal preference.:)

(^ I'd be dishonest if I didn't acknowledge that my nostalgia for the Myth games heavily informs my feelings about the relative merits of tactical vs strategic scale RTS combat simulations.)

  • Like 1
Link to post
Share on other sites
  • 3 weeks later...
Spoiler

 

Granted, not in the battlefield, but should give some idea.

The biggest difference should not be in the rate of fire, but in ammunition. Javelins should have 3-4 shots and take a downtime while slingers could shot non stop (but with lower damage and atrocious accuracy).

Link to post
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.

×
×
  • Create New...