省份修改

本页面讲述的内容长期有效

添加省份的方法: 每一个访问这个页面的玩家都倾向于了解如何创建一个省份。接下来是针对不同图像编辑程序的一些指南。本指南适用于Windows 7和Mac OSX 10.9,也应适用于其他版本的Windows和Mac。

不兼容的程序

Microsoft Paint,Paintbrush(Mac系统),OpenOffice Draw和LibreOffice Draw(Linux系统)不能用来编辑rivers.bmp,heightmap.bmp和terrain.bmp,因为它们无法实现打开索引颜色并保存修改的功能。在用上述程序中的任意一个编辑其中的某个文件以后会经常性的引起EU4在启动时崩溃。

GIMP

为了展示所有的可能性,我们将在爱尔兰海的贸易节点和大陆上添加一个新的小岛。

新建mod(Windows)

Making a new folder
Adding the .mod file

首先,在“C:/Users/<Username>/Documents/Paradox Interactive/Europa Universalis IV/mod”路径下新建一个文件夹,这应该是EU4的默认路径。如果不在这里,请先尝试找到正确的路径,或者最糟糕的情况,在这个位置下重新安装EU4。给这个文件安上你想要的名字,在这里我选择了“Celtica”。其次,如果mods文件夹中已经安装了mod,建议将“.mod”文件(在Windows上可能显示为Windows Media Player文件)复制并重命名为与您的文件夹相同的名称。然后打开它(本教程使用notepad ++)并更改“name ="<name>"”和“archive =mod / "<foldername>"”。需要记住的是,因为这是一个文件夹而非.zip(压缩文件),所以并不需要(并且会导致mod损坏)在文件名最后添加.zip的后缀名。

“粗暴”方式(Windows)

如果由于某些原因例如磁盘空间很小或者可能需要很长时间来复制文件,那么一个不方便但却很简单的“what you need to copy(复制所需)”指南如下。如果不想浪费时间,并且需要立即开始实际的修改,请按照“快速方式”中的说明操作。

接下来,转到安装原版EU4(它应该位于“C:/ Program Files(x86)/ Steam / SteamApps / common / Europa Universalis IV”)并复制map文件夹。将map文件夹粘贴到/ mod中的mod文件夹中。然后,在你的mod文件中创建一个“history”文件夹,然后创建一个“provinces”文件夹。虽然没有必要,但是官方推荐将“C/ Program Files(x86)/(...)/ history / provinces”中的省份文件复制到“C:/ Users / (...)/ mod / <mod文件夹名称> / history /provinces”,以方便以后创建省份。然后,在MOD中创建一个名为“common”的文件夹,并进一步创建一个名为“tradenodes”的文件夹,并从原版安装中复制所述文件(应该称为“00_tradenodes”)。之后,创建一个名为“localisation”的文件夹,并从原版文件夹中取“prov_names_l_english”和“EU4_l_english”。


快速方式(Windows)

把common文件夹、history文件夹、localization文件夹和map文件夹从 C:/Program Files (x86)/Steam/SteamApps/common/Europa Universalis IV 复制到 C:/Users/<Username>/Documents/Paradox Interactive/Europa Universalis IV/mod。然后如果操作正确,文件大小应该在210MB左右。

Setting up shop (Mac)

First, create a folder at /Users/<Username>/Documents/Paradox Interactive/Europa Universalis IV/mod, which should be your default location for EU4. If it's not there, try searching around. Name the file whatever you want, however for this mod I chose "Celtica". Then, if there already is a mod installed in the mods folder, it is recommended to copy the .mod file (it may show up as a video file) and rename it to the same name as your folder. Then open it (this tutorial uses textedit) and change name="<name>" and archive="mod/<foldername>". Remember, since this is a folder and not a .zip file you should not add .zip after the file name.

Copy the common folder, history folder, localization folder and map folder from /Users/<Username>/Library/Application Support/Steam/SteamApps/common/Europa Universalis IV to /Users/<Username>/Documents/Paradox Interactive/Europa Universalis IV/mod/<Modname> (the folder created earlier). Then, if done correctly the folder should be somewhere around 210MB.

