[HOI4 Modding] Using Variables

  Рет қаралды 11,065

The Iron Workshop

The Iron Workshop

Күн бұрын

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: hoi4.paradoxwikis.com/Modding
HOI4 Wiki Variables page: 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: notepad-plus-plus.org/downloads/
Please consider disabling your AdBlocker on KZbin to support this channel and any other channel that creates content you enjoy and makes revenue from ads.

Пікірлер: 24
@generalbashar2256
@generalbashar2256 3 жыл бұрын
BTW when you open up the console you can hit the up arrow key to have the console put in your last command even from a different mod or game launch, just so you don't have to type in the command over and over again.
@TheMacke9
@TheMacke9 11 ай бұрын
Thank you so much for your modding videos! They are incredibly useful and have helped me loads with my modding adventures. This video made me finally understand how paradox variables work.
@DaredeviIGR
@DaredeviIGR 3 жыл бұрын
Hey man, first of all thanks for these videos. Really useful when I started a couple months ago. Currently I am pretty used to stuff like these, but I'd still like to ask. On 8:15 you mention using variables as a cooldown. I imagine a on_daily is used under certain conditions? How heavy is on_daily_TAG in general? I am so afraid to use it because I fear I will rely upon it.
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
As long as you don't overuse it it should be fine, limiting the effect with an if statement is highly recommended and you can also use on_weekly to make it less painful... While it won't look as good as a daily ticker it can be worth it.
@DaredeviIGR
@DaredeviIGR 3 жыл бұрын
@@TheIronWorkshop Yea basically that was my doubt. Does the if case actually minimize the performance loss, or considering you have to check ifs every day you still suffer a lot anyways I wish there was a way where i would completely stop an on_daily after a point, without even the need to go through its if clause.
@ParasaurolophusEwan
@ParasaurolophusEwan 7 ай бұрын
Hoi4 modding help needed: i have a state modifier that is added by a decision, but for some reason it keeps deleting itself after one ingame day!
@Freef_01
@Freef_01 Жыл бұрын
I've already heard it's impossible but I wanna ask anyway: Is there a way to combine a variable and a String/Text? I want to try making a random main menu theme on game startup, so I had the idea to make different main menu music files with a number at the back, then in the music.asset file do something like file = "mainmusic" + var:random_music + ".ogg"
@cirianar
@cirianar 3 жыл бұрын
Could you make a video about how to mod interfaces?
@mota478
@mota478 Жыл бұрын
I want to create a dynamic modifiers like the soviet have with their The red army buff
@trihermawan9553
@trihermawan9553 3 жыл бұрын
Quick question, how can u spawn a naval unit through national focus? I mean the land units was pretty straightforward because there's many example of them in vanilla focus tree, but I can't seems to find any navy unit
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
Same way, your OOB just needs to contain naval units.
@trihermawan9553
@trihermawan9553 3 жыл бұрын
​@@TheIronWorkshop tried it, but it wont spawn, i used create_unit syntax and copy the ships from OOB. this is the syntax that i tried : random_owned_controlled_state = { prioritize = { 335 } create_unit = { ship = { name = "KRI Palembang" definition = battleship equipment = { ship_hull_heavy_1 = { amount = 1 owner = INS version_name = "Palembang Class" } } } } }
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
Not this way, use the load_oob command and load an oob file that has the ships where you want them to be.
@trihermawan9553
@trihermawan9553 3 жыл бұрын
@@TheIronWorkshop so first i have to create an OOB file in advance and name it for example INS_naval, and just type load_oob = INS_naval?
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
Exactly
@user-nm1jt7hz8x
@user-nm1jt7hz8x Ай бұрын
how do I add up two variables?
@mhumanworldm
@mhumanworldm 3 ай бұрын
How do I make dynamic modifiers?
@muse5722
@muse5722 3 жыл бұрын
Any chance of a return to eu4 lessons?
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
I am in the process of renewing the EU4 lessons and will probably have some new lessons posted too
@adama.4521
@adama.4521 3 жыл бұрын
Please i have prb i dont can publique my mod in steam
@killerking1987
@killerking1987 2 жыл бұрын
of course you would have an nft picture.
[HOI4 Modding] AI Modding
18:46
The Iron Workshop
Рет қаралды 9 М.
[HOI4 Modding ] Creating a new country
32:42
The Iron Workshop
Рет қаралды 305 М.
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 86 МЛН
1❤️
00:20
すしらーめん《りく》
Рет қаралды 33 МЛН
[HOI4 Modding] Creating a basic focus tree
38:30
The Iron Workshop
Рет қаралды 208 М.
Motorized Only In 2023 Is OP! Hearts of Iron 4
19:15
Alex The Rambler!
Рет қаралды 70 М.
Hearts Of Iron 4 Modding Has Gone Too Far
17:16
iSorrowproductions
Рет қаралды 424 М.
[HOI4 Modding] Creating New Characters
1:08:14
The Iron Workshop
Рет қаралды 85 М.
[HOI4 Modding] Creating New States
21:03
The Iron Workshop
Рет қаралды 61 М.
The Hoi4 Mod That Changes Everything - Hearts Of Iron 4
13:27
iSorrowproductions
Рет қаралды 829 М.
HOI4: How to Overthrow Stalin with No Base and Without Sabotage
16:41
Hearts of Iron IV | Säkkijärven Polkka [Full Version]
2:03
Hearts Of Iron IV
Рет қаралды 1,8 МЛН
[HOI4 Modding ] Creating New Ideas
30:12
The Iron Workshop
Рет қаралды 53 М.
Boy's Magic Magnet! | NEW EPISODES COMING IN JUNE (Animation Meme) #boyanddragon #shorts
0:31
Факты, Спасающие Жизнь 7 🔥
0:38
Глеб Рандалайнен
Рет қаралды 3,7 МЛН
Toshiba Refrigerator Flagship Store Toshiba Ice Refrigerator
0:19
Blueberry Lutein
Рет қаралды 19 МЛН
#Roblox но моя сестра в ярости от такого подарка..🫣 #Lipt04ka
0:36
Липточка | РОБЛОКС
Рет қаралды 1,4 МЛН
لعبه حبار 112
0:42
عبدو
Рет қаралды 27 МЛН
Minecraft RTX 203% CLUCK KENT #Shorts
0:29
Jake Fellman
Рет қаралды 23 МЛН