Pilot Ratings

For bug reports and fixes, installation issues, and new ideas for technical features.

Moderator: SEOW Developers

Post Reply
Riksen
Posts: 125
Joined: Thu 17 Jan 2013 2:35 am
Location: Florida, USA
Contact:

Pilot Ratings

Post by Riksen »

Hi everyone,

I finally was able to get the photos to work in the statistics and thank u everyone who gave me a hand on that but it seen Riksen is always tweaking something in the databases lol...

My question now is how do i change the requirements to achieve each pilot rating rank in the statistics. Lets say to become an ace the pilot would, for example, require 20 kills or 10.000 points?

Thxs again

Riksen
IV/JG7_4Shades
Posts: 2202
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

In stats_functions.php there is a function that calculates pilot ratings. You can edit it yourself as you see fit.

Here is the default code:

Code: Select all

//Algorithm for the pilot rating.
function Pilot_Rating($Sorties,$AK,$SK,$IK,$KIAMIA) {
	extract($GLOBALS);

	if ($Sorties < 3) {return LL($L->screen->PilotDetails->skill0);}

	//pre-Aces rating method
	//$simpleRating = Floor((3*$AK+$SK+$IK)/$Sorties - $KIAMIA);

	//Aces rating method
	//$simpleRating = Floor((3*$AK+$SK+$IK) - 8*$KIAMIA);
	$simpleRating = Floor((3*$AK+$SK+$IK) - 5*$KIAMIA);
	if ($Sorties < 5) {
		$simpleRating = Min(-1,$simpleRating);
	}
	else if ($simpleRating < 10) {
		$simpleRating = Max(0,$simpleRating);
	}
	else if ($simpleRating < 15) {
		$simpleRating = Max(1,$simpleRating);
	}

	if ($simpleRating < 0) {
		return LL($L->screen->PilotDetails->skill0);
	}
	else if ($simpleRating == 0) {
		return LL($L->screen->PilotDetails->skill1);
	}
	else if ($simpleRating == 1) {
		return LL($L->screen->PilotDetails->skill2);
	}
//	else if ($simpleRating >= 2 && ($AK > 5 || $SK+$IK > 15)) {
//		return LL($L->screen->PilotDetails->skill3);
//	}
	else if ($simpleRating >= 2 && $KIAMIA/$Sorties < 0.35 && ($AK/$Sorties > 0.75 || ($SK+$IK)/$Sorties > 2.25)) {
		return LL($L->screen->PilotDetails->skill3);
	}
	else {
		return LL($L->screen->PilotDetails->skill2);
	}
	return LL($L->screen->PilotDetails->skill0);
}
Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
Riksen
Posts: 125
Joined: Thu 17 Jan 2013 2:35 am
Location: Florida, USA
Contact:

Post by Riksen »

Thxs Shades!! Got it!
Post Reply