Please add ?nation=(your nation name) to the url to get it to work properly (Remember, spaces should become \"%20\", HTML-encoded).
Other options:
&popspec=(the difference of your \"population\" from Nationstates) - For those countries who like to specify exact populations
&randomize=1 - Randomizes the GDP per capita and budget (and population if there's no popspec) slightly
&defenseprovided=1&defense=(percentage of your GDP spent on defense) - Calculates your Defense spending. REQUIRES DEFENSEPROVIDED TO BE SET.
&militarybudget=1 - Forces &defense= to represent the percentage of your budget instead of your GDP. MUST BE USED WITH THE TWO ABOVE VARIABLES.
Population: " . number_format($population) . "
Civil Rights: $civilrights
Economy: $economy
GDP per Capita: $" . number_format($gdppercap[$economy]) . "
GDP: \$" . number_format($gdp) . "
National Budget: \$" . number_format($budget);
if($defenseprovided)
{
if($militarybudget)
{
$military = round($budget * ($defense / 100));
$gdppercent = round($military / $gdp * 100, 2);
echo "
\nPercentage of GDP Spent on Defense: $gdppercent%
Percentage of Budget Spent on Defense: $defense%
";
}
else
{
$military = round($gdp * ($defense / 100));
$budgetpercent = round($military / $budget * 100, 2);
echo "
\nPercentage of GDP Spent on Defense: $defense%
Percentage of Budget Spent on Defense: $budgetpercent%
";
}
$f15e = floor($military / 31100000);
$su34 = floor($military / 20000000);
$f16 = floor($military / 18800000);
$mig29 = floor($military / 11000000);
$m1a2 = floor($military / 4300000);
$t90 = floor($military / 3000000);
$m16 = floor($military / 586);
$ak47 = floor($military / 300);
echo "Military Budget: \$" . number_format($military) . "
Enough for:
" . number_format($f15e) . " F-15Es, or...
" . number_format($su34) . " Su-34s, or...
" . number_format($f16) . " F-16s, or...
" . number_format($mig29) . " MiG 29s, or...
" . number_format($m1a2) . " M1A2 Abrams, or...
" . number_format($t90) . " T-90s, or...
" . number_format($m16) . " M-16s, or...
" . number_format($ak47) ." AK47s