Unit Quality Question

Post Reply
TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Unit Quality Question

Post by TimDee58 » Thu Nov 01, 2018 10:59 am

Hi I'm hoping someone can kindly provide me with some information about the Unit Quality readings when in game.

Obviously I get the Exp+Elan/2 bit thats fine but I'd be really grateful to know what the levels are that are applied in battle, and at what point they change.

Thanks in advance
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21831
Joined: Sun Dec 04, 2005 6:25 pm

Re: Unit Quality Question

Post by rbodleyscott » Thu Nov 01, 2018 1:59 pm

Here is the code, it should be possible to work the logic out from that even if you don't program:

Code: Select all

// Prints quality string
FUNCTION PrintQualityString(me)
{
	int quality;

	quality =  GetQuality(me);

	if (quality <= 40)
		{
			if (GetAttrib(me, "Elan") < GetAttrib(me, "Experience"))
				{
					PrintString("IDS_TT_DEMORALISED");
				}
			else
				{
					PrintString("IDS_TT_UNTRAINED");
				}
		}

	if ((quality >= 41) & (quality <= 60))
		{
			if (GetAttrib(me, "Elan") < GetAttrib(me, "Experience"))
				{
					PrintString("IDS_TT_DISHEARTENED");
				}
			else
				{
					PrintString("IDS_TT_RAW");
				}
		}

	if ((quality >= 61) & (quality <= 90))
		{
			if (GetAttrib(me, "Elan") < GetAttrib(me, "Experience"))
				{
					PrintString("IDS_TT_MILDLY_DISHEARTENED");
				}
			else
				{
					PrintString("IDS_TT_BELOW_AVERAGE");
				}
		}

	if ((quality >= 91) & (quality <= 110))
		{
			PrintString("IDS_TT_AVERAGE");
		}

	if ((quality >= 111) & (quality <= 159))
		{
			if (GetAttrib(me, "Elan") > GetAttrib(me, "Experience"))
			  {
			    PrintString("IDS_TT_ENTHUSIASTIC");
			  }
			else
			  {
					PrintString("IDS_TT_ABOVE_AVERAGE");
			  }
		}

	if ((quality >= 160) & (quality <= 210)) // Note: This section should start at cut off point for Impact Pistol not being cancelled by Impact Mounted.
		{
			PrintString("IDS_TT_SUPERIOR");
		}

	if ((quality >= 211) & (quality <= 250))
		{
			PrintString("IDS_TT_HIGHLY_SUPERIOR");
		}

	if (quality > 250)
		{
			PrintString("IDS_TT_ELITE");
		}
}
Richard Bodley Scott

Image

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Unit Quality Question

Post by TimDee58 » Fri Nov 02, 2018 2:54 am

great, got it thanks
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

Post Reply

Return to “Field of Glory II: Modding”