Login

russian armor

How to make a win condition mod!

21 Jul 2018, 19:05 PM
#1
avatar of Darkworld

Posts: 67

I have a win condition mod 500 popcap but without the commanders.


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
21 Jul 2018, 21:55 PM
#2
avatar of Lugie
Senior Modmaker Badge

Posts: 327

Could you phrase your request a bit better? I'm not exactly sure of what you want to do.
22 Jul 2018, 17:30 PM
#3
avatar of Darkworld

Posts: 67

I download a win condition mod call 'AN-500pc And No Commanders'

What I want to do is make a win condition mod like above but have not 500pc but 700pc and with commanders.
24 Jul 2018, 11:14 AM
#4
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

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:
Code
+ commander
if that's not there already.

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

24 Jul 2018, 12:29 PM
#5
avatar of Darkworld

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:
Code
+ commander
if that's not there already.

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:D, Where is scar file in the COH2 mod builder I have never made a scar file before where to start.
24 Jul 2018, 13:39 PM
#6
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317




Thank you very much for this:D, 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.
24 Jul 2018, 13:51 PM
#7
avatar of Darkworld

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.
24 Jul 2018, 14:36 PM
#8
avatar of RagnarTheGamer
Master Modmaker Badge

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.
24 Jul 2018, 14:40 PM
#9
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

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.
24 Jul 2018, 14:55 PM
#10
avatar of Darkworld

Posts: 67

jump backJump back to quoted post24 Jul 2018, 14:40 PMeliw00d
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?
24 Jul 2018, 15:17 PM
#11
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

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.
24 Jul 2018, 15:30 PM
#12
avatar of Darkworld

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
24 Jul 2018, 15:33 PM
#13
avatar of RagnarTheGamer
Master Modmaker Badge

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
24 Jul 2018, 15:44 PM
#14
avatar of Darkworld

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!
24 Jul 2018, 15:47 PM
#15
avatar of Darkworld

Posts: 67

jump backJump back to quoted post24 Jul 2018, 15:17 PMeliw00d
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?
24 Jul 2018, 15:48 PM
#16
avatar of RagnarTheGamer
Master Modmaker Badge

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
24 Jul 2018, 15:55 PM
#17
avatar of eliw00d
Honorary Member Badge

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...
24 Jul 2018, 16:12 PM
#18
avatar of Darkworld

Posts: 67

jump backJump back to quoted post24 Jul 2018, 15:55 PMeliw00d

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




24 Jul 2018, 16:35 PM
#19
avatar of RagnarTheGamer
Master Modmaker Badge

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.
24 Jul 2018, 16:47 PM
#20
avatar of Darkworld

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
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

903 users are online: 903 guests
1 post in the last 24h
11 posts in the last week
27 posts in the last month
Registered members: 50002
Welcome our newest member, rwintoday1
Most online: 2043 users on 29 Oct 2023, 01:04 AM