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
5
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
5
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
5
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)
1 user is browsing this thread:
1 guest
Livestreams
36 | |||||
31 | |||||
30 | |||||
14 | |||||
5 | |||||
4 | |||||
4 | |||||
3 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.655231.739+15
- 2.1103405.731+8
- 3.845.944+25
- 4.842223.791+5
- 5.943411.696-1
- 6.35759.858+3
- 7.275145.655+1
- 8.280108.722+31
- 9.307114.729+3
- 10.10629.785+7
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
12
Download
1270
Board Info
462 users are online:
462 guests
1 post in the last 24h
17 posts in the last week
49 posts in the last month
17 posts in the last week
49 posts in the last month
Registered members: 50297
Welcome our newest member, Vasquez55
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Vasquez55
Most online: 2043 users on 29 Oct 2023, 01:04 AM