Hello,
I am new here but I noticed that with the new WFA you cannot change the pop cap for maps like you could before. Is there something I am not doing correctly? Is there a new way to do it?
Pop Cap change does NOT work on WFA?
24 Jun 2014, 17:01 PM
#1

Posts: 18
24 Jun 2014, 17:03 PM
#2



Posts: 3421 | Subs: 11
Post your code, please.
24 Jun 2014, 17:11 PM
#3

Posts: 18
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
24 Jun 2014, 19:34 PM
#4

Posts: 18
So I managed to get the Pop cap change to work, however I cannot seem to get the change in resources working for the maps. I know how to change the german and soviets, however the new factions remain unsolved. any ideas?
24 Jun 2014, 21:09 PM
#5

Posts: 18
I take that back, apparently it worked on one maps but the rest just crash. here is the code I am using:
What am I doing wrong in this text that is making the game crash. I am trying to play these maps with the new US Forces and Oberkommando west. Is there a solution?
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
end
Scar_AddInit(OnInit)
-- [[ Markers ]]
-- [[ Squad Groups ]]
-- [[ Entity Groups ]]
end
What am I doing wrong in this text that is making the game crash. I am trying to play these maps with the new US Forces and Oberkommando west. Is there a solution?
24 Jun 2014, 21:47 PM
#6



Posts: 3421 | Subs: 11
I've updated the guide with support for Western Front Armies.
http://www.coh2.org/topic/12433/how-to-custom-starting-resources
http://www.coh2.org/topic/12433/how-to-custom-starting-resources
24 Jun 2014, 23:38 PM
#7

Posts: 18
Well I got the pop cap working seperately and the resources working seperately. But when i try to put them both together it crashes. Any ideas?
25 Jun 2014, 15:09 PM
#8



Posts: 3421 | Subs: 11
Post your full code please. And use
Check your code syntax.
Code
tags.[code]Your code goes here..[/code]
I take that back, apparently it worked on one maps but the rest just crash. here is the code I am using:
Codefunction 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
end
Scar_AddInit(OnInit)
-- [[ Markers ]]
-- [[ Squad Groups ]]
-- [[ Entity Groups ]]
end
What am I doing wrong in this text that is making the game crash. I am trying to play these maps with the new US Forces and Oberkommando west. Is there a solution?
Check your code syntax.
PAGES (1)

2 users are browsing this thread:
2 guests
Livestreams
![]() |
![]() |
![]() |
36 | ||
![]() |
![]() |
![]() |
37 | ||
![]() |
![]() |
![]() |
6 | ||
![]() |
![]() |
![]() |
4 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.42463.871+2
- 2.659233.739+2
- 3.300162.649+1
- 4.286110.722-2
- 5.12543.744+3
- 6.310114.731+6
- 7.193100.659+3
- 8.10829.788+9
- 9.1171650.643+2
- 10.725443.621-2
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
13

Download
1318
Board Info
582 users are online:
582 guests
0 post in the last 24h
4 posts in the last week
42 posts in the last month
4 posts in the last week
42 posts in the last month
Registered members: 51783
Welcome our newest member, viksodfia
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, viksodfia
Most online: 2043 users on 29 Oct 2023, 01:04 AM