Home » PLAYER'S HQ 1.13 » v1.13 General Gameplay Talk » NCTH Scope penalties below optimal range - broken?
Re: NCTH Scope penalties below optimal range - broken?[message #322122] Thu, 27 June 2013 11:31 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
I have implemented a new formula for automatic scope selection. This does only apply when "Scope Modes" is turned off (with scope modes only the selected optics will define the magnification factor).

This formula will decide which scope to use based on the distance to the target and the gap between different scope factors. The formula is only used if the currently evaluated scope would apply a penalty.

// calculate penalty ratio (this was already done before)
dScopePenaltyRatio = (CurrentFactor * rangeModifier / TargetMagFactor)

// new formula
if (dScopePenaltyRatio <= CurrentFactor / (( CurrentFactor + BestFactor ) /2 -1 ) && CurrentFactor > BestFactor)
// use this as the new BestFactor
BestFactor = CurrentFactor

CurrentFactor - magnification of the currently evaluated scope
BestFactor - magnification of the best scope found so far
TargetMagFactor - magnification at target range (perfect magnification)
dScopePenaltyRatio - performance curve of the scope depending on distance to target (>1 below perfect range, ==1.0 at perfect range, <1 above perfect range). Values <=1 will never appear because they mean that we are using the scope at or above perfect range which won't apply a penalty anyway.

Why would we want to use a scope which applies a penalty? Because the magnification of the scope could still provide better results in aiming than our small power optics that we have in addition to that.

example:

4x scope vs. iron sights

For iron sights the magnification is 1x. We are going to check 4x scope vs. 1x iron sights.

BestFactor = 1.0
CurrentFactor = 4.0
CurrentFactor / (( CurrentFactor + BestFactor ) /2 -1 ) = 4.0 / ( (4.0 + 1.0) /2 -1 ) = 2.666667

As long as our dScopePenaltyRatio is equal or below 2.666667 the bigger 4x scope will be selected for targeting. I made a small chart for testing which shows that this is the case up to 11 tiles distance. Below that the game will switch to the iron sights.

During my tests I noticed something else with NCTH that should be fixed (probably a known problem to other players). 10x scopes are basically useless with NCTH because they have their perfect range at 70!!! tiles. Aiming at any target below that will apply a hefty penalty. So basically 7x scopes have become the new sniper scopes with a perfect range of 49 tiles (usually enough for the common maps). For the standard assault rifle I will probably use a 4x scope.

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322124] Thu, 27 June 2013 14:30 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
committed

Report message to a moderator

Sergeant Major

Re: NCTH Scope penalties below optimal range - broken?[message #322126] Thu, 27 June 2013 14:47 Go to previous messageGo to next message
Strohmann is currently offline Strohmann

 
Messages:287
Registered:August 2011
Location: Division Thought Crimes
Quote:
During my tests I noticed something else with NCTH that should be fixed (probably a known problem to other players). 10x scopes are basically useless with NCTH because they have their perfect range at 70!!! tiles. Aiming at any target below that will apply a hefty penalty. So basically 7x scopes have become the new sniper scopes with a perfect range of 49 tiles (usually enough for the common maps). For the standard assault rifle I will probably use a 4x scope.

Stock 1.13 serves more or less just as a new feature dump today. Before HAM 5 the CTHConstants.ini had a value of 0.7 for SCOPE_RANGE_MULTIPLIER, that partly solved the out-of-sight-range problem for the high power scopes. With HAM 5 Headrock deemed that unnecessary, item transformations should simulate switching between different magnifications in the future, so the value was changed back to 1.0. But noone bothered with implenting proper item transformations for that in stock 1.13, which lead to the problem you decribed.

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322134] Thu, 27 June 2013 20:55 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Strohmann

Stock 1.13 serves more or less just as a new feature dump today. Before HAM 5 the CTHConstants.ini had a value of 0.7 for SCOPE_RANGE_MULTIPLIER, that partly solved the out-of-sight-range problem for the high power scopes. With HAM 5 Headrock deemed that unnecessary, item transformations should simulate switching between different magnifications in the future, so the value was changed back to 1.0. But noone bothered with implenting proper item transformations for that in stock 1.13, which lead to the problem you decribed.


