Accuracy system
Moderator: Moderators
Accuracy system
The idea is to add a random chance for a weapon to miss that can be varied by the circumstances and applied to all weapon types (some weapontypes like beamlasers, guided missiles and flamethrowers cannot be made inaccurate ATM).
Basically both the weapon and the target have a hit ratio (usually between 0.0 and 1.0) with a falloff value that defines how range influences this, on a shot the ratios are multiplied, a random number between 0 and 1 rolled and:
If the random number is less than the ratio: The weapon is fired accurately, receives a spread angle of less than atan(target radius / target distance).
Otherwise: The weapon receives a spread angle of greater than atan(target radius / target distance), in the case of a guided missile an invisible flare is launched in a random direction instead and the missile locks onto that flare.
The weapon should have modder-definable multipliers for the spread angle in either case (so e.g. misses can miss by at least 5 metres while hits are only fired at the central 5% of the target hitsphere).
The COB could set variables that control both a weapon's hit ratio (per weapon, possibly as a multiple of the weapon's fbi-defined hit ratio) and the hit ratio enemies get against this unit. This would allow e.g. movement or smoke grenades to increase the chance of a miss or maybe give an accuracy boost if the unit had enough time to get prone.
I realize there's accuracy on the move and spread angles but those don't differentiate between targets and have a fixed accuracy decay for larger distances.
Basically both the weapon and the target have a hit ratio (usually between 0.0 and 1.0) with a falloff value that defines how range influences this, on a shot the ratios are multiplied, a random number between 0 and 1 rolled and:
If the random number is less than the ratio: The weapon is fired accurately, receives a spread angle of less than atan(target radius / target distance).
Otherwise: The weapon receives a spread angle of greater than atan(target radius / target distance), in the case of a guided missile an invisible flare is launched in a random direction instead and the missile locks onto that flare.
The weapon should have modder-definable multipliers for the spread angle in either case (so e.g. misses can miss by at least 5 metres while hits are only fired at the central 5% of the target hitsphere).
The COB could set variables that control both a weapon's hit ratio (per weapon, possibly as a multiple of the weapon's fbi-defined hit ratio) and the hit ratio enemies get against this unit. This would allow e.g. movement or smoke grenades to increase the chance of a miss or maybe give an accuracy boost if the unit had enough time to get prone.
I realize there's accuracy on the move and spread angles but those don't differentiate between targets and have a fixed accuracy decay for larger distances.
Basically both the weapon and the target have a hit ratio (usually between 0.0 and 1.0) with a falloff value that defines how range influences this, on a shot the ratios are multiplied, a random number between 0 and 1 rolled and:
Imagine the same but modifying the damage output instead of accuracy by firing range.
Needed tags:
dynamicDamage: enabled/disabled
minRange: 100% damage applied from point blank to minRange
minDamage: x% damage applied at weapon's maximum range
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Yeah, but that's not what I'm on about. Minimum firing range for the damage multiplier, i.e. distance between firing vector to target vector > minRange makes the damage multiplier kick in and in-/decrease damage. Actually some sort of effective range would be better I think.
Weapon range = [2000], effective range = [500] to [1500]
Then you'd need a mutliplier for 0 to [500] and one for [1500] to [2000]
So shooting stuff at point blank may cause little damage as well as maximum range. Well okay this brings up new problems... how do you get your unit move into enemy range other than a dummy weapon?
Uh... I'm kinda stealing the thread.
About the accuracy system, something such as hit or no hit based on distance and occasional randomness would be cool indeed. I don't like it that weapons either have to hit or won't be able to hit their target at all.
This would probably bring quite some mods one step closer to realistic combat. In fact units should have a defence and attack value to influence their ability to hit.
Weapon range = [2000], effective range = [500] to [1500]
Then you'd need a mutliplier for 0 to [500] and one for [1500] to [2000]
So shooting stuff at point blank may cause little damage as well as maximum range. Well okay this brings up new problems... how do you get your unit move into enemy range other than a dummy weapon?
Uh... I'm kinda stealing the thread.
About the accuracy system, something such as hit or no hit based on distance and occasional randomness would be cool indeed. I don't like it that weapons either have to hit or won't be able to hit their target at all.
This would probably bring quite some mods one step closer to realistic combat. In fact units should have a defence and attack value to influence their ability to hit.
Guessmyname wrote:Damage dependant on range I would quite like
Already semi-possible using dirty hax. Its not as good as a smooth scaling tag would be (which we'd love :D), but by giving a unit three (or more, depending on how many gradations you want to do) weapons that look identical but with different damages, you can approximate this effect. The trick is to set them with descending ranges - one long range weapon, one medium range weapon, one short range weapon. Then, in the script, have each shorter range weapon lock the longer ones above it. So when the long range weapon is active, any of them can fire; when the medium range weapon is active, the short range and the medium range one can fire, and when the short range one is active, only that one can fire.
and poof, you have range dependant damage. Although in a very inefficient and hackish way - a tag that smoothly scaled weapon damage depending on range would be lovely.
I like the people who complain about random number accuracy systems.. Let me quickly outline why such a system would be useful in spring..
Accuracy as we know it in real life is based on the hand eye coordination of people and or the equipment they are using, however physics has alot of variables that can throw stuff of, and even with missiles/bombs and rangefinders there is still a small amount of guess work/mechanical failure. In essence the reason stuff misses in real life is because of an extremely complicated set a variables that even science could not put into a single equation.
Spring does not by any stretch of the imagination use a completely realistic physics system, nor does any game by really. It instead uses a "dumbed" down version of newtonian physics to figure out how stuff would end up acting, this version is barebones enough that your computer does not choke trying to do the calculations. This however is a two edged sword, because as the number of variables had been reduced to a small number to make it easy to run, it also makes it easy to break the system. Essentially all the units in spring have Aim bots, they can easily calculate where to fire a weapon to hit a target because there are only a few variables needed to understand. In addition to this is the fact that the ranges and speeds of objects in spring are not in any way realistic or even near realistic, battles in real life take place over several miles, battles in spring take place over several dozen yards at best. Applying realistic ranges would be near impossible as you could only play on a 40x40+ map with like 5 units given the extreme range they can fire. What this means is that units in spring are generally not very fast moving, do not have to shoot very far to hit stuff and do not have to track very fast moving targets. This means that unless you make the projectile a unit is firing incredibly slow moving, or slow firing pretty much any unit can hit any other unit almost spot on a good deal of the time, more often than would be thought given the weapons. This ends up with units like aircraft often being shot at by units that in a more realistic setting would have no chance of hitting them.
We already have a couple of tags that apply random "innacurracy" to weapons, tags like spray angle and accuracy, these fudge the numbers when a unit fires and make the shot go off center of the actual line of fire. This however is not specifically enough all the time.
Given these circumstances it might be nice to have the ability to dictate the accuracy of a certain weapon against a certain unit via armor or some other method, so that we can "fake" the innaccuracy of things like main battle tank cannons vs aircraft or some other things that cannot be easily done without creating odd looking firing..
In addition it would be nice if we could give some sort of inaccuracy to missiles beyond wobble..
Accuracy as we know it in real life is based on the hand eye coordination of people and or the equipment they are using, however physics has alot of variables that can throw stuff of, and even with missiles/bombs and rangefinders there is still a small amount of guess work/mechanical failure. In essence the reason stuff misses in real life is because of an extremely complicated set a variables that even science could not put into a single equation.
Spring does not by any stretch of the imagination use a completely realistic physics system, nor does any game by really. It instead uses a "dumbed" down version of newtonian physics to figure out how stuff would end up acting, this version is barebones enough that your computer does not choke trying to do the calculations. This however is a two edged sword, because as the number of variables had been reduced to a small number to make it easy to run, it also makes it easy to break the system. Essentially all the units in spring have Aim bots, they can easily calculate where to fire a weapon to hit a target because there are only a few variables needed to understand. In addition to this is the fact that the ranges and speeds of objects in spring are not in any way realistic or even near realistic, battles in real life take place over several miles, battles in spring take place over several dozen yards at best. Applying realistic ranges would be near impossible as you could only play on a 40x40+ map with like 5 units given the extreme range they can fire. What this means is that units in spring are generally not very fast moving, do not have to shoot very far to hit stuff and do not have to track very fast moving targets. This means that unless you make the projectile a unit is firing incredibly slow moving, or slow firing pretty much any unit can hit any other unit almost spot on a good deal of the time, more often than would be thought given the weapons. This ends up with units like aircraft often being shot at by units that in a more realistic setting would have no chance of hitting them.
We already have a couple of tags that apply random "innacurracy" to weapons, tags like spray angle and accuracy, these fudge the numbers when a unit fires and make the shot go off center of the actual line of fire. This however is not specifically enough all the time.
Given these circumstances it might be nice to have the ability to dictate the accuracy of a certain weapon against a certain unit via armor or some other method, so that we can "fake" the innaccuracy of things like main battle tank cannons vs aircraft or some other things that cannot be easily done without creating odd looking firing..
In addition it would be nice if we could give some sort of inaccuracy to missiles beyond wobble..
You know, if you had the "hit percentage" of the weapon basically define when the weapon's wobble and accuracy kick in, that might be the solution. Basically the weapon would be innacurate if it had a "hit" flag, but the shot would use the wobble and accuracy - no matter what type of weapon - on a "miss".
You won't notice any of it in the OTA (read: BA) mods anyway. Would greatly enhance any mod IMO. It's retarded that a weapon deals the very same damage and hits all the time (or is supposed to hit all the time). No microing units out of the way does not count. Actually they are supposed to do that on their own, a miss/hit system simply simulates this.Dragon45 wrote:All this shit is supposed to be emergent in a true RTS simulation like Spring. Adding in completely arbitrary accuracy crap like this shuold remain firmly in the domain of Starcraft and its ilk.
I doubt anyone thought of Starcraft in the first place, at least I didn't because I don't like the gameplay in any *craft games (but WC1).
Spring is a platform for mods, not a game. It should be up to the mod to decide how real it should be. Considering Spring doesn't use cover and other effects that introduce inaccuracy in real life we need other ways to define that.Dragon45 wrote:All this shit is supposed to be emergent in a true RTS simulation like Spring. Adding in completely arbitrary accuracy crap like this shuold remain firmly in the domain of Starcraft and its ilk.