Hearts of iron 4 как изменить версию мода

К нам в ГЕКС поступило множество жалоб, что моды, на которые ранее были подписаны игроки, вроде бы обновлялись (скачивались), но в лаунчере/в игре было видно, что активировалась старая версия установленного ранее мода. Данное руководство позволит решить эту проблему со всеми модами для HoI4 и Stellaris.Внимание! Изначально это руководство писалось для Стеллариса, поэтому скриншоты взяты из него, единственное отличие – все манипуляции Вы делаете с папкой Hearts of Iron IV, а не Stellaris.

Overview

К нам в ГЕКС поступило множество жалоб, что моды, на которые ранее были подписаны игроки, вроде бы обновлялись (скачивались), но в лаунчере/в игре было видно, что активировалась старая версия установленного ранее мода. Данное руководство позволит решить эту проблему со всеми модами для HoI4 и Stellaris.Внимание! Изначально это руководство писалось для Стеллариса, поэтому скриншоты взяты из него, единственное отличие – все манипуляции Вы делаете с папкой Hearts of Iron IV, а не Stellaris.

Симптомы проблемы

  • Вы подписаны на мод, и видите, что вышло обновление – но в лаунчере старая версия или несовместимая версия.
  • Мод активирован, но в игре ничего не поменялось, хотя в новой версии мода заявлены изменения.
  • Вышеописанные проблемы имеют место, но Вы уверены, что обновление мода скачалось, т.к. в меню «Загрузки» вы видите нечто вроде этого:

Т.е. вы все сделали как обычно, Ваши любимые моды обновляются, но при этом… не обновляются. Отписка от мода и повторная подписка не помогают. При этом, если Вы подпишитесь на новый мод – он загружается в Мастерской, активируется в лаунчере и в игре тоже с ним тоже все в порядке. Знакомая ситуация?

Большая и важная просьба

Прежде чем мы перейдем к самому интересному, у нас к Вам будет громадная просьба, учитывая глобальность проблемы. Тысячи игроков не могут получить обновления модов и не в курсе как эту проблему исправить.

Поэтому убедительно просим Вас:

  • Оценить руководство.
  • Добавить руководство в избранное.
  • И самое Важное – поделится им с Вашими друзьями в Стиме.

Примерно вот так:

и вот так:

Также приглашаем Вас в нашу группу ГЕКС. Будем Вам признательны, если Вы присоединитесь к нам и пригласите Ваших друзей (только фанатов стратегий Paradox). Добро пожаловать: [link]. Спасибо!
Двигаемся дальше.

Поиск папки Hearts of Iron IV в Документах

Имея громадный опыт технической поддержки наших модов, я напишу инструкцию очень подробно. Даже слишком подробно. Ну очень слишком даже череcчур подробно. Просьба отнестись с пониманием.

Если Вы тертый калач и понимаете что нужно найти – можете пропустить этот этап и сразу перейти в конец руководства, где весь процесс решения проблемы описан в одном предложении.

ШАГ 1. Закройте Стим.

Нужно его закрыть совсем и полностью, т.е. в трее кликнуть правой кнопкой на иконку Стим и нажать Выход. Вот так:

ШАГ 2. Находим папку: Мои документыParadox InteractiveHearts of Iron IV

Не смейтесь, на этом этапе заканчивались очень многие попытки поиграть в игры Paradox c модами, особенно вот с этим.

Итак, искомый путь по умолчанию для Stellaris:

C:UsersAdminDocumentsParadox InteractiveHearts of Iron IV

Вместо Аdmin должно быть Ваше имя пользователя в Windows.

Для совсем неопытных пользователей: Вы можете попасть в эту же папку через Мой Компьютер:

  1. Откройте папку Мой Компьютер. Вы увидите примерно следующие (в зависимости от операционной системы интерфейс может отличаться, но незначительно):

  2. Войдите в папку Документы и найдите в ней папку Paradox Interactive:
  3. В папке Документы найдите папку Hearts of Iron IV и откройте ее.

И ни капельки не сложно. Двигаемся дальше.

Удаляем лишнее и старое

Итак, Вы в папке Hearts of Iron IV:


Здесь нас интересуют две папки: workshop и mod.

