No effect on infantry's final AT attack - Problem found :)

PC : Battle Academy is a turn based tactical WWII game with almost limitless modding opportnuities.

Moderators: Slitherine Core, BA Moderators

PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

No effect on infantry's final AT attack - Problem found :)

Post by PirateJock_Wargamer »

I'm playing a couple of Blitzkrieg MP (Town Fight & Killing Fields as French in both) and have noticed that if one of my infantry units attack a German armoured unit, the first AT attack will reduce the armoured unit's morale but if I then do a second AT attack (same units), even if I get 'Deflected' message, there in no further reduction in the armoured unit's morale. I've had this happen every time I've tried it (more than 5 or 6 occasions). Is this right?

Cheers

Edit - updated the Subject to better reflect the issue
Last edited by PirateJock_Wargamer on Thu Apr 21, 2011 10:54 pm, edited 3 times in total.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

It sounds like a bug - if you have a saved game where you can make it happen send it to info@slitherine.co.uk.
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Hi Iain

I've only noticed it in these MP games - it's my 2 games against Amaz_Ed if you can get to them. I'm not saying the issue is specific to them, it's just that I have done more than my usual 1 or 2 AT attacks in a game so noticed it then.

I'll try a singleplayer game tonight and see if I can replicate it if needed.

Cheers
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Thanks - ideally a save right before it happens wher it is repeatable would be good so that probably means single player. Once it has happened it is too late.
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Hi Iain

Couldn't set it up in singleplayer so have used hotseat; the game is dated 18 Feb 2011 18:25. Hope that you can use it. There's a nice ripe Panzer sitting there just waiting to be attacked by the sappers! There's a message in the game - basically I've tried it a couple of times in hotseat and every time the 2nd AT charge attack has no effect. However I have noticed that if the infantry do 2 reactive fire attacks when the tank is adjacent BOTH attacks will reduce the morale. Not sure if the reactive fire attacks are the same as the AT charge attacks.

Cheers
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

PirateJock wrote:Hi Iain

Couldn't set it up in singleplayer so have used hotseat; the game is dated 18 Feb 2011 18:25. Hope that you can use it. There's a nice ripe Panzer sitting there just waiting to be attacked by the sappers! There's a message in the game - basically I've tried it a couple of times in hotseat and every time the 2nd AT charge attack has no effect. However I have noticed that if the infantry do 2 reactive fire attacks when the tank is adjacent BOTH attacks will reduce the morale. Not sure if the reactive fire attacks are the same as the AT charge attacks.

Cheers
Sounds like two different attacks ... ie, Reation Attack drops morale, AT Charge attack doesn't. So, it's missing the morale check script in the AT charge attack then, eh? Or is this on purpose?

Pirate Jock ... If you have a moment you can check the scripts for that morale check ... I think it's under the ASSAULT bsf?

I'm wondering now, if there's going to be a change, if they should both lower morale or both not ... If we look at Armor VS Armor, if you can't kill the target (AP effectiveness low and kill chance low) then the target armor won't take a morale hit.

It's a tough call on that one IMO .... Good catch Pirate!
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Hi Iain/Pip

Is the hotseat game OK to see what's happening?

Cheers
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Nobody has looked yet unfortunately.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

had a quick look and want to be sure what you mean. Assaults & AP attacks are different. A failed assult does not reduce morale, but a deflected shot does.

The reaction AP attack and AP attack use the same code so if one works they both should.
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Hi Iain

I am talking about AP attacks only. From what I've seen the 1st AP attack and BOTH reaction AP attacks reduce the morale; it's only the 2nd AP attack that there seems to be no effect. Very strange if they are using the same code for the AP attack. Is there something in the reaction script wrapped round the AP attack script?

Cheers
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

I've been looking through the scripts and for the life of me cannot find how the morale of the attacked unit is adjusted. Any clues? I assume that the infantry's attack with AT charges uses the scripts in the Fire_AP.bsf and FireLogic_AP.bsf files.

Also, thinking about differences between Assaults and AP attacks. Isn't the outcome of an assault clear cut, i.e. either you destroy the target or you don't. So you wouldn't expect the target's morale to drop on an assault.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Yes that is correct - assaults either the kill the unit or are repulsed and cause no morale damage.

