Code
function OnInitID()
--Population cap override value
g_popCapOverRide = 500
for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_SetPopCapOverride(player, g_popCapOverRide)
end
local ResourceSets = {
standard = {
--soviet:
[0] = {
manpower = 490,
fuel = 50,
munition = 0,
action = 0,
command = 0,
},
--german:
[1] = {
manpower = 490,
fuel = 20,
munition = 0,
action = 0,
command = 0,
},
},
highResources = {
--soviet:
[0] = {
manpower = 1390,
fuel = 80,
munition = 50,
action = 0,
command = 1,
},
--german:
[1] = {
manpower = 1390,
fuel = 50,
munition = 50,
action = 0,
command = 1,
},
},
customSet_01 = {
--soviet:
[0] = {
manpower = 4000,
fuel = 400,
munition = 400,
action = 0,
command = 2,
},
--german:
[1] = {
manpower = 4000,
fuel = 40,
munition = 400,
action = 0,
command = 2,
},
},
customSet_02 = {
--soviet:
[0] = {
manpower = 0,
fuel = 0,
munition = 0,
action = 0,
command = 0,
},
--german:
[1] = {
manpower = 0,
fuel = 0,
munition = 0,
action = 0,
command = 0,
},
},
}
--This will set the resource set to use in-game
local g_ResourceSet = ResourceSets.customSet_01
local Player_ApplyResourceSet = function(player, resourceSet)
Player_SetResource(player, RT_Manpower, resourceSet.manpower)
Player_SetResource(player, RT_Fuel, resourceSet.fuel)
Player_SetResource(player, RT_Munition, resourceSet.munition)
Player_SetResource(player, RT_Action, resourceSet.action)
Player_SetResource(player, RT_Command, resourceSet.command)
end
for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_ApplyResourceSet(player, g_ResourceSet[Player_GetRace(player)])
end
-- [[ Markers ]]
-- [[ Squad Groups ]]
-- [[ Entity Groups ]]
end