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?
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.
Where can I find the default maps? How to open them with WorldBuilder, if he can only open the sgb and scenref&