Overview
Создание новой карты — труд, требующий базовых знаний работы с графическими редакторами (Photoshop, GIMP, PaintNet и т. п.) и понимания аспектов моддинга. Неопытный малец, скорее всего, погрязнет в этом болоте и бросит это дело… Этот урок — попытка расширить порог вхождения.Саму карту мы будем создавать через программу MapGen 2.2
Начало
Для начала нам нужен графический редактор. Вполне может подойти обычный Photoshop с расширением dds. Или же Paint.net.
Следовательно, нужна идея: какую карту готовитесь рисовать? Придумали, молодцы.
Для примера я взял эту карту. Кто узнал, тот молодец.
Land Input
Перейдём в MapGen:
После чего заходим в любой графический редактор и начинаем всё делать ручками, в моём случае я буду использовать GIMP.
Начинаем мы с общей формы карты — Land Input. Открываем в GIMP файл LandMap из MapGen v2.2Examples:
Что нужно знать про Land Input?
Эта карта из трех цветов указывает Мапгену, где море, озеро и земля. Размер этого изображения также определяет размер вашей карты, но не надейтесь, что Вы сможете создать карту любого размера, игра ограничена в этом вопросе (стандартный размер 5632 x 2048), поэтому используйте LandMap из MapGen v2.2Examples в качестве шаблона.
Вы можете нарисовать ее вручную, что мы и будем делать, и перетащить в программу или сгенерировать из карты высот (height map). В любом случае, придется создавать карту.
Нам нужны три цвета. Ниже указаны их коды.
-Суша: #9644C0
-Море: #051412
-Озеро: #00FF00
Рисуете карандашом без сглаживания, пиксели при приближении должны выглядеть подобным образом:
Обязательно используйте подобные параметры! Если Force и Hardness будут не 100%, то цвет не будет соответствовать коду:
Правда, если вы слегка изменили цвет, программа может исправить это, но не злоупотребляйте этим. Однако, важно сохранить изображение в виде 24-битного растрового изображения (24-bit bitmap), прежде чем загружать его в пажилую Мапгену.
После того как нарисовали карту закидываем файл в Мапгену в разделе Land Input.
У HOI4 минимальный размер провинции 8 пикселей. Прога превращает все маленькие острова в провинцию, что может стать проблемой, если остров меньше 8 пикселей. Включение «check for small islands» будет проверять наличие этих островков. Если они найдены, карта будет отображаться с указанными островками, обведенными красным, чтобы вы могли ее исправить.
Ну вот, одна карта уже готова!
Terrain input
Создаем карту ландшафта — terrain input.
Карта местности указывает, где находятся различные зоны ландшафта на вашей карте (НЕ ПУТАТЬ с картой местности terrain map, которая определяет текстуры карты).
Генератор может автоматически создать такую карту, щелкнув «generate plains world». Вы можете нарисовать свою карту:
-Поля: #FF8142
-Леса: #59C755
-Холмы: #F8FF99
-Джунгли: #7FBF00
-Болото: #4C6023
-Горы: #7C877D
-Пустыня: #FF3F00
-Океан: #0000FF
-Озера: #00FFFF
-Городская местность: #9B00FF
Файл создается по аналогичному принципу, как и Land Input, а также должен быть с 24-битным растровым изображением того же размера, что и прошлая карта.
Опыт показывает, что во избежании квадратных артефактов на прибрежных зонах, делаем их равнинами (это повлияет на генерацию карты высот):
Закидываем в Мапгену!
Province Size Input
Следующий этап проще. Прога сама сгенерирует Province Size Input.
Карта Province Size Input определяет размер провинций суши (внезапно). Указывая цвет провинций от белого до черного цвета. Оттенки серого варьируется. Для провинций, сгенерированных на белых областях, будет задан максимальный размер, для областей на черных областях будет установлен минимальный размер, а между провинциями будет масштабироваться в зависимости от значения оттенков серого.
Морские и озерные провинции масштабируются по их прибрежному расстоянию, однако вы можете контролировать их размер в правом нижнем углу Мапгены.
Настройки размера провинций — это искусство. Правильный их выбор решает много. В будущем Вы столкнетесь с такими ошибками:
- Слишком большие провинции вызовут ошибку — Province X has TOO LARGE BOX. Соотношение ширина/высота провинции составляет более 1/8 от общей ширины/высоты карты. Также это может быть признаком того, что две провинции имеют общий цвет.
- Слишком маленькие провинции — Province X has only N pixels. Минимальный размер провинции — 8 пикселей.
- Иногда общий угол провинций может вызвать ошибку — Map invalid X crossing. Please fix pixels at coords. Иногда игра может соединить нижнюю левую и верхнюю правую провинции, что вызывает подобные ошибки. Их появление неизбежно и правится ручным способом или генерируя другую карту провинций, о которой мы поговорим далее.
Оптимальная настройка интуитивна, и подбирается в зависимости от формы карты. Главное — не переборщить:
Имеется два способа сгенерировать Province Size Input.
Mercator Distribution: имитирует форму глобуса, так что экваториальные провинции меньше, чем полярные. Отлично подходит по дефолту.
Uniform Distribution: провинции однородного размеры, подходящие для модов с маленькими картами (редкость). Малую карту технически сложно реализовать, не сломав саму игру.
Мы жмем Mercator Distribution.
Boundary Input
Дальше определяем примерные регионы суши в Boundary Input
Границы указывают как провинциям и стейтам выровняться относительно этих границ.
-Суша: #dcdcdc
-Море: #ffffff
-Границы: #000000
Границы должны быть толщиной в один пиксель, непрерывными.
Эта карта не является обязательной (можете вообще пропустить этот момент, если Вам не нужны какие-то строгие границы), но если вы хотите добавить ее, убедитесь, что это 24-битное изображение и того же размера как и остальные карты.
River map
Логично было перейти к ближней вкладке province map, но опыт показывает, что лучше сначала замутить карту рек.
Делаем карту рек — river map. Можно рисовать самому или автоматически сгенерировать.
Правда, очень важно соблюдать цвета рек. Реки всегда должны быть толщиной в 1 пиксель.
Палитра цветов:
Зеленый пиксель — начало реки, красный — объединяет реки в одну, желтый — разделяет на две, голубые пиксели — определяют толщину реки на карте (но на этой карте все толщиной в пиксель).
Если вы сделали карту вручную, сначала загрузите ее в Мапген, а затем сохраните ее в проге. Это гарантирует, что ваше изображение будет в нужном формате для игры.
Случайные изгибы рек «River Random Wander». Если «Add to Existing Rivers» включено, предыдущая карта рек не будет перезаписана, и дополнительные реки будут добавлены к существующим.
Province map
И вот сейчас генерируем карту провинций — province map.
Карта провинции province map очень важна, она определяет все провинции в игре. Мапген также создает файл definitions.csv к этим провинциям.
В этом файле информация по:
province id (номер провинции); r value; g value; b value (RGB код); province type (land/sea/lake) (тип провинции – суша, море, река); coastal (true/false) (берег – да или нет); terrain (plains/hills/urban/etc) (тип местности – поля, холмы, городская местность и т. д. ); continent (int) (номер континента)
В будущем пригодится.
К счастью, вам не нужно ее делать вручную. Нажмите «Generate» в левом нижнем углу, и карта провинции будет создана, используя ваши настройки и карты, определенные на предыдущих вкладках. Опция «Provinces Don’t Cross Rivers» станет доступной, если вы загрузите карту рек. Это заставит провинции выравниваться с реками, поэтому мы рисовали реки заранее.
Если у вас уже есть карта провинций, перетащите ее и файл definitions.csv в программу вместе. Из этих файлов будут также сгенерированы land map и terrain input map.
State Output
генерируем «Generate» дефолтные стейты (states) для нашей карты в State Output. Не забудьте сохранить файлы стейтов, нажав на «Save» (создаете новую папку и жмете «Select» и «Yes»), это пригодится в будущем.
Отображаемое изображение просто позволяет вам визуализировать сгенерированные стейты и нигде не используется в HOI4. Вывод этой вкладки представляет собой список текстовых файлов, каждый из которых определяет states.
Вы можете выбрать размер и форму стейтов (ползунками) и сгенерировать их случайным образом.
Height map
Дальше делаем карту высот — height map. Важный файл, который требует подбора адекватных параметров, которые являются уникальными в зависимости от карты.
Высота начинается от значения 94 (уровень моря), а 255 – самая высокая гора. Не рекомендуем использовать предельные значения.
В левом нижнем углу есть несколько ползунков для настройки алгоритма генерации:
Desert Smoothing: определяет, насколько плоскими являются пустыни.
Plains Roughness: крупномасштабные особенности равнин, насколько велики долины и холмы.
Plains Noise: мелкие черты равнин, насколько ухабистые равнины.
Hills Height: увеличение высоты холмов.
Mountain Height: увеличение высоты горы.
Mountain Noise: мелкие черты гор, насколько ухабистые горы.
После того, как вы выбрали свои настройки, нажмите «Generate», чтобы создать карту высот. «Sea Level Indicator» нарисует океан, так вы можете оценить свою береговую линию, но море не будет присутствовать при сохранении этой карты.
Рекомендуется оставить параметр включенным «Force Coast Align with Land Map», чтобы он вынуждал его создавать ту же береговую линию, настроить уровень моря и максимальную высоту вашей карты. Нажав «Update», вы внесете изменения в карту высот.
World Normal
Потом создаете карту нормаль — World Normal.
На этом изображении закодирована поверхность карты, и оно используется в HOI4 для указания теней и бликов. Нормали основаны на карте высот, но есть несколько настроек, которые вы можете настроить.
Normal Smoothing: насколько резкими/размытыми являются тени/блики.
Gradient Limit: какая максимальная яркость/тень.
Colour map
У карты Colour map есть нюансы.
В ванильной игре называется colormap_rgb_cityemissivemask_a.dds.
Его можно нарисовать самому (задача не из легких), поэтому просто генерируем.
Desert Moisture: изменяет вид желтых и сухих пустынь.
Forest Moisture: изменяет вид зеленых и пышных лесов/джунглей.
Правда, есть один нюанс. Мапген создаст вам файл Colour map в формате .bmp, но нам нужен .dds! Поэтому мы генерируем карту в Мапгене, и сохраняем ее себе (save to File).
Потом открываем его в GIMP (или в другом графическом редакторе который имеет экспорт в виде dds).
И экспортируем, как .dds 8.8.8.8 ARGB 32 bpp.
Ну или конвертируете, как Вам удобно. Главное, чтобы был в .dds 8.8.8.8 ARGB 32 bpp.
Terrain map
И осталась последняя карта местности — Terrain map. К счастью, генерируется автоматически!
Эта карта указывает HOI4, какую текстуру использовать на карте.
Как и с реками, если вдруг вы сделали карту вручную, сначала загрузите ее в Мапген, а затем сохраните ее в проге. Это гарантирует, что ваше изображение будет в нужном формате для игры.
Кстати, Мапген может крашанутся при генерации этой карты, такое бывает. Просто попробуйте заново.
Экспорт карты из MapGen
Осталось всё экспортировать!
Нужно вставить тот Colour Map в dds. формате, которые мы конвертировали. Назвать мод (не используйте кириллицу).
Мапген сохранит этот мод в “…DocumentsParadox InteractiveHearts of Iron IVmod”. Если всё сделано, как указано, папка мода с его дескриптором в формате .mod будет по указанному адресу.
В общем, сейчас мы можем запустить эту карту на версии игры 1.5.4 без вылетов.
Обладателю стимовской версии это не является проблемой. Переходим на 1.5.4:
Если всё прошло гладко, увидим такое:
По сути, это завершение ПЕРВОЙ ФАЗЫ новой карты.
Ссылки на программы
MapGen2.2: [link]
GIMP: [link]
Итоги
Если помог разобраться с созданием карт и программой MapGen, то буду рад вашей поддержки этого руководства и так же не откажусь от материальной поддержки)
[link]
Вторая фаза карты:
[link]
This is a community maintained wiki. If you spot a mistake then you are welcome to fix it.
The map of the game is primarily changed within the /Hearts of Iron IV/map/ folder. This includes provinces and details about them as well as the cosmetic appearance of the map: trees, terrain, cities.
/Hearts of Iron IV/map/*.bmp files are referred to as bitmaps. Commonly these are used for the cosmetic appearance of the map, aside from the provinces bitmap.
/Hearts of Iron IV/map/*.csv files are CSV tables. These may be edited within a text editor or a table editor such as Excel or OpenOffice. It can be preferable to open these with text editors for greater performance.
Notes[edit | edit source]
- Due to how the game reads BMP files, many image editors such as Paint.net or Microsoft Paint can’t be used for most bitmap files, provinces and world_normal being exceptions. Photoshop and GIMP are alternatives that will always work, but the mode should never be changed from indexed when using them. If a map was saved incorrectly, the later section on details of the BMP format provides an easy way to correct the map.
- When exporting the map in GIMP, «do not write color space information» must be checked on.
- Debug mode turned on via launch settings is essentially necessary for map modding. Without debug mode, any error marked with MAP_ERROR will cause the game to fail to load and it wouldn’t be possible to open nudge within the main menu: some map errors may lead to the game being impossible to open in singleplayer.
- Some of the errors marked with MAP_ERROR may not appear in the error log when it opens during the main menu loading. The error log after selecting a country in singleplayer will contain all of the map errors for sure.
- Using the nudge can make the map editing much easier, but the tool is still unstable. At times it can be better to do manual editing, but the nudge is still important to know of and use.
- The nudge will drop files in the User directory directly, such as the Documents/Paradox Interactive/Hearts of Iron IV/ folder (Default location within Windows), with the folders of /history/, /map/, and /localisation/ potentially being created inside of that folder. These will be loaded by default in base game as well if left there. Additionally, these have lower priority than the mod files: if a mod is set to unload previously-loaded files within a generated folder via replace_path or contains a copy of the same edited file within of itself, editing via nudge may appear to not show changes until the files are ported over to the mod files and they get loaded (Such as via the ‘update’/’load’ button in the nudge, depending on the menu, or by restarting the game).
- /Hearts of Iron IV/map/default.map can be used in order to change the file used for a certain purpose, such as the name of the provinces bitmap. Within this article, it’ll be assumed that /Hearts of Iron IV/map/default.map is unchanged, with the filenames being the same as in base game.
BMP format[edit | edit source]
- This section is primarily the technical details on why the first two notes are necessary to be followed, how to fix the map broken by the first note not being followed, as well as explaining some terminology used later in the article such as ‘colormaps’ and ‘8-bit’/’8 bitdepth’/’8 bpp’.
There are 3 primary types of BMP files used in Hearts of Iron IV: 8-bit greyscale, 8-bit indexed, and 24-bit RGB. A BMP file may have compression, but Hearts of Iron IV requires that absolutely none is present and the rest here will assume it being off. No compression means that each pixel is assigned the same amount of bits.
A primary concept is bitdepth. Simply said, this is how many bits are assigned for each pixel, whether it’s for a specific colour channel or all of them combined. In total, it can be 8, it can be 24, it can be 32, it may be something else. As the amount of bits per pixel contributes to the filesize, a bitdepth being wrong would result in a large difference between the filesize of the base game file and the mod’s file, which would be easy to identify to tell which file is wrong. Total bitdepth of an image per pixel is commonly shortened as the «-bit» suffix — such as «24-bit» meaning 24 bitdepth — or as «bpp», short for «bits per pixel».
This decides the size of the palette in the file: 8-bit allows colours total, 24-bit allows
, and 32-bit allows
. In editors where the bitdepth isn’t explicitly shown when saving, it can be deduced from how many colours there are. For example, a typical RGB-mode BMP file has a bitdepth of 24 with every colour allowed, but if an alpha channel (allowing transparency) is added, then the bitdepth gets to 32 as each level of transparency counts as a separate colour. If the colourmap exists and has a total of 256 colours, then the bitdepth is set to 8.
Greyscale is the simplest one. This is used only for the heightmap. Every single pixel is assigned a hexadecimal value from 00 to FF (0 to 255 in decimal). 00 is pure black, FF is pure white. Paint.net and Microsoft Paint do not have intristic support for saving in greyscale and generate 8-bit palettes when saving, so if a file is set to have 8 bitdepth in one of these, the value assigned to each pixel may be different even if pointing to the same colour. This will result in an ‘offset’, making each pixel have a higher or a lower height than defined, turning the map into pure black in a worst case scenario. If a file is saved wrong, GIMP and Photoshop include simple conversions to greyscale within the image -> mode
menu in the topbar.
24-bitdepth RGB is also fairly simple. provinces and world_normal bitmaps use this mode. Every pixel is assigned a value from 000000 to FFFFFF. This is split into 3 channels: first pair of numbers is the green value, second pair of numbers is the blue value, third pair of numbers is the red value. This process is universal for every image editor and so any can be used, as long as it’s set to 24 bitdepth.
8-bit Indexed is somewhat more complex. This is used in every other bitmap in the game: cities, rivers, terrain, and trees. After the DIB header telling the specifics of the file, there is a palette of 255 colours. These colours are assigned IDs from 00 to FF by their order within the palette. This palette is also called the colormap. Each pixel in the bitmap itself (i.e. after the colormap) is assigned a value from 00 to FF that corresponds to an ID within the colormap. Within indexed images, the game never checks the colours that the colormap assigns to each ID, only what ID is assigned to each pixel.
Some image editors, such as Paint.net[1] or Microsoft paint, disregard the colormap when opening the BMP file, allowing the user to use any colour when editing. Instead, when saving the image set to 8 bitdepth they dynamically generate the colormap from scratch, assigning an ID for each colour in an essentially unpredictable way. This is a problem because the game does not check the colour of each pixel, only its ID, the order of which gets essentially randomised. Due to that, only an image editor such as GIMP or Photoshop that preserves the colormap throughout editing can be used, and in that case the image mode should never be changed from indexed, as that will recreate the issue introduced by the prior editors.
As an alternative, two copies of the file can be kept: the one used in the mod and an alternate one. The second one can be kept in 24-bit or 32-bit RGB and can be used with more layers to trace the terrain to match up with needed templates. When needed to port over to the mod, both should be opened throughout the image editor and the contents of the alternate one should be copied to the mod within the image editor as to preserve the colormap’s order.
Additionally, the header must be assgined correctly. The game is primarily set-up to expect BITMAPINFOHEADER as the header for all BMP files. This depends on the image editor and most should save within this one by default.
However, several adaptations exist, necessary to crreate colour maps, colour space information, or gamma correction, which aren’t supported by the game. The most common one to accidentally save in is BITMAPV5HEADER, written by the GIMP foundation. This is used in order to add the ICC information, characterizing in which colour space the image has to be read in. Hearts of Iron IV’s engine is not set to recognise this header, and it is only used by GIMP. For this reason, when saving in GIMP, «do not write color space information» must be checked on in order to save with BITMAPINFOHEADER rather than BITMAPV5HEADER.
Correcting a broken map[edit | edit source]
As it’s possible to edit an 8-bit file without palette restrictions by keeping a separate 24-bit copy of the file, the same can also be used to correct a file which had its colormap reset or which was erroneously saved in a higher bitdepth. To do so, this checklist can be followed:
- Change the filename of the mod’s broken bitmap. For this example, map/terrain_broken.bmp will be used (with map/terrain.bmp as the original file), but the same can be applied to every other bitmap.
- Copy the base game’s according map/terrain.bmp file into the mod. If the mod’s map had its dimensions changed, this image should be resized to the proper ones, otherwise it shouldn’t be touched.
- Open both map/terrain_broken.bmp and map/terrain.bmp within GIMP or Photoshop.
- Within the image editor, select everything in map/terrain_broken.bmp (using ctrl+A or Select -> All) and copy it to the clipboard.
- Paste the contents of the file into map/terrain.bmp.
- Export the opened map/terrain.bmp file with correct settings, disabling writing colour space information if using GIMP.
- Optionally delete the map/terrain_broken.bmp file.
Coordinate system[edit | edit source]
Since the map is a 3D object, there are X, Y, and Z positions using a typical Cartesian coordinate system, which are commonly referred to in a multitude of map files. For disambiguation, these are the coordinates that the game uses:
- A single X coordinate is equivalent to a single pixel within the provinces bitmap horizontally. The horizontal edges of the map are at 0, and it goes left-to-right (or west-to-east). Note that the map loops horizontally.
- A single Y coordinate is equivalent to a value of 10 (in decimal) within the heightmap. A Y position of 0 is equivalent to pure black on the heightmap, while a Y position of 25.5 is equivalent to pure white on the heightmap. The water level, for example, is located at 9.5 by the Y position[2].
- A single Z coordinate is equivalent to a single pixel within the provinces bitmap vertically. The lower (or southern) edge of the map is at 0, and it goes down-to-up (or south-to-north). Note that most image editors have it the other way around: the position at 0 by the axis would be at the top and it going up-to-down. When wanting to know the Z coordinate, it can be useful to change the coordinate system that the editor uses (if possible) or temporarily flip the image upside down.
Quick overview[edit | edit source]
These files in the map folder are common to edit:
- /Hearts of Iron IV/map/provinces.bmp is used as a map assigning the province borders.
- /Hearts of Iron IV/map/definition.csv is used in order to assign in-game province information, including terrain, continent, and the coastal status. This does not change the graphical appearance.
- /Hearts of Iron IV/map/terrain.bmp is used as the terrain map, assigning textures to the specified positions. This does not change the actual province terrain, just the appearance.
- /Hearts of Iron IV/map/heightmap.bmp is used as the heightmap, assigning a height for each pixel on the map. This is also used to put areas underwater.
- /Hearts of Iron IV/map/world_normal.bmp is used as the normal mapping, assigning a slope to each pixel that gets used in lightning calculates. This is used to create more accurate shadows.
- /Hearts of Iron IV/map/terrain/colormap_rgb_cityemissivemask_a.dds is used to create an overall colouring of the world and to change the opacity of city lights.
- /Hearts of Iron IV/map/terrain/colormap_water_0.dds is used to create a colouring of the world oceans.
- /Hearts of Iron IV/map/buildings.txt is used to assign the positions of building models and to assign the neighbouring sea province to the buildings that require it, i.e. naval bases and floating harbours. This can cause a game crash if left unedited while adding new states or provinces.
- /Hearts of Iron IV/map/unitstacks.txt is used to assign the information regarding the position and rotation of unit models and positions of unit models.
- /Hearts of Iron IV/map/rivers.bmp is used to assign rivers that appear in the world.
- /Hearts of Iron IV/map/trees.bmp is used to assign tree models that appear in the world.
- /Hearts of Iron IV/map/airports.txt and /Hearts of Iron IV/map/rocketsites.txt are used to assign the province sites for each state where airports and rocket sites would be built. This will cause a game crash if left unedited while adding new states.
- /Hearts of Iron IV/map/supply_nodes.txt and /Hearts of Iron IV/map/railways.txt are used to assign the supply nodes and railways at the game’s start. This will cause a game crash if unedited on a new map.
- /Hearts of Iron IV/map/adjacencies.csv is used to create special relationships between pairs of provinces, whether it’s making the border impassable or creating a passage without a border.
- /Hearts of Iron IV/map/adjacency_rules.txt is used to establish more complex rules for province relationships, primarily in regards to making straits that can be passable or not depending on circumstances.
- /Hearts of Iron IV/map/ambient_object.txt is used to create models that are constantly present on the world map. This includes the base game’s world borders in the north and the south.
- /Hearts of Iron IV/map/cities.txt is used to assign different city models to different parts of the world, by default using /Hearts of Iron IV/map/cities.bmp as the map.
State modding[edit | edit source]
- Main article: State modding
States are defined within /Hearts of Iron IV/history/states/*.txt files, with information about the states: provinces containing them, the state category, the starting buildings and owner.
The nudge works for editing states, however, there are several issues:
- If a state’s name contains any special character requiring more than one byte to represent in UTF-8 (e.g. any letters outside of the English alphabet), the nudge will crash when trying to create one.
- Every quote within the state’s history file will get removed if a nudge edits it. This can break DLC checks (e.g.
has_dlc = "Waking the Tiger"
), present in base game Turkish or Chinese states.
Additionally, note that the nudge dynamically updates strategic regions with states: a newly-created state will not have its provinces assigned to strategic regions and that will have to be done via the nudge. Since strategic regions are assigned for each province individually, deleting the strategic region outputs within the user directory’s /Hearts of Iron IV/map/strategicregions/ folder may work, as long as the strategic region borders don’t need to be adjusted, as all provinces of one state must be within the same strategic region.
Strategic regions[edit | edit source]
- Main article: Strategic region modding
Strategic regions are defined within /Hearts of Iron IV/map/strategicregions/*.txt files, where provinces are added to them individually. A province must have a strategic region. Otherwise, many interactions with that province can cause a game crash, sometimes appearing before the game can launch. The strategic regions are used for ships and airforce as regions where they can be assigned, but they also serve for assigning weather. A naval strategic region may also have naval terrain assigned with naval_terrain = terrain_name
.
Weather[edit | edit source]
Each strategic region has weather defined in periods, as
weather={ period={ between={ 0.0 30.11 } temperature={ -6.0 12.0 } no_phenomenon=0.500 rain_light=1.000 rain_heavy=0.150 snow=0.200 blizzard=0.000 arctic_water=0.000 mud=0.300 sandstorm=0.000 min_snow_level=0.000 } } }
between = { ... }
decides in which period the weather applies: both dates within the definition of the period are included within the period; the first number is the day, the second is the month; the count for days and months starts from 0 rather than 1.temperature = { ... }
assign the maximum and minimum temperatures for the period.
Most of the lines decide the chance for each province in the strategic region to have that weather type, assuming that the chance no_phenomenon
evaluates as false. Multiple weather types can happen at the same time, and weather is calculated daily.
min_snow_level
decides the visual appearance of snow in the region. Usually set to 0.1 in the particularly snowy periods such as winter in Northern Scandinavia.
Additionally, the /Hearts of Iron IV/map/weatherpositions.txt file decides the position of weather objects such as the clouds. A single entry in the file has the following layout:
strategic region ID;X position;Y position;Z position;size
For example, 1;2781.24;9.90;1571.49;small
means that the strategic region with the ID of 1 has a small weather object in the specified position.
The size only has 2 values: small and large. Multiple definitions or none at all may be present for the same strategic region, however, there should be at least one definition in the file for both large and small objects to avoid a game crash.
Weather is best generated with nudge in the strategic region menu.
Provinces[edit | edit source]
There are two files related to the province definitions:
- /Hearts of Iron IV/map/provinces.bmp, which decides how the provinces are placed on the map.
- /Hearts of Iron IV/map/definition.csv, which decides the exact details about the province: ID, RGB value to link to the map, coastal status, terrain.
The provinces bitmap is saved as a 24-bit RGB file. Saving in 32-bit will result in a ‘We do not support bitdepth at 32’ error, resulting in a crash on startup. The province bitmap being saved wrong (Such as the prior 32 bitdepth or being the wrong format renamed to BMP) will result in ‘X4008: floating point division by zero’ errors. Due to proportions of other map files, both length and width have to be a multiple of 256. Due to the engine limitations, the total area of the file in pixels cannot exceed 13 107 200.
An unused colour for the bitmap can be picked by using the database menu within the nudge. However, considering the sheer amount of possible colours, randomising a colour using a site such as random.org can also be used, with a chance of overlap being extremely low.
If the province definitions are incomplete or incorrect, the game creates a ‘corrected’ copy of this file in the user directory to replace the CSV table for province definitions, with any incomplete or missing province definitions filled in, as /Hearts of Iron IV/map/definition.csv.fixed and other copies of the file in that folder. It might be necessary to delete this copy after making changes to the original file.[3]
Both of these can be used to speed up province creation by painting random colours on the map, then letting the game generate the CSV table which’ll be adjusted manually once ported over to the mod.
The previously-mentioned corrected copy of the province definition within the user directory would contain every province definition from the mod’s definition.csv alongside every colour that’s present on the bitmap but doesn’t have a definition, which’ll have a default entry as a land province with no continent and unknown terrain. This can be used with an image editor to locate any unintended colours in the provinces.bmp file. These can be the result of picking a wrong colour or of anti-aliasing being turned on when editing the map. To locate them, one can choose the colour that the newly-generated province has and paint it over a spot that’s safe to paint (Such as a large sea province or a corner of the map), and then use the colour select tool with 0% tolerance/0 threshold (name for the option depends on the image editor) in order to select it. In image editors, this is commonly either a separate option (Such as in GIMP) or an option within the magic wand tool for it to have a global flood mode (Such as in Paint.net).
After having located the province in question, the question of what to do with it is left up to the modder: it can be made into a separate province entirely (and so should be assigned to a state and strategic region), possibly altering its borders to fit better, or it could be removed entirely from the provinces.bmp file. In either of these cases, the spot that has been made in order to find the province should be reverted to its initial state.
An entry within the /Hearts of Iron IV/map/definition.csv follows the specified format:
Province ID; R value; G value; B value; Province type (land|sea|lake); Coastal status (true/false); Terrain; Continent (integer)
Example definition of these include the following:
7;212;179;179;sea;true;ocean;0 114;40;15;15;land;false;plains;1 260;170;235;235;land;true;urban;1
The RGB values for each province should be unique in order for them to be identifiable on the bitmap and are integers on the scale from 0 to 255. The continent must be an integer that represents a continent. For sea provinces, it must be kept at 0, while for lakes it may be kept at 0.
Terrain is defined for each province individually here. This does not change the appearance of the province, just the terrain it’s assigned, which changes naval or land combat. For lake provinces, terrain must be ‘lakes’ while for sea provinces it must be ‘ocean’.
In here, the coastal status is used for both seas and land provinces. For land provinces, it means that a border with a sea province (not a lake), and for sea provinces it means that a border with a land province. This is used for determining, for example, where naval bases can be built and where they can’t. If bitmap and province definition disagree on whether or not a province is coastal, such as if a land province is specified as non-coastal but still borders sea provinces or vise-versa, bitmap’s results will be preferred. This does mean that there is no reason to specify the coastal status within the province definition, and it remains a leftover from before 1.11.
Province IDs should go in order. While a gap in province IDs will not necessarily crash the game, it will instead create a different problem: each province after the gap will take on the properties of the next province by ID other than the colour on the bitmap. For example, if province 23 doesn’t exist, province 24 will take on the terrain, type (land|sea|lake), coastal status, and continent of province 25, which will copy from province 26 in turn and so on. This can cause highly unintended behaviour if not crashes, so it’s best to not have any province gaps: if a province is to be deleted, another one must fill the gap, such as the last province by ID.
Hearts of Iron IV has a limit on province displaying. No more than 65536 different province borders can be displayed at the same time before an integer overflow causes the in-game engine to stop displaying any additional ones. In-game, this is usually hit at about 21000 provinces. In other words, province amount should be kept low, with the base game’s roughly 13000-14000 provinces being an amount to aim for. More can cause the game to run more slowly and unstably. If a province borders another province several times in a disjointed manner, such as in the attached image, each one counts as a separate border.
These disjointed island provinces may also cause a game crash if they’re too disjoined with large distances between them. This is not anything to worry about with regular provinces, but if two share a colour by accident, this may happen.
Additionally, these errors are common to encounter:
- «Map invalid X crossing. Please fix pixels at coords»: Four provinces share a common corner. The game connects the bottom left and the top right provinces but this situation is confusing to the player and should be avoided. Keep in mind that the map loops horizontally, so this X crossing may be right at the edge of the province bitmap.
- «Province X has TOO LARGE BOX. Perhaps pixels are spread around the world in provinces.bmp»: The province has a width/height of more than 1/8th of the total map width/height. This might be an indication that two provinces inadvertently share a color, but it may also be a large province. Large provinces aren’t treated stably by the game and should be avoided.
- «Province X has only N pixels»: The province consists of no more than NGraphics.MINIMUM_PROVINCE_SIZE_IN_PIXELS (8 by default). This is likely too small to be easily usable by the player.
- «Prov 12345 has no continent»: This error has these common causes:
- The province is a land province, yet its continent ID is left at zero. This also includes the auto-generated province definitions, present if a colour is found that isn’t present in the definition file. If the province doesn’t exist in the regular provinces.csv file, check the «fixed» variant created by the game in user directory.
- The province entry doesn’t end with the Windows-style CRLF line ending, commonly being the Unix-style LF line ending. This usually breaks every single province’s continent. The exact process of conversion depends on the text editor. For example: in Visual Studio Code, this is changed with the bottom bar; in Notepad++, this is changed with the «EOL conversion» in the Edit menu; in Sublime Text, this is changed with the «Line endings» in the View menu.
- «Bitmap and province definition disagree on whether or not province 12345 is coastal. Bitmap adjacency result will be prefered. «: This error has these common causes:
- Exactly what the error states: the province is a coastal land province yet it’s marked as non-coastal within /Hearts of Iron IV/map/definition.csv or vise-versa. Adjust the province definition accordingly.
- There’s a missing province ID somewhere earlier in the file, which offsets the province definitions from their intended colours later on in the file. This is typically the case if there are hundreds of such errors and the province definition matches up with the coastal status. A broken-looking terrain map mode can also be an indicator of this issue.
Continents[edit | edit source]
Continents are defined within the /Hearts of Iron IV/map/continent.txt file within the continents = { ... }
table. The continents have several uses in-game:
- Used for a state-scoped trigger checking the continent.
- Used for assigning AI areas for a variety of AI strategies.
- Used for assigning a set of randomly-generated portraits to a country if there is not a country-specific one defined.
The continents block is a simple list of continents. The IDs are assigned in the order defined.
All land provinces must belong to a continent to avoid errors. The continents are assigned in /Hearts of Iron IV/map/definition.csv, also possible to apply via the Database menu in nudge. Continents do not need to follow state borders.
These continents exist in base game:
ID | Internal name | Localised name | Notes |
---|---|---|---|
1 | europe | Europe | Includes Cyprus. The border between Europe and Asia runs in the Ural mountains, cutting states such as Kalmykia and Archangelsk in half. |
2 | north_america | North America | Erroneously includes 2 provinces in Albania’s North Epirus. |
3 | south_america | South America | This also includes Central America (up to Guatemala/Belize, including these) and the Caribbean. |
4 | australia | Australia | This only includes the Australian mainland, New Zealand, as well as the islands and archipelagos of Papua, Tasmania, Bismarck, Solomon Islands, and French Polynesia. The rest of the Pacific islands are Asian. |
5 | africa | Africa | The Suez canal is considered the border: the entire state of Sinai is in the Middle East. |
6 | asia | Asia | The border with the Middle East runs cutting the states of Herat and Baluchistan in half, while others are almost entirely contained in one or the other. |
7 | middle_east | Middle East | The border with Europe in Caucasus Mountains cuts Abkhazia, Kabardino-Balkaria, North Ossetia, Azerbaijan, and Istanbul in half. The rest are entirely contained within one or the other. |
Terrain[edit | edit source]
There are two primary types of terrain in the game: graphical and provincial. Both terrain types are defined within /Hearts of Iron IV/common/terrain/*.txt files.
Provincial terrain is assigned within /Hearts of Iron IV/map/definition.csv to each province for land provinces and within the strategic regions for sea provinces. This does not change the graphical appearance in any way (aside from the ‘simple terrain’ map mode), instead, this assigns modifiers to the province and details about land or naval combat.
Graphical terrain is assigned within /Hearts of Iron IV/map/terrain.bmp to the map itself. This file is a 8-bit indexed image with the same dimensions as the provinces bitmap. This is purely the visual appearance of the map and doesn’t change it in any actual way. However, the database section in the nudge has a setting to auto-generate the provincial terrain based off the graphical terrain.
Provided are tables of base game terrain types.
Since the game decides the terrain based off the colormap IDs, the colours in the graphical terrain can be changed to anything as long as the colormap ID (specified in the ID column) is the same and the file will be treated no different, so the colours here are merely the ones that the base game uses. ‘Terrain type’ in the graphical terrain table refers to the nudge-generated provincial terrain type. Appearance in the graphical terrain table is the specified segment of the atlas file set to full opacity: in practice, the atlas file has transparency so that some parts of the terrain are more visible than others.
ID | Colour | Appearance | Terrain type | Notes |
---|---|---|---|---|
0 | (86, 124, 27) | plains | ||
1 | (0, 86, 6) | forest | Typically used for the dense forests. | |
2 | (112, 74, 31) | hills | ||
3 | (206, 169, 99) | desert | ||
4 | (6, 200, 11) | forest | Typically used for the sparse forests. | |
5 | (255, 0, 24) | plains | Typically used for farmland. | |
6 | (134, 84, 30) | mountain | ||
7 | (252, 255, 0) | desert | ||
8 | (73, 59, 15) | desert | ||
9 | (75, 147, 174) | marsh | ||
10 | (174, 0, 255) | mountain | ||
11 | (92, 83. 76) | mountain | ||
12 | (255, 0, 240) | desert | ||
13 | (240, 255, 0) | urban | Automatically spawns city models. | |
14 | (55, 90, 220) | lakes | Never used in-game, seems to refer to an invalid texture. Instead, the ocean terrain is used for lakes. | |
15 | (8, 31, 130) | ocean | ||
16 | (255, 255, 255) | mountain | Is permamently covered in snow, unlike the other graphical terrain using the same appearance | |
17 | (132, 255, 0) | hills | ||
18 | (255, 126, 0) | mountain | Never used in base game. | |
19 | (114, 137, 105) | plains | Is permamently covered in snow, unlike the other graphical terrain using the same appearance | |
20 | (58, 131, 82) | mountain | ||
21 | (255, 0, 127) | jungle | ||
22 | (0, 82, 82) | jungle | Never used in base game. | |
27 | (243, 199, 147) | mountain | ||
31 | (27, 27, 27) | mountain | Never used in base game. |
Internal name | Localised name | Terrain type | Notes |
---|---|---|---|
unknown | Unknown | land | Default terrain for new provinces. |
forest | Forest | land | 84 optimal combat width, -15% division attack. |
hills | Hills | land | 80 optimal combat width, -25% division attack. |
mountain | Mountain | land | 75 optimal combat width, -50% division attack. |
plains | Plains | land | 90 optimal combat width |
urban | Urban | land | 96 optimal combat width, -30% division attack. |
jungle | Jungle | land | 84 optimal combat width, -30% division attack. |
marsh | Marsh | land | 78 optimal combat width, -40% division attack. |
desert | Desert | land | 90 optimal combat width |
ocean | Ocean | sea | Default terrain for sea provinces. |
lakes | Lakes | sea | Default terrain for lake provinces. |
water_fjords | Fjords and Archipelagos | naval | Makes battlecruisers, battleships, heavy cruisers, and carriers less viable, makes the navy harder to detect, and removes 15% from positioning. |
water_shallow_sea | Shallow Sea | naval | Makes submarines easier to detect and removes 5% from positioning. |
water_deep_ocean | Deep Oceans | naval | Makes destroyers, light cruisers, submarines, and mines less viable. |
Provincial terrain[edit | edit source]
Provincial terrain types are defined within /Hearts of Iron IV/common/terrain/*.txt files in the categories = { ... }
block. Each terrain is a code block, and the name of the block gets taken as the terrain’s name, such as this creating terrains my_terrain_1 and my_terrain_2.
categories = { my_terrain_1 = { <...> } my_terrain_2 = { <...> } }
The following arguments go into terrain:
color = { 100 120 140 }
assigns a colour to the terrain in the ‘Simplified terrain’ map mode. This is a RGB value, where each one goes on the scale from 0 to 255.sound_type = forest
assigns the ambient sound played by the terrain. This appears to be unused.movement_cost = 1.0
assigns the move speed for this terrain in particular. A higher value means that divisions or ships will move slower.units = { ... }
assigns unit-scoped modifiers that would apply on every land division or ship within this province within battle, such asattack = 0.1
ordefence = -0.1
.my_subunit = { ... }
serves to make these apply to specific sub-units, withunits = { ... }
within being for combat and the rest for outside. For example,
carrier = { units = { attack = -0.2 } navy_fuel_consumption_factor = 0.2 }
- Additionally, the terrain serves as a modifier block, allowing any provincial modifier to be used within. These include many combat-related and state-scoped modifiers.
is_water = yes
if set, will mark this as water terrain, making it only possible to use for seas and lakes. Additionally,naval_terrain = yes
would be needed to mark it as a naval terrain which can be used in strategic regions.
The following arguments are only for land terrain:
combat_width = 78
assigns the base combat width. Up to this many units would be able to participate in the battle without penalties.combat_support_width = 24
assigns the combat width on top of the combat_width. After combat_width is exceeded, combat_support_width more worth of troops can still engage in combat, but with penalties.supply_flow_penalty_factor = 0.2
assigns a penalty to supply flow through provinces with this terrain.match_value = 8
assigns a terrain value for this province. This is primarily used for the state_and_terrain_strategic_value trigger/variable and to assign costs to the peace conference.ai_terrain_importance_factor = 8.0
assigns a strategic importance value for AI on this terrain. A higher value means that AI would recognise this as a defensible province.
Some common modifiers to use include the following:
attrition = 0.1
sets the base attrition for the land province.enemy_army_bonus_air_superiority_factor = -0.1
modifies the bonus that would be given to the attacker from air superiority.sickness_chance = 1.0
makes combat on this province result in a possibility of the army leader becoming sick.positioning = 0.1
modifies the navy positioning within this sea province.navy_visibility = -0.2
modifies the visibility of navies within this sea province.
Localisation can be added with using the terrain’s ID as the localisation key:
my_terrain_1: "My terrain" my_terrain_1_desc: ""
For land provinces, there are 2 sprites: regular (with GFX_terrain_ prepended before the terrain’s name) and winter (Additionally with _winter appended in the end). The winter sprite appears when the province is covered in snow, while the regular one appears regularly. These would be the following for my_terrain_1
:
spriteType = { name = GFX_terrain_my_terrain_1 textureFile = gfx/interface/terrains/terrain_my_terrain_1.dds } spriteType = { name = GFX_terrain_my_terrain_1_winter textureFile = gfx/interface/terrains/terrain_my_terrain_1_winter.dds }
For naval terrain, there are 10 sprites: regular, rain, storm, snow, and snowstorm for both day and night. These would be the sprite definitions for my_naval_terrain_1
:
spriteType = { name = GFX_terrain_my_naval_terrain_1_day textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_day.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_day_rain textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_day_rain.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_day_storm textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_day_storm.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_day_snow textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_day_snow.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_day_snow_storm textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_day_snow_storm.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_night textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_night.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_night_rain textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_night_rain.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_night_storm textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_night_storm.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_night_snow textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_night_snow.dds } spriteType = { name = GFX_terrain_my_naval_terrain_1_night_snow_storm textureFile = gfx/interface/terrains/terrain_my_naval_terrain_1_night_snow_storm.dds }
Graphical terrain[edit | edit source]
Graphical terrain is defined within the /Hearts of Iron IV/common/terrain/*.txt files within the terrain = { ... }
block. Each graphical terrain type is a separate block within that overarching block, with the name of the block being irrelevant, with overlaps possible. Example definitions include:
terrain = { my_terrain = { type = urban color = { 23 } texture = 1 spawn_city = yes } my_terrain = { type = plains color = { 24 } texture = 2 } }
In here, type = urban
tells the provincial terrain type that the nudge would assign to the graphical terrain of this type when auto-generating province terrains, color = { ... }
is a list of colormap indices that get used for the graphical texture, and texture = 1
assigns the atlas definition, beginning with 0.
Optional arguments are spawn_city = yes
, which automatically spawns city models, and perm_snow = yes
, which makes the specified regions be covered in snow permamently.
The atlas files are /Hearts of Iron IV/map/terrain/atlas0.dds and /Hearts of Iron IV/map/terrain/atlas_normal0.dds. These must be squares. By default, each is a map of tiles in a 4×4[4], where each tile is 512×512 pixels large.[5]
The tiles are arranged in the left-to-right then up-to-down order starting from 0, as in the attached table.
0 | 1 | 2 | 3 |
4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 |
This order means that, for example, texture = 11
within a graphical definition will result in the rightmost lower-middle tile being chosed assuming the default 4×4 arrangement.
atlas0 is the regular texture map, for the textures that will get assigned on the terrain, while atlas_normal0 is a normal map, which gets used to assign vectors perpendicular to each point on the texture which get used when shading the map.
The files atlas1 and atlas2, as well as atlas_normal1 and atlas_normal2 serve for farther zoom levels: the game uses lower-quality textures when the camera is more zoomed-out or with different graphics settings to save on performance. atlas1 has each of its dimensions at half-size of atlas0, and atlas2 has them at the quarter-size of atlas0.
For the game to read the file, mipmaps must be generated and DXT5 must be the compression algorithm used.
Height map[edit | edit source]
/Hearts of Iron IV/map/heightmap.bmp is used in order to determine the height of a given position on the map. A minimum value (or pure black) translates to a height of 0 by the Y axis, while the maximum value (or pure white) translates to a height of 25.5 by the Y axis.
The sea level is set at the height of 9.5 by default[2], and so anything below the value of 95 (on the scale from 0 to 255) will be shown as underwater, while everything above 95 will be shown as above water. Water is always at the constant height.
It should be preferred to create smooth transitions in pixel’s values in order to create more smooth-looking transitions. In addition to the heightmap, the Normal map also contributes to smoothness.
Heightmap has the same image dimensions as the provinces bitmap and is saved as a 8-bit greyscale image.
Normal map[edit | edit source]
/Hearts of Iron IV/map/world_normal.bmp is a a normal map saved in the 24-bit RGB format, deciding on the exact slope of each pixel within the 3D rendering of the map. This is used in the lighting calculations.
The red channel decides on the X value of the vector from -1 to 1: a value of 0 is pointing to the left (West) as much as possible while a value of 255 is pointing to the right (East) as much as possible.
The green channel decides on the Y value of the vector from -1 to 1: a value of 0 is pointing to the bottom (South) as much as possible, while a value of 255 is pointing to the top (North) as much as possible.
The blue channel decides on the Z value of the vector from 0 to -1: a value of 128 corresponds to 0, meaning it is not pointing at the viewer but rather perpendicularly depending on the X and Y values, while a value of 255 corresponds to -1, which means it’s pointing at the viewer as much as possible.
There are several tools that can be used in order to generate a normal map from a heightmap. Some include:
- NVidia’s texture tools.
- Within Photoshop CC, Filter > 3D > Generate Normal Map.
- Within GIMP, using the normal map plugin: after downloading, opening the heightmap, changing image type to RGB, Filter > Map > Normal, and inverting the Y axis.
Rivers[edit | edit source]
/Hearts of Iron IV/map/rivers.bmp is an 8-bit indexed bitmap file that decides the positioning of rivers. Rivers must be exactly one pixel thick and only go in orthogonal directions: pixels do not connect diagonally. As the river counts as a level 1 railway[6], particularly long rivers can cause the game to slow down or run unstably. The river map is a 8-bit indexed bitmap with the same dimensions as the provinces bitmap.
To correctly render, each river must have exactly one, by default green, start marker. In this case a river is taken as a single contiguous block of river pixels: those connected with red flow-in or yellow flow-out sources count as the same river as the main flow. Only the ‘main branch’ of the river should have the green source pixel, any branch connected to it via the red flow-in shouldn’t have it.
Index | Color | Function |
---|---|---|
0 | (0, 255, 0) | The source of a river |
1 | (255, 0, 0) | Flow-in source. Used to join multiple ‘source’ paths into one river. |
2 | (255, 252, 0) | Flow-out source. Used to branch outwards from one river. |
3 | (0, 225, 255) | River with narrowest texture. |
4 | (0, 200, 255) | River with narrow texture |
5 | (0, 150, 255) | |
6 | (0, 100, 255) | River with wide texture. |
7 | (0, 0, 255) | |
8 | (0, 0, 225) | |
9 | (0, 0, 200) | |
10 | (0, 0, 150) | |
11 | (0, 0, 100) | River with widest texture. |
By default, indexes 0[7] up to including 6[8] are treated as small rivers for game mechanics, indexes up to including 11[9] as large rivers. Pixels with any other index within the file do not get read in-game and serve as ‘comments’, usually used to signify the land province outlines to make it easier to place rivers.
If the path connecting the centres of two provinces overlaps at least one river pixel, it is considered a river crossing. If it intersects multiple river pixels of different types, the crossing type is implementation defined. To avoid player confusion, province paths should either clearly cut or stay clear of a river.
A possible error to encounter is MAP_ERROR: Palette in rivers.bmp is probably not correct
. This can entirely be ignored: the rivers.bmp file will be loaded regardless and, unlike other map errors, this does not prevent the game from loading without debug mode.
This error is caused by GIMP: editing in Photoshop does not produce this. By default, the DIB header is set to say that the colormap has 0 colours despite the fact that the colormap still contains 256 colours. This is to ensure that the game does not spend time reading colours within the BMP file and instead skips straight to the bitmap itself. GIMP instead sets the DIB header to say that there are 256 colours in the palette, which is unexpected by the game. This cannot be fixed within GIMP itself, however, assuming that the rivers bitmap is otherwise correct (Saved in 8-bit indexed mode with BITMAPINFOHEADER) this can also be fixed by opening the rivers bitmap within a hex editor and changing two values: addresses 00 00 00 2F
and 00 00 00 33
should both be 00
instead of 01
as set by GIMP.
Trees[edit | edit source]
- See also: Entity modding
/Hearts of Iron IV/map/trees.bmp is a 8-bit indexed bitmap that decides on the position of tree models on the map. The resolution of the map decides on the density of trees, by default each side is of the provinces bitmap.
The map decides on the positions of pdxmesh objects. A sprite with the ID of 14 will cause the pdxmesh with the name of mapobject_14
to spawn on that location, for example:
pdxmesh = { name = "mapobject_14" file = "gfx/models/mapitems/trees/my_tree.mesh" scale = 0.5 }
This definition would be within a /Hearts of Iron IV/gfx/entities/*.gfx file within the objectTypes = { ... }
block. By default, these tree types exist within the base game:
Colormap ID | Colour | Tree Type/Density |
---|---|---|
2 | (30, 139, 109) | Sparse Palm |
3 | (18, 100, 78) | Dense Palm |
5 | (76, 156, 51) | Sparse Forest |
6 | (47, 120, 24) | Dense Forest |
28 | (150, 0, 255) | Sparse Jungle |
29 | (88, 0, 138) | Dense Jungle |
Color maps[edit | edit source]
The colormap files define the overall color tint applied to the map. Without a colormap file, all land will appear the same overall color, regardless of terrain type. They should be saved in the .DDS format, using the 8.8.8.8 ARGB 32-bit profile with no mipmaps.
/Hearts of Iron IV/map/terrain/colormap_water_0.dds is used to give tint to the water. Each of its dimensions is halved compared to the provinces bitmap. Similarly applies for the water colormaps 1 and 2: they are the same but with the dimensions halved compared to the previous level. This is for performance reasons as to make the game use lower-quality textures when zoomed out or with different graphics settings.
/Hearts of Iron IV/map/terrain/colormap_rgb_cityemissivemask_a.dds serves two purposes. The RGB channels define the default coloring of the map, which gets modified by terrain. When making changes to the terrain or height map, this color map should be updated too to reflect the changes visually. The alpha channel is used for city lights at night: more opacity means stronger night lights. The file should use half of the vertical and horizontal resolution of the provinces bitmap.
Editing this colourmap in particular would be much easier if the alpha channel should be separated from the RGB channels, as these serve different purposes. The process to do so depends on the image editor. For example, in GIMP it is done by adding a layer mask with the setting of «Transfer layer’s alpha channel» selected, which’ll allow editing the alpha channel by editing the mask and the RGB channels by editing the now non-transparent layer.
Buildings[edit | edit source]
There are 3 primary files for buildings in the map folder: /Hearts of Iron IV/map/buildings.txt, which primarily decides the position of building models; /Hearts of Iron IV/map/airports.txt, which assigns the province within the state where the air base will be built; and /Hearts of Iron IV/map/rocketsites.txt, which assigns the province within the state where the rocket launch site will be built.
The locations of building models for each state are defined in /Hearts of Iron IV/map/buildings.txt. An entry in that file is defined as such (If unspecified, assume a number with up to 2 decimal digits):
State ID (integer); building ID (string); X position; Y position; Z position; Rotation; Adjacent sea province (integer)
- State ID defines which state the building is located in. Even for provincial buildings, this is the ID of the state, not the province. Instead, provincial buildings have several entries per state, with the XYZ position being used by the game to know which province it’s for.
- Building ID defines which model is being located. While this includes each building, this also includes floating harbours as floating_harbor.
- X, Y, and Z position represent the position on the map of the building model using the coordinate system.
- Rotation is measured in radians. A rotation of 0 will result in the building model pointing in the same direction as the model is set, while positives will rotate it counter-clockwise and negatives will rotate it clockwise. A full rotation resulting in the same position as 0 is equal to the number π multiplied by 2, roughly 6.28.
- Adjacent sea province is only necessary to define for naval bases and floating harbours, in order to let the game know from which sea province ships or convoys can access the land province where it is located. If the building type is not a naval base, it should be left at 0.
It is preferable to generate the building models in the building section in the nudger, rather than filling it out manually. However, note that the game will crash if the currently-existing /Hearts of Iron IV/map/buildings.txt file is entirely empty, so there should be at least one definition, even if incorrect. It is possible to copy it over from the base game.
If some naval base or floating harbour is missing a definition within this file, the game will crash once any province with one would be evaluated by AI or tried to be used as a naval base. This represents as a crash with the client_ping or hourly_ping last read file a few hours into the game, fixed by turning off AI. This is because the building definition is used not only for the model of the naval base, but also for assigning the sea province that the port goes out into. If there is no definition, the game fails at evaluating the spot where the navy would be placed, resulting in an infinite loop that eats the RAM and the CPU leading to a crash.
An entry within /Hearts of Iron IV/map/airports.txt or /Hearts of Iron IV/map/rocketsites.txt looks like 123 = { 4321 }
. Within this, the first number that serves as the name of the block is the ID of the state, while the number within the block is the province containing the air base or rocket launch site.
This also can be generated via the nudge’s building section.
Unit model and victory point positions[edit | edit source]
The /Hearts of Iron IV/map/unitstacks.txt file decides on the positions of unit models and victory points within each individual province. This is edited via the Unit
menu in nudge.
In particular, this decides the position of the victory point on the map if one is present within the province. Whether one is present, how it’s called, and how much it’s worth is decided within state history files and localisation.
An entry in the file has the following formatting:
Province ID; Type; X position; Y position; Z position; Rotation; Offset
- Province ID assigns to which province the model is aimed for.
- Rotation is done in radians, 0 being the default state and positives rotating it counterclockwise.
- The offset is used for the animation in order to make it so that the animations of units within provinces are not directly happening at the same time, but have a delay.
- Type is an integer from 0 to 38 assigning a purpose.
ID | Internal name | Notes |
---|---|---|
0 | Standstill | |
1 | Moving 0 | Different numbers represent different needed levels of rotation |
2 | Moving 1 | Different numbers represent different needed levels of rotation |
3 | Moving 2 | Different numbers represent different needed levels of rotation |
4 | Moving 3 | Different numbers represent different needed levels of rotation |
5 | Moving 4 | Different numbers represent different needed levels of rotation |
6 | Moving 5 | Different numbers represent different needed levels of rotation |
7 | Moving 6 | Different numbers represent different needed levels of rotation |
8 | Moving 7 | Different numbers represent different needed levels of rotation |
9 | Attacking | |
10 | Defending | |
11 | Disembarck 0 | Different numbers represent different needed levels of rotation |
12 | Disembarck 1 | Different numbers represent different needed levels of rotation |
13 | Disembarck 2 | Different numbers represent different needed levels of rotation |
14 | Disembarck 3 | Different numbers represent different needed levels of rotation |
15 | Disembarck 4 | Different numbers represent different needed levels of rotation |
16 | Disembarck 5 | Different numbers represent different needed levels of rotation |
17 | Disembarck 6 | Different numbers represent different needed levels of rotation |
18 | Disembarck 7 | Different numbers represent different needed levels of rotation |
19 | Ship in port | |
20 | Ship in port moving | |
21 | Standstill RG | RG stands for regrouping |
22 | Moving 0 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
23 | Moving 1 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
24 | Moving 2 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
25 | Moving 3 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
26 | Moving 4 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
27 | Moving 5 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
28 | Moving 6 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
29 | Moving 7 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
30 | Disembarck 0 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
31 | Disembarck 1 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
32 | Disembarck 2 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
33 | Disembarck 3 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
34 | Disembarck 4 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
35 | Disembarck 5 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
36 | Disembarck 6 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
37 | Disembarck 7 RG | Different numbers represent different needed levels of rotation. RG stands for regrouping |
38 | Victory point |
Adjacencies[edit | edit source]
The adjacencies file is /Hearts of Iron IV/map/adjacencies.csv. This decides the relationships between borders of provinces, allowing to create borders between non-directly adjacent provinces (such as strait crossings), block the border between two directly adjacent provinces (making it impassable), or otherwise set up adjacency rules that make crossing the border limited (such as the Gibraltar strait).
The following format is used for adjacencies:
Start province ID;End province ID;Adjacency type;Through province ID;Starting X position;Starting Y position;Ending X position;Ending Y position;Adjacency rule;Comment
For example, these are valid adjacencies:
6891;3838;sea;5579;-1;-1;-1;-1;;Sardinia-Corsica 10910;12807;impassable;-1;-1;-1;-1;-1;;Himalayas 3314;6336;sea;2752;2885;1578;2890;1581;;Afsluitdijk
There are 2 primary types of an adjacency: sea and impassable. ‘Impassable’ fully blocks the connection between two provinces, while ‘sea’ creates a conditional border between the provinces (using an adjacency rule or otherwise), not requiring these provinces to have a direct border. If a type is not specified, then it assumes to be sea. The sea connection must be between two provinces of the same type: sea or land. If the connection is between two land provinces, they can’t directly border each other.
Since the impassable type can’t go ‘through’ a province, does not have a start or ending positions for graphics, and can’t have an adjacency rule set, these should remain unset. This is done by leaving the adjacency rule field completely blank and having the rest be left as -1.
‘Through’ marks a province that serves as a gateway for the adjacency for the sea type. If the two provinces do not directly border each other, it is mandatory to define a Through province. Enemy control of that province (such as an enemy ship in the sea province between the two land provinces) will prevent the adjacency from being possible to use. Additionally, it is possible to define an adjacency rule in this case to apply to the provinces.
X and Y positions decide the start and end of the red line created with a strait crossing between two land provinces. These use the X and Z coordinates in the 3D coordinate system. If set to -1, then the position will be calculated automatically, as the middles of the starting and ending provinces.
Even when otherwise empty, the file must be terminated with a line containing a negative from-field and a semicolon to prevent an infinite hang on start-up.
Adjacency rules[edit | edit source]
Adjacency rules, found at /Hearts of Iron IV/map/adjacency_rules.txt are ways to establish more complex rules on who can access a specified adjacency, either a strait or a canal. In order to establish an adjacency rule, it must first specify the name in /Hearts of Iron IV/map/adjacency.csv. This file must be encoded in UTF-8 without the byte order mark.
Determining what each type of relation has access to is next. Friends are any nation that is a subject, is given military access to, or in a faction with the controlling power of the specified adjacency. Contested is when two nations contest the adjacency by controlling different provinces within the required_provinces. Enemy is any nation at war with the controlling power, and neutral is any nation that has no specific relation. Each relation should specify whether armies can pass through (transports), navies can pass through, submarines can pass through, and whether you can use it to get trade through.
After is the required provinces, these specify what a nation must control in order to be the owner of the adjacency. All of the provinces do not need to be within the same state or from the same country. A minimum of two provinces must be specified in this field.
is_disabled
is a trigger block evaluated for the country trying to use the adjacency rule that blocks it entirely if true. tooltip = localisation_key
serves as assigning a localisation key
icon
specifies over which province the icon for the adjacency appears in the navy view. This should be a sea province.
offset
specifies where the icon should move graphically starting from the middle of the province specified as the icon.
For example:
adjacency_rule = { name = "BOSPHORUS_STRAIT" contested = { army = no navy = no submarine = no trade = no } enemy = { army = no navy = no submarine = no trade = no } friend = { army = yes navy = yes submarine = yes trade = yes } neutral = { army = no navy = no submarine = no trade = yes } required_provinces = { 9833 11829 } is_disabled = { has_country_flag = BOSPHORUS_STRAIT_BLOCKED_FOR_COUNTRY tooltip = bosporus_strait_blocked_tt } icon = 9833 offset = { -2 0 -9 } }
Supply nodes and railways[edit | edit source]
Starting positions of supply nodes and railways are defined within /Hearts of Iron IV/map/supply_nodes.txt and /Hearts of Iron IV/map/railways.txt respectively. An invalid definition can cause crashes when trying to open singleplayer or when trying to open the ‘Supply’ section in nudge. An invalid definition in this case is one that’s going over sea provinces, invalid provinces, or a very disjointed railway definition.
It is recommended to use the nudge’s Supply section to assign supply nodes and railways.
An entry in the supply nodes file has this formatting, without the semicolon:
Level; Province
The level represents the level of the supply node. By default, supply nodes have the max level of 1[10], so this is limited to 1.
The province represents the ID of the province in which the supply node is located.
Example entry is 1 1234
An entry in the railways file has this formatting, without the semicolons:
Level; Amount of provinces; List of provinces
The level represents the level of the railway. By default, this is no more than 5.[11]
The amount of provinces is how many provinces the railway lasts.
The list of provinces is a whitespace character-separated list of province IDs on which this railway goes.
A valid railway definition is the following: 4 4 693 1444 12 11
Supply areas (For versions prior to 1.11)[edit | edit source]
Note: With the release of 1.11 and No Step Back, supply areas are deprecated and instead the initial logistics/supply system is defined through supply_nodes.txt and railways.txt; see previous section. For further information on updating your map from 1.10 to 1.11, see this post.
All states must be associated with a supply area. Each supply area can take any number of states, and each state should be in only one supply area.
Supply areas are formatted as follows:
supply_area={ id=1 name="SUPPLYAREA_1" value=12 states={ 5 85 } }
Ambient objects[edit | edit source]
- See also: Entity modding
The /Hearts of Iron IV/map/ambient_object.txt file is used to define the cosmetic 3D objects found in the map that are always generated, such as the map frame or winds.
Each ambient object is a separate definition within the file of type = { ... }
. The following arguments go inside of an ambient object definition:
type = object_type
refers to an entity defined within a /Hearts of Iron IV/gfx/entities/*.asset file.use_animation = no
sets whether the ambient object has an animation that should be used or not.time_duration = 300
sets the time for how long the animation takes place.scale = 100.0
sets the size of the ambient object. The default size is 1.always_visible = yes
, if set, enforces the ambient object to be permamently visible such as the frames.object = { ... }
decides each instance of the entity. Multiple can exist in the same ambient object. In particular, these arguments are used:name = my_entity_name
is the name of the object. This does not have to be unique and only shows up within the nudge.position = { ... }
is the XYZ position of the object.rotation = { ... }
is the rotation of the object by XYZ axes.
This is an example of an ambient object definition:
type = { type = my_entity use_animation = no scale = 1000 always_visible = yes object = { name = my_entity_name position={ 420.090 10.000 382.670 } rotation={ 0.000 0.000 0.000 } } object = { name = my_entity_name position={ 1234.890 10.000 407.440 } rotation={ 0.000 0.000 0.000 } } }
The nudge can edit existing ambient objects, but it is unable to create new ones: they have to be created manually first.
References[edit | edit source]
- ↑ Paint.net automatically generates the colormap: https://forums.getpaint.net/topic/10989-bitmap-colormap-editing/?do=findComment&comment=181320
- ↑ 2.0 2.1
static const float WATER_HEIGHT = 9.5f;
in /Hearts of Iron IV/gfx/FX/constants.fxh - ↑ HoI 4 — map/definition.csv in user dir is used without validation
- ↑
static const float MAP_NUM_TILES = 4.0f;
in /Hearts of Iron IV/gfx/FX/constants.fxh - ↑
static const float TEXELS_PER_TILE = 512.0f;
in /Hearts of Iron IV/gfx/FX/constants.fxh - ↑ NDefines.NSupply.RIVER_RAILWAY_LEVEL = 1 in Defines
- ↑ NDefines.NMilitary.RIVER_SMALL_START_INDEX = 0 in Defines
- ↑ NDefines.NMilitary.RIVER_SMALL_STOP_INDEX = 6 in Defines
- ↑ NDefines.NMilitary.RIVER_LARGE_STOP_INDEX = 11 in Defines
- ↑ As defined within /Hearts of Iron IV/common/buildings/00_buildings.txt
- ↑ NDefines.NSupply.MAX_RAILWAY_LEVEL = 5 in Defines
When editing Defines, make sure to use an override file rather than copying the entire file, as that can cause game crashes when new defines get added, which can happen even in ‘minor’ updates.
Этот мод изменяет карту мира, добавляя или изменяя многие ее аспекты. Большую часть изменений вы можете пронаблюдать непосредственно на скриншотах, но все же я опишу их отдельно, на всякий случай.
Особенности мода в том, что он:
- углубляет цвета при отдалении, для лучшего политического обзора карты;
- удаляет цвет страны, когда карта значительно увеличена для лучшего обзора местности (границы между странами по-прежнему видны);
- уменьшает толщину границы для лучшего обзора приграничных территорий;
- изменяет рельеф некоторых местностей так, чтобы его легче было различить;
- удаляет названия стран с карты для «чистого» взгляда;
- делает воду в водоемах более темной для большей реалистичности;
- изменяет размер иконок на карте.
Как вы уже поняли, большая часть изменений однозначно в положительную сторону, хотя некоторые, на мой взгляд, все же являются спорными (мне вот не понравилось отсутствие названий стран, но автор не дурак и выпустил версию с ними. Вау!). Хотя на замену стандартной карте у меня точно отправится именно этот мод. Кстати, он полностью совместим с режимом Iron Man, да и с мультиплеером проблем нет. Что по совместимости с модами, то автор отметил, что конфликтов быть не должно вообще ни с чем (или с очень малым количеством дополнений). Короче, я уже пользуюсь, а вы?
Установка (и для пиратов, и для лицензий):
- Архив в архиве необходимо переместить в …DocumentsParadox InteractiveHearts of Iron IVmod). Если папки mod нет — создать.
- Файл .mod должен быть помещен аналогично в …DocumentsParadox InteractiveHearts of Iron IVmod).
- Теперь необходимо открыть файл .mod любым текстовым редактором (например, блокнотом/Notepad++ или иным) и изменить текст после path, чтобы вместо
path=»workshop/content/281990/12345678/nazvanie_moda.zip» получилось так — path=»mod/nazvanie_moda.zip» - Активируйте мод в лаунчере. Вот и всё, никаких сложностей!
Проблемы при установке?
Согласно моей проверке, этот способ установки должен работать. Для обладателей лицензии проще и надежнее перейти по ссылке из источника и скачать там.
Иногда бывает, что файл с разрешением .mod пропадает после копирования в папку /mod. В таком случае просто поставьте в свойствах этому файлу галочку «Только чтение».
Стандартная версия — Скачать
Версия с названиями стран — Скачать
Приятной игры, мои фронтовые товарищи!
Доп. информация о моде:
Автор мода: Kai
Источник: перейти
Версия: от 19 янв. 2017
Перевод на русский: не требуется
Hearts of Iron 4
06.06.2016
Стратегия,
Глобальная стратегия
8.8
956
оценок
1
2
3
4
5
6
7
8
9
10
-
Hearts of Iron 4
-
Новости124
-
Мнения6
-
Юмор5
-
Файлы522
-
Читы51
-
Гайды5
-
Форумы210
-
Cкриншоты72
-
Галерея191
-
Игроки
новые
- за день
- за неделю
- за месяц
- за год
- за всё время
Все
Геймплей
Графика
Звуки
Интерфейс
Исправление ошибок
Карты
Квесты и Миссии
Локации
Модели
Одежда
Оптимизация
Официальные патчи
Прически и Лица
Русификаторы
Скины
Торговля
Транспорт
Утилиты
26 ноября 2021
|
Модели,
Геймплей,
Интерфейс,
Звуки,
Карты,
Русификаторы,
Торговля
Hearts of Iron 4 «Мод на вселенную S.T.A.L.K.E.R. v1.0.0»
2080
13
18
1 октября 2021
|
Геймплей,
Интерфейс,
Карты
Hearts of Iron 4 «My universe-My rules (alpha0.1.1) — Глобальный мод по вселенной»
167
2
-6
3 сентября 2021
|
Геймплей,
Интерфейс,
Карты
My universe-My rules(alpha0.1) Глобальный мод по вселенной.
63
3
2
12 августа 2021
|
Карты,
Оптимизация
Hearts Of Iron 4 «FPS Map — мод на карту»
4752
12
-1
1 мая 2020
|
Геймплей,
Интерфейс,
Карты
Hearts of Iron 4 «Славянское Государство | Slavian State (1.5.x)»
570
14
2
5 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Treaty of Sevrs»
69
0
0
5 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «European Union»
167
1
0
5 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Broken Spain»
46
1
0
5 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Time machine — Spain V 2.0»
50
1
0
3 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Rise of Omsk: Permanent Revolution»
113
0
1
3 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Triumph of the Will»
36
0
0
3 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Cutting USSR [Dependent]»
399
0
0
2 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Persia Rising»
110
0
0
1 февраля 2020
|
Геймплей,
Карты
Hearts of Iron 4 «California is an Island»
22
0
0
30 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Восстание Баварии»
73
1
0
30 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Purble Place»
13
0
0
30 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Nepal: Buffed»
41
0
0
29 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Country Unions»
94
0
0
29 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «The Rise of KFC»
15
1
0
29 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Kingdom of Jerusalem»
49
0
0
29 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «The Country of Shrek»
25
0
0
29 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Греческий Рассвет»
113
0
0
26 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Израиль наносит ответный удар!»
178
0
1
26 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Divided Brazil (Beta)»
3
0
0
21 января 2020
|
Геймплей,
Карты
Hearts of Iron 4 «Argentina Expanded»
44
0
0
12 августа 2019
|
Геймплей,
Карты
Hearts of Iron 4 «anti-kwai war mod 1.7.0»
132
5
1
30 апреля 2019
|
Геймплей,
Официальные патчи,
Карты
Hearts of Iron 4 «No nations (1.6 patch)»
169
1
1
7 марта 2019
|
Карты
Hearts of Iron 4 «Too Many States»
90
0
0
26 февраля 2019
|
Геймплей,
Карты
Hearts of Iron 4 «Красный против синего + русификатор / Red vs Blue»
172
0
0
30 декабря 2018
|
Геймплей,
Карты
Hearts of Iron 4 «Alternative borders of countries — Альтернативные границы стран»
89
4
0
5 февраля
|
Кино и сериалы,
Трейлеры
Педро Паскаль сыграл роль Марио в пародийном трейлере сериала по мотивам Mario Kart от HBO
Mario Kart: Double Dash!!
23
117
7 февраля
|
ПК
На ПК стал доступен ранний доступ к Hogwarts Legacy
Hogwarts Legacy
86
68
вчера в 15:19
|
Слухи
По слухам, Resident Evil 4 будет очень «точным» ремейком, но «сильно переосмыслит и изменит» некоторые части
Resident Evil 4
40
84
сегодня в 09:24
The Legend of Zelda: Tears of the Kingdom будет официально переведена на русский язык
The Legend of Zelda: Tears of the Kingdom
9
47
сегодня в 10:54
Анонсирована сногсшибательная фигурка Ядовитого Плюща из комиксов DC
24
67
сегодня в 18:08
|
ПК
Разработчики Atomic Heart представили расширенные системные требования к ПК с ожидаемой производительностью
Atomic Heart
92
63
сегодня в 08:10
|
Индустрия
По мнению аналитиков, Microsoft завершит приобретение Activision Blizzard, несмотря на попытки регуляторов остановить их
28
25
сегодня в 18:04
|
Обновления
Крупное бесплатное обновление для V Rising выйдет в мае
V Rising
1
11
сегодня в 15:09
|
Индустрия
По словам актрисы Эль Фэннинг, Death Stranding 2 «выходит за рамки видеоигры»
Death Stranding 2
27
22
вчера в 17:14
|
ПК
Онлайн Hogwarts Legacy в Steam поднялся до 350 тыс. игроков
Hogwarts Legacy
43
37
сегодня в 04:11
|
ПК
В ПК-версии Hogwarts Legacy нашли файлы эксклюзивного контента для PlayStation
Hogwarts Legacy
55
66
вчера в 22:08
Фанаты Star Wars Jedi считают анимацию бега Кэла «дурацкой»
Star Wars Jedi: Survivor
31
67
7 февраля
Фанат показал Замок из Heroes of Might and Magic III на Unreal Engine 5
Heroes of Might and Magic 3: The Restoration of Erathia
15
74
сегодня в 15:09
|
Консоли
Видео показывает, как выглядел бы ремейк Resident Evil 3 для PS1
Resident Evil 3
10
30
3 февраля
|
ПК,
Индустрия
EMPRESS взломала Monster Hunter Rise, следующая на очереди Hogwarts Legacy
Monster Hunter Rise
118
259
сегодня в 07:51
|
Анонсы,
Трейлеры
Создатели Ni No Kuni представили свою следующую игру — JRPG DecaPolice
DECAPOLICE
1
22
сегодня в 12:22
|
Индустрия
Похоже, что Earthworm Jim 4 был тихо отменен, вероятно, из-за банкротства компании Intellivision friend
22
20
вчера в 10:32
|
Индустрия
Сайт для отслеживания стримеров по Hogwarts Legacy был закрыт. Активистам, устроившим бойкот игре, угрожают судами
Hogwarts Legacy
131
212
7 февраля
|
ПК
Вышла первая версия фанатского ремейка Star Wars Jedi Knight: Dark Forces 2 на движке Unreal Engine
Star Wars: Jedi Knight — Dark Forces 2
12
70
3 февраля
|
ПК
ПК-версию The Last of Us Part 1 перенесли на 28 марта — игре нужна дополнительная полировка
The Last of Us: Part 1
107
118
3 февраля
|
ПК,
Трейлеры
Моддер Halk Hogan анонсировал мод текстур высокого разрешения Cyberpunk 2077 HD Reworked Project
Cyberpunk 2077
71
117
Самые новые и популярные игры можно получать бесплатно
Пополнение Steam-кошелька не проблема, если у вас есть бонусы
Дорогие и дефицитные геймерские девайсы теперь не нужно покупать
Grand strategy titles like Hearts of Iron 4 are extremely challenging games that revel in the unrelenting complexity and depth of their systems. And the thing is, most fans like them exactly like that. These are really tough experiences where decisions made 10’s of hours ago can come back to haunt you in the most unexpected ways. I know that doesn’t sound fun, but trust me when I say that it is.
And while this makes for extremely entertaining scenarios for those who know what they’re doing, games like these are not exactly known for their approachability or newbie-friendly mechanics. Jumping into them for the first time can be extremely rough. Often times this requires players to go through hours of videos and articles to even understand the basics.
So if you’re someone who’s having a tough time with Hearts of Iron 4, I’m here to tell you that there are a bunch of cheats that you can use to alleviate the difficulty a bit. There are also a bunch of commands that help you tweak the settings of the game. We’ll go over all of them them in our HOI4 console commands guide.
How To Use Country Tags For Console The Command In Hearts Of Iron 4
If you have one of the players that are looking to use Country Tags in Hearts Of Iron 4, then you can start from the command console as it is a more viable option. After going through all of the command console cheats you will know that there is a cheat that you can use to find out a specific Country Tag of any nation that will exist in the games database. Normally there will be every nation present in the database if it exists at the game’s start dates 1936 and 1939.
Moreover, there will be many tasks that are buried within the game files. However, they are the ones that are yet to be released and are formable nations. For instance, if you look at the Kingdom of Prussia, you will notice that it can be brought back using the French focus tree. It will have a tag of “PRE”.
However, not every formable nation you see will have a unique country tag to it. But any really simple nation will always have a Country Tag. Also, No Step Back recently introduced the new nations releasable to the Soviet Union.
Now it goes without saying that using console commands has the potential to completely ruin your playthrough if you go too crazy. So try these cheats out only after you’ve saved your game first. Or start a completely new run that you don’t care about messing up.
Either way, once you’re in the game, press either the Tab, ~, `, ” or ^ button to open up the console. The key will vary depending on the layout of your personal keyboard. After a text bar opens up on the left-hand side, you can input your preferred HOI4 console commands here.
Many of the commands we’re about to list below will require country specific tags such as ‘CHI’ for China or ‘SOV’ for the Soviet Union. In order to make the process of finding these easier for yourself, try inputting the command ‘tdebug’ into the console. With this active, you can hover your mouse over any location and the tag will be revealed.
Similar Articles: Fallout New Vegas Console Commands Full List [2021].
With all that out of the way, let’s actually jump into the full list of HOI4 console commands.
Full List of Commands
Below, you will find the full list of console commands for this game. Some of these are pretty straightforward, but others could potentially break you game. So be careful when using these.
Command | Effect |
add_equipment [Amount] [Equipment Name] | Use this command to add a specific amount of any equipment other than naval equipment to the arsenal. Alternatively, you can remove equipment by specifying a negative value in [Amount]. |
add_latest_equipment [Amount] | The command gives the specified [Amount] of the latest equipment variants to the player. |
add_opinion [source Country Tag] [target Country Tag] | The command adds an opinion from the specified [Country Tag] to the other [Country Tag]. |
allowdiplo | This command allows players to use any diplomatic action in the game without justification. This includes everything from ‘Call To Arms’ to ‘Create Faction’. |
allowtraits | Removes all restrictions on assigning general traits. Using this command allows you to freely assign general traits to any of your commanders. |
annex [Country Tag / ‘all’] | This command starts an annexation with the nation specified in the [Country Tag]. Basically, you claim their land as your own. |
cp [Amount] | This command will add Command Power or CP to a government. This resource is always capped at 100. |
debug_nuking | After using this HOI4 console command, launching nukes in any province is permitted regardless of the current conditions. |
event [Event ID] [Country Tag] | Start the specified event in [Event ID], in the country chosen with [Country Tag]. |
gain_xp [Amount] | Players can use this command to give experience to a specific Leader. The amount given is determined by the value added to [Amount]. |
instantconstruction | Enables or disables the instant construction cheat, allowing all construction projects to happen instantly without any queues. |
manpower [Amount] | Add the specific amount of manpower to your country. |
observe | Enter ‘Observe’ mode, where you do not play as any country at all. The entire game now plays on autopilot, messages do not appear, and the game is never automatically paused. |
research [slot id / ‘all’] | Use this command to instantly research all equipment in a specific technology slot. |
research_on_icon_click | The command will instantly research any technology whenever you click on its icon in the technology tree. |
st [Amount] | You can gain Stability with this command. This resource is always capped at 100%, and you can remove it by specifying a negative number in [Amount] instead. |
tag [Country Tag] | Switch your country to the [Country Tag]. Basically you can switch your playable country at any time with this command. |
tdebug | Enable or disable debug mode with this command. In debug mode, IDs for things like states, provinces, etc are shown whenever you hover over them with your cursor.
As mentioned above, this is extremely useful if you intend to use HOI4 console commands at all. |
teleport [Province ID] | You can use this command to either activate the teleportation tool or instantly teleport all selected armies and ships to the province with the specified ID. |
whitepeace [Country Tag] [Country Tag] | This command creates ‘white peace’ between the two countries chosen with the [Country Tag]. What this means is that things revert back to the way they were before war was initiated. |
winwars | Give your country the maximum possible war score for any and all wars it is currently participating in. |
ws [Amount] | Players can gain War Support with this command. This resource is always capped at 100%, and you can also remove it by specifying a negative number in [Amount] instead. |
add_ideas [idea name] | Adds the [idea name] with the specified ID to your current country. |
add_party_popularity [Ideology Group] [Amount] | This command adds the specified [Amount] of party popularity to a specified [Ideology Group]. Ideology Groups are: ‘C’ for (Communism),
‘F’ for (Fascism), ‘D’ for (Democratic) and ‘N’ for (Neutrality). |
aidump | Dumps AI data from your currently selected unit to a log file. |
aircombat [scenario] [result] [Province ID] [airbase State ID] [airbase State ID] [equipment] [equipment] [equipment creator] [equipment creator] | Initiates air combat in the specified location from your desired country, airbase and equipment. |
analyzetheatres | Using this command will check all theatres in the game for errors. |
building_health [building type] [State ID / Province ID] [level] [Amount] | Tweak the health of an existing building with this command. |
civilwar [ideology] [Country Tag] | With this command, you can start a civil war within a specific country. You can even choose the ideology of the conflict.
Choices include ‘Communism’. ‘Fascism’, ‘Democratic’ and ‘Neutrality.’ |
combatsound [frequency] | Can be used to modify the frequency of a sound being played from the combat view. The number added should be anywhere between 1 and 50. |
debug_tactics | Players can enable or disable the visibility of the ‘tactics’ debug tooltip. |
decision.nochecks | This HOI4 console command allows you to ignore all decision requirements. |
deleteallunits [Country Tag] | This command allows players to delete all armies and fleets of the specified [Country Tag]. |
deltat [speed multiplier] | With this command, players can change the speed of different animations in the game. The number specified is supposed to be a multiplier. So 2 would double the speed, while 0.5 would half the speed. |
focus.autocomplete | The command allows for immediate completion of all national focuses. This command will also affect the game’s AI. |
focus.ignoreprerequisites | With this command you can ignore any and all focus prerequisites. |
focus.nochecks | With this command you can ignore any and all focus requirements. |
fronts | The command enables or disables the visibility of foreign fronts. |
help [command] | If this command is used simply as ‘help,’ then it will print a list of commands.
But if it is used as ‘help [command],’ it will print information about the specified commands. |
instant_prepare | Using this command will allow naval invasions to skip preparation time.
To be able to use this command, you must add ‘-debug’ to your HOI4 launch options, otherwise it will not work. |
massconquer | Open the ‘mass conquer’ tool with this HOI4 console command. |
nextsong | Skip to the next soundtrack in the music playlist in-game. |
nomapicons | The command enables or disables the visibility of icons on the map. |
nopausetext | Enable or disable the visibility of the pause menu with this console command. |
nu [Amount] | This command adds the chosen[Amount] of naval utility to your own naval utility count. |
nuke [Amount] | The command adds the chosen [Amount] of nukes to your current country. |
occupationpaint [Country Tag] | If no [Country Tag] is specified, this command toggles enables or disables occupation painting. However if the [Country Tag] is provided, your country will immediately occupy all land that the specified country owns. This does not apply to any land they might simply occupy. |
particle_editor | Opens the particle editor GUI. |
pp [Amount] | Add the specified [Amount] of political power to your own country. |
reload [file name] | This console command can be used to reload a file without opening and closing the game. |
reloadfx [map / .fx file] | This command reloads the game’s shaders. You can also specify either a map name, postfx or filename. |
reloadsupply | The command allows you to reload all supply systems. |
rendertype | The command prints the render type that is currently being used for your client. |
set_ruling_party [Ideology Group] | Set the specified [Ideology Group] as the ruling party of a country. Ideology Groups are: ‘C’ for (Communism),
‘F’ for (Fascism), ‘D’ for (Democratic) and ‘N’ for (Neutrality). If you wish to change the ruling party of another country, you must first switch to playing as them with the tag command mentioned above. |
setcontroller [Country Tag] [Province ID] | Players can set the controller of a specified province with this command. |
setowner [Country Tag] [State ID] | Set the owner of a specified state with this command. |
spawn [unit name/id] [Province ID] [Amount] | Players can use this command to spawn the specified [Amount] of a unit in a province.
To use this command, you must first add ‘-debug’ to your HOI4 launch options, otherwise it will not work. |
testtool | The testing tool will be opened with this command. |
theatersrebuild | Rebuild all existing theatres with this command. |
time | Prints the current time in-game. |
traderoutes | This HOI4 console command enables or disables the visibility of all trade routes in the game. |
tweakergui | Opens up a tweaker GUI. |
xp [Amount] | This command gives the specified [Amount] of experience to all experiences types. This includes Army XP, Air XP and Naval XP. |
yesman | Causes country AI to automatically accept any and all diplomatic offers, regardless of the case. |
Similar Articles: Civ 5 Tier List.
morehumans [Amount] | This HOI4 console command will add the specified [Amount] of humans to your current country.
With a negative value in [Amount], you can also subtract the number of humans. |
window [open / close] [gui name] | Opens or closes the GUI with the specified name. |
reloadinterface | Reload the game interface with this command. |
reloadtechnologies | The command reloads all technologies. |
updateequipments | Forcefully reloads equipment-related files |
updatesubunits | Forcefully reloads unit-related. |
reloadoob [Country Tag] | Reloads the Order of Battle of the country with the specified [Country Tag]. |
update_loc [localisation key] | This command reloads the mentioned localisation key. |
poll | Poll valid events with this command. |
pause_in_hours [hours] | Pauses the game after the specified amount of time. Useful if you want to leave the game running, but not for too long. |
add_autonomy [Country Tag] [Amount] | The command adds or subtracts autonomy from the specified [Country Tag]’s autonomy level. |
testevent [Event ID] [character id] | Test the specified ID without actually triggering it with this command. |
resign | If you input this command, you will make yourself resign from your current position. |
add_interest [Country Tag] | Add the country with the specified [Country Tag] to your interest. |
remove_interest [Country Tag] | Remove the country with the specified [Country Tag] from your interest. |
add_diplo | Adds diplomatic enroute for your current country. |
printsynchstuff | View the current seed of your game with this HOI4 console command. |
setrandomcount [count] | If executed without any [count], this command will set the random count to 0. If a number is instead provided as a value, the random count will be set to this. |
ai | The command enables or disables AI in-game. |
human_ai | AI for human countries can be enabled or disabled with this command. |
ai_invasion | Enable or disable the AI for naval invasion with this command. |
ai_accept | The command enables or disables whether AI will always accept diplomacy. |
fow [Province ID] | Enable or disable fog of war in the province of the specified ID.
If this command is executed without any [Province ID], it will turn off fog of war completely. If a [Province ID] is specified, FOW will only be toggled for that province. |
collision | Enables or disables the collision debug GUI. |
savegame | Forcefully save the game. |
savecheck | Use this command to check if saving is functioning correctly.
It will create a save file named ‘Test_01’. load it, and then save that again as ‘Test_02’. If the two files are the same size, then there is no problem. |
ip | Print your IP to the console with this HOI4 console command. |
requestgamestate | Prints the gamestate. |
nudge | Opens the nuge tool. |
mapmode [mapmode id] | Change the map mode to the specified type.
Map mode IDs: 1 is Default, 2 is Naval, 3 is Air, 4 is Supply, 5 is State, 6 is Resistance, 7 is Resource, 8 is Diplomacy and 9 is Faction. |
fullscreen | Enables or disables fullscreen mode in the game. |
prices | Prints price info to the game.log file. |
add_core [State ID] [Country Tag] | This command adds the specified [State ID] as a ‘core’ of the specified country. A ‘core’ is a state that’s considered to be a rightful part of the country. |
remove_core [State ID] [Country Tag] | The command removes the specified [State ID] as a ‘core’ of the specified country. A ‘core’ is defined as a state that’s considered to be a rightful part of the country. |
debug_zoom | Cause the game to zoom in with this HOI4 console command. |
debug_types | An advanced debug tool. It only works if running RTTI. Will print the data type for all dynamic reference objects to the console. |
debug_show_event_id | This command prints the [Event ID] of the currently ongoing event. |
debug_commands | Print the current ‘commandcount’ to the message.log file with this command. |
debug_events | Initiate event counting and print data collected from this with the ‘debug_dumpevents’ command. |
debug_dumpevents | Print data collected since the ‘debug_events’ command was last executed. |
debug_diploactions | Initiate diplomatic action logging and print data collected from this with the ‘debug_dumpdiploactions’ command. |
debug_dumpdiploactions | Print data collected since the’debug_dumpdiploactions’ command was last executed. |
debug_assert | The command enables or disables game asserts. |
debug_smooth | Frame smoothing can be enabled or disabled with this command. |
debug_nomouse | This console command enables or disables the mouse’s scroll wheel functionality. |
debug_terrain | Enables or disables terrain. |
debug_cities | The command enables or disables the cities painting mode. |
debug_water | Water can be enabled or disabled with this command. |
debug_fronts | Enables or disables the ‘interpolated fronts’ debug screen. |
debug_off_front_snap | This enables or disables the ‘offensive fronts snapping’ debug screen. |
debug_borders | The command enables or disables all borders in-game. |
debug_trees | Enables or disables trees. |
debug_rivers | This HOI4 console command enables or disables rivers. |
debug_postfx | Enables or disables PostFX. |
debug_sky | The command enables or disables the sky. |
debug_tooltip | Enables or disables tooltips in-game. |
flagsoutput [path] | Generate and then save a texture atlas file to the specified [path]. |
cityreload | This command reloads the cities in a game. |
error | Print any errors from the log file. |
version | Prints the current version of the game to the HOI4 console. |
debug_nogui | Enables or disables the game’s GUI with this command. |
debug_volume [volume] | Adjust the volume of the game with this command. |
debug_lockcamera | Camera lock can be enabled or disables with this command. |
debug_lines | This HOI4 console command enables or disables debug lines. |
debug_entities | The command enables or disables ‘entities’. |
debug_info | Enables or disables the debug info screen. |
debug_particle | This command enables or disables particles. |
debug_ai_budget [Country Tag] | Prints the AI budget information to the game’s console. |
debug_textures | Print texture debug information to the game log. Will not show up in console. |
debug_texture | The command enables or disables textures like bloom. |
debug_wireframe | Enables or disables HOI4’s forced wireframe. |
debug_achievements_clear | This command will clear all of your achievements and stats. This is irreversible |
moveunit [Unit ID] [Province ID] | Move the specified unit [Unit ID] to the specified province [Province ID]. |
spawnactor [name] [Province ID] [animation] | The command spawns an actor. If an [animation] is specified, the character will spawn with that particular animation. |
guibounds | This command enables or disables the bounds debug GUI. |
cameraclamp | Enables or disables the camera clamp. |
provtooltipdebug | This command enables or disables province tooltip debug info. The info also includes things like Province ID, etc. when you hover over a province on the map with your cursor. |
reloadweather [seed] | Reload weather with this HOI4 console command. |
weather | This command enables or disables weather. If this feature has been turned off, weather will always be disabled. |
debug_air_vs_land | Enable or disables debug mode for Air combat vs Land combat. |
mapnames | Enable or disables map names. |
profilelog | The command will output profiling data to ‘time.log’. |
run [file name] | Runs a list of commands in a specified file. |
oos | Makes the client go out of sync. |
debug_crash | This command is a debug tool. When executed, it will debug client crashes. |
sleep [duration] | The command will pause the game for the specified amount of time in seconds. |
goto_province [Province ID] | Move the center of your camera to the specified state mentioned with [Province ID]. |
goto_state [State ID] | Move the center of your camera to the specified state mentioned with [State ID]. |
trigger_docs | Print information regarding triggers and their exact effects. |
3dstats | Enables or disables 3D stats. |
hdr | This command enables or disables high dynamic range imaging. |
hdr_debug | The command enables or disables high dynamic range imaging debugging. |
srgb | Enables or disables color debugging in the game. |
bloom | Enables or disables bloom effect. |
posteffectvolumes.default [post effect] | Can be used to enable or disable a specific post effect, depending on the specified name. |
night | The command enables or disables night. |
filewatcher | This command enables or disables the filewatcher. |
createlean | The command generates LEAN textures. |
helplog | After using this command, a full list of all HOI4 console commands will be outputted to the game.log file. |
hsv | The command converts HSV to RGB. |
tag_color [rgb] | Players can use this command to set the tag color of your current country. |
browser [url] | Open the browser window and load the specified [URL]. |
browser_base_url [url] | Sets the URL of the browser. |
aiview | Enables or disables debug info for the AI. |
airealism | Enables or disables realistic AI for the game. |
instant_wargoal | Allows for the application of war goals without any justification. |
set_country_flag [Country Tag] | This command sets the national flag of the specified [Country Tag] as your current nation’s flag. |
set_cosmetic_tag [Country Tag] [Country Tag] | With this command you can change the name and flag of the specified [Country Tag] to that of another country. |
This has been eXputer’s HOI4 Console Commands guide. While you’re here, why not also check out our Marvel Strike Force Tier List.
Was this article helpful?
Thanks! Do share your feedback with us. ⚡
How could we improve this post? Please Help us. ✍
Grand strategy titles like Hearts of Iron 4 are extremely challenging games that revel in the unrelenting complexity and depth of their systems. And the thing is, most fans like them exactly like that. These are really tough experiences where decisions made 10’s of hours ago can come back to haunt you in the most unexpected ways. I know that doesn’t sound fun, but trust me when I say that it is.
And while this makes for extremely entertaining scenarios for those who know what they’re doing, games like these are not exactly known for their approachability or newbie-friendly mechanics. Jumping into them for the first time can be extremely rough. Often times this requires players to go through hours of videos and articles to even understand the basics.
So if you’re someone who’s having a tough time with Hearts of Iron 4, I’m here to tell you that there are a bunch of cheats that you can use to alleviate the difficulty a bit. There are also a bunch of commands that help you tweak the settings of the game. We’ll go over all of them them in our HOI4 console commands guide.
How To Use Country Tags For Console The Command In Hearts Of Iron 4
If you have one of the players that are looking to use Country Tags in Hearts Of Iron 4, then you can start from the command console as it is a more viable option. After going through all of the command console cheats you will know that there is a cheat that you can use to find out a specific Country Tag of any nation that will exist in the games database. Normally there will be every nation present in the database if it exists at the game’s start dates 1936 and 1939.
Moreover, there will be many tasks that are buried within the game files. However, they are the ones that are yet to be released and are formable nations. For instance, if you look at the Kingdom of Prussia, you will notice that it can be brought back using the French focus tree. It will have a tag of “PRE”.
However, not every formable nation you see will have a unique country tag to it. But any really simple nation will always have a Country Tag. Also, No Step Back recently introduced the new nations releasable to the Soviet Union.
Now it goes without saying that using console commands has the potential to completely ruin your playthrough if you go too crazy. So try these cheats out only after you’ve saved your game first. Or start a completely new run that you don’t care about messing up.
Either way, once you’re in the game, press either the Tab, ~, `, ” or ^ button to open up the console. The key will vary depending on the layout of your personal keyboard. After a text bar opens up on the left-hand side, you can input your preferred HOI4 console commands here.
Many of the commands we’re about to list below will require country specific tags such as ‘CHI’ for China or ‘SOV’ for the Soviet Union. In order to make the process of finding these easier for yourself, try inputting the command ‘tdebug’ into the console. With this active, you can hover your mouse over any location and the tag will be revealed.
Similar Articles: Fallout New Vegas Console Commands Full List [2021].
With all that out of the way, let’s actually jump into the full list of HOI4 console commands.
Full List of Commands
Below, you will find the full list of console commands for this game. Some of these are pretty straightforward, but others could potentially break you game. So be careful when using these.
Command | Effect |
add_equipment [Amount] [Equipment Name] | Use this command to add a specific amount of any equipment other than naval equipment to the arsenal. Alternatively, you can remove equipment by specifying a negative value in [Amount]. |
add_latest_equipment [Amount] | The command gives the specified [Amount] of the latest equipment variants to the player. |
add_opinion [source Country Tag] [target Country Tag] | The command adds an opinion from the specified [Country Tag] to the other [Country Tag]. |
allowdiplo | This command allows players to use any diplomatic action in the game without justification. This includes everything from ‘Call To Arms’ to ‘Create Faction’. |
allowtraits | Removes all restrictions on assigning general traits. Using this command allows you to freely assign general traits to any of your commanders. |
annex [Country Tag / ‘all’] | This command starts an annexation with the nation specified in the [Country Tag]. Basically, you claim their land as your own. |
cp [Amount] | This command will add Command Power or CP to a government. This resource is always capped at 100. |
debug_nuking | After using this HOI4 console command, launching nukes in any province is permitted regardless of the current conditions. |
event [Event ID] [Country Tag] | Start the specified event in [Event ID], in the country chosen with [Country Tag]. |
gain_xp [Amount] | Players can use this command to give experience to a specific Leader. The amount given is determined by the value added to [Amount]. |
instantconstruction | Enables or disables the instant construction cheat, allowing all construction projects to happen instantly without any queues. |
manpower [Amount] | Add the specific amount of manpower to your country. |
observe | Enter ‘Observe’ mode, where you do not play as any country at all. The entire game now plays on autopilot, messages do not appear, and the game is never automatically paused. |
research [slot id / ‘all’] | Use this command to instantly research all equipment in a specific technology slot. |
research_on_icon_click | The command will instantly research any technology whenever you click on its icon in the technology tree. |
st [Amount] | You can gain Stability with this command. This resource is always capped at 100%, and you can remove it by specifying a negative number in [Amount] instead. |
tag [Country Tag] | Switch your country to the [Country Tag]. Basically you can switch your playable country at any time with this command. |
tdebug | Enable or disable debug mode with this command. In debug mode, IDs for things like states, provinces, etc are shown whenever you hover over them with your cursor.
As mentioned above, this is extremely useful if you intend to use HOI4 console commands at all. |
teleport [Province ID] | You can use this command to either activate the teleportation tool or instantly teleport all selected armies and ships to the province with the specified ID. |
whitepeace [Country Tag] [Country Tag] | This command creates ‘white peace’ between the two countries chosen with the [Country Tag]. What this means is that things revert back to the way they were before war was initiated. |
winwars | Give your country the maximum possible war score for any and all wars it is currently participating in. |
ws [Amount] | Players can gain War Support with this command. This resource is always capped at 100%, and you can also remove it by specifying a negative number in [Amount] instead. |
add_ideas [idea name] | Adds the [idea name] with the specified ID to your current country. |
add_party_popularity [Ideology Group] [Amount] | This command adds the specified [Amount] of party popularity to a specified [Ideology Group]. Ideology Groups are: ‘C’ for (Communism),
‘F’ for (Fascism), ‘D’ for (Democratic) and ‘N’ for (Neutrality). |
aidump | Dumps AI data from your currently selected unit to a log file. |
aircombat [scenario] [result] [Province ID] [airbase State ID] [airbase State ID] [equipment] [equipment] [equipment creator] [equipment creator] | Initiates air combat in the specified location from your desired country, airbase and equipment. |
analyzetheatres | Using this command will check all theatres in the game for errors. |
building_health [building type] [State ID / Province ID] [level] [Amount] | Tweak the health of an existing building with this command. |
civilwar [ideology] [Country Tag] | With this command, you can start a civil war within a specific country. You can even choose the ideology of the conflict.
Choices include ‘Communism’. ‘Fascism’, ‘Democratic’ and ‘Neutrality.’ |
combatsound [frequency] | Can be used to modify the frequency of a sound being played from the combat view. The number added should be anywhere between 1 and 50. |
debug_tactics | Players can enable or disable the visibility of the ‘tactics’ debug tooltip. |
decision.nochecks | This HOI4 console command allows you to ignore all decision requirements. |
deleteallunits [Country Tag] | This command allows players to delete all armies and fleets of the specified [Country Tag]. |
deltat [speed multiplier] | With this command, players can change the speed of different animations in the game. The number specified is supposed to be a multiplier. So 2 would double the speed, while 0.5 would half the speed. |
focus.autocomplete | The command allows for immediate completion of all national focuses. This command will also affect the game’s AI. |
focus.ignoreprerequisites | With this command you can ignore any and all focus prerequisites. |
focus.nochecks | With this command you can ignore any and all focus requirements. |
fronts | The command enables or disables the visibility of foreign fronts. |
help [command] | If this command is used simply as ‘help,’ then it will print a list of commands.
But if it is used as ‘help [command],’ it will print information about the specified commands. |
instant_prepare | Using this command will allow naval invasions to skip preparation time.
To be able to use this command, you must add ‘-debug’ to your HOI4 launch options, otherwise it will not work. |
massconquer | Open the ‘mass conquer’ tool with this HOI4 console command. |
nextsong | Skip to the next soundtrack in the music playlist in-game. |
nomapicons | The command enables or disables the visibility of icons on the map. |
nopausetext | Enable or disable the visibility of the pause menu with this console command. |
nu [Amount] | This command adds the chosen[Amount] of naval utility to your own naval utility count. |
nuke [Amount] | The command adds the chosen [Amount] of nukes to your current country. |
occupationpaint [Country Tag] | If no [Country Tag] is specified, this command toggles enables or disables occupation painting. However if the [Country Tag] is provided, your country will immediately occupy all land that the specified country owns. This does not apply to any land they might simply occupy. |
particle_editor | Opens the particle editor GUI. |
pp [Amount] | Add the specified [Amount] of political power to your own country. |
reload [file name] | This console command can be used to reload a file without opening and closing the game. |
reloadfx [map / .fx file] | This command reloads the game’s shaders. You can also specify either a map name, postfx or filename. |
reloadsupply | The command allows you to reload all supply systems. |
rendertype | The command prints the render type that is currently being used for your client. |
set_ruling_party [Ideology Group] | Set the specified [Ideology Group] as the ruling party of a country. Ideology Groups are: ‘C’ for (Communism),
‘F’ for (Fascism), ‘D’ for (Democratic) and ‘N’ for (Neutrality). If you wish to change the ruling party of another country, you must first switch to playing as them with the tag command mentioned above. |
setcontroller [Country Tag] [Province ID] | Players can set the controller of a specified province with this command. |
setowner [Country Tag] [State ID] | Set the owner of a specified state with this command. |
spawn [unit name/id] [Province ID] [Amount] | Players can use this command to spawn the specified [Amount] of a unit in a province.
To use this command, you must first add ‘-debug’ to your HOI4 launch options, otherwise it will not work. |
testtool | The testing tool will be opened with this command. |
theatersrebuild | Rebuild all existing theatres with this command. |
time | Prints the current time in-game. |
traderoutes | This HOI4 console command enables or disables the visibility of all trade routes in the game. |
tweakergui | Opens up a tweaker GUI. |
xp [Amount] | This command gives the specified [Amount] of experience to all experiences types. This includes Army XP, Air XP and Naval XP. |
yesman | Causes country AI to automatically accept any and all diplomatic offers, regardless of the case. |
Similar Articles: Civ 5 Tier List.
morehumans [Amount] | This HOI4 console command will add the specified [Amount] of humans to your current country.
With a negative value in [Amount], you can also subtract the number of humans. |
window [open / close] [gui name] | Opens or closes the GUI with the specified name. |
reloadinterface | Reload the game interface with this command. |
reloadtechnologies | The command reloads all technologies. |
updateequipments | Forcefully reloads equipment-related files |
updatesubunits | Forcefully reloads unit-related. |
reloadoob [Country Tag] | Reloads the Order of Battle of the country with the specified [Country Tag]. |
update_loc [localisation key] | This command reloads the mentioned localisation key. |
poll | Poll valid events with this command. |
pause_in_hours [hours] | Pauses the game after the specified amount of time. Useful if you want to leave the game running, but not for too long. |
add_autonomy [Country Tag] [Amount] | The command adds or subtracts autonomy from the specified [Country Tag]’s autonomy level. |
testevent [Event ID] [character id] | Test the specified ID without actually triggering it with this command. |
resign | If you input this command, you will make yourself resign from your current position. |
add_interest [Country Tag] | Add the country with the specified [Country Tag] to your interest. |
remove_interest [Country Tag] | Remove the country with the specified [Country Tag] from your interest. |
add_diplo | Adds diplomatic enroute for your current country. |
printsynchstuff | View the current seed of your game with this HOI4 console command. |
setrandomcount [count] | If executed without any [count], this command will set the random count to 0. If a number is instead provided as a value, the random count will be set to this. |
ai | The command enables or disables AI in-game. |
human_ai | AI for human countries can be enabled or disabled with this command. |
ai_invasion | Enable or disable the AI for naval invasion with this command. |
ai_accept | The command enables or disables whether AI will always accept diplomacy. |
fow [Province ID] | Enable or disable fog of war in the province of the specified ID.
If this command is executed without any [Province ID], it will turn off fog of war completely. If a [Province ID] is specified, FOW will only be toggled for that province. |
collision | Enables or disables the collision debug GUI. |
savegame | Forcefully save the game. |
savecheck | Use this command to check if saving is functioning correctly.
It will create a save file named ‘Test_01’. load it, and then save that again as ‘Test_02’. If the two files are the same size, then there is no problem. |
ip | Print your IP to the console with this HOI4 console command. |
requestgamestate | Prints the gamestate. |
nudge | Opens the nuge tool. |
mapmode [mapmode id] | Change the map mode to the specified type.
Map mode IDs: 1 is Default, 2 is Naval, 3 is Air, 4 is Supply, 5 is State, 6 is Resistance, 7 is Resource, 8 is Diplomacy and 9 is Faction. |
fullscreen | Enables or disables fullscreen mode in the game. |
prices | Prints price info to the game.log file. |
add_core [State ID] [Country Tag] | This command adds the specified [State ID] as a ‘core’ of the specified country. A ‘core’ is a state that’s considered to be a rightful part of the country. |
remove_core [State ID] [Country Tag] | The command removes the specified [State ID] as a ‘core’ of the specified country. A ‘core’ is defined as a state that’s considered to be a rightful part of the country. |
debug_zoom | Cause the game to zoom in with this HOI4 console command. |
debug_types | An advanced debug tool. It only works if running RTTI. Will print the data type for all dynamic reference objects to the console. |
debug_show_event_id | This command prints the [Event ID] of the currently ongoing event. |
debug_commands | Print the current ‘commandcount’ to the message.log file with this command. |
debug_events | Initiate event counting and print data collected from this with the ‘debug_dumpevents’ command. |
debug_dumpevents | Print data collected since the ‘debug_events’ command was last executed. |
debug_diploactions | Initiate diplomatic action logging and print data collected from this with the ‘debug_dumpdiploactions’ command. |
debug_dumpdiploactions | Print data collected since the’debug_dumpdiploactions’ command was last executed. |
debug_assert | The command enables or disables game asserts. |
debug_smooth | Frame smoothing can be enabled or disabled with this command. |
debug_nomouse | This console command enables or disables the mouse’s scroll wheel functionality. |
debug_terrain | Enables or disables terrain. |
debug_cities | The command enables or disables the cities painting mode. |
debug_water | Water can be enabled or disabled with this command. |
debug_fronts | Enables or disables the ‘interpolated fronts’ debug screen. |
debug_off_front_snap | This enables or disables the ‘offensive fronts snapping’ debug screen. |
debug_borders | The command enables or disables all borders in-game. |
debug_trees | Enables or disables trees. |
debug_rivers | This HOI4 console command enables or disables rivers. |
debug_postfx | Enables or disables PostFX. |
debug_sky | The command enables or disables the sky. |
debug_tooltip | Enables or disables tooltips in-game. |
flagsoutput [path] | Generate and then save a texture atlas file to the specified [path]. |
cityreload | This command reloads the cities in a game. |
error | Print any errors from the log file. |
version | Prints the current version of the game to the HOI4 console. |
debug_nogui | Enables or disables the game’s GUI with this command. |
debug_volume [volume] | Adjust the volume of the game with this command. |
debug_lockcamera | Camera lock can be enabled or disables with this command. |
debug_lines | This HOI4 console command enables or disables debug lines. |
debug_entities | The command enables or disables ‘entities’. |
debug_info | Enables or disables the debug info screen. |
debug_particle | This command enables or disables particles. |
debug_ai_budget [Country Tag] | Prints the AI budget information to the game’s console. |
debug_textures | Print texture debug information to the game log. Will not show up in console. |
debug_texture | The command enables or disables textures like bloom. |
debug_wireframe | Enables or disables HOI4’s forced wireframe. |
debug_achievements_clear | This command will clear all of your achievements and stats. This is irreversible |
moveunit [Unit ID] [Province ID] | Move the specified unit [Unit ID] to the specified province [Province ID]. |
spawnactor [name] [Province ID] [animation] | The command spawns an actor. If an [animation] is specified, the character will spawn with that particular animation. |
guibounds | This command enables or disables the bounds debug GUI. |
cameraclamp | Enables or disables the camera clamp. |
provtooltipdebug | This command enables or disables province tooltip debug info. The info also includes things like Province ID, etc. when you hover over a province on the map with your cursor. |
reloadweather [seed] | Reload weather with this HOI4 console command. |
weather | This command enables or disables weather. If this feature has been turned off, weather will always be disabled. |
debug_air_vs_land | Enable or disables debug mode for Air combat vs Land combat. |
mapnames | Enable or disables map names. |
profilelog | The command will output profiling data to ‘time.log’. |
run [file name] | Runs a list of commands in a specified file. |
oos | Makes the client go out of sync. |
debug_crash | This command is a debug tool. When executed, it will debug client crashes. |
sleep [duration] | The command will pause the game for the specified amount of time in seconds. |
goto_province [Province ID] | Move the center of your camera to the specified state mentioned with [Province ID]. |
goto_state [State ID] | Move the center of your camera to the specified state mentioned with [State ID]. |
trigger_docs | Print information regarding triggers and their exact effects. |
3dstats | Enables or disables 3D stats. |
hdr | This command enables or disables high dynamic range imaging. |
hdr_debug | The command enables or disables high dynamic range imaging debugging. |
srgb | Enables or disables color debugging in the game. |
bloom | Enables or disables bloom effect. |
posteffectvolumes.default [post effect] | Can be used to enable or disable a specific post effect, depending on the specified name. |
night | The command enables or disables night. |
filewatcher | This command enables or disables the filewatcher. |
createlean | The command generates LEAN textures. |
helplog | After using this command, a full list of all HOI4 console commands will be outputted to the game.log file. |
hsv | The command converts HSV to RGB. |
tag_color [rgb] | Players can use this command to set the tag color of your current country. |
browser [url] | Open the browser window and load the specified [URL]. |
browser_base_url [url] | Sets the URL of the browser. |
aiview | Enables or disables debug info for the AI. |
airealism | Enables or disables realistic AI for the game. |
instant_wargoal | Allows for the application of war goals without any justification. |
set_country_flag [Country Tag] | This command sets the national flag of the specified [Country Tag] as your current nation’s flag. |
set_cosmetic_tag [Country Tag] [Country Tag] | With this command you can change the name and flag of the specified [Country Tag] to that of another country. |
This has been eXputer’s HOI4 Console Commands guide. While you’re here, why not also check out our Marvel Strike Force Tier List.
Was this article helpful?
Thanks! Do share your feedback with us. ⚡
How could we improve this post? Please Help us. ✍