3 New Notifications

New Badge Earned
Get 1K upvotes on your post
Life choices of my cat
Earned 210

Drag Images here or Browse from your computer.

Trending Posts
Sorted by Newest First
v
vaaaana 15.04.20 06:27 pm

Change the limit of the troops (Company of Heroes 2)

All kind time of day!
Tell me please, is it possible to take the official multiplayer map (created by developers) and edit its attributes (specifically the limit of troops), and then download through the workshop?
If so, how?
2 Comments
Sort by:
L
Lukash VI 15.04.20

The question still relevant? You can take any map, open it in WorldBuilder, Click Scenario-Scenario Properties, rename map name. (Then you can distinguish the map). In the folder with the map there is a file ИМЯ_КАРТЫ_ID.scar. Open it with Notepad and add the following:
--Population cap override value
g_popCapOverRide = 300

for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_SetPopCapOverride(player, g_popCapOverRide).

It will look like this:

OnInitID function()
--Population cap override value
g_popCapOverRide = 300

for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_SetPopCapOverride(player, g_popCapOverRide)
end

-- [[ Markers ]]

-- [[ Squad Groups ]]

-- [[ Entity Groups ]]

end

To save the file. In WorldBuilder click File-Export Package. Play.

D
Doctor_Shtopor 16.07.20

Where can I find the default maps? How to open them with WorldBuilder, if he can only open the sgb and scenref&