Наша задача – спрятать эти папки от игры (или их содержимое).

Шаг 1. Переименовываем обе папки

Называем произвольно – цель просто изменить имя, чтобы игра их не могла найти, например в workshop_old и mod_old:


————

Важно! Ниже информация для создателей модов и для тех, кто устанавливает моды вручную…

Если Вы качаете моды исключительно через подписку в Мастерской Стим – проигнорируйте следующие разделы: Для авторов модов и Осторожно, ахтунг!

Для авторов модов

Авторы модов, будьте осторожны! Вы храните Ваши моды именно в папке mod. Но Вы профи, поэтому я советую Вам не переименовывать папку mod, а только удалить из нее файлы и только тех модов, на которые вы подписаны в Мастерской Стим.

Осторожно, ахтунг!

Информация для тех, кто специально использует старые версии модов или устанавливает моды вручную не из Мастерской Стим:

  • Если Вы очень давно не играли, но были ранее подписаны на моды в Мастерской.
  • Если Вы на некоторые моды подписаны в Мастерской, а некоторые устанавливаете вручную в папку mod.
  • Если Вы используете лично Вами модифицированные моды и храните их в папке mod.
  • Вы доигрываете партию со старыми модами на старой версии игры…

То удалите из папки mod только те моды (и папку/архив с модом и файл *.mod), на которые Вы подписаны в мастерской и которые должны обновляться! И соответственно оставьте те моды, которые Вы устанавливали вручную (естественно только в том случае, если они Вам нужны).

В итоге мы сделали так, что игра при следующем запуске не увидит устаревшие моды. Осталось совсем чуточку.

P.S. Теоретически папки можно удалить, а не переименовывать, но в целях безопасности и душевного спокойствия – предлагаю сделать переименование.

Проверяем кэш и запускаем игру

Шаг 1. Запускаем Стим

Шаг 2. Переходим в Библиотеку

Шаг 3. Кликаем на названии игры Hearts of Iron IV правой кнопкой мыши и выбираем Свойства

Шаг 4. В появившемся окне переходим на вкладку ЛОКАЛЬНЫЕ ФАЙЛЫ и нажимаем ПРОВЕРИТЬ ЦЕЛОСТНОСТЬ КЭША…

Шаг 5. Ждем завершения процесса…

Это может занять несколько минут – 3-5 минут максимум.

Нажимаем Закрыть.

Шаг 6. Запускаем игру – видим лаунчер, но НЕ СТАРТУЕМ ИГРУ. После появления лаунчера считаем до пяти и выходим из него. Повторяем операцию 2-3 раза. Это нужно, чтобы моды докачались и докачались новые служебные файлы.

Шаг 7. Готово! Запускаем игру, активируем нужные нам моды в лаунчере и играем

P.S. Если все нужные моды на месте, можете удалить ранее переименованные папки (в нашем случае workshop_old и mod_old). Если не все моды на месте, поищите их в в ранее переименованной папке mod_old и перенесите вручную в новую папку mod, которая появилась возле переименованной.

На этом все и спасибо за внимание! Не забудьте поставить оценку и поделиться с друзьями данным руководством, а также вступить в нашу Стим группу. А если Вы еще не подписаны на наши замечательные моды… Вы знаете, что делать.

Анализ проблемы и быстрорешение

Информация для старожилов и просто интересующихся.

Так что же произошло? В чем корень проблемы?

С недавних пор (лето 2016) Стим выборочно изменил алгоритм загрузки модов для Stellaris и Hearts of Iron 4, но забыл согласовать это с разработчиками игр. И вроде бы новый алгоритм зацепил не всех игроков (предположительно). Более того, в нашей нише игр новый алгоритм стал работать только со Стелларисом и HoI4, в EU4 и СK2 моды загружаются и хранятся по старинке.

