[HOI4 Modding] Using Variables

Опубликовано: 25 Март 2026
на канале: The Iron Workshop
15,633
321

This lesson will explain how to create, change and use variables in Hearts of Iron 4. It will also explain how to use variables in localization and check their values with the in game console.

Timestamps for this tutorial/lesson:
00:00 - Lesson Start
00:19 - Lesson contents
02:18 - Basic of variables
06:28 - When to use variables
09:20 - Basic commands
14:11 - In game examples
------- Extra Syntax -------
32:36 - Using variables in localization
37:28 - Using variables as even targets
40:51 - Using temporary variables
44:29 - Using random variables

Useful links:

Iron Workshop Discord server:   / discord  
My twitch channel:   / playerhoi  

Hearts of Iron IV wiki modding page: https://hoi4.paradoxwikis.com/Modding
HOI4 Wiki Variables page: https://hoi4.paradoxwikis.com/Variables

If you would like to contribute to make the Iron Workshop better you can do so on Patreon:   / playerhoi  

Here are the download links to the various tools used during The Iron Workshop lessons/tutorials.

Notepad++ Download: https://notepad-plus-plus.org/downloads/

Please consider disabling your AdBlocker on YouTube to support this channel and any other channel that creates content you enjoy and makes revenue from ads.