地图修改

地图依靠不同的图像文件和文本文件来生成地图的各种效果和属性。

关于如何处理构成地图的图像,请参阅地图修改速查。

省份地图

provinces.bmp 控制省份的形状,与 definition.csv 配合使用。所有省份都必须拥有唯一的红-绿-蓝(RGB)颜色组合。请注意,将此文件中的任何像素设为纯黑(0,0,0)或纯白(255,255,255)都会导致游戏崩溃。

provinces.bmp 文件应为 RGB 模式,并保存为 24 位位图图像文件(.BMP)。

Europa Universalis IV\map\provinces.bmp

地形地图

terrain.bmp 控制地形的分配及其贴图,与 terrain.txt 配合使用。

terrain.bmp 文件应为索引模式,并保存为 8 位位图图像文件(.BMP)。请确保保留颜色表,且其顺序与原版一致。

Europa Universalis IV\map\terrain.bmp

树木地图

重要:树木地图上必须至少绘制少量某一种树木,游戏才能加载。

trees.bmp 控制树木在地图上的分布,与 terrain.txt 配合使用。trees.bmp 文件的分辨率会影响所放置树木的密度。

trees.bmp 文件应为索引模式,并保存为 8 位位图图像文件(.BMP)。请确保保留颜色表,且其顺序与原版一致。

Europa Universalis IV\map\trees.bmp

河流地图

重要:请在河流地图上至少放置一条河流,游戏才能加载。

rivers.bmp 控制河流在地图上的分布。河流的粗细必须始终为 1 像素。

rivers.bmp 文件应为索引模式,并保存为 8 位位图图像文件(.BMP)。请确保保留颜色表,且其顺序与原版一致。

rivers.bmp 中使用以下颜色:

  • 绿色:(0, 255, 0) - 河流的源头。
  • 红色:(255, 0, 0) - 汇入源。用于将多条“源头”路径汇合为一条河流。请注意,汇入源不需要绿色的源头像素。
  • 黄色:(255, 252, 0 ) - 分流源。用于从一条河流向外分出支流。
  • 蓝色:(0, 225, 255) - 贴图最窄的河流。
  • 蓝色:(0, 200, 255) - 贴图较窄的河流。
  • 蓝色:(0, 100, 255) - 贴图较宽的河流。
  • 蓝色:(0, 0, 200) - 贴图最宽的河流。

可以使用比原版 rivers.bmp 更多的颜色,它们在颜色表中的位置越靠后,河流就越粗。

Europa Universalis IV\map\rivers.bmp

高度图

heightmap.bmp 决定地图的 3D 网格。( 0, 0, 0 ) 是最低点,(255, 255, 255) 是最高点。海平面设定在 (94, 94, 94),因此低于该值的区域都会被淹没。

请让不同高度之间的过渡保持平滑,否则会产生明显的锯齿状边缘。

heightmap.bmp 文件应为灰度模式,并保存为 8 位位图图像文件(.BMP)。

Europa Universalis IV\map\heightmap.bmp

法线贴图

world_normal.bmp 决定 3D 凹凸贴图。要为高度图正确添加阴影,必须有此文件。

它们的尺寸是 heightmap.bmp 的一半。

法线贴图可以使用Nvidia 的纹理工具由 heightmap.bmp 生成,也可以在 Photoshop CC 中使用“滤镜 > 3D > 生成法线图”。 这里有一份详细的指南,介绍如何使用 Gimp 生成法线贴图。

Europa Universalis IV\map\world_normal.bmp

色彩贴图

色彩贴图:colormap_autumn.dds、colormap_spring.dds、colormap_summer.dds 和 colormap_winter.dds 会在各自对应的季节叠加在地形贴图之上。

colormap_x.dds 文件应为 RGB 模式,并以 .DDS 格式保存,使用 8.8.8.8 ARGB 32 bpp 配置(Gimp 2.8 中为 RGBA8),且不带 mipmap。

