Home » MODDING HQ 1.13 » v1.13 General Development Talk » (Potential) NCTH Code Change Discussion
Re: (Potential) NCTH Code Change Discussion[message #324489] Fri, 30 August 2013 13:29 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
dinglehopper

Lasers do not make quick firing from the hip just as easy as if you are aiming down the sights. In other words they should not negate the penalty. Take your laser pen out in the day sometime and from your hip light things up at distnces from 5 to 50 feet. Now swing around a corner, pick a target in that range and see how long it takes you to get your pointer on the target, if you can even see the pointer. It is slightly easier at night. Despite what Hollywood shows, lasers work best when used while aiming down the sights, this is because the sights give you a great point of reference and if the laser is there it provides some assurance you are on target.

Hip based shooting is already inaccurate in the game (depends on CTH_PENALTY_FROM_ALTWEAPHOLD and AIMING_PENALY_FROM_ALTWEAPHOLD). The laser helps somewhat to negate that penalty. How much it improves shooting depends on a laser performance bonus that I implemented in my copy of the code. Lasers do not work like before in this implementation.

old way: lasers work like scopes and apply divisor y to aperture size x just like scopes do

new way: lasers apply a percentage reduction of aperture size when used with hip or iron sight shooting. They don't apply to scopes at all.

This code is not yet available to public testing.

dinglehopper

In fact lasers are moving more and more into the nonvisible spectrums so that you have to use a scope to see them. Since you should be looking through a scope when using laser the military figures making it required is a small price for making it harder for the intended target to see the laser. Many of the lasers in mods are supposed to be these sorts of lasers. Anything with IR or UV in the name or description is for sure not a visible laser without a scope.

Lasers with IR in the name still have big cover penalties in their definitions. So per definition they are not invisible in the game.
I appreciate your insights but Ja2 is not a simulation. So for gameplay reasons I wouldn't make scopes any more powerful. Take a good shooter and the right scope for the range and you almost have a guaranteed hit with the current NCTH system.
Because of that I decided that the laser bonus should only apply to non scoped shooting because that needed an improvement. That's why I also implemented an iron sight performance bonus. It works like the laser performance bonus but only for using iron sights.

I'm still trying to figure out good default values. At the moment I'm playing with IRON_SIGHT_PERFORMANCE_BONUS of 15 percent.
I still have no lasers for my mercs (early in the game).

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #324514] Fri, 30 August 2013 20:00 Go to previous messageGo to next message
Strohmann is currently offline Strohmann

 
Messages:287
Registered:August 2011
Location: Division Thought Crimes
Quote:
I appreciate your insights but Ja2 is not a simulation. So for gameplay reasons I wouldn't make scopes any more powerful. Take a good shooter and the right scope for the range and you almost have a guaranteed hit with the current NCTH system.
Because of that I decided that the laser bonus should only apply to non scoped shooting because that needed an improvement.
Well, then why not apply a second multiplier that lowers the bonus if aiming through a scope instead of scrapping the concept completly? If one doesn't like it, it can still be set to zero.

Quote:
I'm still trying to figure out good default values. At the moment I'm playing with IRON_SIGHT_PERFORMANCE_BONUS of 15 percent.
In my mod i typically had a 12-15 bonus to aiming cap, but i deleted the cth penalties from armours, in vanilla the highend ones apply -15 till -40 and -6 till -16 ...

Btw do you already have preliminary numbers for LASER_PERFORMANCE_BONUS and range at day/night and how they are calculated?

Report message to a moderator

Master Sergeant
Re: (Potential) NCTH Code Change Discussion[message #324515] Fri, 30 August 2013 20:59 Go to previous messageGo to next message
iklop is currently offline iklop

 
Messages:82
Registered:July 2013
Location: Germany
Greetings :wave:

dinglehopper
Take your laser pen out in the day sometime and from your hip light things up at distnces from 5 to 50 feet. Now swing around a corner, pick a target in that range and see how long it takes you to get your pointer on the target, if you can even see the pointer. It is slightly easier at night. Despite what Hollywood shows, lasers work best when used while aiming down the sights, this is because the sights give you a great point of reference and if the laser is there it provides some assurance you are on target.

I totally agree here...

silversurfer
So for gameplay reasons I wouldn't make scopes any more powerful. Take a good shooter and the right scope for the range and you almost have a guaranteed hit with the current NCTH system.
Because of that I decided that the laser bonus should only apply to non scoped shooting because that needed an improvement. That's why I also implemented an iron sight performance bonus. It works like the laser performance bonus but only for using iron sights.

... and mostly here.

I support Strohmann: why not mixing both concepts ? If it's possible:
Wil made settings that high power Lasers provide a slight AP bonus to draw/point the weapon in the AFS mod. Lasers actually do help while pointing the gun, as was pointed out. For "iron sights" (and red dots ? ) you could set the aiming bonus, and for "iron sights + all other scopes" you could set the ap pointing bonus.

Maybe easiest way would be a flag for iron sights that activates the aiming bonus if Laser is attached (as iron sights will most likely be the fewest items out of the scope class) thus adding an "inactive" aiming bonus on the iron sight flagged scope, and simply removing the aiming bonus from the Laser *unsure*

[Updated on: Fri, 30 August 2013 21:36] by Moderator

Report message to a moderator

Corporal 1st Class
Re: (Potential) NCTH Code Change Discussion[message #324529] Sat, 31 August 2013 12:02 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
As per request I made three modifiers for lasers instead of one:

LASER_PERFORMANCE_BONUS_HIP - applies only when shooting from hip
LASER_PERFORMANCE_BONUS_IRON - applies only when aiming over iron sights or other 1x sights
LASER_PERFORMANCE_BONUS_SCOPE - applies only when aiming through scope (anything that has > 1x magnification)

The basic IRON_SIGHT_PERFORMANCE_BONUS and LASER_PERFORMANCE_BONUS_IRON are cumulative. :naughty:

If one of the laser bonuses is not 0 the new calculation takes place otherwise the old laser behaviour is used.
Three modifiers make balancing a lot harder but you asked for it. Razz

I don't have any preliminary numbers for laser bonus yet. Doing artificial tests with single targets is nice but it doesn't reflect the real battles in Arulco.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #324532] Sat, 31 August 2013 13:28 Go to previous messageGo to next message
iklop is currently offline iklop

 
Messages:82
Registered:July 2013
Location: Germany
:cheerleader: Thank you very much :cheerleader:

Report message to a moderator

Corporal 1st Class
Re: (Potential) NCTH Code Change Discussion[message #324620] Tue, 03 September 2013 00:41 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
Actually somehow the mercs could pull off more shots, even somewhat aimed ones(consider aiming is a fixed AP cost and is not reduced by injuries), when injured. This is totally weird to me. That may be just for my perfect super soldiers of course.

Am it seems to me that the squad lead AP bonus does the same. I didn't try hard to verify but it seems that the AP to attack is affected by the bonus beyond the maximum stackable limit. Let's say a character is influenced by 5 levels of squad leader skill, with a stack limit of 3. The attack AP would actually be penalized as if the character was under the influence of 5 levels of AP bonus, while actually receiving only 3.

Edit: It seems that I missed a lot of discussions and actual progress during the past month despite I was actively refreshing the page because I was too dumb to notice there was a "PAGE 2".

[Updated on: Tue, 03 September 2013 01:39] by Moderator

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #324637] Tue, 03 September 2013 05:09 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
Looks like some interesting progress on the implementation of laser bonus. Although it seem to be quite limited in scope, any progress is a good one. Thanks for making such an effort, silversurfer.

What I believe is that one laser dot is as good as another, during day or night, if they are working at their full effectiveness. To model the deterioration of laser at longer than optimal range is tricky though. Although less visible, when you eventually find the laser dot, it's almost as good as a more visible one, cutting down the CTH bonus is not idea in my opinion. I believe what happens in the real world is that it takes you more time to find the less visible dot. But how do you implement that in game? One way I could think about is to make the bonus unavailable to unaimed/insufficiently aimed shots, until sufficient aim clicks are applied. Also it doesn't make sense to me to have identical best laser range day or night, if brightness is actually going to affect laser performance.

I'd like to know the brightness's effect on laser in more detail, is it possible to make it tweakable in ini?

As for the appropriate bonus to apply, I think what laser does is to provide an aimpoint, an aimpoint that is almost as accurate as the one provided by iron/red dot sight. So naturally laser will allow you to match the accuracy of sighted shots, which is to partially/fully remove the 30% CTH cap penalty of hip fire when working properly.

BTW, tweaked laser bonus bring up another issue: is it possible to add hip fire for crouch and prone? Won't exactly be "hip fire" I suppose, but unsighted, just to full fill the functionality of using only laser in stances other than standing. I wouldn't mind if there's no animation for this.

[Updated on: Tue, 03 September 2013 06:29] by Moderator

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #324645] Tue, 03 September 2013 11:03 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
mmm
Actually somehow the mercs could pull off more shots, even somewhat aimed ones(consider aiming is a fixed AP cost and is not reduced by injuries), when injured. This is totally weird to me. That may be just for my perfect super soldiers of course.

I believe this is the same behaviour as for a turtle type merc. He may not move far in one turn but he can shoot as much as others.


mmm

Am it seems to me that the squad lead AP bonus does the same. I didn't try hard to verify but it seems that the AP to attack is affected by the bonus beyond the maximum stackable limit. Let's say a character is influenced by 5 levels of squad leader skill, with a stack limit of 3. The attack AP would actually be penalized as if the character was under the influence of 5 levels of AP bonus, while actually receiving only 3.

At the moment I have no idea what you are talking about and I'm not going to dive into AP calculation code at the moment. :whoknows:


mmm

To model the deterioration of laser at longer than optimal range is tricky though. Although less visible, when you eventually find the laser dot, it's almost as good as a more visible one, cutting down the CTH bonus is not idea in my opinion. I believe what happens in the real world is that it takes you more time to find the less visible dot. But how do you implement that in game?

What is aiming anyway? It's getting your optics aligned with the target and coordinate your movement to keep it there. The laser will help you with that so it influences your chance to hit. That is how it is implemented at the moment and I don't plan to change it. The fact that the laser is harder to catch at longer range makes the aiming process more difficult which results in lesser bonus.


mmm

I'd like to know the brightness's effect on laser in more detail, is it possible to make it tweakable in ini?

At the moment it is not tweakable in the ini. It's a simple multiplier (with values from 0=bright light to 1=darkness) that is calculated from the brightness at the target tile. If it's night and your target is standing next to a lantern the laser dot will be less visible.
However, laser range at night is better in general making lasers more potent at night IF your target is not standing in bright light. Wink

mmm

BTW, tweaked laser bonus bring up another issue: is it possible to add hip fire for crouch and prone? Won't exactly be "hip fire" I suppose, but unsighted, just to full fill the functionality of using only laser in stances other than standing. I wouldn't mind if there's no animation for this.

No. It makes no sense in my opinion because you will have your weapon shouldered when you shoot from crouched or prone position. Using an invalid animation is even more reason to say "No".

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #324656] Tue, 03 September 2013 17:19 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
Well, aiming to me is to point the gun at the intended target. With laser, you get a better indication of where you are point at, which is why I recommended the removal of the hip fire penalty as the bonus, if we consider such penalty as the result of lack of such indication(no sight). And the visibility of the dot doesn't really affect it's accuracy as an indication, that's why I'm against relating the amount of bonus to the visibility of the laser dot. Instead the bonus can be delayed until certain aiming level is achieved to simulated the reduced visibility( to the point it becomes totally invisible= never receiving the bonus).

As for stances, I believe it's still possible to do point shooting from crouch at least. The reason is I see laser as a sight, and it doesn't really work in conjunction with other sights(seeing laser dot through scopes doesn't mean it's helping with aiming). and I'd like the option to use just laser.

I see it's hard to convince you to do a overhaul on what you just did, so I'll just leave everything there. Hopefully you'll see some merits in it later. And don't get me wrong, this is still an improvement compare to the projection factor thing. I just can't hold myself back from asking for more.

The way brightness affect the laser concerns me a little bit. We have brightness half way between broad daylight and total darkness. Like dawn/dusk, or less illuminated tiles. Those situations aren't exactly uncommon. So I'm wondering if it's possible to make the change more "gradual" like the brightness's effect on vision range, rather than just simple on/off. And yes, even I can tell this is complicated.

[Updated on: Tue, 03 September 2013 17:26] by Moderator

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #324661] Tue, 03 September 2013 18:52 Go to previous messageGo to next message
dinglehopper is currently offline dinglehopper

 
Messages:134
Registered:January 2008
I am sorry silversurfer; I did not mean to cause code to be changed, nor was it my intent to turn this into a training sim. Somebody asked for real world insight, and since I had it I provided it.

Lasers and hip fire have recently become a big problem in the real shooting world. It is because the popular Call of Duty game franchise added lasers in a way that made hip fire not only possible but in many circumstances preferable. I would wager this is also a large part of the reason lasers and hip fire is a pushed topic here. Call of Duty, a great game I play a lot (almost as much as JA2), is not real life. It is not even close! In real life pistols are not as accurate as or more accurate than sniper rifles at long ranges. Also, shooting "Akimbo" is little more than a great way to waste ammo.

In the real world of shooting, hip fire is only effective in making the enemies keep their heads down, and even then it is less effective then aimed fire. The only reason to hip fire is you don't expect to hit anything anyways but you just want to make some noise and scare people. In real life there is nothing that can ever make hip fire more accurate and deadly than aimed fire; lasers do not suddenly negate all the disadvantages of hip fire. In professional shooting and soildering no one ever hip fires. Even when using "spray and pray" they will be shooting from cover which is not the same as hip fire. In competition shooting the only group that hip fires are the cowboy shooters, but they are a weird lot where accuracy means how close their gun is to actual old cowboy guns and hitting things is really not that important. And even the cowboy shooters don't use lasers to hip shoot.

Here is some real life reasons that hip shooting doesn't happen in real life:
-You cannot aim while hip shooting, not even with a laser.
-Recoil is much harder to counter when shooting from the hip, making taking consecutive shots at the same target actually take longer than if aiming down the sights.
-Jams are much more common when shooting from the hip; this is also due to the inability to counter recoil. (Note this does not have any effect on revolvers, bolt action, or pump action guns; but semi auto handguns are hit by this really hard especially lower velocity rounds like the .45).
-Aiming down the sights is not technically required in USPS or IDPA competitions; this has lead to irrefutable proof that aiming down the sights is faster and more accurate than firing from the hip at any range when the goal is hitting something.
-Guns are not balanced or designed to be fired from the hip (there a few military heavy weapons where this is not true, none of which I have seen in any JA2 mod). This makes hip fire uncomfortable at best and in some cases dangerous to the shooter.

To play fair, here are the benefits of hip shooting:
-You make a lot of noise and scare people when you shoot from the hip.

Now let

Report message to a moderator

Sergeant
Re: (Potential) NCTH Code Change Discussion[message #324662] Tue, 03 September 2013 19:20 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
That gave me a totally random and 100% OT idea:
If you have lasers, Bloodcats should lose all intention of attacking you and instead chase the dot Very Happy

Report message to a moderator

Captain

Re: (Potential) NCTH Code Change Discussion[message #324663] Tue, 03 September 2013 19:30 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
At least, they could pick up some meat from the ground, or chase the crows.

Report message to a moderator

Lieutenant

Re: (Potential) NCTH Code Change Discussion[message #324665] Tue, 03 September 2013 20:25 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
mmm
And the visibility of the dot doesn't really affect it's accuracy as an indication, that's why I'm against relating the amount of bonus to the visibility of the laser dot. Instead the bonus can be delayed until certain aiming level is achieved to simulated the reduced visibility( to the point it becomes totally invisible= never receiving the bonus).

And who decides how many aim clicks you have to spend? Each weapon/class has its own limit which is also affected by stance and skills.
No thank you, I don't want to make the system any more complicated than it already is.


mmm

The way brightness affect the laser concerns me a little bit. We have brightness half way between broad daylight and total darkness. Like dawn/dusk, or less illuminated tiles. Those situations aren't exactly uncommon. So I'm wondering if it's possible to make the change more "gradual" like the brightness's effect on vision range, rather than just simple on/off. And yes, even I can tell this is complicated.


The brightness modifier is a FLOAT. It can take any value between 0 and 1 so its effect is gradual. We have 15 light levels in Ja2. That means we will also have 15 values for the brightness modifier.


@dinglehopper
I have read your arguments about laser usage in real world and I can understand them. The reason why the CTH bonus is implemented like I did it is that I didn't want to completely remove this functionality from the game. I believe that it works nice for gameplay purposes.
If you don't like one or all of the bonuses just set the according ini setting to 0. Wait, don't set all to 0 because that will activate the old behaviour... Very Happy
Set one to 0.01 or something.

But if you say that you like the idea to have a small bonus of 5% with iron sights then set it like this:

LASER_PERFORMANCE_BONUS_HIP = 0.0
LASER_PERFORMANCE_BONUS_IRON = 5.0
LASER_PERFORMANCE_BONUS_SCOPE = 0.0

It is up to the player to decide. I won't tell them how to play this game.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #324666] Tue, 03 September 2013 21:11 Go to previous messageGo to next message
dinglehopper is currently offline dinglehopper

 
Messages:134
Registered:January 2008
No, no. I am perfectly fine with your changes.

JA2 is where I get to satisfy my inner mall ninja in a fullfilling way. I believe all of us have an inner mall ninja (Mall Ninja noun \ˈmȯl nin-j

Report message to a moderator

Sergeant
Re: (Potential) NCTH Code Change Discussion[message #324690] Wed, 04 September 2013 03:38 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
silversurfer
mmm
And the visibility of the dot doesn't really affect it's accuracy as an indication, that's why I'm against relating the amount of bonus to the visibility of the laser dot. Instead the bonus can be delayed until certain aiming level is achieved to simulated the reduced visibility( to the point it becomes totally invisible= never receiving the bonus).

And who decides how many aim clicks you have to spend? Each weapon/class has its own limit which is also affected by stance and skills.
No thank you, I don't want to make the system any more complicated than it already is.


I know this is not the central issue and you have no plan to alter the system anymore, but this is actually an easy one. One way is to provide bonus on no aiming when within "best laser range" and require full aiming(100% aim click) at "max laser range", anything in between can be calculated base on the amount of distance exceeds the best range. Let's say half way between best and max range, then it requires 50% of the total aim clicks for the bonus to kick in. I think this will be good enough(for me), but you may come up with something even better.


silversurfer
mmm

The way brightness affect the laser concerns me a little bit. We have brightness half way between broad daylight and total darkness. Like dawn/dusk, or less illuminated tiles. Those situations aren't exactly uncommon. So I'm wondering if it's possible to make the change more "gradual" like the brightness's effect on vision range, rather than just simple on/off. And yes, even I can tell this is complicated.


The brightness modifier is a FLOAT. It can take any value between 0 and 1 so its effect is gradual. We have 15 light levels in Ja2. That means we will also have 15 values for the brightness modifier.


So can I take it as 15 are too many? I mean if you could be so kind to do 5 brightness levels to cover the brightness in between it will be a pretty smooth transition.

[Updated on: Wed, 04 September 2013 03:39] by Moderator

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #324700] Wed, 04 September 2013 09:52 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
The more values you can get between 0 and 1 the smoother the transition will be. There is no reason to force it to less.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #324856] Sat, 07 September 2013 16:19 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Well people, I just committed my changes to SVN. Minimum requirements are exe version 6370 and GameDir 1759.

In Ja2_Options.ini the following parameter has to be TRUE (the default).
USE_NEW_CTH_CALCULATION = TRUE

There are 4 new parameters in CTHConstants.ini:

IRON_SIGHT_PERFORMANCE_BONUS = x

This will decrease the size of the base aperture by x percent when using Iron Sights or other 1x sights. It will accept values from -50.0 to 50.0. If you set a negative value the aperture will increase - probably not what you want...
This parameter is there to increase Iron Sight usefulness compared to scopes. If you think that your Iron Sights should be as good as a 2x scope set this parameter to 50.0.


LASER_PERFORMANCE_BONUS_HIP = x
LASER_PERFORMANCE_BONUS_IRON = x
LASER_PERFORMANCE_BONUS_SCOPE = x


These three parameters will also decrease the size of your base aperture by x percent when the respective sight is used and the target is in laser range. They will accept values from 0.0 to 50.0.
Keep in mind that IRON_SIGHT_PERFORMANCE_BONUS and LASER_PERFORMANCE_BONUS_IRON are cumulative. If you set both to 50, well, ... :superman:

When all three values are 0.0 the old NCTH code will be active and use the Projection Factor. Your items will show you the property in UDB.
If you want the new behaviour set at least one of these three parameters to something other than 0 and the game will use the from the item and displays this value (divided by 10 to get # of tiles) in UDB.


The defaults are all 0.0 at the moment which means no change from previous behaviour. Set them to whatever you want to balance the game to your liking.

The values I'm playing with at the moment are (using stock 1.13 on WF6.07 maps):

IRON_SIGHT_PERFORMANCE_BONUS = 15.0
LASER_PERFORMANCE_BONUS_HIP = 20.0
LASER_PERFORMANCE_BONUS_IRON = 10.0
LASER_PERFORMANCE_BONUS_SCOPE = 5.0

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #324864] Sat, 07 September 2013 20:22 Go to previous messageGo to next message
Strohmann is currently offline Strohmann

 
Messages:287
Registered:August 2011
Location: Division Thought Crimes
How does the and LASER_PERFORMANCE_BONUS during the different brightness level get calculated now (or doesn't the range get modified at all)? What does happen beyond , does the bonus drop to 0 or does it decrease gradually? How does the decrease get calculated?

[Updated on: Sat, 07 September 2013 22:05] by Moderator

Report message to a moderator

Master Sergeant
Re: (Potential) NCTH Code Change Discussion[message #324866] Sat, 07 September 2013 23:06 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
The laser uses the same calculation for laser range that has been there forever.

BestLaserRange is the range within the laser always is effective. It is defined by item property and not calculated.
MaxLaserRange is the maximum range that is affected by light level at the target.

MaxLaserRange will always be higher than BestLaserRange. The light level defines how much higher. At night this can be more than 2x as high but you will have a harder time to see the target because it is dark.

There is also a Brightness Modifier (values from 0.0 to 1.0). This defines laser effectiveness at the target. It is multiplied with the Laser_Performance_Bonus. If it is bright at the target spot the modifier will have a low value. It gradually increases the darker it is.

Last but not least there is an EffectiveLaserRatio to define effectiveness between BestLaserRange and MaxLaserRange.

So within BestLaserRange the final bonus gets calculated like this:
iBasicAperture = iBasicAperture * (FLOAT)( (100 - (fLaserBonus * fBrightnessModifier)) / 100)

Between BestLaserRange and MaxLaserRange the formula is this:
iBasicAperture = iBasicAperture * (FLOAT)( (100 - (fLaserBonus * fBrightnessModifier * fEffectiveLaserRatio)) / 100)

At some point the bonus is 0 or near 0 and this point can be reached long before MaxLaserRange is reached.

If you want to see the complete code check function "void AdjustTargetCenterPoint" in LOS.cpp for example.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #325082] Thu, 12 September 2013 09:22 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
Ok, I guess I didn't quite understand the brightness part, I think I do now. I just don't think we actually have 0 and 1 brightness tiles in game. So is it fair to say that we'll always get less than the bonus figure set in the ini?

Still, can I interest you in adding something like percentage hip fire penalty reduction for laser? After all that's where the reduced accuracy for hip fire originated. Altering the aperture alone just don't properly compensate for that.

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #325094] Thu, 12 September 2013 15:54 Go to previous messageGo to next message
demonbreather is currently offline demonbreather

 
Messages:13
Registered:September 2013
Re: Bloodcats chasing lasers. YES PLEASE! Would at least be fun for a joke playthrough.

Report message to a moderator

Private
Re: (Potential) NCTH Code Change Discussion[message #325106] Thu, 12 September 2013 19:48 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
mmm
Ok, I guess I didn't quite understand the brightness part, I think I do now. I just don't think we actually have 0 and 1 brightness tiles in game. So is it fair to say that we'll always get less than the bonus figure set in the ini?

Yes, the brightness modifier will probably never reach 1.0. That's why we still need to experiment with the Ini settings to find some good balanced values.


mmm

Still, can I interest you in adding something like percentage hip fire penalty reduction for laser? After all that's where the reduced accuracy for hip fire originated. Altering the aperture alone just don't properly compensate for that.

No? Very Happy
Altering the base aperture already compensates for the hip fire penalty. I don't want to make laser supported hip firing as powerful as using iron sights because that simply doesn't make sense.
Actually you could do that already by lowering CTH_PENALTY_FROM_ALTWEAPHOLD and/or AIMING_PENALY_FROM_ALTWEAPHOLD if you think that the penalty is too high.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #325131] Fri, 13 September 2013 03:02 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
Well, that's why I proposed "percentage reduction", so the amount is fully open to tweak. Sure, I could do that in the ini to reduce the overall penalty(so hip fire CAN possibly be as powerful as iron sight, even without laser, as it is now) but my intention is to provide the right bonus(in my opinion) for laser. And I imagine it is not that complicated, so it won't cost you too much energy, no?

Anyways, just want to let you know that it won't break anything. If nobody else find the additional option useful, at least I will.

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #326027] Tue, 01 October 2013 08:22 Go to previous messageGo to next message
storytime is currently offline storytime

 
Messages:19
Registered:March 2004
Location: Ontario
NCTH goes only some way to fixing shooting mechanics. This is how shooting should work:

Step 1: Aim
  This is basically the rate of vector error correction / time.  Anyone can line up
  a sight precisely with a point.  It's that some do it more quickly (and JA has no
  wind or ballistics).  Input whatever factors you want affecting that rate.  For
  a game you need to choose a fixed amount of time because that determines the AP
  spent when you press a button.  For this purpose all characters must spend the
  same AP regardless of skill, weapon or firing mode.  The only variable is the aim
  vector, resulting from your function determining how close the soldier gets in the
  given time span.  This result must be saved for later use.
Step 2: Shoot
  This is essentially the same as aim except that it is the vector error of the
  projectile as determined by your weapon and ammo.  The deviation is cumulative
  with the result from step 1.
Step 3: Adjust Aim
  Aim is a state, not a function of pulling the trigger.  (This is where all games
  get it wrong; because all commercial devs copy the wrong methods of previous games
  resulting in a perpetual chain of wrongness).  Here the aim state is shaken by
  recoil.  This result must again be saved for later use.
Step 4: Repeat Shot or Reset Aim
  When a soldier presses the trigger again shooting at the same target he must
  start aiming from where he was aiming after the last shot (at least relative to the
  target).  Otherwise the soldier is executing a redundant process of repeating Step
  1 from ground zero, spending all of the AP for that.  This creates the absurd
  problem of needing to include aim AP with every trigger pull (for every firing mode
  for every weapon if the weapon.ini is any indicator).  Aim should only reset if
  something is done that warrants it: spending/forfeiting AP elsewhere than shooting
  at that target since the last shot.  If you want to account for target movement, the
  only way is to save something about the last AP use of each soldier on the map,
  representing whether, how fast and in what direction the soldier is currently
  moving.  Expending prep AP again in the next shot on either current or next turn
  should reduce aim error from where it already is.


Example code:
Vector aimVector; //current state of weapon aim
Vector shotVector; //the direction the bullet goes
Vector shot() {
  aimVector = getAimVector(soldier);
  shotVector = aimVector + getBulletVector(weapon);
  return shotVector;
}


I don't know what data type the JA code actually uses for those values. I'm just getting the gist of it. The lack of a true aim state is ultimately why it's better to fire in auto in the longest possible bursts rather than make short bursts. There are also too many pointless steps/factors added/retained in NCTH. The entire target centered aperture with every shot basis must be replaced for any sensible mechanic to be implemented.

Another possibility is having a focus mode. A soldier can have a focus target. AP can be manually spent to increase aim precision at any point. It can also be spent automatically to maintain aim on the target's turn based on how much AP the target spends or some such.

[Updated on: Tue, 01 October 2013 08:28] by Moderator

Report message to a moderator

Private
Re: (Potential) NCTH Code Change Discussion[message #326038] Tue, 01 October 2013 11:55 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
So simple and elegant ... now write down the get___Vector functions and see if you can manage in a less arcane way than previous systems.

Report message to a moderator

Captain

Re: (Potential) NCTH Code Change Discussion[message #333553] Sat, 07 June 2014 13:37 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
In retrospect the most appropriate bonus for laser for NCTH is probably FlatBase. It is a modifier I've never seen being used. It simulates what laser does, which is to improve point shooting/less aimed shots, while doing litle to fully aimed shots. Only if someone could relate this modifier to laser stats...

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #334158] Fri, 11 July 2014 18:18 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Because some people are not happy about the current implementation of the scope penalties I implemented a little modifier. This modifier defines at what point the penalty starts.

For NCTH Headrock imagined a certain view cone in front of the shooter. A scope would project that cone to targets farther away. So a target at the 70m default shooting distance would look the same through a 2x scope at 140m. The closer the target is the more difficult it will get to aim through a scope which is represented by the AIM_TOO_CLOSE_SCOPE modifier.

While I agree that it is harder to aim at a target that is too close to the shooter who is looking through a scope I also think that a few meters are not going to affect his ability to aim very much. After all it's not a big difference if the target is at 130m instead of 140m, right? Also it depends on how large the target appeared to begin with.

;------------------------------------------------------------------------------------------------------------------------------
; This value defines at which point below scope range the AIM_TOO_CLOSE_SCOPE based penalty starts. A value of 0.0 removes
; scope penalties. A value of 1.0 means the penalty starts as soon as the target is just a little below
; scope range. 0.5 means penalty starts at half the scope range and so on...
;------------------------------------------------------------------------------------------------------------------------------
AIM_TOO_CLOSE_THRESHOLD = 0.8

Imagine this modifier as a slider that reaches from 0.0 to 1.0 and with it you can select where the penalty should start.

Taking the example from above if the modifier is 1.0 we will start to suffer a penalty as soon as that target moves 1m towards us and is now at 139m. This is how it was working until now.
With the current default of 0.8 the target can move 28m towards us (distance 112m) and we would not suffer any penalty. Below that the penalty will slowly start.

This modifier is implemented in revision 7328 and GameDir 2066.

[Updated on: Fri, 11 July 2014 18:21] by Moderator

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #334451] Tue, 22 July 2014 13:43 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
On request I implemented a new functionality for iron sights to make them a little more powerful over longer distances. This change is active from revision 7358, GameDir 2077.

There is a new switch in CTHConstants.ini:

; This option affects DEGREES_MAXIMUM_APERTURE for iron sights. If it is set to FALSE
; the basic aperture will grow linearly to the distance to target (old behaviour).
; If TRUE the aperture will use a curve to grow slower over distance making iron sights
; more powerful over longer distances.
IRON_SIGHTS_MAX_APERTURE_USE_GRADIENT = FALSE

This is set to FALSE at the moment because it could mess up mods that try to balance iron sights and similar optics with other means. If you want to use this experimental feature you have to set the switch to TRUE.

What does it do?

The basic aperture size is calculated using DEGREES_MAXIMUM_APERTURE from CTHConstants.ini. The default for DEGREES_MAXIMUM_APERTURE is 15. This leads to a basic aperture size of ~18,1168 at 7 tiles range. This was equal for all shots. This basic aperture was then growing or shrinking based on the distance to the target. It was a linear process. At 14 tiles range it grew to ~36,2336 (x2) and so on.

The new formula applies a curve to the basic aperture which makes it grow slower for iron sights. At 7 tiles it is ~15,2995 and at 14 tiles it's 29,5962 for example.
Don't expect wonders though. For long range shooting you will still want scopes. Wink

The formula that is used is:
new_basic_aperture = basic_aperture * ( 1 / sqrt( tiles ) / 4 + 0,75 )


http://picload.org/image/lwgipcw/basicaperture.png

All other modifiers are applied on the modified basic aperture. That means for example that if you set IRON_SIGHT_PERFORMANCE_BONUS or other iron sight related bonuses too high your iron sights may outperform scopes. So be careful.

On top of that I also added some missing NCTH calculations for the AI. This should give them some missing bonuses depending on their equipment.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #334546] Fri, 25 July 2014 13:30 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
Doesn't make sense though consider it essentially means not only you sway less somehow when you aim at a distant target, your range finding and compensation is more accurate at distance. If anything I'd rather have the aperture curve the other way, be it scope or iron sight.

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #334547] Fri, 25 July 2014 14:03 Go to previous messageGo to next message
Strohmann is currently offline Strohmann

 
Messages:287
Registered:August 2011
Location: Division Thought Crimes
The way scopes currently work, acting as divisor to the aperture size, results in iron sights rapidly loosing effectiveness over distance.

So the proposal was to introduce a method to retain their effectiveness somewhat over distance, but without making them more accurate at any range (this is what IRON_SIGHT_PERFORMANCE_BONUS and co. do, and would make them too accurate close-up to get any meaningful effectiveness at longer ranges) or interfering with the scope-magnification-to-range-balance (this is what increasing the NORMAL_SHOOTING_DISTANCE would do).

Report message to a moderator

Master Sergeant
Re: (Potential) NCTH Code Change Discussion[message #334825] Thu, 07 August 2014 16:21 Go to previous messageGo to next message
Tyxe is currently offline Tyxe

 
Messages:78
Registered:May 2012
Location: France
I have just seen this new parameter right now and love the mechanic.
Like strohmann wrote it corrects something that was lacking.
I still wanted to improve iron sight despite already having IRON_SIGHT_PERFORMANCE_BONUS 20 and NORMAL_SHOOTING_DISTANCE 100.
But close range shoots were already a little bit too easy (the issue with increasing IRON_SIGHT_PERFORMANCE_BONUS) and i did not want to improve/modify scopes further too (NORMAL_SHOOTING_DISTANCE issue).

Really love the options you have introduced in the NCtH formula silversurfer, you have done an amazing work on the most important gameplay aspect of JA2.
I'm going to test it but if it's as good as i think NTcH is almost as perfect as i can imagine it !
Maybe it could be even better if instead of making this option FALSE/TRUTH you could find a way to give the choice to more accurately adjust it.
I need to playtest it though, maybe your new grow line is the one i would enjoy the best anyway, like it happened with the default IRON_SIGHT_PERFORMANCE_BONUS 20 value Smile (but it would maybe allow me to decrease IRON_SIGHT_PERFORMANCE_BONUS a bit in order to decrease/not improve close shots accuracy but improve even further long range one).
Thank you for your fine work anyway, very much appreciated.




Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #334829] Thu, 07 August 2014 20:31 Go to previous messageGo to next message
Tyxe is currently offline Tyxe

 
Messages:78
Registered:May 2012
Location: France
I quickly playtested it taking some screenshots to easily notice the difference.
And it works great !
I strongly suggest the option to be TRUE by default but lowering the vanilla IRON_SIGHT_PERFORMANCE_BONUS to 5 or 10.
Only good consequences doing that IMO : a bit less accurate very close shot, as accurate close shot and more accurate medium/long shots.

[Updated on: Thu, 07 August 2014 21:56] by Moderator

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #334835] Fri, 08 August 2014 11:33 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
I can see how it makes gameplay sense from the beginning. It is just strange to me that you could, say, somehow maintain less than 2x the spread radius at twice the distance.

Report message to a moderator

Corporal
Re: (Potential) NCTH Code Change Discussion[message #334842] Fri, 08 August 2014 16:01 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Sure, it's an artificial modifier to balance gameplay. We all know that once the player has top equipment he has a big advantage over the enemy. It's the AI that uses iron sights most of the time so the AI benefits more than the player.

It's an option that defaults to "off" so you have to activate it anyway in order to use it. If you don't like it just leave it off.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #335672] Wed, 10 September 2014 15:26 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
I added a new modifier for NCTH to CTHConstants.ini in revision 7504 GameDir 2143.

; If IRON_SIGHTS_MAX_APERTURE_USE_GRADIENT is TRUE the following parameter defines
; how fast the aperture will grow. A lower value will make it grow slower thus making
; iron sights even more powerful.
; A value of 2.0 will make iron sights almost as powerful as a 2x scope whereas a value
; of 5.0 causes just a little change from the old behaviour.
; Values can go from 2.0 to 5.0
; The default is 3.0
IRON_SIGHTS_MAX_APERTURE_MODIFIER = 3.0

If you play with "IRON_SIGHTS_MAX_APERTURE_USE_GRADIENT = TRUE" you can now set how slow/fast the basic aperture will grow for iron sights. The lower the value the more useful iron sights stay over longer distances. The old fixed value that the formula used was 4.0. The new default is already an improvement. You may need to lower IRON_SIGHT_PERFORMANCE_BONUS in your configuration so iron sights do not outperform 2x scopes.

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #337518] Mon, 03 November 2014 15:25 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Starting with GameDir 2176 the option IRON_SIGHTS_MAX_APERTURE_USE_GRADIENT is set to TRUE per default. This should make it a little easier for the player to hit targets with iron sights, especially at the beginning of the game where scopes aren't available.
Of course this helps the enemy soldiers too. Razz

Report message to a moderator

Lieutenant
Re: (Potential) NCTH Code Change Discussion[message #337579] Wed, 05 November 2014 22:38 Go to previous message
Tyxe is currently offline Tyxe

 
Messages:78
Registered:May 2012
Location: France
silversurfer
Starting with GameDir 2176 the option IRON_SIGHTS_MAX_APERTURE_USE_GRADIENT is set to TRUE per default. This should make it a little easier for the player to hit targets with iron sights, especially at the beginning of the game where scopes aren't available.
Of course this helps the enemy soldiers too. Razz

I approve wholeheartedly, much better than a huge IRON_SIGHT_PERFORMANCE_BONUS.
However i would lower IRON_SIGHT_PERFORMANCE_BONUS from 20 to 10 (I play with 0 bonus but NORMAL_SHOOTING_DISTANCE = 100 and it's fine) in the same time.

Report message to a moderator

Corporal
Previous Topic: [request] (female) russian (and/or other) IMP-Speech-files
Next Topic: HOW DO I GET THE 7623 EXE TO ACTUALLY RUN WITH SVN CHECKOUT 7623
Goto Forum:
  


Current Time: Fri Mar 29 06:38:06 GMT+2 2024

Total time taken to generate the page: 0.02716 seconds