Unit Quality Question

Post Reply
TimDee58
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 270
Joined: Wed Mar 07, 2018 1:32 am
Location: Russian Federation

Unit Quality Question

Post by TimDee58 »

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
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28323
Joined: Sun Dec 04, 2005 6:25 pm

Re: Unit Quality Question

Post by rbodleyscott »

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
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 270
Joined: Wed Mar 07, 2018 1:32 am
Location: Russian Federation

Re: Unit Quality Question

Post by TimDee58 »

great, got it thanks
Post Reply

Return to “Field of Glory II: Modding”