How to make a win condition mod!
Posts: 756 | Subs: 8
Just take a look at https://github.com/eliw00d/example-win-condition-pack and that is how yours should look, with different names. Obviously, ignore the .gitattributes, .gitignore, and README.md as those are git/GitHub related.
Posts: 67
The .mod and .xml files go in your root folder when you create the WinConditionPack. The .win file goes in data/game/winconditions, while the .scar file goes in data/scar/winconditions. I would recommend watching the video in chunks, and follow along with your own folder/files.
Just take a look at https://github.com/eliw00d/example-win-condition-pack and that is how yours should look, with different names. Obviously, ignore the .gitattributes, .gitignore, and README.md as those are git/GitHub related.
in your video this file goes into the scar
Where do I put this code in my scar file top or bottom?
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)
And this goes into win on your video
+ commander is put in the win file ok but do I add a new line with notepad++
Posts: 317
in your video this file goes into the scar
Where do I put this code in my scar file top or bottom?
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)
And this goes into win on your video
+ commander is put in the win file ok but do I add a new line with notepad++
You dont edit the .xml or .mod files you only edit the .scar and .win files.
Posts: 67
You dont edit the .xml or .mod files you only edit the .scar and .win files.
Now I am really confused so xml and mod files are not to be edit or copied ok I get that BUT where is scar and win files in my mod folder because I can't find it.
The only place I found them is in
COH2/Archives/Data.sga/data/scar/wincondition
COH2/Archives/Data.sga/data/game/wincondition
Here is the Win file from COH2/Archives
Here is the scar from COH2/Archives
Posts: 317
Now I am really confused so xml and mod files are not to be edit or copied ok I get that BUT where is scar and win files in my mod folder because I can't find it.
The only place I found them is in
COH2/Archives/Data.sga/data/scar/wincondition
COH2/Archives/Data.sga/data/game/wincondition
Here is the Win file from COH2/Archives
Here is the scar from COH2/Archives
yes these are the files you want to edit
Posts: 67
yes these are the files you want to edit
This is all new to me and I am trying to learn and it hard.
Ok thanks now I know, but where do I add the code you gave me in scar file? also do I delete all the text in the scar and just add this code to it, or do I just place it at the top/ bottom of scar text, and where do I add the '+ commander' code to win file the same top/bottom. or do it matter,
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)
In the win file at the top says 'name = no_win_condition"" do I edit the name to my win condition mod or just leave it!
And what is scar_file ="Data Scar/WinConditions/None.Scar" do I edit this name to my scar mod or leave it!
I wish member "eliw00d"" could update how to edit the scar and win files that would be great, I have seen his files but they are over 3 years old and COH2 have updated a few times it the same how to make a win condition mod year 2014 I understand it give you the basic ideal but sadly it don't help me who is trying to learn how to scar for the first time.
I want to say Thank you to RagnarTheGamer and eliw00d for the help so far
An update
I have just found a website that shows how to use the wizard mod builder oh my god now I know how the wizard creates the win and scar files so I didn't need open the COH2\Archives win and scar files, as I said before I am starting to learn the hard way.
I post the link here for other members
http://modding.companyofheroes.com/win-condition-pack-wizard
Anyway still need the help on the code please.
Posts: 756 | Subs: 8
I did make a tutorial that covers SCAR, but it assumes you have learned how to program.
https://www.youtube.com/watch?v=RnNdGDXOvbQ
As for the .win questions:
1. I don't remember if the name matters too much, but I have always matched it to my .mod and .xml files, so I would recommend that to be safe.
2. scar_file has to be set to
. This is how your scripts get loaded when your WCP is selected."data:scar/winconditions/<name of your scar file here>.scar"
The tools have honestly not changed enough to warrant new videos (plus I'm not as active anymore), so they should still be fairly accurate. Keep in mind most of my videos assume you have some modding experience. I am glad you found the official wiki, as that is definitely at more of a beginner level than most of my videos. It's hard teaching stuff.
Posts: 317
This is all new to me and I am trying to learn and it hard.
Ok thanks now I know, but where do I add the code you gave me in scar file? also do I delete all the text in the scar and just add this code to it, or do I just place it at the top/ bottom of scar text, and where do I add the '+ commander' code to win file the same top/bottom. or do it matter,
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)
In the win file at the top says 'name = no_win_condition"" do I edit the name to my win condition mod or just leave it!
And what is scar_file ="Data Scar/WinConditions/None.Scar" do I edit this name to my scar mod or leave it!
I wish member "eliw00d"" could update how to edit the scar and win files that would be great, I have seen his files but they are over 3 years old and COH2 have updated a few times it the same how to make a win condition mod year 2014 I understand it give you the basic ideal but sadly it don't help me who is trying to learn how to scar for the first time.
I want to say Thank you to RagnarTheGamer and eliw00d for the help so far
An update
I have just found a website that shows how to use the wizard mod builder oh my god now I know how the wizard creates the win and scar files so I didn't need open the COH2\Archives win and scar files, as I said before I am starting to learn the hard way.
I post the link here for other members
http://modding.companyofheroes.com/win-condition-pack-wizard
Anyway still need the help on the code please.
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)
Posts: 67
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)
Thanks again
SCAR is just the internal name for Relic's scripting language (SCripting At Relic) which is basically a defrocked version of Lua 5.1.5. You would just need to learn how to program in Lua and then learn the API for CoH2 (see here).
I did make a tutorial that covers SCAR, but it assumes you have learned how to program.
https://www.youtube.com/watch?v=RnNdGDXOvbQ
As for the .win questions:
1. I don't remember if the name matters too much, but I have always matched it to my .mod and .xml files, so I would recommend that to be safe.
2. scar_file has to be set toCode. This is how your scripts get loaded when your WCP is selected."data:scar/winconditions/<name of your scar file here>.scar"
The tools have honestly not changed enough to warrant new videos (plus I'm not as active anymore), so they should still be fairly accurate. Keep in mind most of my videos assume you have some modding experience. I am glad you found the official wiki, as that is definitely at more of a beginner level than most of my videos. It's hard teaching stuff.
Thanks for the link & code, also yes your videos are for those who know COH2 already I remember your user name on Relicnews (if it's you) when it was all about COH it's a shame it closed down, I learn allots but now time have changed again, now we have COH2 and it's a bitch to learn because allots things have changed in the game files.
I am not going to get into the hard stuff on scar or win, I just wanted a win condition mod with 700pc and with commanders that's all,
in your video on win condition, you said to add the templates\Add Attributes to my mod xml file also click on 'add burn folder' and make game\scar why I ask is because when I used the Wizard it did it all for me but it put all the files in one folder not like your video do it matter! just want to make it sure I am safe with this
So in my win condition mod folder is like this
my_win_condition_mod.sga
my_win_condition_scar.scar
my_win_condition_win.win
my_win_condition_mod Intermediate Cache
my_win_condition_mod
Posts: 317
So in my win condition mod folder is like this
my_win_condition_mod.sga
my_win_condition_scar.scar
my_win_condition_win.win
my_win_condition_mod Intermediate Cache
my_win_condition_mod
Looks good
Posts: 756 | Subs: 8
in your video on win condition, you said to add the templates\Add Attributes to my mod xml file also click on 'add burn folder' and make game\scar why I ask is because when I used the Wizard it did it all for me but it put all the files in one folder not like your video do it matter! just want to make it sure I am safe with this
Honestly, you can just let the wizard do it all for you. I just prefer setting up burn folders because then you can add/remove files and not have to change anything in Mod Builder (I have over 1000 .scar files for example). In your case, it sounds like you will only ever have the one file, so what the wizard did is fine.
Posts: 67
Looks good
Thanks I will let you know if something goes wrong and I will post a Screen shot
Honestly, you can just let the wizard do it all for you. I just prefer setting up burn folders because then you can add/remove files and not have to change anything in Mod Builder (I have over 1000 .scar files for example). In your case, it sounds like you will only ever have the one file, so what the wizard did is fine.
Wow that's allots of files you have, One other question if I had a new unit to the game and edit the abp file with different weapon will the A.I use that weapon or do I need to make a scar file for the A.I to use that weapon. when player vs A.I in game
Posts: 756 | Subs: 8
Posts: 67
.abp (Animator BluePrint) files are how the game combines different models, objects, and animations together. Since they are just art related, they should have no impact on gameplay.
That's good, Thanks to you and RagnarTheGamer again for help
Posts: 67
here is the win file
and here is the scar file
Posts: 317
Back again having real problems with the win and scar files I did edit with the codes from 'RagnarTheGamer' at first I kept getting CTD so had to start again and made a new folder in documents but now the win condition mod will not show in the COH2 game. what is wrong now?
here is the win file
and here is the scar file
I think you are not reading carefully the messages. The problem why your commander isn't working is that the code has no sense to make it work you need to add:
permitted_categories = intel_bulletin + skin_pack + vehicle_decal + fatality + commander
This is how the default "permited_categories" looks, here you can edit what is allowed or what isn't allowed.
The SCAR file PopCap needs to look like this:
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)
Make sure the spaceing is corect.
Posts: 67
I think you are not reading carefully the messages. The problem why your commander isn't working is that the code has no sense to make it work you need to add:
Code
permitted_categories = intel_bulletin + skin_pack + vehicle_decal + fatality + commander
This is how the default "permited_categories" looks, here you can edit what is allowed or what isn't allowed.
The SCAR file PopCap needs to look like this:
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)
Make sure the spaceing is corect.
Thanks for the code.
But as for not understanding the messages you explained it like this "to enable commanders you go to your .win file. In there, there are "permitted_categories" to enable commanders you just add there: + commander that's why I could find the permitted categories or understand what you mean! in the win file and how would I know how to make that code you just gave me above I am new to this I have no experiences in code making for COH2.
But I thank you for the help,
I add your win code but game stop working then I edit the win code to below now everything works in the win condition mod,
This is the new Win file now
And this is the New Scar file I added your code near the bottom.
Posts: 317
Thanks for the code.
But as for not understanding the messages you explained it like this "to enable commanders you go to your .win file. In there, there are "permitted_categories" to enable commanders you just add there: + commander that's why I could find the permitted categories or understand what you mean! in the win file and how would I know how to make that code you just gave me above I am new to this I have no experiences in code making for COH2.
But I thank you for the help,
I add your win code but game stop working then I edit the win code to below now everything works in the win condition mod,
This is the new Win file now
And this is the New Scar file I added your code near the bottom.
So it all works now? because you again didn't pay attention to the spacing, look at my "do" and your "do" in the SCAR file.
Posts: 67
So it all works now? because you again didn't pay attention to the spacing, look at my "do" and your "do" in the SCAR file.
yes I can see the difference on 'do' and 'end' but I can tell you it all works I have just finished a 4v4 game took over two hours I am sorry but there is nothing wrong if there was I would say so but if you think it will be a problem I just edit it again.
Again your Scar right!
Posts: 317
yes I can see the difference on 'do' and 'end' but I can tell you it all works I have just finished a 4v4 game I am sorry but there is nothing wrong if there was I would say so but if you think it will be a problem I just edit it again.
Again Scar right!
Glad you made it work mate! Good luck with other modding
Livestreams
5 | |||||
305 | |||||
25 | |||||
9 | |||||
6 | |||||
4 | |||||
3 | |||||
3 | |||||
1 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.600215.736+15
- 3.34957.860+14
- 4.1108614.643+9
- 5.305114.728+1
- 6.916405.693-2
- 7.273108.717+24
- 8.722440.621+4
- 9.261137.656+2
- 10.1041674.607-2
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
8 posts in the last week
34 posts in the last month
Welcome our newest member, Falac851
Most online: 2043 users on 29 Oct 2023, 01:04 AM