Login

russian armor

Victory Points 1000?

2 Mar 2019, 08:31 AM
#1
avatar of BoshelvikHall

Posts: 52

The .win and .scar files I downloaded from Eliwood don't have the 500 VP requirements to win the game.
I searched for "victory point" in scar doc in fortresseuropemod.com and searched here but can't find the solution for this specific thing.
I don't dislike the "annihilation" win condition but if I want to set my custom win condition (e.g., 500 or 1000) how would I do this?
2 Mar 2019, 15:50 PM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

2 Mar 2019, 21:06 PM
#3
avatar of BoshelvikHall

Posts: 52

This should have all the info you need:

http://modding.companyofheroes.com/win-condition-file-format

I also updated my example to have some references: https://github.com/eliw00d/example-win-condition-pack#references



So setting VP to 1000 is all done in default.win?
I see "Use WinWarning_SetTickers/WinWarning_SetMaxTickers/WinWarning_SetCritical/WinWarning_SetToolTip to set tickers" seems like that's what I need to use.

I went to check in ScarDoc and it has " WinWarning_SetMaxTickers( int team1MaxTickers, int team2MaxTickers ) and "WinWarning_SetTickers( int team1Tickers, int team2Tickers )"
so it seems that I need to add these in default.scar?

But I don't know what I need to put in the parentheses.
3 Mar 2019, 00:02 AM
#4
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

No, the .win file is where you would specify which parts of the UI to show. Your .scar file is where you would set tickers and max tickers. Team 1 is the left side, team 2 is the right.
3 Mar 2019, 03:01 AM
#5
avatar of BoshelvikHall

Posts: 52

No, the .win file is where you would specify which parts of the UI to show. Your .scar file is where you would set tickers and max tickers. Team 1 is the left side, team 2 is the right.


in default.win I changed to this (apart from the other code above it):

"score_display = vp_ticker
show_time = false"

and removed the "entity_replacements ="


in default.scar I edited to this:

"local function WinCondition_Init()

WinWarning_SetMaxTickers( 1000 team1MaxTickers, 1000 team2MaxTickers )
WinWarning_SetTickers( 1000 team1Tickers, 1000 team2Tickers )"

although there's a lot of annihilation code above that came with default.scar



This didn't work and disabled the camera zoom out code underneath.
3 Mar 2019, 03:55 AM
#6
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8


WinWarning_SetMaxTickers( 1000 team1MaxTickers, 1000 team2MaxTickers )
WinWarning_SetTickers( 1000 team1Tickers, 1000 team2Tickers )


The "int team1MaxTickers" part is telling you the type and name of the parameter. You don't actually keep that there. You should have:

WinWarning_SetMaxTickers(1000, 1000)
WinWarning_SetTickers(1000, 1000)


4 Mar 2019, 01:05 AM
#7
avatar of BoshelvikHall

Posts: 52


WinWarning_SetMaxTickers( 1000 team1MaxTickers, 1000 team2MaxTickers )
WinWarning_SetTickers( 1000 team1Tickers, 1000 team2Tickers )


The "int team1MaxTickers" part is telling you the type and name of the parameter. You don't actually keep that there. You should have:

WinWarning_SetMaxTickers(1000, 1000)
WinWarning_SetTickers(1000, 1000)





Thanks it works now!
How come the annihilation codes above don't affect this? can I erase them?
4 Mar 2019, 01:33 AM
#8
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

I'm not sure what you mean. The default .scar file? Because it's set up for Annihilation and not Victory Points.
4 Mar 2019, 04:21 AM
#9
avatar of BoshelvikHall

Posts: 52

I'm not sure what you mean. The default .scar file? Because it's set up for Annihilation and not Victory Points.


Ya in .scar. The section I placed the victory points code disables the annihilation codes then, because of where I placed my codes?
4 Mar 2019, 05:14 AM
#10
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Hard to say without seeing the code. I would suggest learning Lua: https://www.lua.org/manual/5.1/manual.html
28 Nov 2020, 16:43 PM
#11
avatar of knox85

Posts: 33

Hard to say without seeing the code. I would suggest learning Lua: https://www.lua.org/manual/5.1/manual.html


How do I set up Victory points and how do I create the win conditions in regard to my set Victory Points?
28 Nov 2020, 17:29 PM
#12
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

jump backJump back to quoted post28 Nov 2020, 16:43 PMknox85


How do I set up Victory points and how do I create the win conditions in regard to my set Victory Points?


When creating your win condition pack in the tools select the "Requires VP Ticker". This will take care of the logic behind the VP ticker.

Now four your own options. After the initial creation of the WCP you should end up with your_file.win file. This is the file you want to edit.

And simply add this to the file.

options=
{
{
fe_name = "$YOUR_MOD_GUID:LINE_NUMBER", -- This shoudl point to your localization file, Name of the option ingame
value = 500, -- Numeber of tickets
},
{
default = true,
fe_name = "$YOUR_MOD_GUID:LINE_NUMBER", -- This shoudl point to your localization file, Name of the option ingame
value = 750, -- Numeber of tickets
},
{
fe_name = "$YOUR_MOD_GUID:LINE_NUMBER", -- This shoudl point to your localization file, Name of the option ingame
value = 1000, -- Numeber of tickets
},
}


Of course, you can add as many options as you want. Just note that no scroll bar will appear in the game UI but you will still be able to scroll with your mouse in the options.
29 Nov 2020, 09:30 AM
#13
avatar of knox85

Posts: 33



When creating your win condition pack in the tools select the "Requires VP Ticker". This will take care of the logic behind the VP ticker.

Now four your own options. After the initial creation of the WCP you should end up with your_file.win file. This is the file you want to edit.

And simply add this to the file.

options=
{
{
fe_name = "$YOUR_MOD_GUID:LINE_NUMBER", -- This shoudl point to your localization file, Name of the option ingame
value = 500, -- Numeber of tickets
},
{
default = true,
fe_name = "$YOUR_MOD_GUID:LINE_NUMBER", -- This shoudl point to your localization file, Name of the option ingame
value = 750, -- Numeber of tickets
},
{
fe_name = "$YOUR_MOD_GUID:LINE_NUMBER", -- This shoudl point to your localization file, Name of the option ingame
value = 1000, -- Numeber of tickets
},
}


Of course, you can add as many options as you want. Just note that no scroll bar will appear in the game UI but you will still be able to scroll with your mouse in the options.


Ok....so this Text i just have to add via editor?

What tools do you mean?
Im new in this VP creating.
Is there a tutorial?
29 Nov 2020, 10:27 AM
#14
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

jump backJump back to quoted post29 Nov 2020, 09:30 AMknox85


Ok....so this Text i just have to add via editor?

What tools do you mean?
Im new in this VP creating.
Is there a tutorial?


Company of Heroes 2 Tools is the software that is used for modding Company of Heroes 2. And yes all you have to do is copy the code and paste it to your your_file.win file and edit it a bit.

This is a tutorial on how to setup your first win condition pack.
29 Nov 2020, 12:09 PM
#15
avatar of knox85

Posts: 33



Company of Heroes 2 Tools is the software that is used for modding Company of Heroes 2. And yes all you have to do is copy the code and paste it to your your_file.win file and edit it a bit.

This is a tutorial on how to setup your first win condition pack.


are those conditions linked to the specific map then?
29 Nov 2020, 12:43 PM
#16
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

No, they are not. They will work on any map.
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

791 users are online: 791 guests
0 post in the last 24h
12 posts in the last week
26 posts in the last month
Registered members: 49991
Welcome our newest member, JoinToYakt
Most online: 2043 users on 29 Oct 2023, 01:04 AM