The bonus comes from:
Code: Select all
faction:ConsumeManpower(-MPIncome)
ConsumeManpower is a sub-function that consumes manpower.
HOWEVER: if we give it a negative value, it adds a bonus (as in: if you subtract a negative value, you in fact add a positive value)
faction is any given nation in the game.
Every faction will go through the process of getting a manpower bonus at the start of the turn.
MPIncome is a variable, it contains a number value that was created at the start of the function in
Code: Select all
local MPIncome = math.ceil(growthrate * data.factions[faction.id+1].manpowerMax / 1000) -- small factions get +1 MP per turn due to rounding up
Instead of using a variable you can be more specific too, for example:
which will have Italy consume 5 manpower or
which will have Britian add 20 manpower (-20 = add 20)
Of course in the above two cases you will first have to tell the game, who the hell "italy" and "britain" are.
So in case you did not already know, do this by assigning a faction id to the name of the nation
Code: Select all
local italy = game:GetFactionById(8)
or
Code: Select all
local britain= game:GetFactionById(1)
See, any nation in the game has a number ID
France is 0, Britain is 1, Germany is 2, Austria is 3, Russia is 4, Turkey is 5, Belgium is 6, Serbia is 7, Italy is 8 etc. (see factions.lua for more info)
And then finally there are also
anynationnamehere:ConsumeProductionPoints(insert value here) ---- to add/consume production
and
anynationnamehere:ConsumeAmmo(insert value here) ---- to add/consume ammo