Please forgive my ignorance but why wasn't SCOPE_RANGE_MULTIPLIER changed back to 0.7 when players found out that the old value worked better? Has there been a specific reason (crashes, side effects, whatever)?
Actually I'm not a fan of those item transformations. I think that any item in the game should have a valid use on its own.
A factor of 0.7 would make a 10x scope as powerful as a 7x scope is now. It would also make the gaps between the scopes smaller.

Doesn't that look better? (0.7 covers all distances in common maps very well):
factor 1.0:
scope		2x	4x	7x	10x
range		14	28	49	70

factor 0.7:
scope		1.4x	2.8x	4.9x	7x
range		10	20	34	49

[Updated on: Thu, 27 June 2013 20:56] by Moderator

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322143] Fri, 28 June 2013 01:43 Go to previous messageGo to next message
Strohmann is currently offline Strohmann

 
Messages:287
Registered:August 2011
Location: Division Thought Crimes
I can't answer that question, because i am/was not involved in decision process around feature implentation/default settings for stock 1.13, so i can just puzzle the course of these events together.

What i found was this:
ChrisL, Reconsidering the Scope Sight Range Bonus Thread
[...]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).[...]
Headrock, HAM 5 Alpha Thread
Quote:
[...][I found SCOPE_RANGE_MULTIPLIER was 1 in the HAM 5 data][...]

For a reason. Especially now that you have multi-length scopes, using this at 0.7 skews the game towards scopes, making them better than iron sights in any situation. It was something me and ChrisL had a big disagreement about - and now that scopes are adjustable I think his side of the argument is no longer valid (or is less valid than the argument against using this constant).
Headrock, HAM 5 Alpha Thread
Quote:
[...][Laser-Scope balance is better now][...]
This is the result of raising the Scope Coefficient from 0.7 back to the original 1.0. ChrisL, for a reason I couldn't understand then and still can't, increased the efficiency of scopes to make them more useful at lower than their "optimal" range (14t for a 2x scope, 49 for a 7x scope, etc). As a result, most if not all scopes received a high Mag Factor even at iron-sights range, thus being better than lasers.

Whatever his "fix" was supposed to do (and again, I didn't even understand it back when he put it in), it's going to be meaningless once we get multi-mode scopes (and already have them in UC thanks to Wil473). So that's what you're experiencing, basically: scopes working as intended.

I can add that it shares also the same problem with all these cth-constants: they govern all scopes the same way, you can't configure them for individual items. Also after Headrock disappeared, noone feels responsible for NCTH any longer (ChrisL and others also left this project), so it stagnated; insofar i appreciate your effort.

[Updated on: Fri, 28 June 2013 01:50] by Moderator

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322163] Fri, 28 June 2013 17:50 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Thank you for these infos. I'm going to play on with SCOPE_RANGE_MULTIPLIER set to 0.7 and see how it works out. My team still needs better equipment to be fully efficient and allow some more testing.

Btw. I don't think that it is necessarily bad that SCOPE_RANGE_MULTIPLIER counts for all scopes. The differentiation comes from the mag factor of the scope which influences its penalty at a certain range. The penalty for a 10x scope was so high that on a standard map it would have been impossible to hit anything smaller than a car. What do I need a sniper for if he can't hit an opponent with the tools at hand? Once I get my hands on a real sniper rifle and attach a 10x scope I will see how this has changed with SCOPE_RANGE_MULTIPLIER 0.7. I already know that I will get the penalties that existed for the 7x scope before but I'm curious to see it in action.

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322574] Wed, 10 July 2013 01:58 Go to previous messageGo to next message
krux is currently offline krux

 
Messages:62
Registered:June 2011
Are these changes now available on SVN? For SCOPE_RANGE_MULTIPLIER it would be optimal to externalize it IMHO, so people can chose their setting.

Report message to a moderator

