+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 40

Thread: A guide to map modding

  1. #1
    Captain cyrylc's Avatar
    EU3 CompleteHearts of Iron IIIRome GoldVictoria 2Victoria II: A House Divided

    Join Date
    Feb 2011
    Location
    Bieszczady
    Posts
    429

    A guide to map modding

    Hi!

    As there is no guide on how to create new provinces in Vicky, I feel the need to make one.

    Please note that this guide is accurate for vanilla 1.3 and might not work with AHD. If anyone knows if there are any differences in map modding between vanilla and AHD - feel free to write them in this thread or PM me.

    Stuff you'll need:
    - Victoria 2 (that's quite obvious)
    - some text editing tool (I use MS Notepad)
    - a tool to edit map (it's in BMP format so most programs should be able to open it, I use GIMP).
    I also recommend you downloading the Clausewitz Positions Editor, it's much easier to edit positions with it than with Notepad.

    1. You'll need to think about what provinces you want to add and where. I'll create province Bieszczady, since that's where I was born and where I live.

    2. Create .txt file in Vicky folder\history\provinces. It should be called "ID - Province name.txt", for example mine is "3249 - Bieszczady.txt". It doesn't matter in which folder in "provinces" you put your new file, I put mine in "austria" folder.
    It should look like that:
    Code:
    owner = AUS # owner of the province.
    controller = AUS # controller of the province, usually it's the same as owner, but if for example Austria is at war with Russia at the start of the scenario and Russia is occupying it from the start, you should change it to "controller = RUS"
    add_core = AUS #
    add_core = POL # cores.
    add_core = RUT #
    trade_goods = coal # trade goods that province is producing, list of those is in goods.txt file in "common" folder.
    life_rating = 35 # life rating, most European provinces have 35 life rating in 1836.
    Don't forget to add an empty line at the end, without it the game will erase last character in file and it'll think that the province has 3 life rating.

    3. Open some file in "localisation" folder (it doesn't matter which one, the game reads them all anyway, it doesn't matter in which place in file you put new text too) and add a line looking like that:
    Code:
    PROV3249;Bieszczady;Bieszczady;Bieszczady;;Bieszczady;;;;;;;x;;x;;;;;;;;;;;;;;
    I usually just copy another line and change ID and names.
    It's PROV and province ID, then English name, French name, German name and Spanish name.

    4. Now the real map editing. Open the "map" folder, you'll see some files there.

    - adjacencies.csv
    Edit it if you want to create new straits.
    Code:
    13;14;sea;3011;0;Vancouver Crossing
    I think it's ID of first province;ID of second province;sea;ID of sea province in which the strait is located;0;name of strait. The 0 means it is a standard sea crossing. Numbers higher than 0 are used to refer to canals.

    - climate.txt
    It decides which climate your province has. I've added mine to "temperate climate" group. You may also edit climate effects on gameplay here.

    - continent.txt
    'Tis pretty obvious.

    - default.map
    The "max_provinces" number is number of all provinces+1, in unmodded Vicky 2 1.3 it's 3249, because there are 3248 provinces. So, if you're going to add one province you need to change it to "max_provinces = 3250".

    - definitions.csv
    Each province has its own colour, those colours are in RGB format in this file. The colour that you use must be unique, otherwise the engine will not recognise it as a separate province.
    Code:
    3249;53;14;240;Bieszczady;x
    ID;red;green;blue;province name;x

    - positions.txt
    I didn't edit that file, as I'm editing the positions with Clausewitz editor (there's a link to this editor at the top of my post) and actually I can't edit them in Notepad.
    If you want to edit this file in Notepad, look at Sakura's guide to map modding in EU3, it's explained pretty well there. Stuff in Vicky 2 is a bit different from EU3, you'll need to add the factory's position and possibly something else (naval base? I'm not sure).

    - provinces.bmp
    Open it in some graphics program, and draw your province somewhere, using colour from definitions.csv file. The map is flipped upside down, you may want to change it to normal-looking map before you start editing, don't forget to make it upside down again when you finish.

    - region.txt
    Here, you assign your province to some region; if your province hasn't got region, the game will crash when you click at the province. If you want to know which region has which ID, look in localisation files for something like "West Galicia" or wherever you want to put your new province.

    - region_sea.txt
    I don't know if it actually does anything, it also looks like it's impossible to add new sea provinces.

    For editing the terrain.bmp and rivers.bmp files remember to use a programme which supports indexed bitmaps such as The GIMP.
    - rivers.bmp
    In this file you edit rivers. White colour is land, pink is seas and oceans, river's rising is in green (in RGB format: 0 255 0), then it uses 5 different shades of blue, always in the same order: 0 250 255, 0 200 255, 0 0 225, 0 0 150, 0 0 100. Red pixel is where two rivers meet. It is also crucial that rivers are always only one pixel wide and must horizontally or vertically border another river pixel (i.e. you can't do diagonals, instead go one up/down then one across etc.)
    Each river must have one green originating pixel. Rivers cannot fork, if you want to give the appearance of one doing so you need to use another green pixel at the start of every fork. This map is flipped upside down too.

    - terrain.bmp
    This file determines what terrain the province is. The colours are explained in terrain.txt. This map is flipped upside down.

    5. Create the POPs in history\pops folder.
    It should look like that:
    Code:
    #Przemysl (596000/149000 POPS) # province name and number of POPs. first number (596 000) here is the number of actual people in that province, second number (149 000) is amount of POPs (one POP represents a family of 4 people). 
    705 = { # province ID
    	clergymen = { # POP type, those are in common\pop_types.txt
    		culture = ukrainian # culture. common\cultures.txt
    		religion = orthodox # religion. common\religions.txt
    		size = 175 # size of POP.
    	}
    
    	artisans = {
    		culture = ukrainian
    		religion = orthodox
    		size = 950
    	}
    
    	soldiers = {
    		culture = ukrainian
    		religion = orthodox
    		size = 175
    	}
    
    	farmers = {
    		culture = ukrainian
    		religion = orthodox
    		size = 17700
    	}
    
    	aristocrats = {
    		culture = polish
    		religion = catholic
    		size = 3400
    	}
    
    	clergymen = {
    		culture = polish
    		religion = catholic
    		size = 1175
    	}
    
    	artisans = {
    		culture = polish
    		religion = catholic
    		size = 5750
    	}
    
    	soldiers = {
    		culture = polish
    		religion = catholic
    		size = 1150
    	}
    
    	farmers = {
    		culture = polish
    		religion = catholic
    		size = 113525
    	}
    
    	clergymen = {
    		culture = ashkenazi
    		religion = jewish
    		size = 125
    	}
    
    	artisans = {
    		culture = ashkenazi
    		religion = jewish
    		size = 4550
    	}
    
    	soldiers = {
    		culture = ashkenazi
    		religion = jewish
    		size = 100
    	}
    
    	farmers = {
    		culture = ashkenazi
    		religion = jewish
    		size = 8225
    	}
    
    	clergymen = {
    		culture = south_german
    		religion = catholic
    		size = 50
    	}
    
    	artisans = {
    		culture = south_german
    		religion = catholic
    		size = 100
    	}
    
    	soldiers = {
    		culture = south_german
    		religion = catholic
    		size = 25
    	}
    
    	farmers = {
    		culture = south_german
    		religion = catholic
    		size = 1825
    	}
    }
    Thanks to:
    Kalelovil and stiv, for some corrections
    Sakura, for EU3 guide which this guide is based on
    Clausewitz, for his positions editor

    That's all I think. Please tell me if I made an error somewhere or if I forgot about something.
    Last edited by cyrylc; 13-05-2012 at 13:53.

  2. #2
    Second Lieutenant spyroware1's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneVictoria 2
    Victoria II: A House Divided

    Join Date
    Aug 2010
    Location
    Imperial London
    Posts
    156
    Thank you so much!

  3. #3
    General Kalelovil's Avatar
    Crusader Kings IIDarkest HourDeus VultEU3 CompleteDivine Wind
    Hearts of Iron IIIHeir to the ThroneMagickaMajesty II CollectionRome Gold
    Semper FiSword of the Stars IISupreme Ruler: Cold WarVictoria 2Warlock: Master of the Arcane

    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,214
    For editing the terrain.bmp and rivers.bmp files remember to use a programme which supports indexed bitmaps such as The GIMP.

    Quote Originally Posted by cyrylc View Post
    - adjacencies.csv
    Edit it if you want to create new straits.
    Code:
    13;14;sea;3011;0;Vancouver Crossing
    I think it's ID of first province;ID of second province;sea;ID of sea province in which the strait is located;0;name of strait. I don't know what that "0" means though.
    The 0 means it is a standard sea crossing. Numbers higher than 0 are used to refer to canals.


    Quote Originally Posted by cyrylc View Post
    - rivers.bmp
    In this file you edit rivers. White colour is land, pink is seas and oceans, river's rising is in green (in RGB format: 0 255 0), then it uses 5 different shades of blue, always in the same order: 0 250 255, 0 200 255, 0 0 225, 0 0 150, 0 0 100. This map is flipped upside down too.
    It is also crucial that rivers are always only one pixel wide and must horizontally or vertically border another river pixel (ie you can't do diagonals, instead go one up/down then one across etc.)
    Each river must have one green originating pixel. Rivers cannot fork, if you want to give the appearance of one doing so you need to use another green pixel at the start of every fork.

  4. #4
    I am now tempted to mod my brother's Victoria II to make al; the map distances 9999999999.

  5. #5
    Sergeant stiv's Avatar
    Hearts of Iron IIIVictoria 2Victoria II: A House DividedVictoria II: Heart of Darkness

    Join Date
    Apr 2009
    Location
    Havant - as in 'haven't a clue'!
    Posts
    77
    Quote Originally Posted by cyrylc View Post
    - provinces.bmp
    Open it in some graphics program, and draw your province somewhere, using colour from definitions.csv file. The map is flipped upside down, you may want to change it to normal-looking map before you start editing, don't forget to make it upside down again when you finish.
    Hi cyrylc,

    Don't forget that 'provinces.bmp' is not only upside down but it is also back to front - so that north is south and east is west and vice versa. It's a pain in the bum!

    Also the colour that you use must be unique otherwise the engine will not recognise it as a seperate province.

    Glad you mentioned the 'Clauswitz Positions Editor' because I've always been doing it manually with Notepad++. Took me ages to do the positions for the 4 groups of little islands in my Scottish Islands Mod

  6. #6
    Captain cyrylc's Avatar
    EU3 CompleteHearts of Iron IIIRome GoldVictoria 2Victoria II: A House Divided

    Join Date
    Feb 2011
    Location
    Bieszczady
    Posts
    429
    Quote Originally Posted by spyroware1 View Post
    Thank you so much!


    Quote Originally Posted by Kalelovil View Post
    For editing the terrain.bmp and rivers.bmp files remember to use a programme which supports indexed bitmaps such as The GIMP.


    The 0 means it is a standard sea crossing. Numbers higher than 0 are used to refer to canals.



    It is also crucial that rivers are always only one pixel wide and must horizontally or vertically border another river pixel (ie you can't do diagonals, instead go one up/down then one across etc.)
    Each river must have one green originating pixel. Rivers cannot fork, if you want to give the appearance of one doing so you need to use another green pixel at the start of every fork.
    Thanks, I added this to OP.

    Quote Originally Posted by stiv View Post
    Hi cyrylc,

    Don't forget that 'provinces.bmp' is not only upside down but it is also back to front - so that north is south and east is west and vice versa. It's a pain in the bum!
    When you flip it in GIMP using "flip vertically", it looks normal.

    Also the colour that you use must be unique otherwise the engine will not recognise it as a seperate province.
    Thanks, added to OP.

  7. #7
    Captain cyrylc's Avatar
    EU3 CompleteHearts of Iron IIIRome GoldVictoria 2Victoria II: A House Divided

    Join Date
    Feb 2011
    Location
    Bieszczady
    Posts
    429
    Is it possible to create/edit a sea province?

  8. #8
    General Kalelovil's Avatar
    Crusader Kings IIDarkest HourDeus VultEU3 CompleteDivine Wind
    Hearts of Iron IIIHeir to the ThroneMagickaMajesty II CollectionRome Gold
    Semper FiSword of the Stars IISupreme Ruler: Cold WarVictoria 2Warlock: Master of the Arcane

    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,214
    Quote Originally Posted by cyrylc View Post
    Is it possible to create/edit a sea province?
    It should be, although I have never done so myself (other than slightly adjusting a sea province's borders).

  9. #9
    Captain cyrylc's Avatar
    EU3 CompleteHearts of Iron IIIRome GoldVictoria 2Victoria II: A House Divided

    Join Date
    Feb 2011
    Location
    Bieszczady
    Posts
    429
    Quote Originally Posted by Kalelovil View Post
    It should be, although I have never done so myself (other than slightly adjusting a sea province's borders).
    I know that their shapes can be edited in provinces.bmp, but is it possible to create new sea provinces? I think I haven't seen text files for sea provinces in history/provinces folder.

  10. #10
    General Kalelovil's Avatar
    Crusader Kings IIDarkest HourDeus VultEU3 CompleteDivine Wind
    Hearts of Iron IIIHeir to the ThroneMagickaMajesty II CollectionRome Gold
    Semper FiSword of the Stars IISupreme Ruler: Cold WarVictoria 2Warlock: Master of the Arcane

    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,214
    Quote Originally Posted by cyrylc View Post
    I know that their shapes can be edited in provinces.bmp, but is it possible to create new sea provinces? I think I haven't seen text files for sea provinces in history/provinces folder.
    It should be. They won't need history/province files. Just make sure the sea provinces are specified under sea_starts in default.map.

  11. #11
    Captain cyrylc's Avatar
    EU3 CompleteHearts of Iron IIIRome GoldVictoria 2Victoria II: A House Divided

    Join Date
    Feb 2011
    Location
    Bieszczady
    Posts
    429
    Quote Originally Posted by Kalelovil View Post
    It should be. They won't need history/province files. Just make sure the sea provinces are specified under sea_starts in default.map.
    Okay, thanks.

  12. #12
    Thanks for the guide! Something of note though, after I edited and saved the provinces.bmp, and then ran the game, the game would freze during creating rivers. I found out (not too sure why it happened) that GIMP had saved the file as 32 bits. I corrected this by doing save as, and selcting 24 bits in advanced options.

  13. #13
    First Lieutenant Tempelridderen's Avatar
    Victoria 2

    Join Date
    Feb 2004
    Location
    Larvik, Norway!
    Posts
    294
    Hello!
    Excellent guide. However, I can't seem to make it work properly. First, the new province I have tried to create doesn't show up in Clausewitz Position Editor. So I think I've done something wrong. Secondly, the game crashes during loading. I'm pretty sure I've followed every step in your guide.. Any ideas about what it might be?
    I've added a new province number 3248 to create the county of Vestfold in Norway.
    In Hoc Signo Vinces

  14. #14
    Field Marshal Gaius Marius I's Avatar
    EU3 CompleteDivine WindHeir to the ThroneVictoria: RevolutionsVictoria 2
    Victoria II: A House DividedVictoria II: Heart of Darkness

    Join Date
    Jul 2003
    Location
    Edmonton, Alberta, Canada
    Posts
    3,512
    Quote Originally Posted by Tempelridderen View Post
    Hello!
    Excellent guide. However, I can't seem to make it work properly. First, the new province I have tried to create doesn't show up in Clausewitz Position Editor. So I think I've done something wrong. Secondly, the game crashes during loading. I'm pretty sure I've followed every step in your guide.. Any ideas about what it might be?
    I've added a new province number 3248 to create the county of Vestfold in Norway.
    There already is a province 3248, the "West Magellan Strait"
    Gaius Marius

    First Man in Rome
    7 Consulships

    ICQ#: 574097267
    MSN: allpowerfull2000@yahoo.com

  15. #15
    First Lieutenant Tempelridderen's Avatar
    Victoria 2

    Join Date
    Feb 2004
    Location
    Larvik, Norway!
    Posts
    294

    Thumbs up

    Quote Originally Posted by Gaius Marius I View Post
    There already is a province 3248, the "West Magellan Strait"
    Thanks!
    It seems I had an old version of Vicky. It works fine now!

    Another question: Is it possible to draw the actual border lines on the map? Because now I only see the province when I press it and it's highlighted. It would be nice with a clear border around it!
    In Hoc Signo Vinces

  16. #16
    Field Marshal Rylock's Avatar
    Crusader Kings IIDarkest HourEU3 CompleteDivine WindHearts of Iron III
    Heir to the ThroneVictoria 2

    Join Date
    Mar 2008
    Location
    Edmonton, Canada
    Posts
    8,090
    Quote Originally Posted by Tempelridderen View Post
    Thanks!
    It seems I had an old version of Vicky. It works fine now!

    Another question: Is it possible to draw the actual border lines on the map? Because now I only see the province when I press it and it's highlighted. It would be nice with a clear border around it!
    Unless I'm mistaken, the game generates province and state borders automatically. If you delete your map cache folder, it will force the game to re-generate those borders on the next start up.

  17. #17
    East vs West developer kunadam's Avatar
    Achtung PanzerArsenal of DemocracyHearts of Iron 2: ArmageddonCrusader Kings IIDarkest Hour
    Deus VultEuropa Universalis 3EU3 CompleteDivine WindFor The Glory
    For the MotherlandGettysburgHearts of Iron IIIHOI3: Their Finest HourHeir to the Throne
    Iron CrossThe Kings CrusadeLost Empire - ImmortalsMagickaMajesty 2
    Victoria: RevolutionsRome GoldSemper FiSengokuSword of the Stars II
    Supreme Ruler 2020 GoldStarvoidVictoria 2Victoria II: A House DividedMount & Blade: Warband
    Mount & Blade: With Fire and Sword

    Join Date
    Aug 2006
    Location
    Budapest, Hungary
    Posts
    2,707
    What is the rule for placing the red dots in the river file? Where should be in relation to where the rivers meet/split.
    Also what about the place the river gets to the ocean/lake? Does it need to be marked by something?
    Game Developer East vs West - Softcoding Team / Research Apps. / The Map 1
    Arsenal of Democracy Technical Team Mod2
    Hungarian leaders for HoI2 3 / Hungarian Improvement for HoI34

  18. #18
    General Kalelovil's Avatar
    Crusader Kings IIDarkest HourDeus VultEU3 CompleteDivine Wind
    Hearts of Iron IIIHeir to the ThroneMagickaMajesty II CollectionRome Gold
    Semper FiSword of the Stars IISupreme Ruler: Cold WarVictoria 2Warlock: Master of the Arcane

    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,214
    Quote Originally Posted by kunadam View Post
    What is the rule for placing the red dots in the river file? Where should be in relation to where the rivers meet/split.
    Also what about the place the river gets to the ocean/lake? Does it need to be marked by something?
    A river pixel can only ever border a maximum of two other river pixels. Any splits from the main river need to have a red pixel where the splits start so that the preceding requirement is still met.
    Last edited by Kalelovil; 09-01-2012 at 13:54.

  19. #19
    East vs West developer kunadam's Avatar
    Achtung PanzerArsenal of DemocracyHearts of Iron 2: ArmageddonCrusader Kings IIDarkest Hour
    Deus VultEuropa Universalis 3EU3 CompleteDivine WindFor The Glory
    For the MotherlandGettysburgHearts of Iron IIIHOI3: Their Finest HourHeir to the Throne
    Iron CrossThe Kings CrusadeLost Empire - ImmortalsMagickaMajesty 2
    Victoria: RevolutionsRome GoldSemper FiSengokuSword of the Stars II
    Supreme Ruler 2020 GoldStarvoidVictoria 2Victoria II: A House DividedMount & Blade: Warband
    Mount & Blade: With Fire and Sword

    Join Date
    Aug 2006
    Location
    Budapest, Hungary
    Posts
    2,707
    There are no green pixels at the junctions of rivers, but there are red ones. Greens appear at their source (at the spring).
    Game Developer East vs West - Softcoding Team / Research Apps. / The Map 1
    Arsenal of Democracy Technical Team Mod2
    Hungarian leaders for HoI2 3 / Hungarian Improvement for HoI34

  20. #20
    East vs West developer kunadam's Avatar
    Achtung PanzerArsenal of DemocracyHearts of Iron 2: ArmageddonCrusader Kings IIDarkest Hour
    Deus VultEuropa Universalis 3EU3 CompleteDivine WindFor The Glory
    For the MotherlandGettysburgHearts of Iron IIIHOI3: Their Finest HourHeir to the Throne
    Iron CrossThe Kings CrusadeLost Empire - ImmortalsMagickaMajesty 2
    Victoria: RevolutionsRome GoldSemper FiSengokuSword of the Stars II
    Supreme Ruler 2020 GoldStarvoidVictoria 2Victoria II: A House DividedMount & Blade: Warband
    Mount & Blade: With Fire and Sword

    Join Date
    Aug 2006
    Location
    Budapest, Hungary
    Posts
    2,707
    I have not seen this in the OP, so I add:

    When rivers meet the junction is like a T (could be rotated in 4 different ways). The red dot is in the stem of the T.
    In other words a red dot is surrounded by 2 river dots, in opposite directions, and one of these river pixels is surrounded by 2 other river pixels.
    RiverJunction.jpg
    Game Developer East vs West - Softcoding Team / Research Apps. / The Map 1
    Arsenal of Democracy Technical Team Mod2
    Hungarian leaders for HoI2 3 / Hungarian Improvement for HoI34

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts