The below script in making officers doesn't seem to work. Though a nation max out to 110% of offficers (which is the maximum possible) the nation still put about 30% in making officers instad of put this into the research. This is a breaking feature that destroy a nations progress.
Anyone know the problem here.
-- Officer ratio.
local liCurrentOfficeRatio = StandardDataObject.Country:GetOfficerRatio():Get()
local liMaxOfficeRatio = defines.military.MAX_OFFICERS
-- Checks to see if you are loosing officers
-- if so take them from espionage and diplomacy
if liCurrentOfficeRatio < (liMaxOfficeRatio * 0.70) then
-- Move the Espionage into the NCO and set it to 0 since we are short
Leadership.Percent_NCO = 0.5 + Leadership.Percent_Espionage
Leadership.Percent_Espionage = 0.0
Leadership.NCONeeded = true
elseif liCurrentOfficeRatio < (liMaxOfficeRatio * 0.75) then
Leadership.Percent_NCO = 0.4
elseif liCurrentOfficeRatio < (liMaxOfficeRatio * 0.85) then
Leadership.Percent_NCO = 0.3
elseif liCurrentOfficeRatio < (liMaxOfficeRatio * 0.92) then
Leadership.Percent_NCO = 0.2
-- Check to see if you have to many officers
-- if so increase research
elseif liCurrentOfficeRatio > (liMaxOfficeRatio * 0.99) then
Leadership.Percent_NCO = 0.0
end
Thanks in advance.
Cheers
Captain Jack
Anyone know the problem here.
-- Officer ratio.
local liCurrentOfficeRatio = StandardDataObject.Country:GetOfficerRatio():Get()
local liMaxOfficeRatio = defines.military.MAX_OFFICERS
-- Checks to see if you are loosing officers
-- if so take them from espionage and diplomacy
if liCurrentOfficeRatio < (liMaxOfficeRatio * 0.70) then
-- Move the Espionage into the NCO and set it to 0 since we are short
Leadership.Percent_NCO = 0.5 + Leadership.Percent_Espionage
Leadership.Percent_Espionage = 0.0
Leadership.NCONeeded = true
elseif liCurrentOfficeRatio < (liMaxOfficeRatio * 0.75) then
Leadership.Percent_NCO = 0.4
elseif liCurrentOfficeRatio < (liMaxOfficeRatio * 0.85) then
Leadership.Percent_NCO = 0.3
elseif liCurrentOfficeRatio < (liMaxOfficeRatio * 0.92) then
Leadership.Percent_NCO = 0.2
-- Check to see if you have to many officers
-- if so increase research
elseif liCurrentOfficeRatio > (liMaxOfficeRatio * 0.99) then
Leadership.Percent_NCO = 0.0
end
Thanks in advance.
Cheers
Captain Jack