Login

russian armor

How-To: Winter Skins in custom maps

24 Nov 2013, 09:42 AM
#1
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

How-To: Winter Skins in custom maps



Basics



You will need a basic text editor for this. Microsoft Notepad is great for this. Even better would be notepad++, which you can download from notepad-plus-plus.org

In this tutorial we will edit two files. Here they are explained:

  • A file called YourMapName.options has a variable called uses_ice, which is used to set vehicle skin type.
  • A file called YourMapName.info has a variable called default_skin which is used to set infantry skin type.

    Why do we need to edit these files manually?

    Even though WorldBuilder has an option in Scenario Properties called "Map Uses Ice" it only affects default_skin variable in .info file. World Builder should edit uses_ice in .options file as well but currently it does not.

    Alright, lets get into setting infantry and vehicle skin types to winter:

    Goto your map folder, e.g.
    Code

    C:\Program Files (x86)\Steam\SteamApps\common\Company of Heroes 2\CoH2\Data\scenarios\mp\YourMapName


    Open YourMapName.options in notepad/notepad++, set uses_ice to true, e.g.
    Code

    uses_ice = true

    and save the file.

    Open YourMapName.info in notepad/notepad++, set default_skin to "winter", e.g.
    Code

    default_skin = "winter",

    and save the file.

    NOTE! World Builder might generate these files each time you save the map. Make sure uses_ice is set to true and default_skin is set to "winter" before using "Export Package".

    Conclusions


    default_skin variable in YourMapName.info can be used for setting infantry skin type. e.g. "winter" or "summer".

    uses_ice variable in YourMapName.options file can be used for setting vehicle skin type, e.g. true for winter skins and false for summer skins.

24 Nov 2013, 10:19 AM
#2
avatar of OnkelSam
Honorary Member Badge

Posts: 1582 | Subs: 4

cool, added to the index
28 Oct 2018, 03:18 AM
#3
avatar of Layndarat

Posts: 3

Gday, I just altered the options and info files for a map as you say to do and now the worldbuilder bugsplats every time I try to open my map. It would help me if you would post more of the files concerned so I could see the text entries on each side of the lines in question. Thank you very much

Edit, used file from other map to reset the info file. Still would like to see the text each side of the winter skins line if you don't mind since I can't get it to work. Thanks very much
28 Oct 2018, 04:44 AM
#4
avatar of Rosbone

Posts: 2144 | Subs: 2

The file is a text file and needs to be edited in a TEXT file editor such as Notepad, Wordpad, etc. Notepad will usually add the .TXT suffix to the file when you save it so be sure to save as.

COH2 will not open the file if it looks like 6p_MyMap.Info.txt.
It wants 6p_MyMap.Info.

Text files all need delimiters in order for the program code to split things into pieces that make sense. The INFO file uses brackets and commas as delimiters {}, The code that reads the file sees an object then reads what is between the brackets as the objects variables. Each variable is delimited by a comma. Code reads until it sees a comma and ends reading for that variable.

Note that each object is also delimited by a comma after its brackets.

PSUEDO CODE EXAMPLE:
Object = { variable1, Variable2, },

ACTUAL EXAMPLE:
default_skins =
{
"winter",
},

- default skins is the object. Its variables are inside { } and ends with a comma.
- "winter" is a string variable inside the brackets and is delimited with a comma. Note that the quotes are a delimiter that indicates read this var as a string.

It is important that each object and its variables are delimited or the program will read gibberish and crash.
29 Oct 2018, 23:07 PM
#5
avatar of Layndarat

Posts: 3

Thank you very much Rosbone, especially for the example. I have the winter skins working now. Sadly, not the blizzards - I'm following the examples, my files in the same places, my scar files appear the same but there is clearly something wrong.
30 Oct 2018, 00:26 AM
#6
avatar of Rosbone

Posts: 2144 | Subs: 2

Here is a sample scar file I used that worked.
The filename is the map name with a SCAR suffix.
2p_MyMap.Scar
Again it is a text file...see above for editor options.


-------------------------------------------------------------------------
-------------------------------------------------------------------------

import("ScarUtil.scar")
import("Systems/BlizzardMulitplayer.scar")

-------------------------------------------------------------------------
-- [[ ONINIT ]]
-------------------------------------------------------------------------

function OnInit()


MP_BlizzardInit("data:art/scenarios/presets/atmosphere/_mp_4p_coh2_okariver_blizzard.aps" ,"data:art/scenarios/presets/atmosphere/_mp_4p_coh2_okariver.aps", nil, nil, true)

end


Scar_AddInit(OnInit)
30 Oct 2018, 13:59 PM
#7
avatar of Layndarat

Posts: 3

jump backJump back to quoted post30 Oct 2018, 00:26 AMRosbone
Here is a sample scar file I used that worked.
The filename is the map name with a SCAR suffix.
2p_MyMap.Scar
Again it is a text file...see above for editor options.


-------------------------------------------------------------------------
-------------------------------------------------------------------------

import("ScarUtil.scar")
import("Systems/BlizzardMulitplayer.scar")

-------------------------------------------------------------------------
-- [[ ONINIT ]]
-------------------------------------------------------------------------

function OnInit()


MP_BlizzardInit("data:art/scenarios/presets/atmosphere/_mp_4p_coh2_okariver_blizzard.aps" ,"data:art/scenarios/presets/atmosphere/_mp_4p_coh2_okariver.aps", nil, nil, true)

end


Scar_AddInit(OnInit)



Hey Rosbone, thanks for all your help mate. Really appreciate it. Haven't compared it to the scar files I've tried yet and although it seems similar I haven't tried okariver yet, but I will now. Thanks again
16 Jun 2020, 07:01 AM
#8
avatar of BoshelvikHall

Posts: 52

jump backJump back to quoted post30 Oct 2018, 00:26 AMRosbone
Here is a sample scar file I used that worked.
The filename is the map name with a SCAR suffix.
2p_MyMap.Scar
Again it is a text file...see above for editor options.


-------------------------------------------------------------------------
-------------------------------------------------------------------------

import("ScarUtil.scar")
import("Systems/BlizzardMulitplayer.scar")

-------------------------------------------------------------------------
-- [[ ONINIT ]]
-------------------------------------------------------------------------

function OnInit()


MP_BlizzardInit("data:art/scenarios/presets/atmosphere/_mp_4p_coh2_okariver_blizzard.aps" ,"data:art/scenarios/presets/atmosphere/_mp_4p_coh2_okariver.aps", nil, nil, true)

end


Scar_AddInit(OnInit)




Does setting Blizzards in WorldBuilder not work?
1 user is browsing this thread: 1 guest

Livestreams

Germany 1

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

485 users are online: 485 guests
0 post in the last 24h
6 posts in the last week
38 posts in the last month
Registered members: 49060
Welcome our newest member, starkindustries
Most online: 2043 users on 29 Oct 2023, 01:04 AM