自 1.35 起,将 DDS 文件保存为 8.8.8.8 已不再有效,色彩贴图不会被加载。将文件保存为 DXT1(Photoshop 中为 BC1 RGB 4bpp)是有效的,这也是目前原版 EU 色彩贴图文件所采用的文件格式。

Europa Universalis IV\map\terrain\colormap_autumn.dds

水域贴图

colormap_water.dds 控制应用于水域的色调。

colormap_water.dds 文件应为 RGB 模式,并以 .DDS 格式保存,使用 8.8.8.8 ARGB 32 bpp 配置(Gimp 2.8 中为 RGBA8),且不带 mipmap。

Europa Universalis IV\map\terrain\colormap_water.dds

反射贴图

reflection.dds 控制水面的倒影。

reflection.dds 文件应以 .DDS 格式保存,使用带 mipmap 的 DXT5(与地形图集类似)。 它是上下颠倒渲染的,影响最大的部分是顶部的方块。

Europa Universalis IV\map\terrain\reflection.dds

default.map

default.map 是一个重要的文本文件,定义了地图在游戏玩法功能上的若干方面。

基本版本如下所示:

width = 5632
height = 2048
max_provinces = 4348

sea_starts = { }
only_used_for_random = { }
lakes = { }
force_coastal = { }

definitions = "definition.csv"
provinces = "provinces.bmp"
positions = "positions.txt"
terrain = "terrain.bmp"
rivers = "rivers.bmp"
terrain_definition = "terrain.txt"
heightmap = "heightmap.bmp"
tree_definition = "trees.bmp"
continent = "continent.txt"
adjacencies = "adjacencies.csv"
climate = "climate.txt"
region = "region.txt"
superregion = "superregion.txt"
area = "area.txt"
provincegroup = "provincegroup.txt"
ambient_object = "ambient_object.txt"
seasons = "seasons.txt"
trade_winds = "trade_winds.txt"

tree = { 3 4 7 10 }

width 和 height 控制地图分辨率。游戏会读取这些值,然后要求图像文件与之匹配。

以下文件应与所定义的分辨率一致:

  • heightmap.bmp
  • provinces.bmp
  • rivers.bmp
  • terrain.bmp

以下文件应为所定义分辨率的一半:

  • world_normal.bmp
  • colormap_autumn.dds
  • colormap_spring.dds
  • colormap_summer.dds
  • colormap_winter.dds
  • colormap_water.dds

可以更改地图分辨率,但高度和宽度必须是 256 的倍数。

max_provinces 是地图上的省份数量(应与地图上绘制的颜色数量一致)加 1。超出该值没有问题(只是 error.log 会被大量刷屏),但如果该最大值低于你的实际最大值,则会在加载过程中崩溃退出到桌面。省份数量不能超过 32,768,否则 EU4 会崩溃。重要:如果使用自定义的地图尺寸,max_provinces 的数值可能需要设置得比通常高得多。如果你的自定义地图一直崩溃,不妨尝试使用主游戏中的 max_provinces 数值。

sea_starts = { } 控制哪些省份是海域。你必须在此处添加某个省份的 ID,该省份才会被视为海域。

only_used_for_random = { } 控制哪些省份用于随机新世界。要使随机新世界功能正常工作,你需要在此处包含大约 1000 个未使用的省份 ID。不过,如果你不打算使用随机新世界,也可以忽略这一项,因为它对普通游戏没有影响。

lakes = { } 控制哪些省份是湖泊。它们本质上是无法使用的海域,会阻断距离计算(例如核心化距离)。你必须在此处添加某个省份的 ID,该省份才会被视为湖泊。

force_coastal = { } 未被使用。推测它会强制将某些省份视为沿海省份,但这只是猜测。

tree = { } 用于在自动地形分配时,将 trees.bmp 中的某些索引颜色关联为树木。

其余定义只是指向每个地图“特性”所对应的文件,例如 definitions = "definition.csv"。

此定义控制运河河流图块在游戏地图上的位置。坐标为运河河流图块左上角像素的坐标,名称用于查找该运河河流图块。

canal_definition = {
	name = "panama_canal"
	x = 1490
	y = 948
}

例如:name = "panama_canal" 与 panama_canal_river.bmp 相关联,因为名称后面会附加 _river.bmp。这同时也将该图块与 ambient_object.txt 中的环境物体关联起来。

相邻关系

重要:你必须至少有一条相邻关系条目,以避免游戏崩溃。

相邻关系文件位于 /Europa Universalis IV/map/adjacencies.csv。它是以逗号分隔的文件,你可以用 Excel 或其他类似程序,或者文本编辑器打开。默认编码为 ANSI。

该文件控制哪些省份与其他省份非连续地相连。例如,岛屿通常不与任何其他陆地省份相连,因为中间隔着海洋省份。相邻关系文件会告诉游戏将这类省份连接起来,使陆军单位可以在它们之间行走。

格式如下:

From;To;Type;Through;start_x;start_y;stop_x;stop_y;Comment
<province id>;<province id>;<type>;<province id>;<map coordinate>;<map coordinate>;<map coordinate>;<map coordinate>;<comment>

相邻关系有五种类型:

  • sea
  • land
  • lake
  • canal
  • river

每种类型会改变用于显示该相邻关系的图像。你也可以将类型留空,这样就不显示任何图像。

地图坐标用于调整显示相邻关系的图像的起点和终点。作为参考,坐标 X0 Y0 位于地图的左下角。如果不需要调整,请使用 -1 代替实际坐标。

假设你想把斯科讷(省份 ID:6)和西兰岛(省份 ID:12)连接起来。然而,厄勒海峡(省份 ID:1258)位于两者之间。为此,你可以像下面这样定义一条相邻关系:

6;12;sea;1258;3008;1633;3000;1630;Skåne-Sjaelland

除了标准的 -1;-1;;-1;-1;-1;-1;-1; 之外,必须始终还有一条相邻关系,游戏才能正常运行。

地区

每个省份都必须属于某个地区。如果你在游戏中与某个不属于任何地区的省份交互,将会崩溃退出到桌面。

地区可以包含任意数量的省份,不过 Paradox 倾向于让每个陆地地区包含 3 到 5 个省份。这控制着每个地区内的发展程度。海洋地区则宽松得多,因为填充过多或过少对游戏玩法的影响较小。

地区的格式如下:

area_name = {
    <province ids>
}

地区的颜色(在“地区”地图模式中可见)是随机的。不过,你可以手动定义地区的颜色:

area_name = {
    color = { <r>, <g>, <b> }
    <province ids>
}

颜色定义使用默认的 RGB 值,范围为 0 到 255(即不是小数形式的 RGB)。

区域

所有地区都必须隶属于某个区域。每个区域可以包含任意数量的地区。

重要的是,海洋区域(即包含海洋地区的区域)通过舰队的探索任务定义了游戏中可探索的区域。

区域的格式如下:

region_name = {
    areas = {
        <areas>
    }
}

为使随机新世界正常运作,你需要在 region.txt 的顶部包含以下内容,因为游戏会用随机生成的地区来填充它。

random_new_world_region = { }

大区

大区用于定义“大陆”规模的区域。每个区域只能属于一个大区。

AI 会使用海洋大区来规划海军基地(如果可能,它希望在其拥有非本土存在的每个海洋大区中至少部署一支舰队)。

大区的格式如下:

superregion_name = {
    <regions>
}

为使随机新世界正常运作,你需要在 superregion.txt 中包含以下内容,因为游戏会用随机生成的区域来填充它。

new_world_superregion = { }

大陆

大陆位于 continent.txt 中,用于将大片省份归为一个传统意义上的大陆。大陆拥有大区所没有的独特游戏玩法效果,这就是两者的区别所在。

所有省份都必须属于某个大陆,否则可能会发生崩溃。

为使随机新世界正常运作,你需要在 continent.txt 中包含以下内容,因为游戏会用随机生成的省份来填充它。

new_world = { }

省份组

位于 provincegroup.txt 中的省份组与地区类似,但本身没有固有功能。它们的作用是对省份进行分组,之后省份组的名称就可以在效果和触发条件中用作作用域。

