[eInfo] How to limit the range of bows, and the problems that arise from it

I'm not sure if it is known, but there is a way to limit the range of bows and other ranged weapons.

For all who don't know, the bows in the game have a range entry, but it doesn't seem to do anything. However, if you use certain special abilities, like Double Strike for example, the attack range of bows suddenly get limited to the amount in the entry. That is happening, because those abilities have a line of code that forces the game to use the weapon's range. The same line can be used with the standard bow-attack, too. I tested it in the game, and it works.

All you need to do is to open up CoreSpells.xml, go to the BowAttack_* entries, and add <UseWeaponRange>1</UseWeaponRange> to each one. It should look like this:

Code: xml
  1. &lt;SpellDef InternalName="BowAttack_Basic"&gt;
  2. &lt;DisplayName&gt;Bow Attack&lt;/DisplayName&gt;
  3. &lt;Description&gt;Attack a unit from a distance with a single arrow from your bow.&lt;/Description&gt;
  4. &lt;Image&gt;Action_BowArrow.png&lt;/Image&gt;
  5. &lt;IconFG&gt;Action_BowArrow.png&lt;/IconFG&gt;
  6. &lt;IconBG&gt;Action_BowArrow.png&lt;/IconBG&gt;
  7. &lt;IconColor&gt;255,255,255&lt;/IconColor&gt;
  8. &lt;SpellBookSortCategory&gt;Unit&lt;/SpellBookSortCategory&gt;
  9. &lt;SpellBookSortSubCategory&gt;UnitDamage&lt;/SpellBookSortSubCategory&gt;
  10. &lt;SpellType&gt;Tactical&lt;/SpellType&gt;
  11. &lt;SpellClass&gt;Offensive&lt;/SpellClass&gt;
  12. &lt;SpellSubClass&gt;Damage&lt;/SpellSubClass&gt;
  13. &lt;SpellTargetType&gt;EnemyUnit&lt;/SpellTargetType&gt;
  14. &lt;HideInHiergamenon&gt;1&lt;/HideInHiergamenon&gt;
  15. &lt;IsCastable&gt;0&lt;/IsCastable&gt;
  16. &lt;IsRangedAttack&gt;1&lt;/IsRangedAttack&gt;
  17. &lt;UseWeaponRange&gt;1&lt;/UseWeaponRange&gt;
  18. &lt;GameModifier&gt;
  19. &lt;ModType&gt;Unit&lt;/ModType&gt;
  20. &lt;Attribute&gt;DefendableDamage&lt;/Attribute&gt;
  21. &lt;/GameModifier&gt;
  22. &lt;AIData AIPersonality="AI_General"&gt;
  23. &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  24. &lt;/AIData&gt;
  25. &lt;HitSoundFX&gt;Hit_Arrow1&lt;/HitSoundFX&gt;
  26. &lt;HitSoundFX&gt;Hit_Arrow2&lt;/HitSoundFX&gt;
  27. &lt;MissSoundFX&gt;Miss_Swing2&lt;/MissSoundFX&gt;
  28. &lt;SpellCastSoundFX&gt;Spell_BowAttack_BasicCast_01&lt;/SpellCastSoundFX&gt;
  29. &lt;SpellCastEffectName&gt;Arrow&lt;/SpellCastEffectName&gt;
  30. &lt;SpellCastEffectScale&gt;0.5&lt;/SpellCastEffectScale&gt;
  31. &lt;SpellCastProjectile&gt;1&lt;/SpellCastProjectile&gt;
  32. &lt;SpellCastProjectileSpeed&gt;1100&lt;/SpellCastProjectileSpeed&gt;
  33. &lt;/SpellDef&gt;

However, there are two problems with this. The first is, that the ranged mage staves use the same attack 'spell' as the bows, but they don't have a range entry. This has the effect, that the staves no longer work at range. This can be solved by adding <TacticalRange>-1</TacticalRange> to their entries in the CoreWeapons.xml. The -1 makes the range unlimited. It should look like this:

Code: xml
  1. &lt;GameItemType InternalName="Staff_Freezing"&gt;
  2. &lt;DisplayName&gt;Hailstone Staff&lt;/DisplayName&gt;
  3. ...
  4. &lt;IsAvailableForSovereignCustomization&gt;0&lt;/IsAvailableForSovereignCustomization&gt;
  5. &lt;Likelihood&gt;100&lt;/Likelihood&gt;
  6. &lt;TacticalRange&gt;-1&lt;/TacticalRange&gt;
  7. &lt;RarityDisplay&gt;Rare&lt;/RarityDisplay&gt;
  8. ...
  9. &lt;/GameItemType&gt;

