How to make a win condition mod!
Posts: 67
But I need some help making my own win condition mod that the A.I uses the commanders in game but used a popcap of 700 units for each player
Posts: 327
Posts: 67
What I want to do is make a win condition mod like above but have not 500pc but 700pc and with commanders.
Posts: 317
this is quite easy to do.
1. COMMANDERS
to enable commanders you go to your .win file. In there, there are "permitted_categories" to enable commanders you just add there:
if that's not there already.+ commander
2. 700 POPCAP
now you need to go to your .scar file. In here you add under imorts:
local function PopCap_OnInit()
for i = 1,World_GetPlayerCount()
do
local player = World_GetPlayerAt(i);
Player_SetPopCapOverride(player, 700);
end
end
Scar_AddInit(PopCap_OnInit)
If you have any problems or questions feel free to ask
Best Regards,
RagnarTheGamer
Posts: 67
Hello Darkworld,
this is quite easy to do.
1. COMMANDERS
to enable commanders you go to your .win file. In there, there are "permitted_categories" to enable commanders you just add there:Codeif that's not there already.+ commander
2. 700 POPCAP
now you need to go to your .scar file. In here you add under imorts:
Code
local function PopCap_OnInit()
for i = 1,World_GetPlayerCount()
do
local player = World_GetPlayerAt(i);
Player_SetPopCapOverride(player, 700);
end
end
Scar_AddInit(PopCap_OnInit)
If you have any problems or questions feel free to ask
Best Regards,
RagnarTheGamer
Thank you very much for this, Where is scar file in the COH2 mod builder I have never made a scar file before where to start.
Posts: 317
Thank you very much for this, Where is scar file in the COH2 mod builder I have never made a scar file before where to start.
there should be one already created if you made the WCP. It should be a file saved in .scar format. If you can't find it try watching this video.
Posts: 67
there should be one already created if you made the WCP. It should be a file saved in .scar format. If you can't find it try watching this video.
I watch the video but he didn't explain where the scar file is to open with notpad++ because he already had it open be for the video I haven't made a WCP with my mod only download one that is not mine to edit.
I just wished his videos explain all of this but he don't he have already open and made the files before the video that's why I had to come to this forum to help me with the mod.
Posts: 317
I watch the video but he didn't explain where the scar file is to open with notpad++ because he already had it open be for the video I haven't made a WCP with my mod only download one that is not mine to edit.
I just wished his videos explain all of this but he don't he have already open and made the files before the video that's why I had to come to this forum to help me with the mod.
You will need to create a folder in your mod file called "data" in date create "game" and "scar" folderss. In "game" you will have all your .win files and in "scar" you will have all your .scar files.
Posts: 756 | Subs: 8
The wizard actually creates the two files if you specify locations for the win condition and scar files. I skipped that part but had the files ready because I was showing a more advanced way to set it up. I probably should have explained that part a little better.
Posts: 67
I have a link in the description of the video to the files you need: https://github.com/eliw00d/example-win-condition-pack
The wizard actually creates the two files if you specify locations for the win condition and scar files. I skipped that part but had the files ready because I was showing a more advanced way to set it up. I probably should have explained that part a little better.
You videos are good but for those that are new to modding coh2 like my self I wish you could have explain more, but thanks for the link
ok there is two win condition pack one is
Myfirstwinconditionpack.mod
another is
myfirstwinconditionpack.xml
do I need both?
Posts: 756 | Subs: 8
https://github.com/eliw00d/example-win-condition-pack/blob/master/data/game/winconditions/default.win
https://github.com/eliw00d/example-win-condition-pack/blob/master/data/scar/winconditions/default.scar
When you make any kind of pack, you will have both a .mod and .xml file. But my example is probably not something you want to directly copy and paste since the ModID is unique. I put it up so you can see what I ended up with, to compare with your own mod.
Posts: 67
You will need to create a file in your mod file called "data" in date create "game" and "scar" files. In "game" you will have all your .win files and in "scar" you will have all your .scar files.
there are two data files let me explain one is in
my games/company of heroes 2/mods/mod projects
another data folder is found in
my games/company of heroes 2/mods/tuning
where do I add the game/win condition & scar/win condition
Posts: 317
there are two data files let me explain one is in
my games/company of heroes 2/mods/mod projects
another data folder is found in
my games/company of heroes 2/mods/tuning
where do I add the game/win condition & scar/win condition
no there will be only one "data" folder
Posts: 67
no there will be only one "data" file
ok in my setup I have this
my games/company of heroes 2/mods/mod projects/british kings II/British Kings II Intermediate Cache/Intermediate Files/data
my games/company of heroes 2/mods/tuning/data/art/ui
Two 'Data" so where to put it please!
Posts: 67
If you're following the video you only need the .win and .scar files:
https://github.com/eliw00d/example-win-condition-pack/blob/master/data/game/winconditions/default.win
https://github.com/eliw00d/example-win-condition-pack/blob/master/data/scar/winconditions/default.scar
When you make any kind of pack, you will have both a .mod and .xml file. But my example is probably not something you want to directly copy and paste since the ModID is unique. I put it up so you can see what I ended up with, to compare with your own mod.
So if I can't use yours as it was only example how do I make a scar file myself with the coh2 tools?
Posts: 317
ok in my setup I have this
my games/company of heroes 2/mods/mod projects/british kings II/British Kings II Intermediate Cache/Intermediate Files/data
my games/company of heroes 2/mods/tuning/data/art/ui
Two 'Data" so where to put it please!
Ahhh, you are using also attribute editor, then put "game" and "scar" folders into the "data" folder where is the "ui" folder
Posts: 756 | Subs: 8
So if I can't use yours as it was only example how do I make a scar file myself with the coh2 tools?
I meant the .mod and .xml. You can absolutely use the .win and .scar files because those are the ones created by the wizard...
Posts: 67
I meant the .mod and .xml. You can absolutely use the .win and .scar files because those are the ones created by the wizard...
So my mod 'MOD file' I just copied it and paste it in my data/game/winconditions and the XML document into the data/scar/winconditions
Is this part right?
So where do I put this in MOD File or XML?
local function PopCap_OnInit()
for i = 1,World_GetPlayerCount()
do
local player = World_GetPlayerAt(i);
Player_SetPopCapOverride(player, 700);
end
end
Scar_AddInit(PopCap_OnInit)
Also
+ commander
MOD file
XML file
Posts: 317
So my mod 'MOD file' I just copied it and paste it in my data/game/winconditions and the XML document into the data/scar/winconditions
Is this part right?
So where do I put this in MOD File or XML?
local function PopCap_OnInit()
for i = 1,World_GetPlayerCount()
do
local player = World_GetPlayerAt(i);
Player_SetPopCapOverride(player, 700);
end
end
Scar_AddInit(PopCap_OnInit)
Also
+ commander
MOD file
XML file
No, you put it into your .scar file with you will automatically get after creating WCP. And "+ commander" you put that into your .win file which is also created.
Posts: 67
No, you put it into your .scar file with you will automatically get after creating WCP. And "+ commander" you put that into your .win file which is also created.
Ok I watch the video again and put the XML file in the game/win condition and the MOD file in the scar/win condition but this time I save files with notepad++ to the folders and not copy and paste them
Is this part right
Livestreams
1 | |||||
889 | |||||
18 | |||||
10 | |||||
2 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.655231.739+15
- 2.842223.791+5
- 3.939410.696+5
- 4.35459.857-1
- 5.599234.719+7
- 6.278108.720+29
- 7.307114.729+3
- 8.645.928+5
- 9.10629.785+7
- 10.527.881+18
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
rwintoday
10 posts in the last week
26 posts in the last month
Welcome our newest member, rwintoday1
Most online: 2043 users on 29 Oct 2023, 01:04 AM