环境物体

ambient_object.txt 用于定义地图中的装饰性 3D 物体。这包括地图边框,所以如果你想移除其他物体,不要直接清空该文件。

环境物体的格式如下:

# Used once for each graphical asset
type = {
    type = <string>         # Refers to the graphical asset in ambient_object.gfx
    use_animation= <yes/no> # Used set set if an object is animated or not
    scale = <float>         # Sets the scale of the asset. 1.0 is default size.
    time_duration=300.000   # Always set to 300 for animated objects, may be redundant

    always_visible = <yes>              # Used to force visibility
    visible_in_all_map_modes = <yes>    # Used to show is non-terrain mapmodes

    # Each instances is a separate object
    object = {
        name = <string>                 # Name does not have to be unique
        hidden_on_start = <yes/no>      # Whether the object is hidden (can be revealed with show_ambient_object)
        position = {
            <x>     # Horizontal coordinate
            <z>     # Height coordinate - 0.0 is base
            <y>     # Vertical coordinate
        }
        rotation = {
            <x>     # Horizontal rotation
            <z>     # Height rotation - this is used for most rotations
            <y>     # Vertical rotation
        }
    }

}

你可以使用 Nudge 工具放置新的实例并移动物体,但如果你想添加新的类型,必须先将其添加到该文件中,然后再使用 Nudge 工具。

运河的环境物体也在这里。要将它们与 default.map 中的运河定义关联起来,你需要确保它们使用相同的名称(例如 panama_canal)。

位置

positions.txt 用于定义单位、城市等的待机位置。你需要为每个省份都定义这些位置,否则游戏将无法进行,因为士兵会凭空消失。

位置的格式如下:

<province id> =
	{
		position= - Dictates the position of the various graphical element a province can have.
		{
			2777.000 1287.000 - The x and y co-ordinates for the City model
			2783.000 1287.000 - The x and y co-ordinates for the standing Unit model
			2777.000 1287.000 - The x and y co-ordinates for the province name Text
			2764.000 1288.000 - The x and y co-ordinates for the province's Port (If the province is not bordering a sea province, the model will not appear)
			2777.000 1287.000 - The x and y co-ordinates for the province's Trade Node model (will not appear if the province is not the main location of a trade node, as defined in 00_tradenodes.txt)
			2783.000 1285.000 - The x and y co-ordinates for the fighting Unit models
			2777.000 1287.000 - The x and y co-ordinates for the Trade Wind icon (not used if the province is not defined in the tradewinds.txt)
		}
		rotation= - Dictates the rotation of each element. The value here is Radians (rad). 2π (6.283) is 360 degrees - 1/2π (1.571) - 90 degrees
		{
			0.000 - City Rotation
			0.000 - Standing Unit Rotation
			0.000 - Text Rotation - When set to 0 the Text will be automatically placed inside the province, according to the province's shape.
			0.785 - Port Rotation
			0.000 - Trade Node model Rotation
			0.000 - Fighting Unit Rotation
			0.000 - Trade Wind icon Rotation
		}
		height= - Dictates the elevation of each element. The value here is is roughly equal to 1 step in the greyscale used for the heightmap.bmp. So -1.00 results in a model one step below the base level (96), whilst 1.00 results in a model one step above.
		{
			0.000 - City Height. This only affects the central city building model, and none of the additional building models in high dev provinces.
			0.000 - Unit Height.
			1.000 - Text Height. Does change the font size of the text, instead of elevation, but will be ignored when the Text Rotation is set to 0.
			0.000 - Port Height.
			0.000 - Trade Node model Height.
			0.000 - Fighting Unit Height.
			0.000 - Trade Wind icon Height.
		}
	}

最好使用 Nudge 工具来完成这项工作。在《欧陆风云4》的启动选项中添加 -nudge 即可激活它。然后在游戏中点击初始菜单里的 Nudge 按钮。使用该工具,然后保存。

修改后的 positions.txt 位于 //Paradox Interactive\Europa Universalis IV\map\positions.txt。把它复制过去覆盖你模组中的原版文件。