Напомним:

  1. Совсем пресовсем давно моды всегда хранились по пути:
    C:UsersUsernameDocumentsParadox InteractiveGameNamemod
    (Например ДокументыParadox InteractiveStellarismod)
  2. Не так давно – с весны 2016 года моды переехали в папку вида:
    C:UsersUsernameDocumentsParadox InteractiveGameNamemodworkshopcontentGameID и в ней уже хранятся моды в папках не по названию, а по id мода в Мастерской (Например для Стеллариса это: C:UsersAdminDocumentsParadox InteractiveStellarisworkshopcontent281990)
  3. Ну и совсем недавно без предупреждения и объявления войны Стим передислоцировал моды в папку:
    …SteamsteamappsworkshopcontentGameName и далее моды в папках по id мода в Мастерской.
    На моем примере для Стеллариса это путь:
    c:Steamsteamappsworkshopcontent281990
    Т.е. моды переехали непосредственно в папку Стим.

И тут начинается самое интересное!
Для Стеллариса и ХоИ4, как и для других игр от Paradox НАИВЫСШИЙ ПРИОРИТЕТ остался для МОДОВ ИЗ ПАПКИ ДОКУМЕНТЫ и именно они отображаются в лаунчере при запуске игры!

Т.е. моды в Мастерской скачиваются, лежат себе обновленные в корневой папке Стима, а игры при запуске все равно берут уже устаревшие моды из папки ДокументыParadox InteractiveИмяИгры – mod или workshop, до тех пор, пока Вы их не удалите.
Естественно подписчики грешат на разработчиков модов, т.к. вся эта катавасия для рядового пользователя происходит незаметно.

Соответственно для старожилов решение проблемы в одном предложении:

При выключенном Стиме снесите или переименуйте папки workshop и mod из папки игры в Документах и проверьте кэш игры.

P.S. Обратите внимание – теперь в папке mod в документах будут храниться только файлы вида ugc_id_мода.mod. По факту это те же старые добрые *.mod файлы, просто пути в них теперь прописываются в папку …Steamsteamappsworkshopcontent…

Руководство актуально на 18 августа 2016 года. Если что-то поменяется, пишите в комментариях – обновлю.

В фильме снимались

Мы всегда рады Вам!

Группа ГЕКС в Стим: [link]

Сайт ГЕКС с меркантильной мутинизацией: [link]

Наши моды локализации:

Stellaris: [link]

Hearts of Iron IV: [link]

Europa Universalis IV: [link]

Crusader Kings II: [link]

Еще раз спасибо, что присоединились к нам и позвали Ваших друзей.

Starting to mod in HOI4 is a long journey. HOI4 and in fact most Paradox games are very easy to mod, and spending a small amount of time to learn the code is enough to start modding; however this isn’t the case for adding new graphics, provinces or juggling with interface files, which has no documentation at all. It can also be frustrating to learn coding in the first place. If you’re clueless on how to start up, stuck or just want some shortcuts, you’ve come to the right place.

This guide will focus on giving the player a basic grasp on editing localisation files, changing flags and leader portraits. Note that this guide makes the assumption that the reader never has done anything to do with modding, creating content based on coding or anything of that sort. It’s focused towards people who’ve spent their lives reading history books and staring at maps, so discretion is advised to people who are familiar with using coding.

Good places to start off[]

The first few steps are a popular topic and various tutorial videos have been made on it. If you don’t feel like learning modding from text, you can always receive visual guidance. These are some of the videos powerblo thinks are the most useful for starting off.

The playlist by MrKmproductions is by far the most informative and helpful series on Youtube, and help you get quite a far way.

The playlist made by Paradox themselves are the canon resource, and while they cover several complicated schemes(new resources, province editing etc.) it’s not organised or user friendly and I wouldn’t recommend it for the fresh green modder.

These series by The Iron Workshop give several tips on how to make several useful changes, and include a nice introduction on making new provinces.

Along with these videos, the wiki page below shows a good list of sites you can access to learn coding or refer to resources.

Making your First Mod[]

While unfortunately Paradox hasn’t given a lot of documentation about modding, they’ve given a lot of useful tools to help the modder get going. One of these is the ability to create an empty mod in mere seconds. When you launch HOI4, you’ll notice a «Mod Tools» button in the launcher.
Press it, and go to «Create a Mod». When you get in there, you can tamper with the title of your mod and add new tags. Unless you know what you’re doing, it’s advised to set your directory the same name as your mod(or an abbreviate of it) without spaces or slashes. The game version should also be set to the latest current version of the game.
Don’t worry too much if you feel you’ve made a mistake; all of these can be edited later. If you’ve finished with all the new bells and whistles, click create mod and you’re ready to go.

