Random New World modding

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

The Random New World (RNW) files are found within /Europa Universalis IV/map/random/.

Map Generation[edit]

The RNW generator uses several image files that supersede the base map:

  • 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.


Tweak Description Notes
width Controls the maximum width that the Random New World will generate to. Making this equal to 5632 will allow the whole world to be regenerated.
height Controls the maximum height that the Random New World will generate to.
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. Making this equal to 5632 will allow the whole world to be regenerated.
cutoff Controls the cutoff at which coordinates are scaled from the old world. Making this 0 to allow the whole world to be regenerated.
seed Sets a fixed seed to allow for predictable generation.


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.


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 }.



Scenarios are placed in RNWScenarios.txt.

# Assigned per region
<name> = {
    # --- Spawn Parameters ---
    temperate = yes / no        # Can spawn in Temperate regions
    arid = yes / no             # Can spawn in Arid regions
    arctic = yes / no           # Can spawn in Arctic regions
    tropical = yes / no         # Can spawn in Tropical regions
    unique = yes / no           # Can be placed multiple times
    min_provinces = <int>       # Minimum contiguous provinces in region to spawn
    max_provinces = <int>       # Maximum contiguous provinces in region to spawn
    chance = <int>              # Spawn chance factor
    # --- Country and Province Parameters ---
    force_together = yes                # Forces spawned countries to spawn next to one another
    force_apart = yes                   # Forces spawned countries not to spawn next to one another
    force_all_provinces_owned = yes     # Forces the spawned countries to own all provinces
    minor_tags = yes                    
    fantasy = yes                       # Only used when the Fantasy Nations option is enabled
    force_coastal = yes                 # Forces the countries to spawn by sea provinces
    min_countries = <int>               # Minimum amount of countries to spawn
    max_countries = <int>               # Maximum amount of countries to spawn
    min_country_size = <int>            # Minimum amount of provinces a country spawns with
    max_country_size = <int>            # Maximum amount of provinces a country spawns with
    min_native_size = <int>             # Minimum native size to use
    max_native_size = <int>             # Maximum native size to use
    min_native_hostility = <int>        # Minimum native hostility to use
    max_native_hostility = <int>        # Maximum native hostility to use
    min_native_ferocity = <int>         # Minimum native ferocity to use
    max_native_ferocity = <int>         # Maximum native ferocity to use
    culture = <culture>                 # Culture to use for province and spawned countries
    culture_group = <culture group>     # Culture group to draw cultures from for use with provinces and spawned countries
    religion = <religion>               # Religion to use for province and spawned countries
    country_religion <religion>         # Overrides religion for spawned countries specifically
    government = <government>           # Government type spawned countries use.
    starting_reform = <reform>          # Starting reform countries use.
    technology_group = <group>          # Technology group spawned countries use.
    unit_type = <unit type>             # Unit type spawned countries use.
    graphical_culture = <gfx>           # Graphical culture spawned countries use.
    # Requires unique = yes
    region = <region>                   # Limits scenario to a specific region
    tile_index = <int>                  # Limits scenario to a specific tile
    # Used to specify random names for spawned countries to use
    names = {


Tile configuration files are made in /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
<modifier> = { <rgb> }

Random Land Names[edit]

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

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

Documentation EffectsTriggersModifiersScopesVariablesLocalisationCustomizable localization
Scripting AdvisorsAgesBookmarksBuildingsCasus belliColonial regionsCountriesCultureDecisionsDefinesDiplomatic actionsDisastersEstatesEventsFactionsGovernmentGreat projectsHistoryIdea groupsInstitutionsMissionsModifiersNation designerPoliciesReligionRebel typesSubject typesTechnologyTrade companiesTrade goodsUnits
Map MapRandom New WorldTrade nodes
Graphics 3D ModelsInterfaceGraphical AssetsFontsParticlesShadersUnit models
Audio MusicSound
Other Console commandsChecksumJoroDox mod making toolMod structureTroubleshootingThe Validator
Guides Adding a province