Page 1 of 2 12 LastLast
Results 1 to 30 of 33

Thread: Missile Accuracy: A Mystery

  1. #1

    Default Missile Accuracy: A Mystery

    So I was curious how missile weapon accuracy worked, so I started messing around in the descr_projectile.txt file.

    It quickly becomes obvious that the "accuracy_vs_units" stat is what controls accuracy, with lower numbers being better, and 1.0 being the worst. (The only thing funnier than setting a bunch of longbowmen to perfect accuracy, is setting them all to 1.0 and watching them shoot at the moon. ^_^)

    The thing that totally dumbfounds me is that many of the basic projectiles have the "accuracy_vs_units" line commented out, and some lack it entirely. These are common projectiles such as bodkin_arrow (English longbowmen), and pistol_bullet (Reiters).

    Adding the accuracy line to these weapons obviously works, but how on earth is their accuracy being determined without this line? In my testing, they seem to perform close to as if they had a 0.5 accuracy, but I've hardly done exhaustive testing.

    Anyone have a clue how this is working?

  2. #2

    Default Re: Missile Accuracy: A Mystery

    I'm sorry not to answer directly to your question, but i must point out that only Scot Guards have bodkin_arrow as projectile and french mounted archers have bodkin_horse or something.
    Changing projectile type changes a lot for a unit.
    On a side note, i realised that giving to mounted xbows the same type of projectiles as naffatun will allow them to throw bombs with their xbows. But it seems their range is capped by something other than their range stat in the EDU.
    Is there anything in the descr_projectile.txt file ?

  3. #3
    Member Member Philbert's Avatar
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    144

    Default Re: Missile Accuracy: A Mystery

    Well I work in software myself, and it is quite usual, and good practice even, that for every setting possible in the config files you create a hardcoded default value for when the setting is absent from the config file.
    It makes your software more robust to dislexic users.

    Also good practice is then to include the item commented out in the config file depicting that default value.
    Hebban olla uogala nestas bigunnan hinase hic enda thu

  4. #4
    blaaaaaaaaaarg! Senior Member Lusted's Avatar
    Join Date
    Feb 2005
    Posts
    1,773

    Default Re: Missile Accuracy: A Mystery

    My guess as well is that there is a default accuracy value for missiles if there is no accuracy_vs_units line in the projectile file.

  5. #5

    Default Re: Missile Accuracy: A Mystery

    Makes sense; this is how Windows itself works. Ever notice then when you want to change a Windows setting, you usually ADD a value to a registry key rather than MODIFY an existing one? It's because in absence of it the application default comes into play.

    I see no reason for MTW2 to work differently.

  6. #6

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by zerathule
    I'm sorry not to answer directly to your question, but i must point out that only Scot Guards have bodkin_arrow as projectile and french mounted archers have bodkin_horse or something.
    Changing projectile type changes a lot for a unit.
    On a side note, i realised that giving to mounted xbows the same type of projectiles as naffatun will allow them to throw bombs with their xbows. But it seems their range is capped by something other than their range stat in the EDU.
    Is there anything in the descr_projectile.txt file ?
    Actually, according to the export_descr_unit.txt file (which would be where to look), Longbowmen, Yeoman Archers, Sherwood Archers, Scots Guard, Retinue Longbowmen, Dismounted French Archers, Welsh Longbowmen, and Free Company Longbowmen all use "bodkin_arrow"s.

    French mounted archers use "cav_bodkin_arrow".

    I think, and I haven't messed with this at all, that the velocity of the projectile directly effects its maximum range. Try changing these in descr_projectile.txt and see if it helps.

    On topic, a default accuracy value was what I figured, too. Now I just have to test, test, test, to see if the default is better or worse than the 0.05 that basic arrows are assigned.

    Thanks for everyone's input.

  7. #7
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by zerathule
    On a side note, i realised that giving to mounted xbows the same type of projectiles as naffatun will allow them to throw bombs with their xbows. But it seems their range is capped by something other than their range stat in the EDU.
    Is there anything in the descr_projectile.txt file ?
    Yes, there is. In the descr_projectile file, for every missile type, there are entries that describe its flight. A limit for upward firing angle, downward firing angle, and a velocity amount or range. In this case, the nahptha_bomb projectile has min -60 degrees, max 70, and velocity 30 (which means it always is launched at 30 m/s). Using typical range equations from physics, you can then determine that its maximum range (always when fired at 45 degrees) is ~90 meters. That means that no matter what you change in the EDU, you'll never get the unit to fire farther than that on flat ground, because the physics of the projectile do not allow it. The easiest way to fix this would be to up the velocity in descr_projectile, which then increases the missile's maximum possible range.

    So the long and short of this is that if you're messing with projectiles, you have to make sure both the EDU and the appropriate descr_projectiles.txt entry allow for the projectile to fire the maximum distance you want. Ideally the two ranges are nearly identical, however the EDU entry could be shorter to account for a limit imposed by the user of the weapon. For instance a cannon crew might be trained to know they can't hit anything outside 300 meters even though their cannon can fire 600, in which case it makes sense to have the EDU at 300 so they simply won't fire past that distance, even though they technically could do so with the weapon.


    See my Sig+ below! (Don't see it? Get info here)

  8. #8

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Foz
    In this case, the nahptha_bomb projectile has min -60 degrees, max 70, and velocity 30 (which means it always is launched at 30 m/s).
    So if Naffatun were limited to a 40 m range on flat ground (the default), does that mean it can't fire at an angle higher than ~13 degrees (assuming no obstructions and stationary target)?

    If so, does that mean a Naffatun's range on high ground equals how far he can throw at ~13 degrees and 30 m/s?

    Also, how does the game take into account various other factors like rain, the slope of the ground and the height of the soldier's weapon?
    Last edited by Miracle; 06-14-2007 at 04:38.

  9. #9
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Miracle
    So if Naffatun were limited to a 40 m range on flat ground (the default), does that mean it can't fire at an angle higher than ~13 degrees (assuming no obstructions and stationary target)?
    Looks like it. If you assume obstruction, then it actually couldn't fire at all. See, if an angle similarly close to 90 degrees were also available (i.e. 77 in this case) then it would have the option of using <=13 and >=77 which would allow high arching shots to go over obstructions if needed, but as nothing in the second range is a legal value, only 13 degrees or less can be used. Anything else in the valid range (13, 70] causes a 30 m/s shot to go further than 40 m, and therefore is not ever able to be used due to the EDU limitation.

    If so, does that mean a Naffatun's range on high ground equals how far he can throw at ~13 degrees and 30 m/s?
    This opens a can of worms. The problem is, I am uncertain as to the exact meaning and implications of the EDU's range setting. It could be a horizontal bound for targeting purposes. OTOH it could be an exact distance measurement between firing point and target. In the first case, the projectile can make a longer flight, but its actual horizontal range is no longer since it will be bounded in the target's horizontal direction at 40 meters of motion regardless of vertical travel. In the second case, height would actually be a disadvantage, as any vertical displacement would mean a longer hypotenuse on the distance triangle, actually taking away range the higher the firing unit was. I rather doubt that's how they've implemented it though. I'm sure there are other possibilities too, but as far as I can tell no possibility produces the correct range increase from an elevated firing position, because the EDU range values are generally arbitrarily shorter than the physical limitations on the projectiles. The result is that no matter how it is implemented, height-advantaged units gain no extra range because the physics advantage is simply cut off by the EDU's lower range requirement.

    So in-game the Naffatun's range on high ground is probably identical to its range on flat ground, or could actually be lower. From what I can piece together about the EDU's range stat, they'd actually have to fire at a lower angle than 13 degrees if elevated above the target, because a similar range limitation will still exist from the EDU.

    I suppose one of the other possibilities for the EDU range listing is that it could be the limitation assuming flat ground, in which case you would be correct that a shot at ~13 degrees would give their best range shot then. It should be noted that that's likely the most positive outlook, and several less favorable possibilities (some above) exist.

    Also, how does the game take into account various other factors like rain, the slope of the ground and the height of the soldier's weapon?
    Rain I believe simply has a given negative impact on projectile effectiveness. There's a toggle that controls whether or not a projectile is affected by rain, and since it doesn't list degrees, I'm inclined to think that any that are affected are modified by a given constant amount. This is further reinforced by noticing that projectiles in rain do not appear to lose accuracy, but certainly seem to kill far less men when they hit them.

    Slope as far as I'm aware is not considered, unless it is possibly taken into account w/ respect to weapon orientation. That really depends on whether or not the projectiles are taken w/ respect to the firing weapon, or w/ respect to the coordinate system. In the former obviously slope would directly shift the projectile's range of possible motion and flight path, while in the latter it would have no effect and every shot would be essentially the same as one from a flat level piece of ground. It's sort of an interesting question, since men generally remain directly upright w/ respect to gravity, where a cannon would actually lay along the terrain... so in reality men should use the second method and always act like they are level, while equipment would use the first that accounts for the facing the terrain would cause.

    Lastly the physics engine in the game seems very well done, so I will say with 95% certainty that the projectile is tracked from the height the soldier is supposedly firing it from. In the case of many of them, that would mean you have projectile motion beginning from about the height of a man, not ground level, and from observing the game engine it sure looks like the height of the weapon is entirely accounted for in the motion of projectiles.


    See my Sig+ below! (Don't see it? Get info here)

  10. #10

    Default Re: Missile Accuracy: A Mystery

    Thanks for the detailed response.

    The EDU's range setting is most likely the first case in that it restricts the range at which a unit can begin their firing animation. I've seen Naffatun throw at angles higher than 13 degrees, but only when their target is moving away from them and the Naffatun had already begun their throwing animation. In this situation their range is bounded only by the game physics; if a heavy cavalry unit traveling away at a speed of 7 m/s were targeted at exactly 40 m away by a Naffatun unit, the Naffatun could theoretically reach their maximum physical range of ~90 m if their firing animation took about 3 seconds:

    firing_animation_time = 50/(415/60) - 90/30/sin(45) = 3

    That means crossbowmen, who by default have a low firing angle and a long reload time, could reach artillery-like ranges if they targeted a routing fast mover.

    Quote Originally Posted by Foz
    The result is that no matter how it is implemented, height-advantaged units gain no extra range because the physics advantage is simply cut off by the EDU's lower range requirement.
    I'm fairly sure the game modifies it in real-time based on some formula that involves Δy (height above datum plane). It would probably look like this:

    Range = DefaultRange + (1/g)*(v*cos(θ)*sqrt((v*sin(θ))^2 + 2*g*Δy) - 0.5*sin(2*θ)*v^2)

    Where θ = default firing angle at max range on flat ground against stationary target

    This is assuming the soldier is firing upright.

    Since soldiers on a hill will fire at a clearly positive angle when a unit reaches its range, I do not believe the EDU range is a hard-set limit. Otherwise, they would have to fire at a lower angle as you suggested.

    If the game portrayed physics as well as you say, then "slope-hugging" missile units like artillery and missile cavalry could theoretically reach very long ranges. They would have to be just before the crest of a hill such that they are facing up at an angle equal to 45 - θ. The height advantage of the hill combined with a starting firing angle of 45 degrees to the horizontal should increase their range dramatically beyond the default EDU value. When you consider that the projectile comes down at an angle near or close to the vertical slope angle of the hill, this becomes a very good battlefield tactic.
    Last edited by Miracle; 06-14-2007 at 08:15.

  11. #11
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    So then the question is how do we determine if that is what is really happening? There's no good way to measure anything on the battlefield that I can think of, so we'd have to devise some way to make any difference induced by moving a unit onto a hill easily observable.

    One possibility I've thought of is to examine the apparent range of the unit without firing it at anything. When a missile unit is selected, the game generally tells you whether the mouse is hovering inside its allowable range or not (IIRC green indicates in range, red out of range). Note this isn't just when attacking - even when the cursor is giving a movement icon, it changes color to indicate in and out of range. So, using a sufficiently elevated terrain feature, it should be possible to simply eyeball the effect. If height is allowing additional range in any way, such an elevated position should affect it dramatically enough to be noticed.


    See my Sig+ below! (Don't see it? Get info here)

  12. #12

    Default Re: Missile Accuracy: A Mystery

    You could use the "Fortress" skirmish map : there is a nice "cliff" from where you can shoot.

  13. #13

    Default Re: Missile Accuracy: A Mystery

    Ok I've thought of a way to precisely measure any range increases due to height:
    1. Deploy a missile unit diagonally away from a target on Grassy Field. Try to keep the missile unit facing its target when the battle begins.
    2. Keep your cursor over the target
    3. When the cursor turns green (and the firing icon appears on your missile unit), pause the game
    4. Zoom your mini-map to the closest zoom level and make sure both units appear on it
    5. Take a screenshot
    6. Go to Paint and paste the screenshot
    7. Crop the image using rectangle select and Ctrl-x/n/v, making sure to have one corner on your missile unit in the mini-map and the opposite corner on its target
    8. Save the picture and open its properties
    9. Use this formula to compute pixel range:
      pixel range = sqrt(imagewidth^2 + imageheight^2)
    10. Repeat above steps except give your missile unit a height advantage on a different map

    Here were my pixel range results using Scots Guards vs. Imperial DFK's on Grassy Plain and then on Saharan Sands (Southwest hill):

    Grassy Plain: 110 pixels
    Saharan Sands SW hill: 125 pixels

    Note that I did not deploy the Guards on the very top of the hill.

    So this provides a pretty convincing proof that height does increase horizontal range.

    If we were to also assume that my physics assumptions were correct, then theoretically one could calculate the approx. height advantage in meters given initial projectile velocity and EDU range.

    I also recently tested my behind-the-hill theory. It doesn't work with low-θ artillery and missile cavalry; they seem to need a clear line-of-sight. It seems to work with high-θ cavalry but gameplay-wise it's not a good idea to deploy them in this way.
    Last edited by Miracle; 06-15-2007 at 01:16.

  14. #14

    Default Re: Missile Accuracy: A Mystery

    Frankly, I'm stunned that there's any question about this.

    Try this: Start a battle on the Carpathia map. Set up one unit of peasant archers on top of that HUGE hill just to your rear.

    Give the AI one unit of peasant archers, as well.

    I just did this, and I got off SEVEN full volleys while the enemy was moving (at a dead run) to a range that they could fire at. Seven.

    That doesn't give any actual numbers, of course, but it shows there's no question at all that height increases range.

    Try trebuchets or cannons on the same position on the same map. It's awe inspiring to watch them shoot so far.

    On the subject of where the shot is calculated from, height-wise, it is assuredly calculated from the height of a soldier's firing arm. This is shown by the notes in descr_projectile.txt that explain that rocket launchers have to have limits to their spread, so that a rocket doesn't land at the feet of the crew and kill them all, while elephant rockets don't have the same problem, due to being fired from higher off the ground.
    Last edited by Rhedd; 06-15-2007 at 02:59.

  15. #15

    Default Re: Missile Accuracy: A Mystery

    I believe that velocity and angle have an effect on accuracy that is why arrows cant be 100% accurate but rockets and musket shots can.
    and there is no limit of range to any weapon.

  16. #16
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: Missile Accuracy: A Mystery

    This was all covered in detail in the tutorial for STW, height gives benefits to range and morale. Just as marching up hill increases fatigue along with rain, snow and desert.
    Didz
    Fortis balore et armis

  17. #17
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Rhedd
    Frankly, I'm stunned that there's any question about this.

    Try this: Start a battle on the Carpathia map. Set up one unit of peasant archers on top of that HUGE hill just to your rear.

    Give the AI one unit of peasant archers, as well.

    I just did this, and I got off SEVEN full volleys while the enemy was moving (at a dead run) to a range that they could fire at. Seven.

    That doesn't give any actual numbers, of course, but it shows there's no question at all that height increases range.

    Try trebuchets or cannons on the same position on the same map. It's awe inspiring to watch them shoot so far.

    On the subject of where the shot is calculated from, height-wise, it is assuredly calculated from the height of a soldier's firing arm. This is shown by the notes in descr_projectile.txt that explain that rocket launchers have to have limits to their spread, so that a rocket doesn't land at the feet of the crew and kill them all, while elephant rockets don't have the same problem, due to being fired from higher off the ground.
    Actually, this doesn't demonstrate that the unit is allowed to fire from any further away at all, it only demonstrates that the unit climbing the hill can't fire from the same distance the one above it can, which we can easily determine through physics anyway. What you noted happens whether or not the EDU's range numbers come into play at all, and can be a direct result of the descr_projectile.txt specs for each projectile, so you can't use these results to say anything about the effect of the EDU's range numbers. OTOH what we're trying to prove is whether or not the unit is allowed to actually fire on a target further away when it is elevated above the target than it can when on the same level as the target. As you can see it is a more difficult question than the one you answered.

    Miracle's test above, however, seems to have some merit to it. Really makes me wonder how the game is determining whether or not a unit can fire on another when height differences are involved.


    See my Sig+ below! (Don't see it? Get info here)

  18. #18
    Corrupter of Souls Member John_Longarrow's Avatar
    Join Date
    Dec 2006
    Location
    Be it ever so humble, there's no place like the Abyss...
    Posts
    267

    Default Re: Missile Accuracy: A Mystery

    Just to add to the issue, I'm playing a game as Milan right now. As such I've got LOTS of crossbows and I use them in preference to normal infantry. As such, I get to spend a lot more time keeping an eye on when targets get in range than I would otherwise. Because of that, I've noticed that my crossbows will normally start firing if on autofire BEFORE I get the green bow icon if the crossbowmen are on top of a hill. As such the conclusion I've come to is height does increase your missiles range and your archers/crossbowmen can figure this out. Its only the user interface that has a problem with this.

  19. #19

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Foz
    Actually, this doesn't demonstrate that the unit is allowed to fire from any further away at all, it only demonstrates that the unit climbing the hill can't fire from the same distance the one above it can, which we can easily determine through physics anyway. What you noted happens whether or not the EDU's range numbers come into play at all, and can be a direct result of the descr_projectile.txt specs for each projectile, so you can't use these results to say anything about the effect of the EDU's range numbers. OTOH what we're trying to prove is whether or not the unit is allowed to actually fire on a target further away when it is elevated above the target than it can when on the same level as the target. As you can see it is a more difficult question than the one you answered.

    Miracle's test above, however, seems to have some merit to it. Really makes me wonder how the game is determining whether or not a unit can fire on another when height differences are involved.
    Okay, okay. This is starting to make me roll my eyes, but let's add another demonstration to the one I stated above...

    One unit of peasant archers (the same used before) vs one unit of any infantry with a "standard" movement rate, on Grassy Plane.

    Opening fire at maximum range on flat ground, the archers get a total of five volleys before the enemy makes melee contact. Five.

    So, on flat ground the peasant archer's range is sufficient to get FIVE full volleys before a target (who didn't even bother to run for three volleys) moves into MELEE range.

    The same unit on high ground gets SEVEN volleys before an enemy moves into BOW range.

    Empirical evidence FTW!

  20. #20
    Confiscator of Swords Member dopp's Avatar
    Join Date
    Jun 2005
    Posts
    702

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Rhedd
    Empirical evidence FTW!
    Not necessarily. The steep slope may just make it more difficult for the enemy to reach the archers. Did they start running faster around the third volley, or did they continue marching because of the incline?

  21. #21
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by dopp
    Not necessarily. The steep slope may just make it more difficult for the enemy to reach the archers. Did they start running faster around the third volley, or did they continue marching because of the incline?
    Thank you for that Dopp. I was thinking it, but really wanted to avoid harassing Rhedd again - I'd sound pretty base at that point.


    See my Sig+ below! (Don't see it? Get info here)

  22. #22

    Default Re: Missile Accuracy: A Mystery

    Heheh. Don't worry about that, Foz. I am seriously difficult to offend/annoy/"harass". And, as I said to Kobal2fr, recently, I hope I don't come off sounding asinine, myself.

    The funny thing is, I had actually included in my post a line predicting that you'd say that, and that it wasn't the case, but I decided that it sounded too snarky, and removed it. Guess I should've left it in. ^_^

    To answer Dopp's question, no, they don't start running after the third volley, like the flatland melee troops. They consistently start running after the FIRST.

    But, so as not to make the same mistake as I did with my last post, I feel compelled to point out that you can now say that doesn't really disprove your point, because perhaps they run at a slower pace due to the incline.

    Watching the tests it seemed obvious that the increase in the number of volleys loosed on the approaching enemy was due to range, not a slower advance by the enemy. Now, this might be a rather difficult thing to "prove", since you can't exactly time the advance, due to the obvious differences in distance. (The length of the "advance" can't be defined by the starting positions or by recieving the first volley, since both of those distances obviously differ in the flat and hilltop tests.)

    Nevertheless, I'm still sticking to my view that it's obvious that height effects range.

    By the way, I'm not ignoring you Didz, I just think that the fact that something was true in STW doesn't necessarily make it true in M2TW.

    EDIT: My wife, reading this discussion over my shoulder, thinks we're all silly for arguing, by the way. She rightfully points out that no matter the physics behind it, placing missile troops on hills obviously gives a substantial advantage. Being men, though, we are, of course, going to continue discussing how. ^_^
    Last edited by Rhedd; 06-17-2007 at 12:01.

  23. #23
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: Missile Accuracy: A Mystery

    Well I'm with Rhedd on this point. There is no question that missiles carry farther when fired from higher ground. It was specifically demonstrated in the original STW tutorials and has been true in every TW game since.

    The 'target in range' sensor 'green arrow' understands this and will flash green at the effective range that missiles can reach the target which is actually slightly less than their maximum range, and the fire at will control will therefore kick in earlier if the unit is on higher ground than its target.

    Interestingly, the maximum effective range of a missile used by the target sensor is not the maximum missile range, particularly for black powder weapons and you will see shot carry much farther and kill enemies far beyond the allowed distance.

    What puzzles me is why people think this has changed. Is there any justification for this?

    I know other things have been dumbed down for MTW2 like morale and fatigue. And more recently John has highlighted in his thread that the expereince system has been undermined presumably to make the game easier to understand for junior players, but is there any evidence that they have also nerfed the terrain effects too?

    Quote Originally Posted by Foz
    Actually, this doesn't demonstrate that the unit is allowed to fire from any further away at all, it only demonstrates that the unit climbing the hill can't fire from the same distance the one above it can, which we can easily determine through physics anyway.
    If what you are trying to test is whether the unit on high ground gets the 'Green Arrow' earlier than it would if it were on lower ground then surely the simple solution is to pitch two units of exactly that same type against each other and see if the one of the hill starts firing first. If it does then it obviously got the 'Green Arrow' first.

    I've certainly fought battles on the coastal mountains of northern Spain and had camel gunners firing at targets on a beach half way across the map. In fact my issue would be whether at that range a musket ball would still have enough kinetic energy to do any harm.
    Last edited by Didz; 06-17-2007 at 12:18.
    Didz
    Fortis balore et armis

  24. #24

    Default Re: Missile Accuracy: A Mystery

    Ooh, why didn't I think of that test earlier, Didz? I feel stupid. ^_^

    Okay, Carpathia map, English longbowmen on the top of the huge hill, and another unit at the base of the hill. One unit of approaching (and unfortunate) Scots.

    The Longbowmen on the TOP of the hill started firing FIRST.

    Keep in mind that the slope of that hill accounts for a lot of horizontal distance. If you center your view over one unit of archers, with the unit detail set to "highest", the other unit are still just sprites. That makes the longbowmen at the foot of the hill nearly a shortbow shot closer to the target, and yet the higher group started firing first.
    Last edited by Rhedd; 06-17-2007 at 13:27.

  25. #25
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: Missile Accuracy: A Mystery

    What I was suggesting was in effect a unit of peasant archers on top of the hill and another at the foot. In theory both units should be able to fire at each other at the same range, but if the height makes a difference the ones on the hill should fire first.

    To be strictly fair you would need to play through the test twice, once commanding the archers on the hill and next the archers on the lower ground. Just to make sure that some sort of AI penalty is not causing the delay in firing.

    In STW this was definately the case and Samurai archers fired much earlier on high ground.
    Last edited by Didz; 06-17-2007 at 14:35.
    Didz
    Fortis balore et armis

  26. #26
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Didz
    What I was suggesting was in effect a unit of peasant archers on top of the hill and another at the foot. In theory both units should be able to fire at each other at the same range, but if the height makes a difference the ones on the hill should fire first.

    To be strictly fair you would need to play through the test twice, once commanding the archers on the hill and next the archers on the lower ground. Just to make sure that some sort of AI penalty is not causing the delay in firing.

    In STW this was definately the case and Samurai archers fired much earlier on high ground.
    As I mentioned earlier, the problem with this method is that the physics in the descr_projectiles file dictate that the unit on lower ground cannot fire from as far away as the one on the hilltop. This we know, and is not a point in contention. Any parabolic weapon loses range when firing upward. However, if the effective range due to physics for the lower unit is below the limit supposedly imposed by the EDU, then this test only proves that physics work, and nothing more. In short, the difference you notice could be simply because the high unit is limited to its 120 range, while the low one (due to physics) must close to 60 in order to fire. That they are different does not indicate the EDU range limitation is being ignored or modified by the high-ground unit.

    The effect (or lack thereof) of the limits in the EDU on the scenario for the hilltop unit, though, is what I'm driving at. We know that a hilltop unit will at least be able to fire at the lower unit at its maximum range, listed in the EDU. The question, however, is whether it is allowed to fire beyond that maximum range in the EDU, via the physics description of its projectile in the descr_projectile file... and if so, how does the game determine the exact amount more that it is allowed to fire? Clearly the EDU bound is not ignored entirely, as units on flat ground can shoot significantly farther than the distance they will target at, as evidenced by shots hitting fleeing enemies at great distance. This clearly shows the EDU limit is invoked somehow. Math dictates that a unit can fire substantially farther distances when in a raised firing position... so I'm simply questioning whether THAT is reflected in the game (and thus units would fire further than their EDU stats claim they should, when they are on high terrain).

    I find it especially interesting that someone earlier reported archers firing on auto-fire when the cursor indicated they could not target the unit(s). This could indicate disparity between the auto-fire feature's targeting method and the cursor's targeting method - and if it's the case, I would guess auto-fire strictly uses physics, while the cursor invokes the EDU limit as well. We've seen disparity in other areas of the game design, so it's certainly not out of the realm of possibility here, either.


    See my Sig+ below! (Don't see it? Get info here)

  27. #27
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Foz
    As I mentioned earlier, the problem with this method is that the physics in the descr_projectiles file dictate that the unit on lower ground cannot fire from as far away as the one on the hilltop. This we know, and is not a point in contention. Any parabolic weapon loses range when firing upward. However, if the effective range due to physics for the lower unit is below the limit supposedly imposed by the EDU, then this test only proves that physics work, and nothing more. In short, the difference you notice could be simply because the high unit is limited to its 120 range, while the low one (due to physics) must close to 60 in order to fire. That they are different does not indicate the EDU range limitation is being ignored or modified by the high-ground unit.
    I'm confused, you obviously have a far more detailed understanding of how the game works than I do. I have no idea what EDU is for instance even though I read an attempt at explaining it in an earlier post.

    The way I see it this whole issue is a matter if physic's. As you say any parabolic weapon weapon gains range when fired from height and loses it when fired at a target on higher ground. Thats why archers on high ground in the game fire farther than archers on low ground, so if we all accept that this is true what exactly is the issue?

    Or is the issue that you don't beleive the unit on high ground fires any farther than it would if it was on level ground?

    If so then we need to establish a simple test which places two identical missile units side by side but with one oat ground level and the other on high ground and advance an enemy unit at each and see if there is any difference in when the two units begin firing.

    Perhaps the best way to do this would be to use a wall, one unit on the wall and another placed in line with it but on the ground. This would mean using the corner of a castle wall so that the ground level unit can be positioned on exactly the same frontage. It could either be run as two seperate tests on the same map and then screen shots compared or if your lucky run simulataneously using one enemy unit to attack both archer units.
    Didz
    Fortis balore et armis

  28. #28
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Missile Accuracy: A Mystery

    Quote Originally Posted by Didz
    I'm confused, you obviously have a far more detailed understanding of how the game works than I do. I have no idea what EDU is for instance even though I read an attempt at explaining it in an earlier post.

    The way I see it this whole issue is a matter if physic's. As you say any parabolic weapon weapon gains range when fired from height and loses it when fired at a target on higher ground. Thats why archers on high ground in the game fire farther than archers on low ground, so if we all accept that this is true what exactly is the issue?
    Okay, I'll try to explain better. Two things governor the firing of a ranged unit: the type of projectile it fires, and the specifications for its weapon/skill with that weapon. The former is detailed in descr_projectiles.txt, and represents the physical limitations of a given projectile type. Detailed are its maximum firing angle, minimum firing angle, and velocity (can be an allowable range, or just a flat amount). This file is responsible for how projectiles behave w/ respect to physics.

    The latter, however, is all detailed in the EDU - export_descr_unit.txt. Each unit has a stat_pri entry that details the following:

    ; stat_pri From left to right
    ; attack factor
    ; attack bonus factor if charging
    ; missile type fired (no if not a missile weapon type)
    ; range of missile
    ; amount of missile ammunition per man
    ; Weapon type = melee, thrown, missile, or siege_missile
    ; Tech type = simple, other, blade, archery or siege
    ; Damage type = piercing, blunt, slashing or fire. (I don't think this is used anymore)
    ; Sound type when weapon hits = none, knife, mace, axe, sword, or spear
    ; Optional. Name of effect to play when weapon fires
    ; Min delay between attacks (in 1/10th of a second)
    ; Skeleton compensation factor in melee. Should be 1

    As you can see, one entry is "range of missile." In practice, it is this number, not the actual physical limitations of the projectile, that determine how far it is allowed to shoot, at least on flat ground.

    The question, then, is how that limitation is applied when the units are NOT on flat ground. Various possibilities could limit the range to exactly the same amount, or various amounts more than the listed number in the EDU, depending how the game implements the calculation. It is that calculation, and the corresponding actual horizontal range of the unit when it is elevated, that we are trying to determine, because by definition that will tell us whether or not the unit is actually capable of firing further from a higher position. It may be the case that a raised unit is limited to the exact same range, the one listed in the EDU.

    Or is the issue that you don't beleive the unit on high ground fires any farther than it would if it was on level ground?
    You are correct that this is the primary thing in contention - whether or not the current firing rules allow an elevated unit to fire beyond the listed EDU "range of missile." That would be necessary to establish that height actually lengthens the range of a missile unit. OTOH I don't honestly believe anything about this issue right now. I am, however, inclined to challenge claims of "proof" if they in fact do not have sufficient evidence behind them to warrant the conclusions being drawn.

    If so then we need to establish a simple test which places two identical missile units side by side but with one oat ground level and the other on high ground and advance an enemy unit at each and see if there is any difference in when the two units begin firing.

    Perhaps the best way to do this would be to use a wall, one unit on the wall and another placed in line with it but on the ground. This would mean using the corner of a castle wall so that the ground level unit can be positioned on exactly the same frontage. It could either be run as two seperate tests on the same map and then screen shots compared or if your lucky run simulataneously using one enemy unit to attack both archer units.
    That sounds like a great idea. The reason something like that isn't done already is probably that I enjoy such discussions as this a bit too much. Plus, I'm a mite lazy. The combination of the two means I have little ambition at this point for running such a test. If you decide to, let me know how it goes, I would love to see results. As much fun as this is, I believe we've soon wrung all the value out of this discussion, and I'm sure everyone is keen to hear a definitive answer.


    See my Sig+ below! (Don't see it? Get info here)

  29. #29

    Default Re: Missile Accuracy: A Mystery

    Yep, Didz, two identical units firing on each other was my first illustration, and it was discounted because of the possibility that it was the lower unit being effected, not the upper one. ^_^

    EDU, by the way, is just a shorthand name for the export_descr_unit.txt file, which defines the majority of unit capabilities, including a line about maximum missile range. This value apparently conflicts with the physics-derived maximum projectile ranges defined in descr_projectile.txt, and so is a point of confusion.

    So, did everyone miss my test in post #24?

    Two identical units firing on the same target. One unit on a hill, the other substantially closer to the target, but on level ground. The higher (farther) unit was capable of firing on the target first.

    No solid numbers, distances, or formulae, there, but indisputable proof of a range increase on higher ground.

    EDIT: Foz snuck a post in while I was posting. ^_^
    Last edited by Rhedd; 06-18-2007 at 01:23.

  30. #30
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: Missile Accuracy: A Mystery

    Thats what I would expect to happen from empirical evidence of using missile units on high places. Not sure what these EDU figures are doing, unless they represent a point at which a missile would lose so much kinentic energy that its flight would cease to gain forward momentum.
    Quote Originally Posted by Foz
    As you can see, one entry is "range of missile." In practice, it is this number, not the actual physical limitations of the projectile, that determine how far it is allowed to shoot, at least on flat ground.
    Well I'm going to stick my neck out and say that in my opinion it can't be. Simply because from the evidence of my own eyes its not the way the game works in play.

    This thread contains images of camel gunners firing from a mountain top at English knights on a beach below. https://forums.totalwar.org/vb/showthread.php?t=85272. The question is whether the range is being limited by 'range of missile' or by the routine which handles missile flight trajectory. If it were the former then I would expect the missiles to simply dissappear in flight, regardless of whether they hit anything (like the ground) but in this instance they were definately carrying the full distance until the hit terra firma. The other interesting thing to note is that the horizonal distance between the camel gunners and the English, as depicted on the mini-map, doesn't look that great, so possibly the 'range of missile' is merely working on horzontal distance to target within which a missile unit will be allowed to target and shoot, and ignoring the distance the projectile will actually travel once it is fired.

    In fact my purely empircal assessment of watching missile troops fire is that in some cases the range gained by missile units on high ground is too great. It might be physically correct to assume that a musket ball can carry a huge distance if fired from a mountaintop but to suggest that the musketeer could actually aim at a target from that distance, or expect a ball to peirce flesh at that range is less certain. Also a stated elsewhere the vertical scale used on battlefields is exaggerated so that unless the physical flight routine is adjusted to compensate the affects of height must also be exaggerated.

    Is there any way of determining how this 'range of missile' is used within the code, if its used at all?

    Or indeed what the range is in terms of battlefield distance?

    and do all missile units have it?

    BTW: Anyone here who uses the DEL key during battles to track the passage of missiles in flight will know that with artillery in particular you do occassionally get a rogue shot which skips right across the battlelfield off the other side and a mile or so into the background terrain. I always assumed that this was simply a particularly tough cannon ball that richoceted for longer before fracturing but perhaps its some mathematical quirk thrown up by the missile fire routine that CA wanted to suppress for archers, crossbowmen and other hand held missiles. After all having an odd cannnon ball bounce for miles is amusing but it would look a bit odd if it was an arrow.
    Last edited by Didz; 06-18-2007 at 11:47.
    Didz
    Fortis balore et armis

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO