No effect on infantry's final AT attack - Problem found :)
Moderators: Slitherine Core, BA Moderators
-
- Site Admin
- Posts: 9860
- Joined: Wed Mar 23, 2005 10:35 pm
Sorry - we got your fix too late in the testing process. It's a pain, but we will perhaps do a smaller update soon with it in. This update took longer than we anticipated, some features needed quite extensive work, so we wanted to get it done asap. Hopefully we'll be back to more frequent updates now.
Cheers
Pip
Cheers
Pip
-
- Staff Sergeant - Kavallerie
- Posts: 325
- Joined: Fri Apr 17, 2009 9:21 pm
- Location: North West, UK
- Contact:
-
- Staff Sergeant - Kavallerie
- Posts: 325
- Joined: Fri Apr 17, 2009 9:21 pm
- Location: North West, UK
- Contact:
-
- Site Admin
- Posts: 13558
- Joined: Fri Apr 01, 2005 10:19 am
-
- Staff Sergeant - Kavallerie
- Posts: 325
- Joined: Fri Apr 17, 2009 9:21 pm
- Location: North West, UK
- Contact:
PirateJock,PirateJock wrote:Superb - looks like it's been fixed![]()
Haven't delved into the script to check (would take too long to reacquaint myself with the flow) but have managed to lose a few tanks to infantry on their 2nd (last) AT charge![]()
Thanks
I peaked at the script in question ... yes, it's been fixed, you can see the change easily in the MakeAttackAP ...
I'm glad you spotted that earlier and I'm really glad they jumped on it!
snipet from the code ...
Code: Select all
// bug fix for last ap charge
apChargeOld = GetAttrib (me, "APCharges") ;
// focus on unit and turn to face target
TurnAndFire (me, x, y, unit, flameDamage) ;
// part 2 of AP charge bug fix
apChargeNew = GetAttrib (me, "APCharges") ;
SetAttrib (me, "APCharges", apChargeOld) ;
-
- Staff Sergeant - Kavallerie
- Posts: 325
- Joined: Fri Apr 17, 2009 9:21 pm
- Location: North West, UK
- Contact:
-
- Site Admin
- Posts: 9860
- Joined: Wed Mar 23, 2005 10:35 pm
-
- Site Admin
- Posts: 9860
- Joined: Wed Mar 23, 2005 10:35 pm
-
- Site Admin
- Posts: 9860
- Joined: Wed Mar 23, 2005 10:35 pm
Yeah, my "snipet" was from the core folder, Data/Battle/Scripts ... In the FireAP_Logic.bsf, under the function MakeAttackAP.pipfromslitherine wrote:That's what I mean - I though that Merr had looked at the updated files and they were as he posted. If yours are not then that is a problem!
I will check here on my install too.
Perhaps there are other factors invloved... djddalton, was it a Reaction attack (op fire) or a direct attack by you? How many men were left in the unit? Scouts have a full strength of 3 men, if you lose a man, your initial strength is now 66%, whereas a 5 man unit that loses a man would be 80%.
Of course, after all that, maybe they just missed the Stug. So far I haven't seen the original problem since the fix. I can't comment on Op Fire ... that seems to be running some other logic used in the React function.
Rob
No, it was a full-strength unit and a direct attack. I have had one incident where the second attack has destroyed the unit, but for all the others there has been no morale drop at all. This has been annoying as it's been the difference between a retreating unit and a unit that can shoot at me.Merr wrote: Perhaps there are other factors invloved... djddalton, was it a Reaction attack (op fire) or a direct attack by you? How many men were left in the unit? Scouts have a full strength of 3 men, if you lose a man, your initial strength is now 66%, whereas a 5 man unit that loses a man would be 80%.
Of course, after all that, maybe they just missed the Stug. So far I haven't seen the original problem since the fix. I can't comment on Op Fire ... that seems to be running some other logic used in the React function.
Rob
edit: - I had to download the latest update from the website instead of the menu uploader (it wouldn't let me). Could this be why?
I have not noticed anything with op fire - don't tend to use it as I wasted both my charges

-
- Site Admin
- Posts: 9860
- Joined: Wed Mar 23, 2005 10:35 pm
Pip,
djddalton is correct ... The morale drop for the 2nd attack is still broken.
The problem is still in the same part of the code (part 3 of the fix)...
You are setting the APCharges attribute too soon because the "CalculateChanceToKillAP" (for morale) will calculate effectiveness as 0 since the ap charges are 0 ...
If you set the attribute after the "morale" like below, it should be all fixed (Merr commented part) ...
djddalton,
wrt filename ... Look in your main game folder ... mine is ;
C:\Program Files\Slitherine\Battlefield Academy\Battlefield Academy\Data\Battle\Scripts
The filename is FireLogic_AP.bsf ... the date is 5/6/2011 (4:50am)... that's the latest file we're talking about.
No need to open it and check.
-Merr
djddalton is correct ... The morale drop for the 2nd attack is still broken.
The problem is still in the same part of the code (part 3 of the fix)...
Code: Select all
if (flameDamage == 0 )
{
// -1 damage means we missed
damage = CalculateDamageAP(me, unit, aimedShot) ;
// part 3 of ap charge bug fix
SetAttrib (me, "APCharges", apChargeNew) ;
// do any morale reduction for AP
morale = CalculateChanceToKillAP(me, unit, 0) / 4 ;
// reduce morale further for a hit
if ( damage > 0 )
{
morale += 10 ;
}
// Get tile damage variable for unit
tileDamage = GetAttrib(me, "AT_TileDamage");
}
Code: Select all
if ( ( effectiveness == 0 ) && ( GetAttrib(me, "HasGrenade") > 0 ) && ( rangeBracket == 0 ) && ( GetAttrib(me, "APCharges") > 0 ) )
{
// if the unit has grenades override the 0 effectiveness
effectiveness += 100 ;
}
Code: Select all
if (flameDamage == 0 )
{
// -1 damage means we missed
damage = CalculateDamageAP(me, unit, aimedShot) ;
// part 3 of ap charge bug fix
//SetAttrib (me, "APCharges", apChargeNew) ;
// do any morale reduction for AP
morale = CalculateChanceToKillAP(me, unit, 0) / 4 ;
// Merr .....
SetAttrib (me, "APCharges", apChargeNew) ;
// reduce morale further for a hit
if ( damage > 0 )
{
morale += 10 ;
}
// Get tile damage variable for unit
tileDamage = GetAttrib(me, "AT_TileDamage");
}
wrt filename ... Look in your main game folder ... mine is ;
C:\Program Files\Slitherine\Battlefield Academy\Battlefield Academy\Data\Battle\Scripts
The filename is FireLogic_AP.bsf ... the date is 5/6/2011 (4:50am)... that's the latest file we're talking about.
No need to open it and check.
-Merr