Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » UC/DL 1.13 & AFS » Reconsidering the Scope Sight Range Bonus
Reconsidering the Scope Sight Range Bonus[message #290792]
|
Sun, 18 September 2011 00:45
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
There has been some discussion as to the game becoming too easy once scopes are available - you can see the enemy, but they do not seem to be able to see you. Part of this is due to the scopes appearing all over the place with respect to coolness values. However, on a fundamental level changing coolness will only delay the undesired effect, so I am now reconsidering how this bonus is used.
I'll be upfront on this one, I don't remember where or why these values are in the mod (and I'm too lazy to check the stock v1.13 XML's).
As of today, 2011/09/17 in the released versions of AFS/DL-1.13/UC-1.13 the defaults are as follows:
Ja2_Options.INI Base_Sight_Range = 13
(it is multiplied by 2 in-game)
General / Nighttime / Daytime / Cave / Bright Light
Sun Goggles: 0 / -8 / 8 / -16 / 16
- - I think this rounds off to a +2 tiles bonus under ideal(Bright Light)
1.5x : 0 / 5 / 20 / 5 / 20
- - +2 tiles during the day
3.5x : 0 / 10 / 50 / 0 / 50
- - up to +5 tiles, and somewhat inconsistent compared to 4x
4x : 0 / 10 / 50 / 5 / 55
- - Again, if rounding as is done as expected (ie. not truncated), +6 tiles sight bonus under ideal (Bright Light)
6x : 0 / 15 / 70 / 0 / 75
- - Up to +8 tiles sight bonus
10x : 0 / 20 / 90 / 0 / 95
- - Up to +10 tiles sight bonus
Binoculars: 0 / 0 / 150 / 0 / 0
Now I am considering dropping the sight bonus for 4x and below to that found on the Sun Goggles, +2 tiles or less. On the other hand I am also considering increasing the sight bonus on the binoculars and 10x to conform with the range in-game that 10x Scope Magnification effect operates at under NCTH.
Additionally, I am a bit unclear as to whether the Bright Light range bonus stacks with the Daytime range bonus, or if it is something entirely different.
Also unclear is the effectiveness of scoped weapons in the hands of the AI. That 6 tile difference in visual sight range from just the 4x scope is a major balancing issue if the AI squanders it.
[Updated on: Sun, 18 September 2011 00:47] by Moderator Report message to a moderator
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #290798]
|
Sun, 18 September 2011 08:30
|
|
knightofni |
|
Messages:96
Registered:August 2011 |
|
|
A couple of comments :
1. Sight range bonuses are a percentage of base range vision. So for a 3.5x Mag (50), you actually get 50% more sight range. In practice i count 12 tiles when it should be 13, but well, close enough. That's why our teams destroy AI's so easily once we have scopes.
To me the scopes sight bonuses are way too high. They should be divided by 2 or maybe 3.
2. I really agree with your suggestion of making scopes consistant with each other. However, i can't really agree with making binoculars more powerful, as it's probably one of the best item in the game already.
3. One problem with re-balancing sight range is that as scopes mag factors are a multiple of NORMAL_SHOOTING_DISTANCE (default 70), so high powered scopes will always fire under the "too close" modifier. I can see 2 "simple" solution to that problem
- Reduce NORMAL_SHOOTING_DISTANCE (solve the scope problem), and reduce DEGREES_MAXIMUM_APERTURE to keep the same accuracy
- Define SCOPE_RANGE_MULTIPLIER = 0.5 (but i'm afraid that wouldnt be enough). Maybe the 1.13 team could allow the minimum value to be lower (probably a very simple change)
--------
EDIT : I guess sight range bonuses work this way :
round down (Base sight range x Bonus) x daylight modifier
So for the 3.5x scope
13x1.5 = 19.5
Round down = 19
Day light = 19 x 2 = 38
12 tiles more than the normal 26, what i count in came. Did NOT double check with other scopes.
[Updated on: Sun, 18 September 2011 08:33] by Moderator Report message to a moderator
|
Corporal 1st Class
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #290808]
|
Sun, 18 September 2011 17:13
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
Checked in-game, yes it is a percentage modifier. Not sure where I got the number of tiles thing from.
Correcting my earlier faulty assumptions on those tags demands a rework of the sight range modifiers.
EDIT: for comparison, I decided to list the modifiers from stock v1.13 (Data-1.13)
Toggle SpoilerSun Goggles
-10
10
-20
20
Night Vision Goggles, Gen. I
10
-20
-40
Night Vision Goggles, Gen. II
20
-20
10
-40
Night Vision Goggles, Gen. III
30
-20
15
-40
Night Vision Goggles, Gen. IV
40
-20
20
-40
Small Scope, 2x
5
10
10
10
ACOG, 4x
10
20
20
20
Battle Scope, 7x
25
50
10
50
70
Sniper Scope, 10x
45
90
15
90
90
Somewhere I diverged particularly badly with the 4x scopes.
EDIT: New Scheme
1.5-2.0x
0
10
0
10
3.5-4.0x
10
20
0
20
6.0x
15
50
0
50
9.0x
20
80
0
80
10.0x
20
90
0
90
1PN51 NV (3.5x)
60
10
50
10
ARX-160/OICW FCS (4x)
40
20
30
20
Thales NV/ARS NV (4x)
60
20
50
20
Thermal (FLIR) Weapon Sight (6x)
100
50
100
50
[Updated on: Sun, 18 September 2011 22:09] by Moderator Report message to a moderator
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #290826]
|
Mon, 19 September 2011 18:23
|
|
ctiberious |
|
Messages:605
Registered:March 2007 |
|
|
You get to see further with a scope because a scope magnifies what you can see. Technically, if you look through a 2x scope, you're seeing things at 200m as if they where only 100m away. Effectively, you can see twice as far with a 2x scope. In JA2, 2x scopes give only a 10% vision bonus which is only 1/10th what you'd get in real life. We do this because using "real life" values would make the game pretty well unplayable since we have limited map sizes.
Changing NORMAL_SHOOTING_DISTANCE would impact a huge portion of NCTH. That value is used in just about every NCTH calculation at some point. And simply altering DEGREES_MAXIMUM_APERTURE isn't going to have the effect you're after. And SCOPE_RANGE_MULTIPLIER willy only change the minimum effective range of a scope, though reducing this value would mean closer ranges so you would avoid having scopes that could never be used without penalty should you actually reduce the vision range bonuses.
I should point out that it's an invalid statement to say "you can see the enemy, but they do not seem to be able to see you". In fact, the enemy DOES use scopes and DOES get the same vision range bonus that you get. The problem with the AI right now is that it doesn't make as much effective use as a player does. A player might use a scope to find a target, then move into a better firing position based on where the player just saw a target. While moving, the player might not be able to see the target any longer, but he remembers where the target was when he looked through the scope. The AI, however, can't "remember" anything. The AI might look through a scope and see a target but doesn't have a hit chance high enough to make a shot so it "decides" to move closer. As soon as it lowers the weapon, it can no longer see the target and therefore doesn't know where the target is. So when the AI moves, it doesn't consider the target location if previously "knew". Basically it's a "memory" thing. Players remember target locations while the AI doesn't. I'm not an AI coder, so I don't know how much work would be involved in correcting this issue. So don't ask me to try and fix it. It's one thing to know what the issue is. It's quite another to have any idea how to resolve it. But anyway, the AI really does use scopes, and really does get the same vision range bonuses a player gets.
Report message to a moderator
|
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #290828]
|
Mon, 19 September 2011 20:09
|
|
ctiberious |
|
Messages:605
Registered:March 2007 |
|
|
Yes, the original scope gave a sight range bonus but I couldn't tell you how much it was. Too much of the code has been altered since the retail version of JA2. I can say that, originally, the Item variable in the code didn't include a vision range bonus tag, but in the original, retail version of the game, all the items were hardcoded so all their modifiers were hardcoded if the functions that dealt specifically with them. I've always assumed that the 90 that we have for the Day and BrightLight Vision Range Bonuses we taken from the retail version when the items were first externalized because I don't remember noticing a difference between sighting ranges after I moved to 1.13.
Please remember that the current "default" for SCOPE_RANGE_MULTIPLIER is just a modifier I basically pulled out of thin air mostly because it set 10x scopes so that the minimum effective range matched the standard sight range for the scope (i.e. 49 tiles). In other words, a "normal" merc using a 10x scope with a 0.7 multipler has 0 tiles of unpenalized usage. But at least this merc never gets a double penalty (too close AND invisible which is what you get above a 0.7 multiplier). 0.6 would give about 7 tiles of unpenalized usage and 0.5 (which I've been working with in my recent tests) gives about 14 tiles.
Otherwise, yes. the "sweet spot" is 70 tiles and the minimum is 49, based on the numbers you're using. But that "sweet spot" is not actual vision range. You'll get hit with the "invisible target" penalty because the games LOS calculations will say that this same 10x scope can't actually see a target beyond 49 tiles. All that 70 tile "sweet spot" means is the "distance aperture" at 70 tiles with a 10x scope is identical to the "distance aperture" at 7 tiles without a scope. This has nothing to do with visibility, LOS or muzzle stability (those are all factored in subsequent steps).
And yes, I suppose you could create an item specifically for the AI to improve it's vision range. The only real catch would be making sure that players didn't get ahold of it as a drop. And I'm not sure how you would go about doing that. Leaving it out of the standard drop xml files would not help if the player was playing the game with "Drop All" active. The best way I could think to do what you're suggesting is to code an AI specific LOS modifier.
EDIT: Actually, that might not be a bad idea. I'm not exactly sure where it would be done, but somewhere in the LOS system, if we updated the code so that any AI related calculations took weapon based vision range modifiers into account regardless of whether the weapon was in a ready position or not, that might actually resolve the problem. Then all it would take is for an enemy soldier to have a weapon with a scope attached. The LOS system would then give that enemy soldier the visionrangebonus for the attached scope and apply it to all the AI decisions. In essence, the scope's bonus would ALWAYS be applied for the AI.
[Updated on: Mon, 19 September 2011 20:12] by Moderator Report message to a moderator
|
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #290832]
|
Mon, 19 September 2011 21:13
|
|
ctiberious |
|
Messages:605
Registered:March 2007 |
|
|
Trying to have scopes grant "real world" sight ranges is where you run into problems. A standard map is something like 170 tiles, corner to corner. And only something like 100 tiles edge to edge. So giving a scope an effective LOS range of 80 tiles means you can pretty much see the entire map. That is going to give snipers (both player and AI) a HUGE advantage. Even if you increased the FOV penalty from it's current 90 to 99 (100 I think would mean no LOS ever). That's the main reason 10x scopes only give a 90% LOS range bonus. Just because they can, do you really want snipers being able to pick off targets on the other side of the map, pretty much without penalty?
As for your calculations, I'm pretty sure that LOS range is BASE_SIGHT_RANGE * 2, and then apply modifiers. The end result is probably the same, but I've noticed that sometimes the code will get some unexpected results because of rounding.
Also, keep in mind that LOS is really a yes/no check based on the tile you're looking at. So it could be night time in the game, but if the tile you're looking at is at the center of some light source that effectively makes that tile count as "bright light" then that tiles LOS range will be generated as if it were bright light regardless of the light level of any invervening tiles. Again, this might not actually be an issue but it's something you should be aware of.
And, finally, keep in mind that all those visionrangebonus modifiers stack. So a merc wearing sun goggles in bright light looking through a 10x scope will actually get +110% LOS range result (90 for the scope + 20 for the goggles).
And I honestly don't know if the "undroppable tag" will keep the item from dropping when Drop-All is active. You'd have to test that.
Report message to a moderator
|
|
|
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #291006]
|
Thu, 22 September 2011 21:24
|
|
ctiberious |
|
Messages:605
Registered:March 2007 |
|
|
all the visionrangebonus tags in items.xml are percentages. It may appear that you're having a straight reduction, but that's simply a result of the math. The functions in the code that deal with those bonuses (whether positive of negative) treat the values as percentages.
Light level itself is also treated as a percentage. The values are all hard coded in the gbLightSighting array, with 100% (bright light) being the highest and 9% (pitch black). Most of this is all handled in the DistanceVisible() function. That function generates base sDistVisible by taking BASE_SIGHT_RANGE * 2, assuming we're facing the direction we're looking.
Next, the effects of tunnel vision are applied to sDistVisible. Tunnel vision reduces our forward vision arc by the listed percent.
Next, elevation differences are factored into sDistVisible. 1/6th of the current sDistVisible is added if at a different elevation. Not sure if this was intentional or what, but this vision range bonus applies whether you're looking up or down. Think it should really only apply if you're looking down but that's not how the code is currently written.
Next, light level is calculated and factored into sDistVisible. Light level reduces sDistVisible to the hard coded percent. So in "Bright Light" you get 100% of sDistVisible. In "Pitch Black" you get only 9%. There are 16 different light levels coded, grouped into 4 categories: Night, Day, Cave and Bright.
Next, visionrangebonus tags are added up and applied as a modifier towards sDistVisible. These modifiers are all added together and then applied as a percentage. So in bright light, if you're using a 7x Battle scope and Sun Goggles, you'll get a total +70% applied. At night, if you're wearing NVGI and using a 4x ACOG you'll get a total +20% applied.
Next, the effects of suppression fire (aka, cowering) are applied, again as a percentage.
Next, traits like Night Ops are applied, again as a percentage.
Finally, effects of gas/smoke (and gasmaskes) are applied, again as a percentage.
One thing to realize, though, is that sDistVisible is an INT16 variable. So at every step of the process, any fractional amounts are lost. In other words, if sDistVisible is 15 before we apply the elevation factor, it'll be 17 when we apply the light level factor. This constant dropping of fractions may be why it often appears as though a VISIONRANGEBONUS=10 results in 1 tile being added even though we're really adding +10%.
Report message to a moderator
|
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #291149]
|
Mon, 26 September 2011 18:27
|
|
ctiberious |
|
Messages:605
Registered:March 2007 |
|
|
Yeah. Basically you've got 16 different values:
80, 86, 93, 100,
94, 88, 82, 76,
70, 64, 58, 51,
43, 30, 17, 9
The game selected the appropriate value by the light level of the specific tile. So if the light level is 0, 80% of vision range is applied. If light level is 3, then 100% is applies. If light level is 15, then only 9% is applied. Remember, in the code light level is a 0-15 value.
As far as the 4 visionrangebonus tags go, they apply to each group. I'm not positive but I think group 1 is BrightLightVisionRangeBonus, group 2 is DayVisionRangeBonus, group 3 is NightVisionRangeBonus and group 4 is CaveVisionRangeBonus.
Love the idea of NV Scopes. I've always felt that was something the game needed. But keep in mind that all visionrangebonus tags get combined together. So when you're considering adding new NV gear (or thermal imaging) remember that face item bonuses (i.e., goggles) are combined with scope. Sun Goggles give a +20% BrightLightVisionRangeBonus. The ACOG also gives +20%. The result is, when visionrangebonus is applies, you'll get a +40% result in a 36 tile vision range (assuming full bright light, or 100%). Not the 37 you'd get if both visionrangebonus tags were applied seperately.
Looking at it another way, the worst "night" vision modifier results in a 51% vision range or 13 tiles (assuming BASE_SIGHT_RANGE = 13). NVG IV gives +40% NightVisionRangeBonus and ACOG gives +10%. So combined you get a +50% or 19 tile range. Not the 20 tiles you'd get if both visionrangebonus tags were applied seperately.
Effectively, because of the order in which the modifiers are applied, you'd need to get a combined +100% NightVisionRangeBonus to simply offset the worst "night vision" modifier. And you'd need a combined +280% NightVisionRangeBonus from NVGs + NV Scopes to get the same vision range the above sun goggle example got.
However, I'm exampling the "best" and "worst" light level modifiers for bright and night levels. But if we look at the "best" night level modifier, that's just a 70% vision range. Or 16 tiles. You only need a combined NightVisionRangeBonus of +63% to negate that light level modifier. And you only need a combined NightVisionRangeBonus to get +125% to match the best day range from the above example. With the current items, the best NightVisionRangeBonus combination you can get is NVG IV (+40) + 10x Sniper Scope (+45), resulting in a +85% vision range. So not enough to completely negate the worst night modifier but more then enough to offset the best night modifier.
As far as your thermal imaging goggles, notice in items.xml that we have a ThermalOptics tag. Don't get excited. That tag IS referenced in the code but it is not used as part of the visibility distance calculation (i.e., the calculations that determine whether the draw an enemy on the map or keep the enemy hidden from the player). Instead, anything you flag as ThermalOptics is treated as having the same "vision" capabilies as the Crepitus get. They don't actually "see" their target but can still get a valid LOS when it comes to attacks. The result would be, if you gave Thermal Imaging Goggles the ThermalOptics tag, they wouldn't necessarily get any special vision range as far as visibility went. Example, if you took the existing NVG IV and added the ThermalOptics tag, they would still only "see" targets (i.e., place them on the map for players to see) out to 19 tiles. But when you actually fired a weapon, LOS range would be closer to the normal 26.
EDIT: As far as the AI, I still think the best option is to update the code so that the AI always gets any scope bonuses for a weapon in hand, regardless of whether the soldier has the weapon ready or not. It's really the only way to allow the AI to simulate "memory". And it keeps you from needing a special item which you don't want players to have.
EDIT: The AI modification I'm suggesting would actually be extremly simple as well. There is already a global flag: gbForceWeaponReady It's used by the CTH functions because CTH calculations have to be made on the assumption that the weapon being used is actually in a ready position whether it really is or not. Otherwise, things like the "f" hotkey wouldn't work correctly. Anyway, if we go into the GetTotalVisionRangeBonus() function (which is the function calls all the other visionrangebonus function and the only place those other functions get referenced from) and add a condition right at the start to set gbForceWeaponReady=true when the 'Soldier' in question is an AI, and then return gbForceWeaponReady=false at the end of the function, that will allow the AI to always make use to scopes for visibility calculations even when the AI doesn't have the weapon in a ready position. If that's something you would like to try out, I can compile you a test build with that change made.
[Updated on: Mon, 26 September 2011 18:40] by Moderator Report message to a moderator
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #291156]
|
Mon, 26 September 2011 19:13
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
Thanks Chris, those 16 values were what I was looking for.
ChrisL
Looking at it another way, the worst "night" vision modifier results in a 51% vision range or 13 tiles (assuming BASE_SIGHT_RANGE = 13). NVG IV gives +40% NightVisionRangeBonus and ACOG gives +10%. So combined you get a +50% or 19 tile range. Not the 20 tiles you'd get if both visionrangebonus tags were applied seperately.
Effectively, because of the order in which the modifiers are applied, you'd need to get a combined +100% NightVisionRangeBonus to simply offset the worst "night vision" modifier. And you'd need a combined +280% NightVisionRangeBonus from NVGs + NV Scopes to get the same vision range the above sun goggle example got.
However, I'm exampling the "best" and "worst" light level modifiers for bright and night levels. But if we look at the "best" night level modifier, that's just a 70% vision range. Or 16 tiles. You only need a combined NightVisionRangeBonus of +63% to negate that light level modifier. And you only need a combined NightVisionRangeBonus to get +125% to match the best day range from the above example. With the current items, the best NightVisionRangeBonus combination you can get is NVG IV (+40) + 10x Sniper Scope (+45), resulting in a +85% vision range. So not enough to completely negate the worst night modifier but more then enough to offset the best night modifier.
So basically, I have nothing to fear about the 10%, 20%, 30%, 40% NVG modifiers making night vision better than day vision. Anything below 63% is still reasonable (minimum night penalty negation).
On the other hand, if I want the new NV 10x scope to work sort of like the 10x scope discussed above last week (ignoring the NVG stacking for the moment) I'm going to have to do some math. I've got some OCTH and NCTH penalties on the NVG to "encourage" the use of NV Scopes by themselves. I was actually hoping that the tunnel vision penalty would stack so that I could setup some numbers where NVG + NV Scope = no vision for the player; but this does not seem to be the case. EDIT: otherwise I'll just subtract 60 from whatever number I come up with in anticipation of best case NVG + 10x NVS.
Oh, I'm quite aware of the thermal imaging tag, I think it was the first feature I'm directly responsible for (idle posting on my part lead to Madd Mugsy applying the Crepitus smell "vision" to the player via this feature). My experience is that the capability to see through walls was too good, so in the TI camera, I actually gave it a vision range penalty - you have to be within 5 or 6 tiles of the enemy to be able to see them through the wall, or see them period. What I'm calling Thermal Imaging Goggles, don't use the thermal optics feature, and are simply better NVG goggles that work equally well or better in caves. Of course with the numbers and insight into how it works, these will be refined to actually work as intended.
ChrisL
EDIT: As far as the AI, I still think the best option is to update the code so that the AI always gets any scope bonuses for a weapon in hand, regardless of whether the soldier has the weapon ready or not. It's really the only way to allow the AI to simulate "memory". And it keeps you from needing a special item which you don't want players to have.
EDIT: The AI modification I'm suggesting would actually be extremly simple as well. There is already a global flag: gbForceWeaponReady It's used by the CTH functions because CTH calculations have to be made on the assumption that the weapon being used is actually in a ready position whether it really is or not. Otherwise, things like the "f" hotkey wouldn't work correctly. Anyway, if we go into the GetTotalVisionRangeBonus() function (which is the function calls all the other visionrangebonus function and the only place those other functions get referenced from) and add a condition right at the start to set gbForceWeaponReady=true when the 'Soldier' in question is an AI, and then return gbForceWeaponReady=false at the end of the function, that will allow the AI to always make use to scopes for visibility calculations even when the AI doesn't have the weapon in a ready position. If that's something you would like to try out, I can compile you a test build with that change made.
Yes please, this is something I'd like to test out. May stop the enemy from always running up to my mercs and punching them.
[Updated on: Mon, 26 September 2011 19:19] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Reconsidering the Scope Sight Range Bonus[message #291581]
|
Wed, 05 October 2011 19:55
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
No problem, my origianl "cheater" sun-goggles for the AI are ready to go in the event neither AI changes or your AI & Scope vision changes end up in the next patch. No rush, my eyes are already bleeding from trying to synchronize all the stuff that is immediately actionable between the three mods. Notepad++ is able to compare different versions of items.xml, but I'm finding that over time "nothing" class items have ended up being filled with different junk.
Streaching what is on-topic, I'm going to seek advice on/discuss use of the tag here. Basically, the inverse of what was previous discussed here: situations where weapon range is shorter than sight range & scope's "sweet spot"
Under OCTH, and dispite my scope penalties, it still made sense under some condidtions to have a 10x scope on a Desert Eagle, however under NCTH this does not seem to be the case anymore. As I am thinking of applying to 6x and 10x sniper scopes, I thought I should get some idea of how it should work.
Also I am reconsidering the use of on the new ballistic calculator attachment. My reading of the is that it only is effective for targets beyond the weapon's range, so its use on a sniper rifle only attachment doesn't seem to be all that useful.
On the otherhand, giving it to scopes that may be mounted on pistols, SMG's, and AR's (usually via adapters except for the Desert Eagles) may be wreck the balance making the shorter range of these weapons even less relevant under NCTH. The question is, under NCTH how big is the effect of vs. weapon's inherent range?
[Updated on: Wed, 05 October 2011 20:08] by Moderator Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 10:24:50 GMT+2 2024
Total time taken to generate the page: 0.02962 seconds
|