Your New Directory[]

Mods are located in the folder ~/.local/share/Paradox Interactive/Hearts of Iron IV/mod(Mac and Linux) or C;Users<username>DocumentsParadox InteractiveHearts of Iron IVmod (Windows). Inside this folder there should be two nitbits;

  • The mod folder, named what you decided your subdirectory was
  • The .mod file, containing info on how the game should handle your mod folder

The EonAB .mod file looks like this:

name = "End of a New Beginning"

path = "mod/eonab"
tags = {
 "Gameplay"
}
supported_version = "1.4.2"

With both of these folders/files, you should be able to select your mod in the game launcher. Right now it shouldn’t do anything, but content is something you can stack along with time. But before we get working with brand new content, there’s a few precautions and tools you should

now of.

Guidelines[]

  • Never use Notepad as your default text editor. For simplicity, use Notepad++, for convenient folder management use Sublime Text or Atom. All of them are free; it’s recommended to have at least two text editors (powerblo uses Atom to manage his projects and Notepad++ to edit individual files)
  • ALWAYS create a workspace folder(where you do the editing) separate from your Paradox InteractiveHearts of Ironmod directory. Similarly, never edit vanilla files- those edits are permanent unless you reinstall the game.
  • Try not to overwrite vanilla files unless their existence create errors or overwrite your content. It’s almost always advised to create separate files for localisation, events, focus trees, etc.
  • Use repository managing programs like GitHub to keep track of what you’ve changed, and to revert any fatal errors you made. Don’t forget to upload every minor change to GitHub; if your game has errors it’s very easy to go sieve through previous versions if you know what changed through tie.
  • Use proper folder merging tools instead of copy-paste like WinMerge.
  • Don’t forget to use UTF-8 encoding for normal files and UTF-8 BOM files for localisation. Text editors like Atom automatically encode your files into these formats.
  • Have a «project» folder that includes all your resources, your workspace, and plans for coordinated modding.
  • Always have several backup folders if you don’t use GitHub. You won’t regret it when your new edits cause CTDs the second you start the game.
  • Use AFP[1]s or Graphical Tools to reduce coding time and make coding easier, but always use them with caution. They often have several bugs and might delete everything you’ve done if you don’t backup.
  • Proper indentations, comments using # and being smart with paragraphs make reading code much easier for other people. This won’t break your game when you don’t keep it, but it’s much more easier for you as well if you know exactly what’s going on with each line of code.
  • Consult other modders or other mods to get help with things you can’t seem to code — reverse engineering is very useful in both learning and decreasing code time, but never plagiarise other’s work.

Localisation : Adding Loading Tips[]

Now that we’ve created the empty template for a mod, it’s time to create some dummy content. Localisation files are a good place to start, being easy to edit and create.

Localisation files give names to ingame variables, and add text for descriptions. This is where all the ingame text is rendered from, so editing these files would change the text that appears ingame. All localisation files are and should be located in <mod>/localisation. Another important point is that all localisation files have the .yml extension and are encoded in UFT-8 BOM format. If you don’t know what these are, don’t worry; you won’t have to worry about these as long as you’re smart with how you code.

The most straightforward piece of localisation the player first sees are the loading tips[2]; the lines of famous words written on the bottom of the screen while the game is loading. The best way to start off with localisation is to copy the file in the vanilla folder[3] and paste it into your mod, so you don’t have to go through the encoding. Create a new folder within your mod called localisation, and copy the loading_tips_l_english.yml file and paste it in there. When you open it, there will be a list of LOADING_TIP_<number>:0 «<loading tip>» , the code that assigns text to loading tips. Within a localisation file, the variable name goes behind the :0, and the text goes inside the double quotation marks. By changing the text inside the double quotes, you can change what the game displays for the loading text. Every single loading tip has an equal chance to appear while loading, so erasing every other one (leaving just one loading tip in) will make only one loading tip appear for the entire loading process.

Using special nitbits of code you can format your loading tips, and in fact any localisation file.

n : The equivalent of typing Enter, adding this annotation jumps the text down one line. Useful for loading tips (you’ve gotta put the original quoter somewhere) or descriptions when you want them to look tidy. Note that you don’t need to put a space after the annotation, like «nAnd Lewis is to blame.»

