随机新世界修改

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

随机新世界(RNW)文件存在于路径 /Europa Universalis IV/map/random/.

地图生成

RNW生成器用于替换基础地图的数个图片文件:

  • colormap_autumn.bmp
  • colormap_spring.bmp
  • colormap_summer.bmp
  • colormap_winter.bmp
  • colormap_water_base.bmp
  • heightmap_base.bmp
  • colormap_noise.bmp is used to add noise to the generated color maps for the RNW portion of the world.

It also makes use of several files for naming:

  • RandomLandNames.txt controls the strings used to randomly name the RNW land provinces.
  • RandomLakeNames.txt controls the strings used to randomly name the RNW lake provinces.
  • RandomSeaNames.txt controls the strings used to randomly name the RNW sea provinces.

项目

The tweaks.lua controls various constants that affect the RNW generator.

设置

项目 描述 备注
宽度(width) 控制用于生成随机新事件的最大宽度 当这个项等于5632时将允许整个世界重新生成
高度(height) 控制用于生成随机新事件的最大高度
overlapping_sea_province_search_width Controls the width in which to eliminate provinces from the base map when placing the Random New World sea zones. 当这个项等于5632时将允许整个世界重新生成
cutoff Controls the cutoff at which coordinates are scaled from the old world. 当这个项等于0时将允许整个世界重新生成
种子(seed) Sets a fixed seed to allow for predictable generation.

Scenarios

The RNWScenarios.txt file contains all the possible scenarios that the RNW may use during generation.

Scenarios are applied per region, meaning once one scenario has been applied to a region, another one cannot.

Note: to allow colonial regions to be created, you need to make sure the colonial_placeholder_1, colonial_placeholder_2, etc objects are present in 00_colonial_regions.txt.

Tiles

The RNW generator creates the RNW world by using predefined tiles for all land. Every tile has a configuration file that defines the various aspects of itself. The name of the configuration file is the name used by the tile data files.

Tile configuration is found in /Europa Universalis IV/map/random/tiles, with the tile data in /Europa Universalis IV/map/random/tiles/data.

Each tile has the follow image files, which follow the same standards the game map images do.

  • <tile>_h.bmp - Height map
  • <tile>_p.bmp - Province map
  • <tile>_r.bmp - River map

It is important to note the function of the size attribute in a tile configuration file. The height and width of the RNW section of the world (by default 2304 by 2048) is divided into multiples of 128.

All tiles have a height and width that is a multiple of 128. So, for example if a tile was 256 pixels tall, and 128 pixels wide, it would have use size = { 2 1 }.

可用参照

剧本

剧本位于 RNWScenarios.txt.

# Assigned per region
<name> = {
    # --- Spawn Parameters ---
    temperate = yes / no        # 是否可以出现在温带
    arid = yes / no             # 是否可以出现在干旱区域
    arctic = yes / no           # 是否可以出现在寒带
    tropical = yes / no         # 是否可以出现在热带
    
    unique = yes / no           # 是否可以重复
    min_provinces = <int>       # 最少省份
    max_provinces = <int>       # 最多省份
    
    chance = <int>              # 出现的机会
    
    # --- Country and Province Parameters ---
    force_together = yes                # 不同国家能否同时出现(如瀛洲和郑和地不能同时出现,失落的塞尔维亚和失落的波斯尼亚必然同时出现)
    force_apart = yes                   # 国家是否彼此相邻
    force_all_provinces_owned = yes     # 产生的国家是否占据所有省份
    minor_tags = yes                    
    fantasy = yes                       # 是否是幻想剧本
    force_coastal = yes                 # 是否沿海
    
    min_countries = <int>               # 最少国家数量
    max_countries = <int>               # 最多国家数量
    min_country_size = <int>            # 国家省份数量下限
    max_country_size = <int>            # 同上
    
    min_native_size = <int>             # 土著最小规模
    max_native_size = <int>             # 同上
    min_native_hostility = <int>        # 土著最小攻击几率
    max_native_hostility = <int>        # 同上
    min_native_ferocity = <int>         # 土著最小凶猛程度
    max_native_ferocity = <int>         # 同上
    
    culture = <culture>                 # 国家主流文化
    culture_group = <culture group>     # 国家主流文化组
    religion = <religion>               # 空地宗教
    country_religion <religion>         # 国家宗教
    government = <government>           # 国家的政府类型
    starting_reform = <改革名称>         # 国家已经选择的政府改革
    technology_group = <group>          # 科技组.
    unit_type = <unit type>             # 兵种组
    graphical_culture = <gfx>           # 文化类型(生成建筑风格)
    # Requires unique = yes
    region = <region>                   # 是否与某个随机地图绑定(如随机印度和亚特兰蒂斯)
    tile_index = <int>                  # 对应的数字编号(需要相同)
    
    # Used to specify random names for spawned countries to use
    names = {
        <name>
    }
}

