Company of Heroes 2

Company of Heroes 2

(1 - 8) Verdun, Frontline Edition
BlacKcuD  [developer] 3 Jul, 2014 @ 10:27am
(SCAR) Additional Resources/Pop-cap explained and Vanilla Version
The pop-cap per player is set to 200 and it is a 4vs4 map with regular resource income.
However, all "unused" resources and pop-cap are divided evenly throughout each team.

Example, if you play this map solo, you will get 4x200=800 pop-cap and 4x more resources. If you choose to play with a friend, both of you will have 400 pop-cap and double the resources. This applies to starting resources and resource income.

---

If you want to play this map with regular "vanilla" gameplay settings, please check out the original version: (2 - 8) Verdun, Valley of Death

Unmodified Vanilla Version, Valley of Death: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=276767880&searchtext=
Last edited by BlacKcuD; 5 Jul, 2014 @ 2:09pm
< >
Showing 1-1 of 1 comments
BlacKcuD  [developer] 3 Jul, 2014 @ 10:28am 
Here is the SCAR file. Thanks to Numennl@gamereplays.org for sharing his scripts with the community.

function OnInitID()

Pinopine(PinopineSettings)

-- [[ Markers ]]

-- [[ Squad Groups ]]

-- [[ Entity Groups ]]

end

-- Pinopinetweak script that balances team, increases pop cap, balances resource rates and start resources.

PinopineSettings =
{
MaximumPlayers = 8,
DefaultPlayerPopCap = 200
}

function Pinopine(settings)

local maximumPlayers = settings.MaximumPlayers
local defaultPlayerPopCap = settings.DefaultPlayerPopCap

local playerCount = World_GetPlayerCount()
local team1Size = 0
local team2Size = 0

for i = 1, playerCount do
local currentPlayer = World_GetPlayerAt(i)
local currentTeamId = Player_GetTeam(currentPlayer)

if currentTeamId == 0 then
team1Size = team1Size + 1
else
team2Size = team2Size + 1
end
end

local teamPopCap = (maximumPlayers * defaultPlayerPopCap) / 2.0
local team1PlayerPopCap = math.floor(teamPopCap / team1Size + 0.5)
local team2PlayerPopCap = math.floor(teamPopCap / team2Size + 0.5)

local popCapResourceFactor = defaultPlayerPopCap / 100
local team1ResourceFactor = (maximumPlayers / team1Size / 2.0) * popCapResourceFactor
local team2ResourceFactor = (maximumPlayers / team2Size / 2.0) * popCapResourceFactor

for i = 1, playerCount do
local currentPlayer = World_GetPlayerAt(i)
local currentTeamId = Player_GetTeam(currentPlayer)
local currentFactor = 1.0

-- select the proper factor
if currentTeamId == 0 then
Player_SetPopCapOverride(currentPlayer, team1PlayerPopCap)
currentFactor = team1ResourceFactor
Modify_PlayerResourceRate(currentPlayer, RT_Manpower, math.sqrt(2.41 * (5.3 - team1Size) * (5.3 - team1Size)) / 2)
Modify_PlayerResourceRate(currentPlayer, RT_Munition, math.sqrt(2.41 * (5.3 - team1Size) * (5.3 - team1Size)) / 2)
Modify_PlayerResourceRate(currentPlayer, RT_Fuel, math.sqrt(2.41 * (5.3 - team1Size) * (5.3 - team1Size)) / 2)
else
Player_SetPopCapOverride(currentPlayer, team2PlayerPopCap)
currentFactor = team2ResourceFactor
Modify_PlayerResourceRate(currentPlayer, RT_Manpower, math.sqrt(2.41 * (5.3 - team2Size) * (5.3 - team2Size)) / 2)
Modify_PlayerResourceRate(currentPlayer, RT_Munition, math.sqrt(2.41 * (5.3 - team2Size) * (5.3 - team2Size)) / 2)
Modify_PlayerResourceRate(currentPlayer, RT_Fuel, math.sqrt(2.41 * (5.3 - team2Size) * (5.3 - team2Size)) / 2)
end


local manpower = math.floor(Player_GetResource(currentPlayer, RT_Manpower) * currentFactor + 0.5)
local munition = math.floor(Player_GetResource(currentPlayer, RT_Munition) * currentFactor + 0.5)
local fuel = math.floor(Player_GetResource(currentPlayer, RT_Fuel) * currentFactor + 0.5)

Player_SetResource(currentPlayer, RT_Manpower, manpower)
Player_SetResource(currentPlayer, RT_Munition, munition)
Player_SetResource(currentPlayer, RT_Fuel, fuel)
end
end
-- end of Pinopinetweak script
Last edited by BlacKcuD; 5 Jul, 2014 @ 2:10pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50