Aristos
Lightseeker
[to_xp]Gekko;13442789 said:would it be possible to add to the civ ribbon a number that shows the strenght of your army compared to that civ, similar to how it works in the BUG mod for civ4? I find being able to tell at a glance if I need more troops is very very useful![]()
The following is all he needs to add where he builds the leader tooltip, and add an entry (one line) to that tooltip calling the following function that mimics the wording and calculation of the military advisor:
Code:
-- Mimics the Military Advisor's comments on relative power using the same formulas
-- glider1, Aristos
function getMilitaryPowerText(iPlayer)
local basePower = 30;
local ourPower = basePower + Players[Game.GetActivePlayer()]:GetMilitaryMight();
local hisPower = basePower + Players[iPlayer]:GetMilitaryMight();
local milRatio = 100 * hisPower / ourPower;
if milRatio >= 250 then
return "[COLOR_RED]IMMENSE";
elseif milRatio >= 165 then
return "[COLOR_PLAYER_ORANGE_TEXT]POWERFUL";
elseif milRatio >= 115 then
return "[COLOR_YELLOW]STRONG";
elseif milRatio >= 85 then
return "[COLOR_WHITE]SIMILAR";
elseif milRatio >= 60 then
return "[COLOR_CYAN]INFERIOR";
elseif milRatio >= 40 then
return "[COLOR:69:130:181:255]WEAK";
else
return "[COLOR_GREEN]PATHETIC";
end
end