Corporal
Re: NCTH Scope penalties below optimal range - broken?[message #322580] Wed, 10 July 2013 10:15 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
You are aware that there's a CTHConstants.ini just for this, right?

Report message to a moderator

Captain

Re: NCTH Scope penalties below optimal range - broken?[message #322581] Wed, 10 July 2013 10:56 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
The bugfix for "Scope Modes = on" and also the auto selection for "Scope Modes = off" are in the latest code. The "SCOPE_RANGE_MULTIPLIER" in the "CTHConstants.ini" wasn't touched so it is still at 1.0. You can set that to whatever you like. I play with 0.7 which works fine for me. Still a lot of shots happen below scope range but it's not as bad as with 1.0.

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322585] Wed, 10 July 2013 16:57 Go to previous messageGo to next message
krux is currently offline krux

 
Messages:62
Registered:June 2011
Thanks! I misread above and got the impression that SCOPE_RANGE_MULTIPLIER was removed and hard-coded to 1.0 in HAM5, great that's not the case then!

Report message to a moderator

Corporal
Re: NCTH Scope penalties below optimal range - broken?[message #322751] Mon, 15 July 2013 19:00 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Penalties for 10X and 7x scopes are too high as we can hardly use the scopes anymore. I appreciate that you guys try to put this penalty feature in, but the scopes should still be useful, right?

Can we work on this to get NCTH to something playable at least? AI seems to miss a lot with their sniper rifles now... And for myself, even an assault rifle with 7x scope isn't useable for long. In some instances the "." button doesn't even work to change to metal sights.

If there won't be changes towards something playable with default settings, maybe it's handy to sum up here which parameters can be adjusted in the game now. I've read all through this thread, but it all sounds pretty confusing...

Is it even possible to tweak the sight range of a scope?
I understand that one can change the scope range with the scope range multiplier... After what I've read here, I think it would be better to set it even to 0,5... What would this imply?

Anyway, in my view, every current scope should be useful for a certain range without penalty... And I think it wouldn't hurt to be able to see further with a 10x and 7x scope than we can see now. Certainly when I think about the big maps...

[Updated on: Mon, 15 July 2013 19:12] by Moderator

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322752] Mon, 15 July 2013 19:19 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Let's say we can get the scope sight range to 60 for a 10X scope instead of 49.
and change the NORMAL_SHOOTING_DISTANCE: 6

Then optimal range for the different scopes would change to:
2X: 12 tiles/120m instead of 14 tiles/140m
4X: 24 instead of 28
7X: 42 instead of 49
10X: 60 instead of 70

[Updated on: Mon, 15 July 2013 20:42] by Moderator

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322758] Mon, 15 July 2013 20:59 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Thor

In some instances the "." button doesn't even work to change to metal sights.

That's because the "1" is set for this scope in "item.xml". Only solution for that (except for removing the parameter) is to install a Reflex Sight as well.

Thor

Is it even possible to tweak the sight range of a scope?

A scope only adds a bonus to sight range AFAIK. The parameters "...VisionRangeBonus" in "items.xml" are for that.

Or you can change the "BASE_SIGHT_RANGE" in "Ja2_Options.ini" so everybody can see further.

Thor

I understand that one can change the scope range with the scope range multiplier... After what I've read here, I think it would be better to set it even to 0,5... What would this imply?

The "SCOPE_RANGE_MULTIPLIER" alters the "ScopeMagFactor" from "items.xml" for NCTH calculation. Setting it to 0.5 will make a 4x scope work like a 2x scope but keep its own bonusses from "items.xml". It will be 100% effective from 2*NORMAL_SHOOTING_DISTANCE upwards with no CTH penalty.
If you think that the penalty for shooting below effective scope range is too high you can set the value for "AIM_TOO_CLOSE_SCOPE" to something higher. -4.0 is the default, -2.0 would mean half as much penalty, 0 would mean no penalty ever.

Thor
Let's say we can get the scope sight range to 60 for a 10X scope instead of 49.
and change the NORMAL_SHOOTING_DISTANCE: 6

Then optimal range for the different scopes would change to:
2X: 12 tiles/120m instead of 14 tiles/140m
4X: 24 instead of 28
7X: 42 instead of 49
10X: 60 instead of 70