Setting up shop (Linux)

First find the mod folder which is usually located at ~/.paradoxinteractive/Europa Universalis IV/mod. If it's not there, try searching around:

   $ find ~/ -iname "mod"

go to the folder and create your mod directory

   $ cd  ~/.paradoxinteractive/Europa\ Universalis\ IV/mod
   $ mkdir "{your mod name}"

If there already is a mod installed in the mods folder, it is recommended to copy the .mod file (it may show up as a music file) and rename it to the same name as your folder:

   $ ls
   $ cp "{existing mod name}.mod" "{your mod name}.mod"

If there is no such file you can create a new one:

   $ touch "{your mod name}.mod"

Then open it and change name="{your mod name}" and archive="mod/{your mod name}". Remember, since this is a folder and not a .zip file you should not add .zip after the file name.

Copy the common folder, history folder, localization folder and map folder from ~/.local/share/Steam/SteamApps/common/Europa Universalis IV to ~/.paradoxinteractive/Europa Universalis IV/mod/{your mod name} (the folder created earlier).

   $ cp -r ~/.local/share/Steam/SteamApps/common/Europa\ Universalis\ IV/common "{your mod name}/common"
   $ cp -r ~/.local/share/Steam/SteamApps/common/Europa\ Universalis\ IV/history "{your mod name}/history"
   $ cp -r ~/.local/share/Steam/SteamApps/common/Europa\ Universalis\ IV/localisation "{your mod name}/localisation"
   $ cp -r ~/.local/share/Steam/SteamApps/common/Europa\ Universalis\ IV/map "{your mod name}/map"

Then, if done correctly the folder should be somewhere around 210MB.

   $ du -sm "{your mod name}"

编辑 heightmap.bmp

Editing Heightmap

Since a new island is being added, adding a province in province.bmp would simply add a province in the middle of the ocean which is not fun. First, open heightmap.bmp in GIMP. Anything below (95, 95, 95) is water so a recommended course of action is to use the colorpicker tool and select a color from coastal Netherlands or Florida. After you're done drawing it should look like something to the right. Make sure the image is in greyscale (Image > Mode > Grayscale) and hit Shift+Control+E or navigate to (File > Export As. . .). Make sure that the image is being saved in .bmp format and in the map path in your mod, then click on the plus next to compatibility options (the screen should pop up after confirming that you'd like to overwrite heightmap.bmp) and check '"Do not write colourspace information"'. This is important because if it is not done the mod will crash. Load up EU4 and if everything is done correctly something like the image to the right should appear.

编辑 terrain.bmp

Editing Terrain.bmp

Obviously there's a problem! The island is all weird and blue. To fix that, terrain.bmp must be edited as well. One way of doing it is to use the rectangular select tool to select the entire image and then use Control+Shift+V to create a new image. On that new image, create a new layer then open heightmap.bmp, selecting it with the rectangular select tool, and then pasting it into the new layer on the new image. If your terrain.bmp appears as grey, change the image mode in ( Image > Mode) to RGB then paste again. While editing, it should look like something to the right.

After editing, proceed to copy the layer with the terrain and paste it onto the terrain on your original terrain.bmp, once again saving with '"Do not write colourspace information"' checked. Loading up your game, it should look like something to the right.

编辑颜色 .dds 文件

Hmm. . ., it still looks faded and weird. But that's because the colormap interprets it as underwater! An approach such as using an online converter to convert from .dds to PNG and back is needed, since GIMP can't open dds files. Alternately, since this is just visual, this step can be skipped, though that is not recommended.

Pick a color from nearby landmasses and use that to color in the island, using the same techniques that were applied to editing heightmap.bmp.

Note: The .dds files are located in the terrain folder inside the map folder. They're labeled "colourmap_<season>" / "colourmap_water". They also are half the size of the terrain.bmp file.

添加一个省份并且编辑 provinces.bmp

