Page 2 of 3

Posted: Thu Apr 28, 2011 10:32 pm
by pipfromslitherine
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

Posted: Fri Apr 29, 2011 12:07 pm
by PirateJock_Wargamer
Hi Pip

No worries :) Looking at the oodles of improvements/additions in this update I can understand a slight delay. Just wanted to check you hadn't done something clever somewhere else in the scripts to fix it.

Thanks

Posted: Thu Sep 08, 2011 11:12 am
by PirateJock_Wargamer
Hi Pip

I'm not sure if this was fixed in the latest update (1.6.0) with all the other changes, fixes etc ... so bringing it up again to keep it alive - I see it as my own little crusade :wink:

Cheers

Posted: Thu Sep 08, 2011 11:46 am
by IainMcNeil
To be honest I dont remember - i think it was but check and if not let us know!

Posted: Fri Sep 09, 2011 12:25 pm
by PirateJock_Wargamer
Superb - looks like it's been fixed :D

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 :cry:

Thanks

Posted: Fri Sep 09, 2011 12:41 pm
by IainMcNeil
Good! :)

Posted: Tue Sep 13, 2011 4:08 pm
by Merr
PirateJock wrote:Superb - looks like it's been fixed :D

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 :cry:

Thanks
PirateJock,

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) ;

Posted: Tue Sep 13, 2011 7:30 pm
by PirateJock_Wargamer
Hi Merr

Thanks for finding that :)

Cheers

Posted: Fri Oct 14, 2011 5:44 pm
by djddalton
I am now having this problem playing market garden - second AT charge is useless every time. Using scout on stugs

Posted: Fri Oct 14, 2011 7:32 pm
by pipfromslitherine
That's odd. There are no special scripts for MG, so it should be using the same scripts as for any other unit.

Are you only seeing this on scouts?

Cheers

Pip

Posted: Fri Oct 14, 2011 10:15 pm
by djddalton
pipfromslitherine wrote: Are you only seeing this on scouts?
Hey Pip

No, I've noticed it on all the infantry units I tried!

Posted: Fri Oct 14, 2011 10:39 pm
by pipfromslitherine
Does your script read as per the fix shown in Merr's post above? It should definitely fix it!

Cheers

Pip

Posted: Sat Oct 15, 2011 8:35 am
by djddalton
Does this go in BATTLESCRIPT? I'll put it at the bottom...I thought it had changed at the update!

Regards,

djddalton

Posted: Sat Oct 15, 2011 6:55 pm
by pipfromslitherine
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.

Cheers

Pip

Posted: Sat Oct 15, 2011 7:52 pm
by Merr
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.
Yeah, my "snipet" was from the core folder, Data/Battle/Scripts ... In the FireAP_Logic.bsf, under the function MakeAttackAP.

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

Posted: Sat Oct 15, 2011 8:10 pm
by djddalton
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
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.

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 ;)

Posted: Mon Jan 02, 2012 1:06 am
by djddalton
Still getting this problem!

Posted: Mon Jan 02, 2012 10:47 pm
by pipfromslitherine
Does your script file look the same as the snippet that was posted? If not - well, that would be a problem for sure!

Cheers

Pip

Posted: Mon Jan 02, 2012 11:37 pm
by djddalton
pipfromslitherine wrote:Does your script file look the same as the snippet that was posted? If not - well, that would be a problem for sure!
Hi Pip,

Just to check, what is the file name the script should be in?

Thanks,

Dom

Posted: Tue Jan 03, 2012 3:12 am
by Merr
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)...

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");
		}
You are setting the APCharges attribute too soon because the "CalculateChanceToKillAP" (for morale) will calculate effectiveness as 0 since the ap charges are 0 ...

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 ;
	}
If you set the attribute after the "morale" like below, it should be all fixed (Merr commented part) ...

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");
		}
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