地块

地块的调整位于/Europa Universalis IV/map/random/tiles.

# Per tile

sea_province = { <rgb> }        # Required for all sea provinces within tile
wasteland_province = { <rgb> }  # Required for all wasteland provinces within tile
lake_province = { <rgb> }       # Required for all lake provinces within tile
empty = { <rgb> }               # Required for the empty space within a tile

num_sea_provinces = <int>       # Must match number of sea provinces in tile
num_land_provinces = <int>      # Must match number of land provinces in tile

regions = <int>                 # How many regions the tile has. 0 will add to existing region
region = { <rgb> }              # Province to center a region around, should match defined region count
continent = yes                 # Does this tile count as a continent
size = { <int> <int> }          # ( <width>, <height> )
weight = <int>                  # Chance to use this tile

unique = <index>                # Tile index referred to in scenarios. -1 for water

add_moisture = <int>            # Adds more moisture to generation of terrain map here.

do_not_rotate_or_mirror = yes   # Prevents the tile being mirrored or rotated
do_not_rotate = yes             # Prevents the tile being rotated
restrict_to_north_edge = yes    # Restricts tile placement to north border of map
restrict_to_south_edge = yes    # Restricts tile placement to south border of map
restrict_to_equator = yes       # Restricts tile placement to middle of map
fantasy = yes                   # Prevents use if Fantasy option is not enabled

# Used to add strait connections within a tile
strait = {
    from = { <rgb> }
    to = { <rgb> }
    through = { <rgb> }
}

# Used to add specific province names. Can localise names here.
province_names = {
    "<name>" = { <rgb> }
}


# Used to add province modifiers to provinces within a tile
# Common ones:
#   river_estuary_modifier
#   important_natural_harbor
#   inland_center_of_trade_modifier #在1.26前内陆、沿海贸易中心与良港修正是分离的,1.26起贸易中心名称统一为level_<等级>_center_of_trade并且取消了良港设定。
<modifier> = { <rgb> }

随机省份名称

These are appended to a name to restrict usage to the specific circumstances.

String Description
coast 仅限于 coastal provinces.
island 仅限于 island provinces.
island2 仅限于 island provinces without straits.
river 仅限于地形为 rivers passing through.
wasteland 仅限于 wasteland provinces.
plains 仅限于地形为 Plains terrain.
plains 仅限于地形为 Plains terrain.
forest 仅限于地形为 Forest terrain.
jungle 仅限于地形为 Jungle terrain.
hills 仅限于地形为 Hills terrain.
mountains 仅限于地形为 Mountain terrain.
desert 仅限于地形为 Desert terrain.
glacial 仅限于地形为 Glacier terrain.
marsh 仅限于地形为 Marsh terrain.
arctic 仅限于 Arctic provinces.
arid 仅限于 Arid provinces.
temperate 仅限于 Temperate provinces.
tropical 仅限于 Tropical provinces.