Login

russian armor

How to make a win condition mod!

24 Jul 2018, 17:12 PM
#21
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

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

Posts: 67

jump backJump back to quoted post24 Jul 2018, 17:12 PMeliw00d
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++
24 Jul 2018, 18:29 PM
#23
avatar of RagnarTheGamer
Master Modmaker Badge

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

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
24 Jul 2018, 20:44 PM
#25
avatar of RagnarTheGamer
Master Modmaker Badge

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
25 Jul 2018, 01:59 AM
#26
avatar of Darkworld

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:clap:

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.


25 Jul 2018, 04:32 AM
#27
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

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 to
Code
"data:scar/winconditions/<name of your scar file here>.scar"
. This is how your scripts get loaded when your WCP is selected.

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. :P
25 Jul 2018, 06:50 AM
#28
avatar of RagnarTheGamer
Master Modmaker Badge

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:clap:

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:
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)
25 Jul 2018, 13:27 PM
#29
avatar of Darkworld

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:
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)



Thanks again:)

jump backJump back to quoted post25 Jul 2018, 04:32 AMeliw00d
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 to
Code
"data:scar/winconditions/<name of your scar file here>.scar"
. This is how your scripts get loaded when your WCP is selected.

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. :P



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




25 Jul 2018, 13:57 PM
#30
avatar of RagnarTheGamer
Master Modmaker Badge

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
25 Jul 2018, 16:17 PM
#31
avatar of eliw00d
Honorary Member Badge

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.
25 Jul 2018, 19:33 PM
#32
avatar of Darkworld

Posts: 67


Looks good



Thanks I will let you know if something goes wrong and I will post a Screen shot


jump backJump back to quoted post25 Jul 2018, 16:17 PMeliw00d

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
25 Jul 2018, 20:22 PM
#33
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

.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.
26 Jul 2018, 18:46 PM
#34
avatar of Darkworld

Posts: 67

jump backJump back to quoted post25 Jul 2018, 20:22 PMeliw00d
.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 :clap:
1 Aug 2018, 02:01 AM
#35
avatar of Darkworld

Posts: 67

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

1 Aug 2018, 06:44 AM
#36
avatar of RagnarTheGamer
Master Modmaker Badge

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:
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.
1 Aug 2018, 12:21 PM
#37
avatar of Darkworld

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:D,


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.





1 Aug 2018, 16:40 PM
#38
avatar of RagnarTheGamer
Master Modmaker Badge

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:D,


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.
1 Aug 2018, 18:41 PM
#39
avatar of Darkworld

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!



1 Aug 2018, 19:05 PM
#40
avatar of RagnarTheGamer
Master Modmaker Badge

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 :thumbsup:
2 users are browsing this thread: 2 guests

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

736 users are online: 736 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