How does that sound?

I think that this would penalize the shooting without scopes because iron sights (scope factor 1.0) depend on "NORMAL_SHOOTING_DISTANCE". Iron sights would be even worse than now.
I would rather lower the "SCOPE_RANGE_MULTIPLIER" (I'm using 0.7 at the moment) and maybe raise the "AIM_TOO_CLOSE_SCOPE" value a bit.

Another problem at the moment is that "MinRangeForAimBonus" is a fixed value that is not altered by "SCOPE_RANGE_MULTIPLIER". This means that you won't get the AimBonus even though you made your scope not suffer a penalty. Maybe this should be changed? Wink

edit: Forget that. "AimBonus" and "MinRangeForAimBonus" are not used at all in NCTH. I wonder why...

[Updated on: Mon, 15 July 2013 21:39] by Moderator

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322765] Mon, 15 July 2013 22:39 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Thanks for the good info & answers, silversurfer! Wink

Quote:

I think that this would penalize the shooting without scopes because iron sights (scope factor 1.0) depend on "NORMAL_SHOOTING_DISTANCE". Iron sights would be even worse than now.


I completely agree with you on this... A pity.

Quote:

I would rather lower the "SCOPE_RANGE_MULTIPLIER" (I'm using 0.7 at the moment) and maybe raise the "AIM_TOO_CLOSE_SCOPE" value a bit.


I will try it out with AIM_TOO_CLOSE_SCOPE to -2 and SCOPE_RANGE_MULTIPLIER to -7.
But if I understand correctly, then a 10X scope will always have a small penalty unless the target is just in sight, 49 tiles away. One tile closer, though, it already has a small penalty... Would be nice if we could tweak this range a bit, but well...

A scope 2X according to items.xml has:
5
10
10

A scope 4X according to items.xml has:
10
20
20

A scope 7X according to items.xml has:
25
50
10
50

A scope 10X according to items.xml has:
45
90
15
90

Any idea how "nightsight", "daysight", "cavesight", and "bright light sight" are eventually calculated? I can't see a link between the 90 DayVisionRangeBonus and the 49 tiles of actual sight... The same for NCTH & OCTH?
And I guess at night or in caves you can see better with a 10X scope, but you still can't shoot anything from such a short distance, right?

(The last year I've always played with NCTH, maybe I'll try the old system once more as well... But it will also be getting used to again. This really is very complicated and delicate shit).





[Updated on: Mon, 15 July 2013 23:11] by Moderator

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322797] Tue, 16 July 2013 02:46 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
I'm not using 10x scopes at the moment, only 7x and 8x for my snipers because of low sight/combat range on the WF maps. On ARs I use 4x scopes.

The sight range bonus depends on the time of day and the place. If below ground the cave bonus is used, above ground it's the night/day/bright day bonus. Bonus/10 should be the number of tiles vision range is extended.

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322799] Tue, 16 July 2013 03:37 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Aha...

Bonus /10... That's really not that much if I understand correctly... Scope 10X then means +9 tiles, Scope 7X means +5 tiles, Scope 4X means +2 tiles, Scope 2X means only one tile during day, right?...
You sure about this?

Normal vision range during day without scopes seems to be 26 tiles?... Now that I see this, I think the Dayvisionrange boni are percentages of this 26, is that possible?

26+23,4 tiles=49,4 tiles day vision range (+90% with a 10X scope)
26+13 tiles=39 tiles day vision range (+50% with a 7X scope)
26+5,2 tiles=31 tiles day vision range (+20 with a 4X scope)
26+2,6 tiles=28,6 tiles day vision range (+10% with a 2X scope)
26 tiles= normal day vision range without scope.

Anyway, 10X scopes are expensive and default with the fancy sniper rifles. I want to be able to use them.



[Updated on: Tue, 16 July 2013 03:38] by Moderator

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322807] Tue, 16 July 2013 11:57 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Sorry, I was guessing there. The code uses the light level to calculate the vision range bonus which should allow a smooth transition.

