Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » bAutofireShotsPerFiveAP
bAutofireShotsPerFiveAP[message #361225] Fri, 11 September 2020 00:54 Go to next message
TWJunky is currently offline TWJunky

 
Messages:94
Registered:November 2012
Location: Austria
Can somebody please let me know the formula for this bAutofireShotsPerFiveAP. i know it is connected to ubShotsPer4Turns
thank you so much!

Report message to a moderator

Corporal 1st Class
Re: bAutofireShotsPerFiveAP[message #361228 is a reply to message #361225] Fri, 11 September 2020 08:02 Go to previous message
Deleted.

 
Messages:2634
Registered:December 2012
Location: Russian Federation
TWJunky wrote on Fri, 11 September 2020 02:54
Can somebody please let me know the formula for this bAutofireShotsPerFiveAP
Exact formula from CalcAPsToAutofire:
aps = ( ( APBPConstants[AUTOFIRE_SHOTS_AP_VALUE] * bDoAutofire * bBaseActionPoints ) / GetAutofireShotsPerFiveAPs(pObj) + (APBPConstants[AP_MAXIMUM] - 1) ) / APBPConstants[AP_MAXIMUM];
aps = ( aps	* ( 100 - GetPercentAPReduction(pSoldier, pObj) ) ) / 100;
Where GetAutofireShotsPerFiveAPs is calculated directly from bAutofireShotsPerFiveAP:
UINT8 GetAutofireShotsPerFiveAPs( OBJECTTYPE *pObj )
{
//	HEADROCK HAM B2.6: Added overall modifier
	if (Weapon[ pObj->usItem ].bAutofireShotsPerFiveAP > 0)
	{
		UINT8 usAutoFireShots = Weapon[ pObj->usItem ].bAutofireShotsPerFiveAP;

		// modify by ini values
		if ( Item[ pObj->usItem ].usItemClass == IC_GUN )
			usAutoFireShots *= gItemSettings.fAFShotsPer5APModifierGun[ Weapon[ pObj->usItem ].ubWeaponType ];

		// WANNE: Fix by Headrock
		// Weapons shouldn't ever lose their Bp5AP due to this modifier.
		return __max((usAutoFireShots + gGameExternalOptions.bAutofireBulletsPer5APModifier), 1);
	}
	else
		return 0;
}
From APBPConstants.ini
;***********************************************************************
;* The following is used with the weapons.xml: bAutofireShotsPerFiveAP  *
;* to determine how many AP we actually want the value to represent.   *
;* "FiveAP" is right for a 25AP system, but 20 is more appropriate for  *
;* a 100AP system.                                                     *
;***********************************************************************
AUTOFIRE_SHOTS_AP_VALUE = 20

[Updated on: Fri, 11 September 2020 08:03]




Left this community.

Report message to a moderator

Lieutenant

Previous Topic: bBurstAP
Next Topic: What is the Unit of visual range bonuses in Item.xml?
Goto Forum:
  


Current Time: Thu Jun 11 22:37:02 GMT+3 2026

Total time taken to generate the page: 0.00531 seconds