[HOI4 Modding] Using On Actions

  Рет қаралды 10,257

The Iron Workshop

The Iron Workshop

Күн бұрын

This lesson will explain how to use on actions, a powerful tool within Hearts of Iron 4 as well as other Paradox titles. See the extra syntax on using if statements together with on actions.
Timestamps for this tutorial/lesson:
00:00 - Lesson start
00:40 - On Actions Pros and Cons
04:10 - Basic of On Actions
07:19 - Creating On Actions
16:40 - Extra Syntax
List of common on actions ( remember to put effect = {} after the name of the on action ):
Note: this is NOT a complete list but should be enough to get your started.
Note 2: In most cases when there is a need for targets for the on action... ROOT is the initiating country and FROM is the target country.
For example, with on_release_as_puppet ROOT is the master that is releasing the country and FROM is the country being released.
on_startup
on_send_volunteers
on_offer_join_faction
on_leave_faction
on_create_faction
on_offer_join_faction
on_state_control_changed
on_war
on_daily
on_weekly
on_release_as_puppet
on_release_as_free
on_civil_war_end
on_new_term_election
on_annex
on_peaceconference_ended
on_war_relation_added
on_government_change
on_subject_free
on_subject_annexed
on_subject_autonomy_level_change
on_puppet
on_capitulation
on_uncapitulation (when a country is freed)
on_nuke_drop
on_declare_war
on_war
on_justifying_wargoal_pulse
on_wargoal_expire
on_army_leader_won_combat
on_army_leader_lost_combat
on_army_leader_promoted
on_paradrop
on_ruling_party_change
-- La Resistance On Actions --
on_operative_on_mission_spotted
on_operative_captured
on_operative_death
on_operative_detected_during_operation
on_operation_completed
Effects for on actions can be found here: hoi4.paradoxwikis.com/Commands
Conditions for on actions can be found here: hoi4.paradoxwikis.com/Conditions
Useful links:
Iron Workshop Discord server: / discord
My twitch channel: / playerhoi
Hearts of Iron IV wiki modding page: hoi4.paradoxwikis.com/Modding
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/
Paint.net Download: www.dotpdn.com/files/paint.ne...
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.