The biggest problem, however, is the AI. It can't cope with the change. If your units are within range, there is no problem. However, if they are without range, the AI keeps trying to attack, but can't, effectively halting the combat. The only way out is to auto-resolve, if that happens. The AI just doesn't understand, that it needs to move closer to be able to attack. You could increase the weapon range, to try and solve this, but the only range, that is guaranteed to not pose any problems for the AI (and therefore lock the combat), is unlimited. This makes the whole change pretty much pointless, but at least it is possible.

29,271 views 37 replies
Reply #1 Top

I was wondering what was going on with bows. This is good to know.

Reply #2 Top

Quoting DsRaider, reply 1
I was wondering what was going on with bows. This is good to know.

It is not without some serious flaws. I updated the OP with my new findings. 

Reply #3 Top

Wouldn't it be easier to use some sort of range based accuracy penalty rather than a range restriction? Something like 50% accuracy reduction should convince people to move.  The AI logic becomes simple:

 

If in range of target

   move backward to edge of range radius  (maintain safe distance from melee)

   shoot

If out of range of target

   move forward towards edge of range radius (attempting to reduce range penalty)

   shoot anyway 

 

Reply #4 Top

Quoting erischild, reply 3
Wouldn't it be easier to use some sort of range based accuracy penalty rather than a range restriction? Something like 50% accuracy reduction should convince people to move.

I don't see a way to do this without applying the penalty all the time, which would seriously nerf ranged weapons, but I'm not nearly as well versed in the code as Heavenfall or SeanW3 are. Even if it is possible, the AI would still need to be taught how to deal with it, which is the reason why the original idea doesn't work.

Reply #5 Top

I tried this a few months ago, but if the AI can't use it, there is no real benefit.

Reply #6 Top

should double strike still be range restricted though?

Reply #7 Top

I actually preferred bows having a limited range.  In WOM they did have limited range.   I'm not sure why SD changed this with FE?  I wish they would at least fix it so it is moddable.

 

Reply #8 Top


they changed it because the ai was having trouble using them properly with limited range.

Reply #9 Top

If the AI can handle the limited range of throwing knives, why can't it handle bows having limited range?

Reply #10 Top

Units throwing knives are primarily melee units, so they'll anyway rush forward to attack you in close combat. Doing so they get into range for throwing knives.

Reply #11 Top

Maybe we can throw some :banhammer: s at the devs for this to be changed when the AI gets an update. Unlimited range is very powerful. Weed out the weak and make the initial damage dealt in melee combat minute can make battles brutally one sided.

Reply #12 Top

To introduce range penalties is fine, but longbows used to have range of 200 yards, a bow that could not shoot at the 50 or so steps wide battleground that are used in the game would be a pitiful toy indeed.

Reply #13 Top

I think that's a fair boon to the final rank of bow and would have no problem with it. Mounted+Charge has the ability to render range meaningless, so I don't think completely removing full battlefield range on bows is needed. On smaller tactical maps the lower rank bows might still end up having full coverage.

Reply #14 Top

Quoting Schweiz, reply 12
Maybe we can throw some s at the devs for this to be changed when the AI gets an update. Unlimited range is very powerful. Weed out the weak and make the initial damage dealt in melee combat minute can make battles brutally one sided.

Yep, I would love to see range penalties or limits imposed for this very reason.

Reply #15 Top

Why does there need to be change? The enemy AI simply needs to be changed to charge bow users. At present they stutter step at 1 square per time and that's just stupid. The AI also needs to slowly move around a tank as they fight it, right now if you stick a tank in their face between them and the archer they just stand there beating uselessly on the tank instead of moving around the tank even at one square per turn.

If you put range on bows you have to put range on spells. Don't bother, just update the AI to deal with archers properly. It already prioritizes them at range, we just need the melee troops to be updated.

Reply #16 Top

I do not think that we need range limits on bows.  We already have units that can cross most battlefields in one turn.  It would be ridiculous to have bows that can be charged from outside their range.

That said, we need a mechanism that hinders bows picking off the weakest units at their leasure.

While many TBS games have had great mechanics: cover, obstruction from units in front, shield units helping those besides them, unless the AI can be taught to understand those mechanics, there's no point in introducing them.

In a few words, unless Stardock accepts that this is a problem and does something about it, there will be no real progress.

Reply #17 Top