Infantry use teh same AP attack as other units so if it happens for them it woudl happen for tanks too. Anyone seen this?
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

iainmcneil wrote:

Infantry use teh same AP attack as other units so if it happens for them it woudl happen for tanks too. Anyone seen this?
Yes ... I just spent a few hours running a test scenario ... I setup some PzIII's to move towards a line of us_infantry hiding in forest.

I narrowed the code down to the Function MakeAttackAP .... specifically under this code ...

Code: Select all

		// deflection?
		if( damage <= armour )
		{
			if (flameDamage == 0 )
			{
				if(damage == -1)
				{
					// shot misses				
					//AddVizUnitText(unit, "IDS_UNIT_MISSED", "ffffff") ;
					exp = GetAttrib (me, "AT_ExplosionType");
I removed the comment for "AddVizUnitText(unit, "IDS_UNIT_MISSED", "ffffff") ;" ... so here's whats happening ....

When the tank moves adjacent to the infantry unit, it will perform an APattack using the Function MakeUnitFire, not an assault ... I noted this because an assault cost action points, and the MakeUnitFire will only use shots.

Now, if the attack "MISSED" ... text display "IDS_UNIT_MISSED Missing" ... damage will then be -1

Code: Select all

	if(hitRoll > chanceToHit)
	{
		// we missed
		damage = -1 ;
	}
.... then the tank would drop morale , in this case from 100 to 75.

On the 2nd attack, the shot "HIT" ... the text shown as "deflected" ... no morale drop.

The strangest part is that after the tank was at 75 morale and moved another tile, another infantry unit made his first attack and MISSED, but no further drop in morale, when in theory (from previous units 1st attack) it should have dropped.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

The morale drop for a miss is the same as a morale drop for a hit, but a deflected hit should get +10 additional morale loss. A miss reduces morale based on how likely the shot is to penetrate if it did hit so larger rounds are more scary than smaller ones, however a deflection cvauses a morlae drop no matter what because it just panics & confused the crew.

We removed the Miss text because it just cluttered the screen - all that line does is show a "MISSED" text whenever a unit misses its target.
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Hi Iain / Pip

Any luck tracking down what causes the last infantry AP attack to have no effect?

Now that I'm looking for it I can confirm it happens on any map with either side - no need to send you a saved game; just set up a game and try it ;) And it's definitely on the last AP charge. The big issue is that basic infantry only have 1 usable anti-tank attack.

Cheers
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Sorry not yet :(

Very busy getting the translations ready at the moment.
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

No worries - just keeping the request alive.
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Eureka! ... I think :)

Post by PirateJock_Wargamer »

Hi Pip /Iain

I think I've tracked down the issue causing the last AP Charge to have no effect. The MakeAttackAP function uses the TurnAndFire function, and in TurnAndFire script there is a line that reduces the APCharge by 1 ...

Code: Select all

if ( effectiveness == 0 )
		{
			SetAttrib(me, "APCharges", GetAttrib(me, "APCharges")-1 ) ;
		}
The problem is that the APCharge attribute is reduced too soon and so when it would set the effectiveness variable at 100 in CalculateDamageAP function at ...

Code: Select all

if ( ( effectiveness == 0 ) && ( grenades > 0 ) && ( rangeBracket == 0 ) && ( GetAttrib(me, "APCharges") > 0 )  )
	{
		effectiveness += 100 ;
	}
It doesn't happen as the APCharges attribute = 0. Consequently the damage variable remains at 0 and the poor infantry are on a hiding to nothing :cry:

Would you be able to fix in the next update? It really does affect games ... standard infantry only get 1 chance to take out armoured units.

Cheers
pipfromslitherine
Site Admin
Site Admin
Posts: 9878
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

Very cool - we hadn't had a chance to check it out, but we will get the fix in for the next update for sure!

Kudos to you Sir :)

Cheers

Pip
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Hi Pip

Not wishing to sound ungrateful, but was this picked up in the 1.5.4 update? Just wanted to check as had a quick scan of the scripts and still looks as is if the issue is still present. However it's late and I've started early celebrations for the Royal Wedding tomorrow, so may have missed it :oops:

Cheers
Post Reply

Return to “Battle Academy”