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
272 | |||||
7 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.34957.860+14
- 3.606219.735+1
- 4.1109614.644+10
- 5.276108.719+27
- 6.305114.728+1
- 7.916405.693-2
- 8.722440.621+4
- 9.261137.656+2
- 10.1041674.607-2
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1235
Board Info
880 users are online:
880 guests
0 post in the last 24h
8 posts in the last week
34 posts in the last month
8 posts in the last week
34 posts in the last month
Registered members: 49110
Welcome our newest member, jhonnycena0400
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, jhonnycena0400
Most online: 2043 users on 29 Oct 2023, 01:04 AM