The problem of why there needs to be range limitations implemented is that there are several mods in the work to increase the tactical battlefield thereby allowing some differentiation between units instead of all units basically being foot.  Make that horse mean something that it can charge across a large field instead of being peppered for 3 to 4 turns by arrows.  I agree that a longbow or the yew longbow (similar to the English longbow) should not be limited from shooting most of the field, if not all; however, a short bow can not shoot all the way across a battlefield.  Basically some strategy to the whole tactical battlefield instead of stack of doom of one unit type.

Reply #18 Top

Quoting halmal242, reply 18
I agree that a longbow or the yew longbow (similar to the English longbow) should not be limited from shooting most of the field, if not all; however, a short bow can not shoot all the way across a battlefield.  Basically some strategy to the whole tactical battlefield instead of stack of doom of one unit type.

The word short bow is not an universally accepted term.  I mean, it is universally used, but not everyone means the same by it.  Many archers and more and more researchers use "short bow" to refer simply to a bow that is shorter than a particular length. A composite short bow is a superior weapon to most (some including myself think any) longbows, and should by no means have a shorter range.

But even an crappy self bow can fire a couple of arrows while a charging horse crosses its range.  And it's very unlikely that a dedicated military unit would be armed with a crappy self bow. English peasant rebels, Mongol tribesmen, Turkic nomads... all those had pretty damn good bows.  The hunting self bow was an often illegal weapon that had to be cheap and painlessly discarded.  I can imagine it on a Fallen Enchantress battlefield only as a early bow that requires no research whatsoever.  You know who would have self bows? Militia in a level 1 city.

Reply #19 Top

The tactical battles are pretty flawed and even though range on bows and spells is something that good tactical battle games have, in FE it would just cause a dominoes effect of problems.  It's so flawed, I just can't think of a way to fix it and not make the whole thing worse.  I agree in principal, but in this game the way it is, it's just not going to work.  

Reply #20 Top

Is it possible to keep the range unlimited and simply implement ranged based accuracy penalties instead?

Reply #21 Top

Quoting Tuidjy, reply 17
I do not think that we need range limits on bows.  We already have units that can cross most battlefields in one turn.  It would be ridiculous to have bows that can be charged from outside their range.

That said, we need a mechanism that hinders bows picking off the weakest units at their leasure.

While many TBS games have had great mechanics: cover, obstruction from units in front, shield units helping those besides them, unless the AI can be taught to understand those mechanics, there's no point in introducing them.

In a few words, unless Stardock accepts that this is a problem and does something about it, there will be no real progress.

This.

I don't see why the AI wouldn't be able to understand synergies.  But then, we don't really have access to the AI programming or know how it's designed, do we?

Reply #22 Top

The problem with the terms short bow and longbows you are correct in that the former is not well defined except to possibly identify a horse bow which was by necessity shorter as riding a horse did not allow the length of normal bow.  You are correct also about about he Mongols having very good bows, which if I remember without looking up they used a short recurve style bow which would is more powerful in terms of distance and damage than a standard shorter bow.  I used to do quite a bit of archery and researched some of this when I was younger but as with all data history is always evolving with new data being added or other data being proven wrong.  

A short bow could possibly shoot all the way across a field but would its arrow penetrate or would it just land and bounce by the time it got there.  I understand trajectory arcs and speed from gravemetric pull.  Basically a shorter bow would not get the arrow up high enough that when it landed on the other end at an arcing angle that it would penetrate all but the lightest armors.  That and a short bow can not shoot as long or heavy of arrows which would not have the mass to penetrate at the speed they are going when they land.  The longbow and the English longbow could put an arrow at an extreme altitude for a bow such that at its optimal height that it could land and still penetrate heavy armors at long distance, this is also because of the larger and heavier arrows used.  These bows were eventually replaced with crossbows because of the extreme penetration capabilities of crossbows and the ability to train troops to use them faster than longbows which required a lifetime to master.  

So in answer to your post I would say that we need a range limit for bows and a accuracy penalty for different distances compared to that range.  Half distance would be no penalty and anything beyond half to 75% max would be at a -10 accuracy and max range would be a -20 accuracy.  This is most likely impossible with the way the game works currently but it could be added.  This way also you could have a short bow still be able to shoot across a field but it might not do as well because it most likely not going to hit.

Reply #23 Top

Japan had 7 foot horse bows.

Reply #24 Top


yeah, and they had an odd shape for a bow too. (lower grip)

Reply #25 Top

True, I did not even consider the Japanese horse bows as they overcame the problem of length with the lower grip.  Still normally without the ability  to overcome technological hurdles in the European area, which is mostly what this game appears to be based around mounted archers used a shorter bow so less range, hence the short bow.