|
|
|
|
|
|
Re: Commentary on Ja2 1.13[message #291772]
|
Mon, 10 October 2011 00:44
|
|
KEN C |
|
Messages:244
Registered:May 2007 Location: Aberdeen Washington USA |
|
|
1.13 started as a mod platform. Notice all the mods produced in the first years. NOW it has morphed into nothing more than a gun mod. All you have to do is ask and someone will draw a picture of your favorite gun no matter how obscure, obsolete, irrevelent, futuristic, outlandish it may be. Then wham it is in the game!
When was the last senario mod produced? Not for more than 3 or 4 years now. Now its all about making the game more complicated not gameplay, immersion, or storyline. There are so many adjustments to be made just to be able to play the game I do not know why any new person would bother. Realism Bah! true to vanilla? Everyone has thier own view. And those who Whine the loudest or know how to code................enough!
Report message to a moderator
|
Sergeant 1st Class
|
|
|
|
Re: Commentary on Ja2 1.13[message #291778]
|
Mon, 10 October 2011 05:15
|
|
KEN C |
|
Messages:244
Registered:May 2007 Location: Aberdeen Washington USA |
|
|
I hope "we" get over shiny features soon and get onto scenario.
Report message to a moderator
|
Sergeant 1st Class
|
|
|
|
|
|
|
|
|
|
|
Re: Commentary on Ja2 1.13[message #292126]
|
Sat, 15 October 2011 09:10
|
|
Pyro |
|
Messages:11
Registered:April 2005 Location: Slovenia |
|
|
SandroI may look into it soon. I wonder what feature made this to happen. Do you use NCTH?
I'm not sure, whatever the default in the newest official version is. How can I turn it off or at least check?
Dieter
It is true that enemies without a weapon will act rather strange, e.g. mostly try to run to the sector border and leave.
They do have ranged weapons.
Dieter
However most handguns have a range of somewhere 10 to 12 tiles early in the game. The sight range is roughly 26 tiles under ideal conditions. I believe any gun can be fired up to double its recommended range, making this 20 to 24 tiles early in the game. As a result most enemies should try to take "lucky" shots at you almost as soon as they can see you. (However I am not sure if NCTH changed the default behavior of double the gun range.)
That is the problem, they should shoot but they don't. Sometimes they even aim at my merc one turn, the next turn they just run back and forth. When I doubled the range of all weapons they started to behave roughly as one would expect.
[Updated on: Sat, 15 October 2011 09:12] by Moderator Report message to a moderator
|
Private
|
|
|
|
|
|
|
Re: Commentary on Ja2 1.13[message #292154]
|
Sat, 15 October 2011 20:56
|
|
tazpn |
|
Messages:99
Registered:December 2007 Location: CA, USA |
|
|
I have a change that I will be using in my game after looking at the code.
Basically, in AICalcChanceToHitGun the change to hit is reduced to zero if the AI exceeds the gun range by 10% and is only 50% when in that range. With pistols I'm not sure that's even an additional square.
I've changed that code to use externalize the parameters to the CTHConstants.ini file. The result is no change in how actual code runs but now those hard coded parameters should be modifiable.
Patch files for base repository and data here (I'll send RoWa21 a PM with this info if you want to include).
http://www.mediafire.com/?69o6s94qddlabps
I added a feature that will use a gradual reduction in chance to hit so that at close to the max range you have little drop off but when you reach the max range you will have the full reduction.
I think I will try these settings which I think will still allow AI to try shooting when at twice the gun range but have a full 75% reduction in chance to hit at the full range.
Toggle SpoilerCTHConstants.ini ;------------------------------------------------------------------------------
; MAX_EFFECTIVE_RANGE_MULTIPLIER
; Maximum effective range of Gun that AI will still attempt to shoot
; Default: 1.1 which equates to 110% of the gun's effective range
; MAX_EFFECTIVE_RANGE_REDUCTION
; Maximum reduction of chance to hit when exceeding effective range
; Default: 0.5 which equates to 50% reduction
; MAX_EFFECTIVE_USE_GRADIENT
; Whether to apply the reduction as a flat reduction or as gradient
; Default: FALSE which is flat reduction when exceeding range
;------------------------------------------------------------------------------
MAX_EFFECTIVE_RANGE_MULTIPLIER = 2.0
MAX_EFFECTIVE_RANGE_REDUCTION = 0.75
MAX_EFFECTIVE_USE_GRADIENT = TRUE
Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Re: Commentary on Ja2 1.13[message #292163]
|
Sat, 15 October 2011 21:57
|
|
tazpn |
|
Messages:99
Registered:December 2007 Location: CA, USA |
|
|
I've done testing to try and ensure it does no harm. Whether it does any good, I've done some testing but its a difficult one for me to setup a map that consistently reproduces the problem to test with. The save I have been testing with the enemy mercs are indeed firing their guns when I use my altered settings where they would not without them. The enemy cannot hit the broadside of a barn most times but they are at least trying which I thought was half the problem. I'm not saying this is a perfect fix more like this is something I am going to try and if you like you can try as well.
I dont have any ready saves where they are running around being completely indecisive. My major concern here is that they may stop trying to advance because the CTH is non-zero when outside of effective range and they will try to shoot. I think they should probably try to advance until they are in effective range but still try to reserve enough AP to fire at least once when not in effective range.
The problem I have is that my mercs can still hit when outside of the effective range (which does not use this change) but the enemy will usually not even try.
Edit: First I set my settings above wrong, not the patch though. Should have been 0.75 instead of 0.25 to get more reduction at distance and 0.9 isn't too bad in limited testing.
After some more testing, the enemy is more than willing to fire at 2x the max range of the gun without NCTH but will charge in open fields with current NCTH. My settings have them firing at 2x the gun range but not advancing in most cases. And they are having more success hitting at that range with those weapons. Admittedly this may not be the intent of NCTH so I'll leave that to the maintainer.
[Updated on: Sat, 15 October 2011 22:42] by Moderator Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Re: Commentary on Ja2 1.13[message #292180]
|
Sun, 16 October 2011 01:16
|
|
tazpn |
|
Messages:99
Registered:December 2007 Location: CA, USA |
|
|
Now a more controversial change and perhaps unrelated now since its not in NCTH code. In line with my comment above I tried to make soldiers more likely to make a partial move toward the target if the chance to hit is really, really low and out of effective gun range but still reserving enough AP to make a partial shot. I also allowed this on Cunning soldiers instead of just aggressives figuring that target is in sight they are more likely to fight.
This with the other change has at least made them more aggressive and less likely to run in circles when armed with pistols and has actually made them quite a threat again. Not crazy about the implementation since I'd like a more accurate range check and AP calculation since AP to fire will change after movement. I figure the increased CTH by getting closer will counteract the cost to move.
Anyway food for thought and here is that change if anyone is interested. Certainly needs playtesting before being included anywhere but I'll keep it in my games.
Toggle SpoilerIndex: GameSource/ja2_v1.13/Build/TacticalAI/DecideAction.cpp
===================================================================
--- GameSource/ja2_v1.13/Build/TacticalAI/DecideAction.cpp (revision 4714)
+++ GameSource/ja2_v1.13/Build/TacticalAI/DecideAction.cpp (working copy)
@@ -4815,6 +4815,39 @@
pSoldier->bDoAutofire = 0;
}
+ // IF WAY OUT OF EFFECTIVE RANGE TRY TO ADVANCE RESERVING ENOUGH AP FOR A SHOT IF NOT ACTED YET
+ if ((pSoldier->bActionPoints > BestAttack.ubAPCost) &&
+ (pSoldier->aiData.bShock == 0) &&
+ (pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2) &&
+ (BestAttack.ubChanceToReallyHit < 8) &&
+ (PythSpacesAway( pSoldier->sGridNo, BestAttack.sTarget ) > usRange / CELL_X_SIZE ) &&
+ (RangeChangeDesire( pSoldier ) >= 3) ) // Cunning and above
+ {
+ sClosestOpponent = Menptr[BestShot.ubOpponent].sGridNo;
+ if (!TileIsOutOfBounds(sClosestOpponent))
+ {
+ // temporarily make merc get closer reserving enough for expected cost of shot
+ USHORT tgrd = pSoldier->aiData.sPatrolGrid[0];
+ INT8 oldOrders = pSoldier->aiData.bOrders;
+ pSoldier->aiData.sPatrolGrid[0] = pSoldier->sGridNo;
+ pSoldier->aiData.bOrders = CLOSEPATROL;
+ pSoldier->aiData.usActionData = InternalGoAsFarAsPossibleTowards( pSoldier, sClosestOpponent, BestAttack.ubAPCost, AI_ACTION_GET_CLOSER, 0 );
+ pSoldier->aiData.sPatrolGrid[0] = tgrd;
+ pSoldier->aiData.bOrders = oldOrders;
+
+ if (!TileIsOutOfBounds(pSoldier->aiData.usActionData))
+ {
+ pSoldier->aiData.usActionData = pSoldier->sGridNo ;
+ pSoldier->pathing.sFinalDestination = pSoldier->aiData.usActionData;
+
+ pSoldier->aiData.bNextAction = AI_ACTION_FIRE_GUN;
+ pSoldier->aiData.usNextActionData = BestAttack.sTarget;
+ pSoldier->aiData.bNextTargetLevel = BestAttack.bTargetLevel;
+ return( AI_ACTION_GET_CLOSER );
+ }
+ }
+ }
+
//////////////////////////////////////////////////////////////////////////
// IF NOT CROUCHED & WILL STILL HAVE ENOUGH APs TO DO THIS SAME BEST
// ATTACK AFTER A STANCE CHANGE, CONSIDER CHANGING STANCE
Report message to a moderator
|
Corporal 1st Class
|
|
|
|
|
Re: Commentary on Ja2 1.13[message #292195]
|
Sun, 16 October 2011 06:58
|
|
usrbid |
|
Messages:1506
Registered:December 2008 |
|
|
SandroI see, so it's what I thought - the NCTH probably messes the AI estimated attack success probability.
One thing I noticed when playing Horn of Aftica on Tais' latest unstable SCI is, that my mercs almost always start with zero percent to hit. Even with a gun with a huge range, like the G3, aiming at the torso of an enemy very close e.g. 13 tiles.
Even spending all aim clicks I rarely got above 50 percent. Once I reached 86% with an AK from 1 tile away, that was the best I got. Then I tried a 3 round aimed burst, all bullets missed. I was better off closing in with Bull and using knuckle dusters, two hits and the enemy was down.
I can see that if the enemy AI uses the to hit percentage to decide what to do, that the AI behavior would be completely screwed up.
You know how this feels guys? Have you ever taken Gasket into combat in version 2085? Where you spend aim clicks and the CTH suddenly jumps from zero percent to 50 percent. It feels like that, like the marksmanship of the merc is really low. Almost like the code ignores MRK or doesn't take all of it into the calculation.
[Updated on: Sun, 16 October 2011 07:02] by Moderator Report message to a moderator
|
|
|
|
|
|
|
Re: Commentary on Ja2 1.13[message #292214]
|
Sun, 16 October 2011 13:36
|
|
usrbid |
|
Messages:1506
Registered:December 2008 |
|
|
RoWa21@dieter: you are talking about ncth, or?
Yes, I am playing Tais' latest unstable SCI with NCTH, I posted more details in the Horn of Africa thread.
The percentages are from pressing the 'F' key. The example was with a G3, with bipod and battle scope, using Steroid prone, enemy was 13 tiles away, hovering the aim cursor over the standing enemy torso, with no aim clicks, 'F' reads out zero percent. This was at night and Steroid was able to see the enemy, meaning the enemy showed in color, not a dark grey shape. Spending all aim clicks I got up to 50 percent. In this situation the CTH would have been so high in the old system that you would try to go for a head shot.
Another thing I noticed, when I auto fire short bursts, maybe 3-5 rounds, the bullets seem to fly past the enemy all along the same line, all of them missing. I saw the enemies have the same problem. It used to be that with e.g. a 50% CTH and firing 5 bullets, you would get something like shot #1 50%, #2 45%, #3 40% etc. and you would have hit maybe 2-3 times depending on luck, but even with 2 hits the enemy would end up dead.
With the new system Barry shot a 3 round burst at an enemy from 6 tiles away and all bullets zipped right past the enemy. Which wasn't a problem because when the enemy shot back, probably spending all APs on auto fire, about 15 bullets zipped right past Barry. The two repeated that twice, suppressing each other and lowering each other's APs. It was quite comical actually.
[Updated on: Sun, 16 October 2011 13:51] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|