pipfromslitherine wrote:There is already logic in there which means they won't fire without at least a reasonable chance of effect.
Pip,
I've looked at reaction fire and there's one piece of logic that appears to override what you said above ...
Just before that logic (they won't fire without at least a reasonable chance of effect) ... it will return an openFire value of 1 if the unit (target) has a chanceToKill me of greater than 10% ...... Meaning, if a Panther appears, the Sherman will open fire because mostly likely the Panther can kill the Sherman, not vise-versa.
I made a little modification to that specific logic using the same logic from the "me" code just after that. Basically, it looks at the rbMultiplier (instead of a flat 10%) when deciding if openFire should return 1. The whole change looks like this ;
Code: Select all
if( (GetTileLOS(x,y,side) ==1 ) && ( GetAttrib(me, "ArmourType") == 1 ) )
{
// what is there chance of killing me currently?
chanceToHit = CalculateChanceToHitAP(unit, me, 0, 0) ;
chanceToPenetrate = CalculateChanceToKillAP(unit, me, 0) ;
chanceToKill = chanceToHit * chanceToPenetrate ;
chanceToKill /= 100 ;
if( distance < 3 )
{
// always fire if 2 or less tiles away and can be seen
openFire = 1 ;
}
rangeBracket = GetRangeBracket (distance) ;
rbMultiplier = rangeBracket * 5 ;
if ( chanceToKill >= rbMultiplier )
{
openFire = 1 ;
}
}
It doesn't solve the problem altogether, but it minimizes it at ranges beyond 4 (increases threshold)...

at ranges of 5 and 6 (bracket=3) the threshold = 15.

at range 7+, the threshold = 20.
pipfromslitherine wrote: It would be possible to add reaction fire functionality in the same vein as hold fire, but might over-complicate the UI for newer players?
I've done this too!! ... A simply "OpFire" button that will mulitply the threshold value for me.
How it works ....

New attribute ... "OpFire" ... default value 1 (no change).

Value of 2 = double's the rbMultiplier value.

Value of 3 = triple's the rbMultiplier value.
Works like the "HoldFire" ... each time you click on it, it will cycle a "range" text in this order ... Long/Medium/Short, then back to Long.
Long Range is the default (no change to games current openFire logic).
Now, using the term "range" is questionable because I'm not really setting a specific range(in tiles), but simply mulitplying the threshold.
I'm testing this to see if the values for medium and long should be 3 and 5 respectively.
So, it will be (1,3,5) instead of (1,2,3).
Works pretty good and I can make a variant to my QuickBattles if anyone wanted to try it.
- Merr