然后你需要删除位于 //Paradox Interactive\Europa Universalis IV\map\ 的 positions.txt,否则它会覆盖原版/模组中的版本。

Nudge 工具键盘快捷键:

  • “next”绑定到“1”
  • “prev”绑定到“2”
  • 旋转 +0.5° 绑定到“q”
  • 旋转 -0.5° 绑定到“e”
  • 旋转 +45° 绑定到“r”
  • 旋转 -45° 绑定到“f”
  • 沿 z 轴移动 +0.5 单位绑定到“w”
  • 沿 z 轴移动 -0.5 单位绑定到“s”
  • 沿 x 轴移动 -0.5 单位绑定到“a”
  • 沿 x 轴移动 +0.5 单位绑定到“d”
  • “Mapmode”绑定到“t”
  • “Check”绑定到“space”
  • “Save”绑定到“s”
  • 将所选物体移动到光标位置绑定到“右键点击”

地形

terrain.txt 有多种功能。它定义了有哪些地形类别(例如草原、森林等),并将这些类别与 terrain.bmp 中的索引颜色相关联。它对 trees.bmp 也做同样的处理。

游戏中每种地形类型都有一个类别,另外还有各种特殊情况的类别,例如 pti 和 ocean。你可以随意添加和移除类别,但必须确保清理其他地方对已移除地形的所有引用,否则可能会发生崩溃。

类别的格式如下:

name = {
    color = { <rgb> }           # Defines the RGB color to use for showing the terrain in the simple terrain mapmode (optional)

    sound_type = <type>         # Defines the ambient sound definition to use for the terrain. Found in sound/all_sounds.asset

    is_water = <yes>            # Defines whether this category is treated as sea
    inland_sea = <yes>          # Defines whether this category is treated as an inland sea

    type = <type>               # Defines the gameplay type (i.e. plains, which is used for the Nomad shock bonus)
                                # Types: pti, plains, forest, hills, mountains, jungle, marsh, desert

    # Used to explicitly make provinces this terrain category. Overrides automatic algorithm.
    terrain_override = {
        <province ids>
    }

    # Terrain-only modifiers
    movement_cost = <float>                     # Multiplier to movement time into/out of province with terrain
    defence = <int>                             # Addition to defence roll in combat in this terrain
    combat_width <float>                        # Multiplier to increase or decrease combat width in this terrain
    nation_designer_cost_multiplier = <float>   # Extra cost multiplier when picked in the Nation Designer

    # Province modifiers can be used here as well.
    <province modifiers>
}

terrain.bmp 中的每个索引颜色都可以与一个地形类别相关联。这用于自动地形算法,让你不必使用 terrain_override。

格式如下:

terrain = {
    <name>  = {
        type = <terrain category>
        color = {
            <index>
        }
    }
}

对于树木,使用的不是地形类别,而是 terrain = { } 中定义的地形名称。格式如下:

tree = {
    <name>  = {
        terrain = <terrain>
        color = {
            <indexes>
        }
    }
}

地形图集

用于特定地形的地形贴图位于 atlas0.dds 和 atlas_normal0.dds 中。

贴图与地形之间的关联是根据 terrain.bmp 中索引颜色的顺序推断的。例如,草原与颜色索引 0 关联,这意味着它会使用纹理图集中的第一个图块。丘陵会使用第二个图块,依此类推。

atlas0.dds 和 atlas_normal0.dds 必须以 DXT5 格式保存,并启用 Mipmap。

可以增大纹理图集的尺寸。在 /Europa Universalis IV/gfx/FX/ 的 pdxmap.shader 中,编辑 NUM_TILES 变量,使其与你新的行数相匹配。

可以增大纹理图集中纹理图块的尺寸。在 /Europa Universalis IV/gfx/FX/ 的 pdxmap.shader 中,将 TEXELS_PER_TILE 变量编辑为你的新尺寸。

气候

climate.txt 用于定义哪些省份属于特殊的气候类型:

  • tropical
  • arid
  • arctic

这些气候会对省份应用 00_static_modifiers.txt 中的修正,并且 AI 对它们的处理方式也有所不同。

