If you are looking for the formula search around the base code, open it with a text program, IT WILL NOT DIRECTLY GIVE YOU THE FORMULA, but It is there.
Plus for demigods you have to add the variable of them upgrading them selves.
But the first part of this post should help with all the creeps.
EXAMPLE OF BASE CODE:
(Taken from Supreme Commander Forged Alliances "Paragon Structure")
[code]ResourceOn = State {
Main = function(self)
local aiBrain = self:GetAIBrain()
local massAdd = 0
local energyAdd = 0
local maxMass = self:GetBlueprint().Economy.MaxMass
local maxEnergy = self:GetBlueprint().Economy.MaxEnergy
while true do
local massNeed = aiBrain:GetEconomyRequested('MASS') * 10
local energyNeed = aiBrain:GetEconomyRequested('ENERGY') * 10
local massIncome = (aiBrain:GetEconomyIncome( 'MASS' ) * 10) - massAdd
local energyIncome = (aiBrain:GetEconomyIncome( 'ENERGY' ) * 10) - energyAdd
massAdd = 20
if massNeed - massIncome > 0 then
massAdd = massAdd + massNeed - massIncome
end
if maxMass and massAdd > maxMass then
massAdd = maxMass
end
self:SetProductionPerSecondMass(massAdd)
energyAdd = 1000
if energyNeed - energyIncome > 0 then
energyAdd = energyAdd + energyNeed - energyIncome
end
if maxEnergy and energyAdd > maxEnergy then
energyAdd = maxEnergy
end
self:SetProductionPerSecondEnergy(energyAdd)
WaitSeconds(.5)
end
end,
},
[code]