Adding the province
  • To add a province, first a color must be chosen. By default, several colors are assigned in the definition file in the map folder. Province 2026 is bugged, so move to 2027 and put in the name "Celtica" where the second to last x is. After the 2027 and before Celtica are 3 RGB codes. Make the color in GIMP reflect that, and using the strategy found while editing the heightmap.bmp add the color to the region of Celtica. If you are trying to set a province ID to anything lower than 2027 (so it is likely to be a complete map overhaul), then please see the below section 'How to edit existing provinces' when proceeding with this section.
  • After adding the province, make sure definition is saved and provinces.bmp is exported with '"Do not write colourspace information"' checked and the .bmp is saved as 24-bits.
  • Then, go into "default" found in the map folder and change the maximum number of provinces to 2028. Also add the province number to one continent in "continent.txt", one winter zone in "climate.txt" and as many regions as necessary in "region.txt".
  • Open "prov_names_l_english" which can be found in the localisation folder, go to the end and follow the formatting while putting in the new province name.
  • As a final step, Go to history/provinces and copy the file named "1-Uppland" and rename it with the province details, in this case "2027-Celtica". This file can now be specified to have different cores, basetax, trade good etc., all of which should be already set up in the folder you copied, you should just have to change the values.

Congratulations! A new province! However it still looks strange - don't worry it'll be fixed soon enough.

添加一个新的贸易节点

To showcase the power of nudge, a new trade node will be added.

  • In EU4_l_english (in the localization folder), find "ragusa" and after finding it put "celtica: "Celtica"".
  • In Common/tradenodes open 00_tradenodes and scroll to the end, and add this (pastebin.com).
  • Scroll up until you find western_european_coast (line 1276) and just after antwerpen but just before members add this (pastebin.com).

使用nudge

Using nudge

Open up any scenario (e.g. Rise of the Ottomans) and open the console (with a US/UK keyboard the key to do this is ` (grave) key or Shift+'). Type in nudge to enter the nudge screen.

  • Click on the dinghy at Hatton Bank (to the west of France) and use the arrows to change the trade route to Celtica. Once there, use the arrows next to Control Points to add and delete and edit the path of the trade route to Celtica.
  • Next, click on the province of Celtica and then a box filled with options such as "City" and "Unit" will be present. To quickly move these ambient objects, use right click.

Important: Click on the 'save' button as exiting out of nudge may crash the game and the setting will not be saved otherwise.

Next, exit the game and go to the /mod folder. There should be folders titled "<modname>map" and "<modename>common" so take the files inside of them and move them to /<modname>/map and /modname/common respectively.

添加邻接关系

Opening the adjacencies.csv file, make two lines and add; 2027;241;sea;1285;-1;-1;-1;-1;Celtica-Ireland 2027;374;sea;1285;-1;-1;-1;-1;Celtica-Wales

These can be explained as From;To;Type;Through;start_x;start_y;stop_x;stop_y;Comment. -1 for coordinates will make the game automagically plot lines from provinces.

最终产品

在所有这些之后,应该(大致)看到以下内容。

Complete island

Thanks for using this WIP guide!

如何编辑现有省份

If you are doing a complete map overhaul, you may want to use the existing province ID's for different ones. Just follow all the steps above all the way up until you have to edit files in the history/provinces file (In the Adding a province section). It is important now that you still include the vanilla files for the original provinces, but instead edit the content of the file to read replace_path = "history/provinces/<file name that the province is being replaced with>.txt".

For example, if I wanted my Celtica file to replace Uppland and have the ID 1, I would start by opening the '1-Uppland' file (in a program like Notepad) and saving it as '1-Celtica'. Then, I would have to edit the 1-Uppland file to read replace_path = "history/provinces/1-Celtica.txt". I can then edit the Celtica file so that all the information in there is correct to the information I have researched about the province, and voila, it should work

It is essential to do this otherwise the game will still read the vanilla files as well, so you'll end up with multiple countries having cores where you do not want them.