climate.txt 同样用于确定省份将遭受哪种形式的冬天。 冬天有三种类型:

  • mild_winter
  • normal_winter
  • severe_winter

如果某个省份没有在此处定义,它将不会经历冬天。

荒地:climate.txt 文件中 impassable = { } 部分所包含的省份在游戏中是荒地。

贸易风

trade_winds.txt 文件用于设定某些省份上空的盛行风。这会降低或提高船只的速度,从而影响探索的速度。

格式如下:

<province id> = <rotation>

旋转用一个整数表示,0 指向右侧,+10 为逆时针移动,-10 为顺时针移动。

贸易风可以在游戏中通过控制台命令重新加载:reloadtradewinds

季节

seasons.txt 文件用于定义游戏中四季更替期间的颜色调整。共有四个季节:冬季、春季、夏季和秋季。

每个季节的格式如下:

<season> = {
    start_date = <date>      # 00.<month>.<day>, in numeric form, i.e. 00.12.01
    end_date = <date>

    # Applies to the northern hemisphere
    hsv_north = { <hsv> }
    colorbalance_north = { <hsv> }

    # Applies to the equator
    hsv_center = { <hsv> }
    colorbalance_center = { <hsv> }

    # Applies to the southern hemisphere
    hsv_south = { <hsv> }
    colorbalance_south = { <hsv> }
}

所使用的颜色格式是小数形式的 HSV(色相、饱和度、明度)。

seasons.txt 文件还控制树木模型在一年中的视觉外观。

高地湖泊

由于高度图的特性,游戏中的水位在地图上各处都设置为相同。然而,湖泊确实存在于高海拔处。要创建高于水位的湖泊,你需要使用 lakes/00_lakes.txt 文件。

该文件允许你通过三角形条带(https://en.wikipedia.org/wiki/Triangle_strip)在设定的高度生成湖泊纹理。

最容易理解其工作原理的方式是:三角形条带标出高地湖泊的大致区域,然后高度标出该区域内新的水线。你并不是真的用三角形条带来绘制湖泊!高度图将定义湖泊在三角形条带内的边缘,实际的湖岸和边缘都埋在地形之下。

格式如下:

lake = {
	triangle_strip = {
        <x> <y>     # Vertices, repeat as needed. Decimal values are accepted.
	}
	height = <int>  # Height at which to show the texture (0 is water level)
}

前三个顶点需要按顺时针顺序定义以构成一个三角形,之后的任何顶点都会与前两个顶点相连,构成更多的三角形。
示例:

添加点 A-C 会绘制出三角形 1。添加点 D 会增加三角形 2,构成一个矩形。该矩形的三角形条带如下所示:
triangle_strip = {
  50 150
  50 50
  150 150
  150 50
}
文档 效果 • 触发条件 • 修正列表 • 作用域 • 变量 • 本地化 • 可自定义本地化 • 运行文件 • 事件图片列表
脚本 脚本函数 • 顾问 • 时代 • 开局设定 • 建筑 • 宣战理由 • 殖民区域 • 国家创建 • 文化 • 决议 • Defines • 外交行动 • 灾难 • 中华帝国 • 阶层 • 事件 • 派系 • 政府 • 政府互动 • 伟大工程 • 历史 • 神圣罗马帝国 • 理念组 • 思潮 • 佣兵 • 任务树 • 修正 • On Actions • 议会 • 和约 • 君主性格 • 政策 • 叛军类型 • 宗教 • 附属国类型 • 科技 • 贸易公司 • 商品 • 单位
地图 地图 • 地图修改速查 • 随机新世界 • 贸易节点
图形 模型 • 界面 • 贴图库 • 字体 • 单位模型
音频 音乐 • 音效
其他 控制台命令 • 校验和 • 模组结构 • 故障排查 • 运行文件
工具 克劳塞维茨开局编辑器 • EU4模组编辑工具 • JoroDox模组制作工具 • The Validator
指南 省份 • 地图修改速查 • 存档编辑 • 脚本教程