This is done in function "INT16 GetTotalVisionRangeBonus( SOLDIERTYPE * pSoldier, UINT8 bLightLevel )" in "Tactical\Items.cpp" if you want to take a look.

Night Vision Range Bonus applies whenever light level is worse than standard daylight level (cave bonus when underground).

Daylight Vision Range Bonus applies whenever it is brighter than standard night.

Bright Light Bonus applies when it is brighter than standard daylight level.

All bonuses stack.

AFAIK Light levels go from 0 to 15:
0 bright day
3 normal day
12 normal night
15 dark night

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322818] Tue, 16 July 2013 17:23 Go to previous messageGo to next message
SharkD is currently offline SharkD

 
Messages:352
Registered:July 2003
I'm playing 6201/1698. I've been pressing the "." key but nothing is happening AFAIK. How can you tell if scope modes are turned on or off? Is there a special icon or graphic?

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322822] Tue, 16 July 2013 19:07 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Do you have "ALLOW_ALTERNATIVE_WEAPON_HOLDING = 3" in your "Ja2_Options.INI"?

The "." key is supposed to be used in tactical screen. As long as you don't have your inventory open you should see a little symbol on your weapon:

http://img818.imageshack.us/img818/7249/bv4t.png

From top to bottom:
Scope
Reflex Sight
Shot from hip
Iron Sights

Report message to a moderator

Lieutenant
Re: NCTH Scope penalties below optimal range - broken?[message #322826] Tue, 16 July 2013 19:41 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Thanks for the info... Guessed something like that... But it doesn't explain how the boni are counted out. Would be interesting to know..

Anyway, I can't read code well and don't even know how to open these code files ending on ".cpp".

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322828] Tue, 16 July 2013 20:11 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
With a text editor. Any will do but a good one with syntax highlighting makes the stuff a lot more readable.

Report message to a moderator

Captain

Re: NCTH Scope penalties below optimal range - broken?[message #322831] Tue, 16 July 2013 20:42 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Aha, thanks for the tip Wink

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322843] Wed, 17 July 2013 06:26 Go to previous messageGo to next message
SharkD is currently offline SharkD

 
Messages:352
Registered:July 2003
silversurfer
Do you have "ALLOW_ALTERNATIVE_WEAPON_HOLDING = 3" in your "Ja2_Options.INI"?

Yes.

silversurfer
The "." key is supposed to be used in tactical screen. As long as you don't have your inventory open you should see a little symbol on your weapon:

http://img818.imageshack.us/img818/7249/bv4t.png

From top to bottom:
Scope
Reflex Sight
Shot from hip
Iron Sights


I guess the problem was that I was crouched. The icon switches properly between scope and hip when I am standing. Iron sights don't seem to be an option however.

My mercs are equipped with 9mm Colt SMGs and 4x scopes.

[Updated on: Wed, 17 July 2013 06:28] by Moderator

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322849] Wed, 17 July 2013 10:39 Go to previous messageGo to next message
Gambigobilla

 
Messages:693
Registered:July 2008
@SharkD
4x scope has "1".

Report message to a moderator

First Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322897] Thu, 18 July 2013 04:31 Go to previous messageGo to next message
SharkD is currently offline SharkD

 
Messages:352
Registered:July 2003
That explains it. Thanks.

So, I'm going to need a reflex sight if I want to be effective at short ranges without removing the scope?

Report message to a moderator

Master Sergeant
Re: NCTH Scope penalties below optimal range - broken?[message #322903] Thu, 18 July 2013 11:07 Go to previous message
silversurfer

 
Messages:2793
Registered:May 2009
SharkD

So, I'm going to need a reflex sight if I want to be effective at short ranges without removing the scope?


Either that or have a backup weapon at hand. My snipers both have a Veresk for close combat.

Report message to a moderator

Lieutenant
Previous Topic: About tower defense on 1.13
Next Topic: Bobby No-Go?
Goto Forum:
  


Current Time: Fri Apr 19 21:37:31 GMT+3 2024

Total time taken to generate the page: 0.01541 seconds