Пікірлер: 44
@Benjamin-pz8fs
@Benjamin-pz8fs 3 жыл бұрын
I'm trying to learn as much as possible before CKIII takes over the channel so it's nice to see you uploading very regularly. Once again thank you for the upload!
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
My pleasure, there are topics I am in a rush to cover before CK3 is released. Hopefully I will be able to do all of them before that happens.
@Benjamin-pz8fs
@Benjamin-pz8fs 3 жыл бұрын
@@TheIronWorkshop You're doing a great job man, uploading this regularly and preparing the lesson files must consume a lot of your time as it is, so any additional HOI4 lessons in the next few weeks are a great bonus. Looking forward to learn some more!
@pillbox2079
@pillbox2079 3 жыл бұрын
@@TheIronWorkshop Wait... will you stop with the tutorials after CKIII?
@Benjamin-pz8fs
@Benjamin-pz8fs 3 жыл бұрын
@@pillbox2079 don't think he will stop but I expect Crusader Kings III to take over the channel for a while :)
@PatriotMapper
@PatriotMapper 3 жыл бұрын
@@pillbox2079 No, he’s making CK3 tutorials now.
@michielo5162
@michielo5162 3 жыл бұрын
Thanks for your tutorials!
@PatriotMapper
@PatriotMapper 3 жыл бұрын
I’m making a Modern Day Mod, so this will be perfect for things like Syrian Civil War! Thank you. Edit: YES! I got the Syrian Civil War to work!
@set1227
@set1227 10 ай бұрын
Mod link?
@PatriotMapper
@PatriotMapper 10 ай бұрын
@@set1227 It was never released (I just didn’t have time to finish it).
@set1227
@set1227 10 ай бұрын
@@PatriotMapper dang sad
@godtierslayer3046
@godtierslayer3046 2 ай бұрын
STILL WATCHING THE GOAT OF HOI4 MODDING 🐐🐐🐐🐐
@pillbox2079
@pillbox2079 3 жыл бұрын
So this... this will be very useful for my mod, actually... I bet that I can use on_startup to show an event as the game loads up. I will test it right now...
@pillbox2079
@pillbox2079 3 жыл бұрын
Ok, this is brilliant! I can do so much stuff with this! Thank you for the video tutorial!
@ivankolosov8381
@ivankolosov8381 3 жыл бұрын
@@pillbox2079 how did you do it? i did everything as he showed and I get the following error message: [19:36:47][effect.cpp:383]: Invalid effect ')' in common/on_actions/AOR_on_actions.txt line : 6 [19:36:47][effect.cpp:284]: Error: "Unknown effect-type: ), near line: 6 " in file: "common/on_actions/AOR_on_actions.txt" near line: 7
@pillbox2079
@pillbox2079 3 жыл бұрын
@@ivankolosov8381 Sorry for the delay. Are you still having the same problem?
@chubby5188
@chubby5188 2 жыл бұрын
awesome thanks!!
@GM-gb1eu
@GM-gb1eu 3 жыл бұрын
nice video
@rehh41
@rehh41 3 жыл бұрын
Nice
@dwayne_-oq1pc
@dwayne_-oq1pc 3 жыл бұрын
Please please make more of these
@torasamurai3929
@torasamurai3929 3 жыл бұрын
@The Iron Workshop Is it possible to add a delya to an on action so for example if i want to have something happen percicely one year after the end of the spanish civil war can I ad some syntax to the effects bracket that adds a dely on when it fires? (I am working with the on end of civil war on action snd my mod is supposed to be used for historical mp so the only civil war should be the spanish)
@torasamurai3929
@torasamurai3929 3 жыл бұрын
how does one tag somebody?
@PolishSoldier1939
@PolishSoldier1939 3 жыл бұрын
Country tag aliases tutorial would be pretty useful.
@Polnisch_StalkerPL
@Polnisch_StalkerPL 3 жыл бұрын
Ty jesteś bart od hpl redux?
@PolishSoldier1939
@PolishSoldier1939 3 жыл бұрын
Tak, to ja, we własnej osobie XD
@Polnisch_StalkerPL
@Polnisch_StalkerPL 3 жыл бұрын
@@PolishSoldier1939 Fajnie
@doktord.8403
@doktord.8403 3 жыл бұрын
Could you make a tutorial how to add something similar to Command Power and PP?
@dodolulupepe
@dodolulupepe 3 жыл бұрын
Are you going to continue this series? It's so useful
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
Yes, once I've covered the basics of CK3 modding I will be making more HOI4 modding stuff.
@dodolulupepe
@dodolulupepe 3 жыл бұрын
@@TheIronWorkshop Thanks!
@yanitar5382
@yanitar5382 3 жыл бұрын
I need a variable tutorial. Please make it. Hi from Russia
@zaidvito4391
@zaidvito4391 3 жыл бұрын
Iron did the old videos work with new launcher
@lukebeich
@lukebeich 3 жыл бұрын
So I suppose the most dangerous on_actions for performance are on_daily/on_weekly/on_monthly... which is why I'm concerned about something: I want to change a global variable periodically, let's say weekly so it will be an on_weekly action, but you said that if I don't limit the effects, they will be applied to all countries. Since I want to make a simple calculation with a global variable that is not tied to a country, if I don't limit the effects, what happens exactly? Let's say that the operation is a simple +1. Will the calculation be repeated for every country simultaneously but with the same final value, so every country does that and the variable will be var+1 at the end? Or is the final value then saved multiple times for each iteration of a country, so the final value will be var + n countries since each added +1? I suppose a simple solution would be to make only one country do this, but what if that country capitulates? I could restrict it to the human player country, but hypothetically I would get the same issue in multiplayer. Do I use a random country each time maybe? What's the best approach here?
@commscan314
@commscan314 3 жыл бұрын
Somehow, a bunch of divisions not willing to perform mitosis are causing HOI4 to not start an American Civil War, because of 'Duplicate Names'. Any help?
@doktord.8403
@doktord.8403 3 жыл бұрын
how do you make a on action happen in a specific time/start date for example one that doesnt happen in 1936 but in 1939
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
You will need to use an if statement and a trigger for a start date. Look at the links i the description of the video and the extra syntax section of the video to understand how to do that. I don't want to flat out give you the solution before you try to find it because that is a very bad way to learn.
@doktord.8403
@doktord.8403 3 жыл бұрын
@@TheIronWorkshop Thanks for the reply helps alot
@chriszupancich5604
@chriszupancich5604 3 жыл бұрын
This has nothing to do with on actions, but whatever. I'm currently making a mod, and I want a random event to fire at a certain interval when the country has a certain national spirit, like the King Carol's lifestyle event in base game. I have the thing in the country history file to kick it all off, and at the end of all the random events, it circles back around to the main hidden event which chooses a random event. However, I keep running into a problem where the events trigger much too quickly, in about 30 day intervals. Here's the syntax: History/countries file: ESA = { random_list = { 100 = { country_event = { id = estoslavia.1 days = 1 } } } } Here's the event file: country_event = { id = estoslavia.1 is_triggered_only = yes hidden = yes immediate = { random_list = { 33 = { country_event = { id = estoslavia.2 days = 170 random_days = 30 } } //train bomb 33 = { country_event = { id = estoslavia.3 days = 170 random_days = 30 } } //assassination 34 = { country_event = { id = estoslavia.4 days = 170 random_days = 30 } } //propaganda } } } What am I doing wrong? Thanks so much. Edit: replaced the # with // because it shows up as a hashtag, but yea those are commented out
@milessmilesbrown6789
@milessmilesbrown6789 3 жыл бұрын
Thanks for the tutorial! Would you happen to know how to name the civil war differently? Rather than the game’s dynamically created names. Instead of the American Civil War it would be called the Fight for Independence or something other than the American Civil War.
@TheIronWorkshop
@TheIronWorkshop 3 жыл бұрын
You can either change the localisation of the civil war wargoal or you can create a new wargoal and give it the name you want.
@milessmilesbrown6789
@milessmilesbrown6789 3 жыл бұрын
@@TheIronWorkshop Thank you! It worked.
@lordbusiness-qs4ok
@lordbusiness-qs4ok 3 жыл бұрын
You should make like a timelapse on making a full scale mod English is not my main language , so My comment may not make sense
[HOI4 Modding] Creating New Music Stations
19:26
The Iron Workshop
Рет қаралды 29 М.
[HOI4 Modding] Using Variables
48:41
The Iron Workshop
Рет қаралды 11 М.
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 7 МЛН
Dynamic #gadgets for math genius! #maths
00:29
FLIP FLOP Hacks
Рет қаралды 18 МЛН
Inca Empire rise and modernization / EU4 RP Storytelling
53:06
[HOI4 Modding ] Creating a new country
32:42
The Iron Workshop
Рет қаралды 304 М.
Ender Pearls can accidentally kill you now and I love it.
8:07
Phoenix SC
Рет қаралды 561 М.
$50 Trillion Was Just Found Under Antarctica
17:41
hoser
Рет қаралды 458 М.
[HOI4 Modding] Creating Decisions and Missions
42:14
The Iron Workshop
Рет қаралды 37 М.
[HOI4 Modding] Creating a basic focus tree
38:30
The Iron Workshop
Рет қаралды 208 М.
[HOI4 Modding] - Creating new events
41:39
The Iron Workshop
Рет қаралды 60 М.
Пять минут до линейки
0:35
ЛогикЛаб
Рет қаралды 3,7 МЛН
СОБИРАЕМ РАДУЖНУЮ ИГРУШКУ #shorts
0:41
Ал Плей
Рет қаралды 3,6 МЛН
Here comes Baby Peach
0:14
Troopa Deluxe
Рет қаралды 12 МЛН
Caseoh VS Sonic & Aphmau | Minecraft & Sonic
0:12
Mischief time
Рет қаралды 11 МЛН
Пьяный дед продал внука в Roblox! 😱 @titwow
0:28