» : Since the boundaries of the localisation is defined by quotes, to use quotes inside your text wall this annotation is used. This is optional, luckily HOI4 is smart enough to let you use normal quotes. However this is recommended for anyone making large scale projects, or just paranoid about how code looks.

UTF-8 and the HOI4 language[]

The traditional Paradox machine, the Clausewitz engine utilises a programming language unique to itself, different from the well known Lua or Java. You don’t have to read the stuff below to make portrait or flag mods, but it’s recommended to know what you’re coding in if you want to be good at it.

  • HOI4 has their own ‘coding language’, making it much easier to code but much less versatile. It’s similar to the EU4 or CK2 language, but being a new iteration and a different game there will be several places the code doesn’t overlap.
  • UTF-8 isn’t a language; it’s a format where the game can read code from .txt files. Don’t go looking for UTF-8 encoders and just see if your text editor can do it.
  • Localisations need an extra step named UTF-8 BOM. Not keeping this is a common cause of missing localisation files.
  • The HOI language, HOI-ese doesn’t utilise ;s or <>s, and links how your code is designed to how it functions. This is why using comments(#) is extremely important so you can keep track and have a clean, bugfree code.
  • Indentations(tab and spaces) don’t really matter in HOI-ese in function.
  • HOI-ese operates using .txt files for most code. .yml files are used in localisation, .gui for interface design and .gfx for designating graphic files.
  • HOI-ese is mostly independent from directory for graphic files. This has not been confirmed for coding files, but generally it’s important to have thourough knowledge on the HOI4 directories.
  • Make sure you don’t name any ingame files or variables the same.

We assume that you have basic knowledge of how code works, and have at least common sense on what parentheses or equal signs do. Then now that you’ve got that through, it’s time to start making edits to the actual game.

Changing Country Leaders[]

Perhaps the best of modding HOI4 would be adding new leaders to nations. It’s one of the more simpler, and straightforward changes to start off with.

Adding new country leaders, or replacing them requires you two edit two things;

  • The «history» file of the nation you’re adding a leader for
  • The portrait for your leader

The history file is the first step of adding a leader, faction, party or researched tech for any nation ingame. They’re located in [mod]/history/countries/[TAG].txt. Opening it for the first time is a complicated process; but since we’re simply adding new leaders it’s simple right now.

Let’s take the example of Germany; we’re not fond that Hitler is in power and want to place a yodeling person in his place.

In the GER.txt, searching «Hitler» returns this block:

create_country_leader = {
name = «Adolf Hitler»
desc = «POLITICS_ADOLF_HITLER_DESC»
portrait = «<directory>»
expire = «<date>»
trait = {

}

  1. Automatic File Processor — A set of .bat files that automate simple actions like creating nation history files or converting flag image files.
  2. They’re called loading tips because traditionally (in Paradox games like EU4) they contained tips on how to play the game.
  3. Wherever your HOI4 is installed — the localisations folder

Starting to mod in HOI4 is a long journey. HOI4 and in fact most Paradox games are very easy to mod, and spending a small amount of time to learn the code is enough to start modding; however this isn’t the case for adding new graphics, provinces or juggling with interface files, which has no documentation at all. It can also be frustrating to learn coding in the first place. If you’re clueless on how to start up, stuck or just want some shortcuts, you’ve come to the right place.

This guide will focus on giving the player a basic grasp on editing localisation files, changing flags and leader portraits. Note that this guide makes the assumption that the reader never has done anything to do with modding, creating content based on coding or anything of that sort. It’s focused towards people who’ve spent their lives reading history books and staring at maps, so discretion is advised to people who are familiar with using coding.

Good places to start off[]

The first few steps are a popular topic and various tutorial videos have been made on it. If you don’t feel like learning modding from text, you can always receive visual guidance. These are some of the videos powerblo thinks are the most useful for starting off.

The playlist by MrKmproductions is by far the most informative and helpful series on Youtube, and help you get quite a far way.

The playlist made by Paradox themselves are the canon resource, and while they cover several complicated schemes(new resources, province editing etc.) it’s not organised or user friendly and I wouldn’t recommend it for the fresh green modder.

These series by The Iron Workshop give several tips on how to make several useful changes, and include a nice introduction on making new provinces.

Along with these videos, the wiki page below shows a good list of sites you can access to learn coding or refer to resources.

Making your First Mod[]

While unfortunately Paradox hasn’t given a lot of documentation about modding, they’ve given a lot of useful tools to help the modder get going. One of these is the ability to create an empty mod in mere seconds. When you launch HOI4, you’ll notice a «Mod Tools» button in the launcher.
Press it, and go to «Create a Mod». When you get in there, you can tamper with the title of your mod and add new tags. Unless you know what you’re doing, it’s advised to set your directory the same name as your mod(or an abbreviate of it) without spaces or slashes. The game version should also be set to the latest current version of the game.
Don’t worry too much if you feel you’ve made a mistake; all of these can be edited later. If you’ve finished with all the new bells and whistles, click create mod and you’re ready to go.

Your New Directory[]

Mods are located in the folder ~/.local/share/Paradox Interactive/Hearts of Iron IV/mod(Mac and Linux) or C;Users<username>DocumentsParadox InteractiveHearts of Iron IVmod (Windows). Inside this folder there should be two nitbits;

  • The mod folder, named what you decided your subdirectory was
  • The .mod file, containing info on how the game should handle your mod folder

The EonAB .mod file looks like this:

name = "End of a New Beginning"

path = "mod/eonab"
tags = {
 "Gameplay"
}
supported_version = "1.4.2"

With both of these folders/files, you should be able to select your mod in the game launcher. Right now it shouldn’t do anything, but content is something you can stack along with time. But before we get working with brand new content, there’s a few precautions and tools you should

now of.

Guidelines[]

  • Never use Notepad as your default text editor. For simplicity, use Notepad++, for convenient folder management use Sublime Text or Atom. All of them are free; it’s recommended to have at least two text editors (powerblo uses Atom to manage his projects and Notepad++ to edit individual files)
  • ALWAYS create a workspace folder(where you do the editing) separate from your Paradox InteractiveHearts of Ironmod directory. Similarly, never edit vanilla files- those edits are permanent unless you reinstall the game.
  • Try not to overwrite vanilla files unless their existence create errors or overwrite your content. It’s almost always advised to create separate files for localisation, events, focus trees, etc.
  • Use repository managing programs like GitHub to keep track of what you’ve changed, and to revert any fatal errors you made. Don’t forget to upload every minor change to GitHub; if your game has errors it’s very easy to go sieve through previous versions if you know what changed through tie.
  • Use proper folder merging tools instead of copy-paste like WinMerge.
  • Don’t forget to use UTF-8 encoding for normal files and UTF-8 BOM files for localisation. Text editors like Atom automatically encode your files into these formats.
  • Have a «project» folder that includes all your resources, your workspace, and plans for coordinated modding.
  • Always have several backup folders if you don’t use GitHub. You won’t regret it when your new edits cause CTDs the second you start the game.
  • Use AFP[1]s or Graphical Tools to reduce coding time and make coding easier, but always use them with caution. They often have several bugs and might delete everything you’ve done if you don’t backup.
  • Proper indentations, comments using # and being smart with paragraphs make reading code much easier for other people. This won’t break your game when you don’t keep it, but it’s much more easier for you as well if you know exactly what’s going on with each line of code.
  • Consult other modders or other mods to get help with things you can’t seem to code — reverse engineering is very useful in both learning and decreasing code time, but never plagiarise other’s work.

Localisation : Adding Loading Tips[]

Now that we’ve created the empty template for a mod, it’s time to create some dummy content. Localisation files are a good place to start, being easy to edit and create.

Localisation files give names to ingame variables, and add text for descriptions. This is where all the ingame text is rendered from, so editing these files would change the text that appears ingame. All localisation files are and should be located in <mod>/localisation. Another important point is that all localisation files have the .yml extension and are encoded in UFT-8 BOM format. If you don’t know what these are, don’t worry; you won’t have to worry about these as long as you’re smart with how you code.

The most straightforward piece of localisation the player first sees are the loading tips[2]; the lines of famous words written on the bottom of the screen while the game is loading. The best way to start off with localisation is to copy the file in the vanilla folder[3] and paste it into your mod, so you don’t have to go through the encoding. Create a new folder within your mod called localisation, and copy the loading_tips_l_english.yml file and paste it in there. When you open it, there will be a list of LOADING_TIP_<number>:0 «<loading tip>» , the code that assigns text to loading tips. Within a localisation file, the variable name goes behind the :0, and the text goes inside the double quotation marks. By changing the text inside the double quotes, you can change what the game displays for the loading text. Every single loading tip has an equal chance to appear while loading, so erasing every other one (leaving just one loading tip in) will make only one loading tip appear for the entire loading process.

Using special nitbits of code you can format your loading tips, and in fact any localisation file.

n : The equivalent of typing Enter, adding this annotation jumps the text down one line. Useful for loading tips (you’ve gotta put the original quoter somewhere) or descriptions when you want them to look tidy. Note that you don’t need to put a space after the annotation, like «nAnd Lewis is to blame.»

» : Since the boundaries of the localisation is defined by quotes, to use quotes inside your text wall this annotation is used. This is optional, luckily HOI4 is smart enough to let you use normal quotes. However this is recommended for anyone making large scale projects, or just paranoid about how code looks.

UTF-8 and the HOI4 language[]

The traditional Paradox machine, the Clausewitz engine utilises a programming language unique to itself, different from the well known Lua or Java. You don’t have to read the stuff below to make portrait or flag mods, but it’s recommended to know what you’re coding in if you want to be good at it.

  • HOI4 has their own ‘coding language’, making it much easier to code but much less versatile. It’s similar to the EU4 or CK2 language, but being a new iteration and a different game there will be several places the code doesn’t overlap.
  • UTF-8 isn’t a language; it’s a format where the game can read code from .txt files. Don’t go looking for UTF-8 encoders and just see if your text editor can do it.
  • Localisations need an extra step named UTF-8 BOM. Not keeping this is a common cause of missing localisation files.
  • The HOI language, HOI-ese doesn’t utilise ;s or <>s, and links how your code is designed to how it functions. This is why using comments(#) is extremely important so you can keep track and have a clean, bugfree code.
  • Indentations(tab and spaces) don’t really matter in HOI-ese in function.
  • HOI-ese operates using .txt files for most code. .yml files are used in localisation, .gui for interface design and .gfx for designating graphic files.
  • HOI-ese is mostly independent from directory for graphic files. This has not been confirmed for coding files, but generally it’s important to have thourough knowledge on the HOI4 directories.
  • Make sure you don’t name any ingame files or variables the same.

We assume that you have basic knowledge of how code works, and have at least common sense on what parentheses or equal signs do. Then now that you’ve got that through, it’s time to start making edits to the actual game.

Changing Country Leaders[]

Perhaps the best of modding HOI4 would be adding new leaders to nations. It’s one of the more simpler, and straightforward changes to start off with.

Adding new country leaders, or replacing them requires you two edit two things;

  • The «history» file of the nation you’re adding a leader for
  • The portrait for your leader

The history file is the first step of adding a leader, faction, party or researched tech for any nation ingame. They’re located in [mod]/history/countries/[TAG].txt. Opening it for the first time is a complicated process; but since we’re simply adding new leaders it’s simple right now.

Let’s take the example of Germany; we’re not fond that Hitler is in power and want to place a yodeling person in his place.

In the GER.txt, searching «Hitler» returns this block:

create_country_leader = {
name = «Adolf Hitler»
desc = «POLITICS_ADOLF_HITLER_DESC»
portrait = «<directory>»
expire = «<date>»
trait = {

}

  1. Automatic File Processor — A set of .bat files that automate simple actions like creating nation history files or converting flag image files.
  2. They’re called loading tips because traditionally (in Paradox games like EU4) they contained tips on how to play the game.
  3. Wherever your HOI4 is installed — the localisations folder

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Heading marker error
  • Insurgency sandstorm ошибка easyanticheat
  • Installing this may take a few minutes wslregisterdistribution failed with error 0x80370102
  • Installing this may take a few minutes wslregisterdistribution failed with error 0x80070422
  • Installation failed with error 0x80070002 гугл хром что делать

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии