- Video description
- 1 year ago
- 449,168 views
- 10,279 likes
- 781 comments
- - - - - - - - - - - - - - - - - - - -
Hearts of Iron TWO: Darkest Hour
https://www.youtube.com/watch?v=ZU1a2oq3WOM&list=UUPcABVoFfCK5gDfX0PY1KGg
Proof Australia Isn't Real
https://www.youtube.com/watch?v=AJWtfIyOfcE&list=UUPcABVoFfCK5gDfX0PY1KGg
- - - - - - - - - - - - - - - - - - - -
SOCIAL MEDIA
Twitter ► https://twitter.com/drewdurnil
Instagram ► https://www.instagram.com/drewdurnil/
Become a Supporter ► https://www.patreon.com/drewdurnil
Patreon Super Supporters: Furry Cruz, Kaitlyn Liu, Nathaniel H, Maxy G, Tyler, Matthew Rembish, KMT for China, Sisterfister, Leather Daddy Lenin, Franco is T H I C C, SwissAargau, Shawn Spellman, Jake Paul is my Daddy, King Salman, William Bennett, Jens the Luvdisc, Ruserification, Mathew Ellis, Elijah Senpai, kirby, Whion, Elphie C, Jeff, Damien P, Astrakonix, Lauri K, TheUnusualArt, Matthew Bourgeois, Maximaloger,
- Comments
- Related videos
This article is considered accurate for the current version of the game.
Capital provinceRome
Government typeFactionAxis (1940-06-10)
Italy starts with modern-day Italy, Libya, Eritrea and Somalia, but with the Fascist leadership under Mussolini, they are out to restore the old Roman Empire as an Italian Empire.
Historical backgroundEdit
Italy had completed conquests (Ethiopia and Albania) prior to its entry into World War II. Despite the Pact of Steel with Nazi Germany, Italy did not join in the war until June 1940, planning to get a share of Allied territory with the defeat of France. Italy's war effort went poorly, resulting in defeats in Greece, North Africa, Ethiopia, and the Mediterranean Sea. The Allies started to invade Italy in the summer of 1943 and Mussolini's government collapsed.
The new royal government of Marshal Pietro Badoglio signed an armistice with the allies, but most of the country was quickly occupied by the Germans, who established a puppet government under Mussolini in the north, the Italian Social Republic (also known as the Salò Republic, from its headquarters). Badoglio and the king escaped to Brindisi without giving any order to the army, which surrendered to the Germans without putting up a fight. The royal government remained in control of the south, declared war on Germany, and was eventually re-established as the government of all of Italy shortly before the end of the war in the spring of 1945. Significant partisan actions took place in northern Italy. Italy would become a member of NATO after the war, but lost the region of Istria and the Dalmatian city of Zadar to Yugoslavia, and all its colonies excluding Somalia.
TechnologyEdit
Brief overview of nation's technological capabilities.
DiplomacyEdit
Italy starts at war with Ethiopia, which is something they will be focusing on for the first months of the game. The Italian technological superiority pretty much guarantees that they will win the war. The new transportation mechanics makes it less of a hassle to strengthen this theatre, and less of a hassle to move back troops afterwards.
AlliancesEdit
The Axis. = Germany,Japan,Finland.Romania,Hungary,Austria,Spain,Thailand
DecisionsoliticsEdit
Here you can put some stuff that relates to the political situation in-game in 1936 and following years.
National spiritsEdit
Italy starts with two national spirits.
- Vittoria Mutilata, which increases their fascist political leanings, and make them less likely to fall for democracy or communism.
- King Victor Emanuel III, the King provides a small national unity increase each month.
National focusEdit
Italy has an interesting National Focus tree with five different entry points.
- Ethiopian War Logistics - A smaller tree which focuses on industrial build up.
- Army Primacy - Strengthens your army research.
- Mare Nostrum - The big naval strengthening tree.
- Light ship focus - Destroyer & Submarine benefits.
- Triumph in Africa - The big political and diplomatic tree, where you have lots of different choices on who to befriend and conquer.
LawsEdit
MinistersEdit
IntelligenceEdit
Brief overview of nation's intelligence capability in 1936.
EconomyEdit
Here you can type some informative bits about this nation's economy in-game in 1936 and following years.
Industrial ProductionEdit
MilitaryEdit
ArmyEdit
Italy has 39 divisions in 1936, but while that looks strong, it is due to them moving to binary divisions earlier, so each of their divisions has less punching power.
MotorizedEdit
Year | Name | Type |
---|---|---|
1936 | SPA Dovunque 41 | Motorized I |
1941 | Fiat 665NM protetto | Mechanized I |
1943 | Breda 61 | Mechanized II |
1945 | SPA Dovunque 35 protetto | Mechanized III |
TanksEdit
Name | Type | Techyear | Tank Destroyer / SP-Artillery / Armored AA Variants |
---|---|---|---|
Great War Tank | 1918 | None | |
L3 | Light Tank I | 1934 | None |
L6 | Light Tank II | 1936 | None |
L8 | Light Tank III | 1941 | None |
M15 | Medium Tank I | 1939 | M.43 105/25 (TD) / M15/42 Carro Contraereo (AAA) |
M16 | Medium Tank II | 1941 | None |
M20/43 | Medium Tank III | 1943 | None |
P75 | Heavy Tank I | 1934 | None |
P26 | Heavy Tank II | 1941 | None |
P43 | Heavy Tank III | 1943 | None |
Il Duce | Superheavy Tank | 1943 | None |
P45 | MBT | 1945 | None |
NavyEdit
The navy is rather strong with 2 battleships, 8 heavy cruisers & 80 smaller ships, but is not modern either.
Naval UnitsEdit
Name | Type | Techyear |
---|---|---|
? | Destroyer I | 1922 |
? | Destroyer II | 1936 |
? | Destroyer III | 1940 |
? | Destroyer IV | 1944 |
? | Light Cruiser I | 1922 |
? | Light Cruiser II | 1936 |
? | Light Cruiser III | 1940 |
? | Light Cruiser IV | 1944 |
? | Heavy Cruiser I | 1922 |
? | Heavy Cruiser II | 1936 |
? | Heavy Cruiser III | 1940 |
? | Heavy Cruiser IV | 1944 |
? | Battlecruiser I | 1922 |
? | Battlecruiser II | 1940 |
? | Battleship I | 1922 |
? | Battleship II | 1936 |
? | Battleship III | 1940 |
? | Battleship IV | 1944 |
? | Super-heavy Battleship I | 1936 |
? | Super-heavy Battleship II | 1944 |
? | Carrier I | 1922 |
? | Carrier II | 1936 |
? | Carrier III | 1940 |
? | Carrier IV | 1944 |
Air ForceEdit
The Air Force have about 300 fighters and 400 bombers in 1936, but it is not modern.
Light AirframeEdit
Name | Type | Techyear | Carrier Variant |
---|---|---|---|
? | Great War Fighter | 1933 | |
? | Fighter I | 1936 | |
? | Fighter II | 1940 | |
? | Fighter III | 1944 | |
? | Jet Fighter I | 1945 | |
? | Jet Fighter II | 1950 | |
Breda Ba.65 | CAS I | 1936 | |
? | CAS II | 1940 | |
? | CAS III | 1944 | |
? | Naval Bomber I | 1936 | |
? | Naval Bomber II | 1940 | |
? | Naval Bomber III | 1944 |
Medium AirframeEdit
Name | Type | Techyear |
---|---|---|
? | Tactical Bomber I | 1933 |
S.M.79 | Tactical Bomber II | 1936 |
? | Tactical Bomber III | 1940 |
? | Tactical Bomber IV | 1944 |
? | Jet Tactical Bomber I | 1945 |
? | Jet Tactical Bomber II | 1950 |
? | Heavy Fighter I | 1936 |
? | Heavy Fighter II | 1940 |
? | Heavy Fighter III | 1944 |
Heavy AirframeEdit
Name | Type | Techyear |
---|---|---|
? | Stategic Bomber I | 1936 |
P.108B | Strategic Bomber II | 1940 |
? | Stategic Bomber III | 1944 |
? | Jet Stategic Bomber I | 1950 |
Strategies and Guides Edit
Put strategies and guides here to help others play this nation. Please post individual guides under its own subheader.
Example Strategy Edit
Build 2 dockyards and then build only civilian factories for 18+ months. As italy you should focus on winning the war in Africa as soon as possible. To do this you need to secure the Mediterranean so you can send supplies and troops to North Africa. To do this I recomend waiting until the capitulation of France to avoid losing ships against their formidable Mediterranean fleet. During this time I like to build up as much radar coverage as possible in the Med. Once France falls you, send out your entire fleet to a sea zone you have radar in (this will give you an advantage in spotting) while simultaneously using fighters and naval bombers to cover the area. After this, the Brits will likely attack with their capital Med fleet and likely be defeated. I like to have 1-2 carriers, a few battleships, some cruisers and a few dozen destroyers. Once the Med is secure, it should be relatively easy to use your first rate army to push back the sparse allied colonial garrisons (it will be good to have smaller and mobile because once you push into central Africa the front can be very long). I recomend investing in heavy fighters in the early game to help cover the large African and Mediterranean Sea Zones.
Hope this helps!
Miscellaneous tips Edit
Here go miscellaneous tips that don't deserve their own subheader.
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 Edit
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 Edit
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.
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 Edit
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:
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 know of.
Guidelines Edit
- 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 Edit
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.
Skyrim special edition how to clean scripts. Jun 26, 2016 Basic Cleaning. The best tool for cleaning a Skyrim save is called Save Game Script Cleaner. Most cleaning and diagnostics can be done with this tool, and it is fast and simple to operate. Download SGSC and install it to a useful, accessible location. You will be using it plenty. You may also wish to add it to Mod Organizer. Mar 22, 2013 If you uninstalled with NMM, the scripts are gone. However, the scripts are in your savegame and the game is still trying to use them since they were apparently placed on objects/actors still in the game. Nothing you can do about it. If you want them to be truly gone, you need to start over or go back to before you installed the mod. The #1 thing that most people need is to remove script instances that are not attached to anything. Go to the 'Clean' menu and select 'Show Unattached Instances'. This will filter the list and show only the script instances that aren't attached to anything. Go to the 'Clean' menu and select 'Remove Unattached Instances'. Save to a new file. Re-saving removes script names etc. Auto backup, if on,(default) creates a backup from your save, named as backup-date-time.ess and backup-date-time.skse. In versions 2.00Clean other' this cleans orphan array7 items +. Jul 31, 2017 Skyrim bakes script data to save files and unisntalling the mod does not remove it. It only causes errors in Papyrus scripting system. Even if mod does not use any scripts, it's changes would need to be subjects of Skyrim vanilla respawn/refresh system.'
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 Edit
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 Edit
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 = {
}
name = 'Adolf Hitler'
desc = 'POLITICS_ADOLF_HITLER_DESC'
portrait = '<directory>'
expire = '<date>'
trait = {
}
- ↑Automatic File Processor - A set of .bat files that automate simple actions like creating nation history files or converting flag image files.
- ↑They're called loading tips because traditionally (in Paradox games like EU4) they contained tips on how to play the game.
- ↑Wherever your HOI4 is installed - the localisations folder
Paradox Interactive’s Hearts of Iron 4 ( (HoI4) offers you a complex strategy simulation of World War II. In the game, you pick your nation and go into the battle. In this guide we show you some cheats, codes and console commands for Hearts of Iron 4. Check them out below:
To activate cheats and console commands in Hearts of Iron 4, you must first open the console, and then enter the codes. These options are available to open the console - depending on the keyboard layout:
To activate cheats and console commands in Hearts of Iron 4, you must first open the console, and then enter the codes. These options are available to open the console - depending on the keyboard layout:
instant construction (ic) - Activate instant construction cheat.
xp (amount of EP) - Give the player experience points for Army, Navy and Air Force.
more humans (humans) - People are Aded.
pp (fuhrer_mana, political_power) (amount of political power) - Political power is added .
add_opinion (country code) - the specified country opinion is added.
add_interest (country code) - The given country will be added to your interest.
add_core (Province ID) - The specified province is added to a core.
remove_interest (country code) - Remove the specified country from your interest.
research (Research Course ID or 'all') - Technology from a specific research space is explored and all technologies are researched.
research_on_icon_click - Technology is researched, if you click on the Technology Tree icon.
reload supply (relsup) - Start new replenishment systems.
threat (amount of threat) - Display the threat level of a player or increase the same.
time - Display the current time.
version - Display the current version of the game.
debug_zoom - Zoom into the game.
nextsong - Move to next song in the soundtrack list.
nopausetext - Pause banner is displayed or hidden - suitable for screenshots.
resign - The player will be logged out of Hearts of Iron 4
particle_editor - The particle editor opens.
massconquer (massc) - The mass Conquest tool opens.
deltat (speed factor) - Animation speed is changed by the specified value.
goto_province (Province ID) - The view to the specified province is centered.
goto_state (State ID) - The view on the given state is centered.
Debug
debug_tactics - Debug tooltips tactics are displayed or hidden.
debug_events - A count of events is started.
debug_diploactions - A census of diplomatic actions is started.
debug_smooth - Turn Frame Smoothing on or off.
debug_water - Turn water on or off.
debug_trees - Turn on or off the trees.
debug_sky - Turn the sky on or off.
debug_nogui - Turn the graphical user interface on or off.
debug_lockcamera - Turn the camera fixing on or off.
debug_achievements_clear - Delete all user statistics and achievements.
Other Cheats / Commands
ai - Turn AI on or off.
ai_invasion - Turn fleet Invasion AI on or off.
ai_accept(yesman) - The automatic acceptance of AI diplomacy is on or off.
fow(debug_fow) (province-ID Optional) - The fog of war in a province and generally on or off.
collision(debug_collision) - The debug display normal values and collisions on or off.
fronts - Foreign fronts are shown or hidden.
traderoutes - Trade routes are displayed or hidden.
poll - Valid events are retrieved.
winwars - In all wars, the maximum war points are allocated.
deleteallunits(DELALL) - All armies and navies of the countries indicated to be destroyed.
theatersrebuild(trebuild) - All commands are deleted and rebuilt applications.
allowdiplo(adiplo,nocb) - Regardless of the rules, all the diplomatic actions are allowed.
observe(spectator) - Your controls no land and observed what happened.
teleport(tp) (province-ID) - Select armies or ships to be teleported to the specified province.
spawn (subunit-Typ) (province-ID) (Menge) - Spawn any unit in the specified province.
moveunit (units-ID) (Provinz-ID) - Move the specified unit in a desired province.
annex (Country code of the destination country) -Annexation is recognized and the specified country is annexed.
whitepeace(wp) (country codes) - White peace is enforced with the specified countries.
debug_nuking - Allow the use of nuclear weapons without testing conditions.
tag (country codes) - Change the symbol to a different country.
instant_prepare - Fleet invasion is prepared immediately.
Hoi4 Console Commands Faction
event (Event-ID) (Country code of the destination country) - Execute the specified event.
testevent (event-ID) (Character-ID) - Test an event without triggering it.
weather - Turn simulation of the weather on or off.
reloadweather (Random placement) - The weather is recharged and random weather conditions are generated.
setowner (country codes) (Federal State-ID) - Specify the owner of the selected state.
setcontroller (country codes) (Province-ID) - The chancellor of the selected province is determined.
Related Articles
XCOM 2: Cheat Codes - console commands
Stellaris: cheat codes and console commands at a glance
Pillars Of Eternity Cheat Codes - God mode, XP and Gold
Effects (also known as Commands) are used in order to affect the game dynamically from within a specific scope.
Effects are used throughout the game in numerous scopes, most commonly National Focuses, Events and Decisions.
See Variables for information on the variable effects.
Note that certain effects may take a value from a variable, i.e.
add_manpower = var:my_var
.This is noted by <variable> in an effect's parameters.
- 2Any Scope
- 3Country Scope
- 4State Scope
- 5Unit Leader Scope
- 6Flow Control
New Man the Guns Effects[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
remove_decision | Allows to remove specified decision without running remove_effect. | remove_decision = GER_MEPO | Removes a decision. | 1.6 | |
swap_ruler_traits | Similar to swap_ideas. Removes one trait and adds another. | swap_ruler_traits = { remove = <trait> add = <trait> } | Swaps traits. | 1.6 | |
remove_exile_tag | Remove the exile tag on a army leader, making them no longer be considered exile leaders. | remove_exile_tag = { USA = 'Arturo Rawson' } | Removes a leaders exile tag. | 1.6 | |
add_legitimacy | Adds legitimacy to a government in exile. | add_legitimacy = 10 | Adds legitimacy. | 1.6 | |
set_legitimacy | Sets the legitimacy of governments in exile. | set_legitimacy= { POL = 1.0 } | Sets legitimacy. | 1.6 | |
become_exiled_in | Makes a country a government in exile in a set country, with a set starting legitimacy. | become_exiled_in = { target = <Host tag> legitimacy = <0-1> starting legitimacy } | Creates a government in exile. | Must be fired from ROOT, the country that should be exiled, or a TAG specification must be used. | 1.6 |
end_exile | Ends a government in exile. | end_exile | Ends a government in exile. | 1.6 | |
add_province_modifier | Adds a province modifier. | add_province_modifier = { 5246 = mud } | Adds a province modifier. | New modifiers can be created in the 'weather.txt' file. | 1.6 |
remove_province_modifier | Removes a province modifier. | remove_province_modifier = { 5246 = mud } | Removes a province modifier. | New modifiers can be created in the 'weather.txt' file. | 1.6 |
set_faction_name | Sets a faction name as the loc name. | set_faction_name = SOME_LOC_KEY | Changes faction names. | 1.6 | |
add_nuclear_bombs | Adds nuclear bomb to TAG's stockpile. | add_nuclear_bombs = 100 | Adds specified number of nukes to the country's stockpile | Needs the Nuke tech to use. | 1.6 |
launch_nuke | Nukes a province. | launch_nuke = { | Nukes a province. When using state it nukes a random province in said state, with a preference to enemy occupied provinces. | Requires Nuke tech and nukes. Removes a nuke from stockpile when used. | 1.6 |
inherit_technology | Transfers all of a nations techs to a specified tag. | inherit_technology = CAN | Transfers tech. | Useful in civil wars and when countries split. The scoped country inherits the techs from the targeted TAG so be careful with the scope. | 1.6 |
set_fuel_ratio | Set country's current fuel ratio relative to its capacity. | set_fuel_ratio | Sets country's current fuel ratio. | 1.6 | |
add_mines | Add mines to a strategic region for the current country. | add_mines = { region = 42 mines = 100 } | Add mines to a strategic region. | 1.6 | |
give_resource_rights | Gives resource rights | give_resource_rights = { receiver = ENG state = 291 } | Gives all the resources of a state to the target country | see 04_mtg_on_actions | 1.6 |
remove_resource_rights | Removes resource rights | ENG = { remove_resource_rights = 477 } | Removes given resource rights | 1.6 |
Any Scope[edit]
Can be used in country, state or unit leader scopes.
General[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
set_global_flag | <flag> An unique string to identify the global flag with. | set_global_flag = my_flag | Defines a global flag. | 1.0 | |
clr_global_flag | <flag> The unique string of a global flag to clear. | clr_global_flag = my_flag | Clears a defined global flag. | 1.0 | |
modify_global_flag | flag = <flag> The global flag to modify. value = <value> The value to set it to: 0 or 1 | Modifies a global flag. | Use variables instead. | 1.0 | |
custom_effect_tooltip | <string> An localized string to display in the tooltip. | custom_effect_tooltip = my_tooltip_tt | Displays a localized key in the effect tooltip. | 1.0 | |
log | <string> An string to in the game.log | log = 'myVariable: [?myVariable]' | Displays a string in the game.log when executed. | Accepts all localization commands (i.e. [Root.GetName], etc) | 1.5 |
save_event_target_as | <string> An unique string to identify the event target with. | Saves the current scope as a key. Is cleared once execution ends (i.e. end of event). | Use event_target:<key> to access the scope. Do not use in Scripted GUIs. | 1.0 | |
save_global_event_target_as | <string> An unique string to identify the global event target with. | Saves the current scope as a key. Persists after execution until cleared via effect. | Use event_target:<key> to access the scope. Do not use in Scripted GUIs. | 1.0 | |
clear_global_event_target | <string> The unique string of the global event target to clear. | clear_global_event_target = my_country | Clears a specific global event target. | 1.0 | |
clear_global_event_targets | yes Boolean. | clear_global_event_targets = yes | Clears all global event targets. | 1.0 | |
break | None | break | Stops execution of effects in current scope. | 1.0 | |
sound_effect | <string> A sound reference from an .asset file. | sound_effect = 'boom' | Plays the specified sound once. | 1.0 | |
randomize_weather | <int> A seed integer. | randomize_weather = 12345 | Randomizes the weather with the specified seed. | 1.0 | |
set_province_name | id = <id> The id of the province to be changed. name = <string> The name to change the province to. | Changes the specified province's name to the specified name. | 1.3 | ||
reset_province_name | <id> The id of the province to reset. | Resets the specified province's name. | 1.3 | ||
goto_province | <id> The id of the province go to. | Moves the camera position over the specified province. | 1.0 | ||
goto_state | <scope> / <variable> The id of the state go to. | Moves the camera position over the specified state. | 1.0 | ||
change_tag_from | <scope> / <variable> The country to change from. | Changes the player to the current scope from the target scope. | The country the player becomes needs to be the scope in which the command is used. | 1.0 | |
add_region_efficiency | 1.5 |
Border War[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
start_border_war | change_state_after_war = <bool> Whether the state changes hands after the war. Attacker scope state = <id> / <variable> The attacker state. num_provinces = <id> The number of provinces used in the state. on_win = <id> The event to fire for the attacker on a win. on_lose = <id> The event to fire for the attacker on a loss. on_cancel= <id> The event to fire for the attacker on a draw. Defender scope state = <id> / <variable> The defender state. num_provinces = <id> The number of provinces used in the state. on_win = <id> The event to fire for the defender on a win. on_lose = <id> The event to fire for the defender on a loss. on_cancel= <id> The event to fire for the defender on a draw. | Starts a border war for the specified attacker and defender. The participating countries are the owners of the specified states. | 1.5 | ||
set_border_war_data | attacker = <id> / <variable> The attacker state. defender = <id> / <variable> The defender state. attacker_modifier = <id> / <variable> The modifier applied to attacker strength. defender_modifier = <id> / <variable> The modifier applied to attacker strength. combat_width = <id> / <variable> The combat width used in the border war battle. | Sets the bonuses or penalties for the attacker and defender in an on-going border war. Used after start_border_war. | 1.5 | ||
cancel_border_war | attacker = <id> / <variable> The attacker state. defender = <id> / <variable> The defender state. dont_fire_events = <bool> Stops the events from start_border_war from firing. | Cancels an on-going border war without a winner. | 1.5 | ||
finalize_border_war | attacker = <id> / <variable> The attacker state. defender = <id> / <variable> The defender state. attacker_win = <bool> Makes the attacker the winner. defender_win = <bool> Makes the defender the winner. | Ends an on-going border war. | 1.5 |
Country Scope[edit]
The effects here must be used within a country scope.
General[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
set_country_flag | <flag> An unique string to identify the country flag with. | set_country_flag = my_flag | Defines a country flag. | 1.0 | |
clr_country_flag | <flag> The unique string of a country flag to clear. | clr_country_flag = my_flag | Clears a defined country flag. | 1.0 | |
modify_country_flag | flag = <flag> The country flag to modify. value = <value> The value to set it to: 0 or 1 | Modifies a country flag. | Use variables instead. | 1.3 | |
country_event | id = <event> The event to fire. days = <event> / <variable> Fires the event in the specified number of days. Optional. hours = <event> / <variable> Fires the event in the specified number of hours. Optional. random = <event> Adds a random number (between 0 and random, inclusive) of hours to the scheduled fire time. Optional. | Fires the specified event for the current country. | Where triggers do not need to be repeatedly checked random can be a performance light alternative to mean_time_to_happen for scheduling events. | 1.0 | |
news_event | id = <event> The event to fire. days = <event> / <variable> Fires the event in the specified number of days. Optional. hours = <event> / <variable> Fires the event in the specified number of hours. Optional. random = <event> Adds a random number (between 0 and random, inclusive) of hours to the scheduled fire time. Optional. | Fires the specified news event for the current country. | The news event uses a different interface to the country event. Where triggers do not need to be repeatedly checked random can be a performance light alternative to mean_time_to_happen for scheduling events. | 1.0 | |
set_cosmetic_tag | <string> The cosmetic tag to switch to. | Makes the current scope use the specified cosmetic tag, changing name and flag. | 1.3 | ||
drop_cosmetic_tag | <bool> Boolean. | Makes the current scope drop the current cosmetic tag they are using. | 1.3 | ||
set_rule | <rule> Boolean. | Toggles the special game rules for the current scope. | Possible rules:
| 1.0 |
State[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_state_core | <scope> / <variable> The state to add core to. | Adds a core for the current scope to the specified state. | 1.0 | ||
remove_state_core | <scope> / <variable> The state to remove core from. | Removes the core of the current scope from the specified state. | 1.0 | ||
set_capital | <scope> / <variable> The state to make capital. | Makes the specified state the current scope's capital state. | 1.0 | ||
add_state_claim | <scope> / <variable> The state to add a claim to. | Adds a claim for the current scope on the specified state. | 1.0 | ||
remove_state_claim | <scope> / <variable> The state to remove the claim from. | Removes a claim of the current scope from the specified state. | 1.0 | ||
set_state_owner | <scope> / <variable> The state to change ownership of. | Makes the current scope the owner of the specified state. | 1.0 | ||
set_state_controller | <scope> / <variable> The state to change controller of. | Makes the current scope the controller of the specified state. | 1.0 | ||
transfer_state | <scope> / <variable> The state to change owner and controller of. | Makes the current scope the owner and controller of the specified state. | 1.0 | ||
set_province_controller | <id> The province to change controller of. | Changes the controller of the specified province to the current scope. | 1.0 |
Powers[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_political_power | <int> / <variable> The amount to add. | Adds the specified amount of political power to the current scope. | 1.0 | ||
set_political_power | <int> / <variable> The amount to add. | Sets the specified amount of political power for the current scope. | 1.0 | ||
add_stability | <int> / <variable> The amount to add. | Adds to the current stability value for the current scope. | Stability values are between 0 and 1. | 1.5 | |
set_stability | <int> / <variable> The amount to add. | Sets the current stability value for the current scope. | Stability values are between 0 and 1. | 1.5 | |
add_war_support | <int> / <variable> The amount to add. | Adds to the current war support value for the current scope. | War Support values are between 0 and 1. | 1.5 | |
set_war_support | <int> / <variable> The amount to set. | Sets the current war support value for the current scope. | War Support values are between 0 and 1. | 1.5 | |
add_command_power | <int> / <variable> The amount to add. | Adds the specified amount of command power to the current scope. | 1.5 |
Politics[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
kill_country_leader | <bool> Boolean. | Kills the country leader for the current scope. | 1.0 | ||
retire_country_leader | <bool> Boolean. | Retires and removes the country leader as head of their party for the current scope. | 1.0 | ||
set_country_leader_ideology | <government> The government to set. | Changes the country leader's government type for the current scope. | 1.0 | ||
add_country_leader_trait | <trait> The trait to add. | Adds the specified trait to the current scope's country leader. | Traits are found in /Hearts of Iron IV/common/country_leader/*.txt. | 1.0 | |
remove_country_leader_trait | <trait> The trait to remove. | Removes the specified trait from the current scope's country leader. | Traits are found in /Hearts of Iron IV/common/country_leader/*.txt. | 1.0 | |
hold_election | <scope> The country to hold an election for. | Executes the events in the on_new_term_election on action for the current scope. | 1.0 | ||
add_popularity | ideology = <ideology> The party to change. popularity = <int> / <variable> The amount of popularity to change. | Adjusts the popularity for the specified party in the current scope. | Values used are 0 to 1. | 1.0 | |
set_politics | ruling_party = <ideology> The party to set. elections_allowed = <bool> Whether elections are allowed. Optional. last_election = <date> When the last election was. Optional. election_frequency = <int> How often in months an election occurs. Optional. | Sets the political party setup for the current scope. | Previously included the 'parties' parameter, which has been deprecated by the 'set_popularities' command. The 'parties' parameter no longer works as of version 1.7 | 1.0 (Updated 1.7) | |
set_popularities | <ideology> = <int>/<variable> The popularity to set. | Sets the political party popularities for the current scope. | The popularities must add up to 100, otherwise the command will have no effect. | 1.7 | |
set_political_party | ideology = <ideology> The party to change. popularity = <int> The amount of popularity to set. | Sets the popularity for the specified political party in the current scope. | 1.0 | ||
set_party_name | ideology = <ideology> The party to change. long_name = <string> The new full name for the party. name = <string> The new short name for the party. | Changes the name of the specified political party for the current scope. | 1.0 | ||
create_country_leader | name = <string> The name of the leader. desc = <string> The description of the leader. picture = <string> The graphical reference to the leader portrait. expire = <string> When the leader dies in history. ideology = <string> The ideology government the leader belongs to. Traits scope <trait> The trait to add. Can add multiple. | The portrait string can include the full path (i.e. gfx/leaders/my_folder/custom_pic.dds) or just the name of the image (i.e. custom_pic.dds). With just the name, the image must be in a folder that matches the tag of the current scope, for example /Hearts of Iron IV/gfx/leaders/GER/custom_pic.dds. | 1.0 |
Diplomacy[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
set_major | <bool> Boolean. | Makes the current scope a major country. | 1.0 | ||
create_faction | <string> The name of the faction. | Creates a faction with the specified name for the current scope. The current scope and any subjects automatically join the faction. | 1.0 | ||
add_to_faction | <TAG> The TAG of the nation to add to the faction of the current scope. | Adds the TAG_TO_ADD to the faction of the FACTION_LEADER_TAG. | 1.0 | ||
leave_faction | <bool> Boolean. | Removes the current scope from the faction they are part of. | 1.5 | ||
remove_from_faction | <string> The name of the faction. | Removes the current scope from the specified faction. | 1.0 | ||
dismantle_faction | <bool> Boolean. | Dismantles the faction of the current scope. | 1.0 | ||
puppet | <scope> The target country. | Makes the specified country the puppet of the current scope. | 1.0 | ||
end_puppet | <scope> The target country. | Removes the puppet status between the target and the current scope. | 1.0 | ||
release | <scope> The target country. | Releases the specified subject or core-only country as a free nation. | 1.0 | ||
release_puppet | <scope> The target country. | Releases the specified subject or core-only country as a puppet for the current scope. | 1.0 | ||
give_guarantee | <scope> The target country. | Makes the current scope guarantee the specified country. | 1.0 | ||
give_military_access | <scope> The target country. | Makes the specified country grant the current scope military access to their country. | 1.0 | ||
recall_attache | <scope> The target country with an attache. | Recalls the current scope's attache from the specified country. | 1.5 | ||
diplomatic_relation | country = <scope> The target country to alter the relationship with ROOT. relation = <type> The relation to change. active = <bool> Whether the relation is started or broken. | Used to define a diplomatic relation between the current scope and target scope country. | Possible relations:
| 1.0 | |
add_opinion_modifier | target = <scope> The target country. modifier = <modifier> The opinion modifier to add. | Adds the specified opinion modifier for the current scope towards the specified scope. | Opinion modifiers are found in /Hearts of Iron IV/common/opinion_modifiers/*.txt. | 1.0 | |
remove_opinion_modifier | target = <scope> The target country. modifier = <modifier> The opinion modifier to remove. | Removes the specified opinion modifier for the current scope towards the specified scope. | Opinion modifiers are found in /Hearts of Iron IV/common/opinion_modifiers/*.txt. | 1.0 | |
reverse_add_opinion_modifier | target = <scope> The target country. modifier = <modifier> The opinion modifier to add. | Adds the specified opinion modifier for the specified scope towards the current scope. | Opinion modifiers are found in /Hearts of Iron IV/common/opinion_modifiers/*.txt. | 1.0 | |
add_relation_modifier | target = <scope> The target country. modifier = <modifier> The relation modifier to add. | Adds the specified relation modifier for the current scope towards the specified scope. | Relation modifiers are found in /Hearts of Iron IV/common/modifiers/*.txt. | 1.4 | |
remove_relation_modifier | target = <scope> The target country. modifier = <modifier> The relation modifier to remove. | Removes the specified relation modifier for the current scope towards the specified scope. | Relation modifiers are found in /Hearts of Iron IV/common/modifiers/*.txt. | 1.4 |
Subjects[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_autonomy_ratio | value = <float> The freedom score to add. localization = <string> The localization key for the modifier. | Adds a freedom score ratio modifier to the current scope. | Used in the subject. | 1.3 | |
add_autonomy_score | value = <float> The freedom score to add. localization = <string> The localization key for the modifier. | Adds an exact freedom score modifier to the current scope. | Used in the subject. | 1.3 | |
set_autonomy | target = <scope> / <variable> The subject country. autonomy_state = <type> The type of autonomy state to set. freedom_level = <float> The new freedom level value. Optional. | Sets the autonomy level for the specified country. | The autonomy states are found in /Hearts of Iron IV/common/autonomous_states/*.txt. | 1.3 | |
release_autonomy | target = <scope> / <variable> The subject country. autonomy_state = <type> The type of autonomy state to set. freedom_level = <float> The new freedom level value. Optional. | Releases the country and sets the autonomy level for the specified country. | The autonomy states are found in /Hearts of Iron IV/common/autonomous_states/*.txt. | 1.3 |
War[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_threat | <int> The amount to change by. | Adjusts the level of World Tension. | 1.0 | ||
add_named_threat | threat = <int> The amount to change by. name = <string> The localization string. | Adjusts the level of World Tension and adds an entry in the World Tension tooltip. | 1.0 | ||
annex_country | target = <scope> Which country to annex. transfer_troops = yes Whether to transfer the troops of the annexed country. | Annex the specified country for the current scope. | 1.0 | ||
add_to_war | targeted_alliance = <scope> The country to assist. enemy = <scope> The country attacking the ally. hostility_reason = <string> Localization for the reason for joining. Optional. | Adds the current scope into the war of their ally against the specified enemy. | 1.0 | ||
declare_war_on | target = <scope> / <variable> The country to attack. type = <wargoal> The wargoal to declare with. | Makes the current scope declare war on the specified country with the specified wargoal. | Wargoals are found in /Hearts of Iron IV/common/wargoals/*.txt. | 1.0 | |
white_peace | <scope> / <variable> The scope to white peace. <message> The reason for peace. | Makes the current scope white peace the specified scope. | 1.0 | ||
set_truce | target = <scope> The scope to truce with. days = <int> The duration of the truce. | Makes the current scope truce with the specified scope. | 1.0 | ||
create_wargoal | target = <scope> / <variable> The country to target. type = <wargoal> The wargoal to generate. generator = { <state id> } The states to supply the wargoal (i.e. take_state_focus). | Grants the current scope a wargoal against the specified country. | 1.0 | ||
start_civil_war | ideology = <ideology> The ideology of the breakaway country. ruling_party = <ideology> The ruling party of the original country. Optional. size = <float> The size of the breakaway country and the fraction of the original stockpile and military units it will receive. Optional. capital = <state> The capital of the breakaway country. Optional. only_own_territory = <bool> Limits the breakaway country to only own territory. Optional. states = { <state> } The states included in the breakway country. Optional. states_filter = { <triggers> } Filters to apply to the state assignment for the breakaway country. Optional. keep_unit_leaders = { <unit leader id> } Keep the specified leaders. Optional. keep_unit_leaders_trigger = { <triggers> Keep the specified leaders that meet the triggers. Optional. | Starts a civil war for the current scope with the specified parameters. | 1.0 |
Resources[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_resource | type = <resource> The resource to add. amount = <int> The amount of resource to add. state = <id> Which state to add the resource to. | Adds the specified resource in the specified amount to the specified state. | 1.0 | ||
create_import | resource = <resource> The resource to import. amount = <int> The amount of resource to import. exporter = <id> Which country exports the resource. | Creates an import for the current scope with the specified resource and from the specified exporter. | 1.0 |
Buildings[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_offsite_building | type = <building> The building to add. level = <level> / <variable> The maximum level to add. | Adds an off-map building for the current scope that produces its effects without being present in a state. | 1.5 | ||
modify_building_resources | building = <building> The building to modify. resource = <resource> The resource to add. amount = <amount> The amount of resource to add. | Modifies the resource output of the specified building for the current scope. | 1.5 |
National Focus[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
load_focus_tree | <string> The focus tree to load. Alternatively, as an effect block: tree = <string> keep_completed = yes/no | Loads a new focus tree for the current scope, retaining any shared focuses. | 1.5 | ||
unlock_national_focus | <focus> The focus to unlock. | Unlocks the specified focus for the current scope. | 1.0 | ||
complete_national_focus | <focus> The focus to complete. | Completes the specified focus for the current scope. | 1.0 |
Decisions[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
activate_decision | <decision> The decision to activate. | Activates the specified decision for the current scope, ignoring triggers for the decision. | Decisions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.0 | |
activate_targeted_decision | target = <scope> The country to target. decision = <decision> The decision to activate. | Activates the specified targeted decision for the specified target for the current scope. | Decisions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.5 | |
remove_targeted_decision | <decision> The decision to remove. | Removes the specified targeted decision for the current scope. | Decisions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.5 | |
unlock_decision_tooltip | <decision> The decision to display. | Displays a special tooltip for the specified decision in the effect tooltip. | Decisions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.5 | |
unlock_decision_category_tooltip | <category> The decision category to display. | Displays a special tooltip for the specified decision category in the effect tooltip. | Decision categories are found in /Hearts of Iron IV/common/decisions/catergories/*.txt | 1.5 |
Missions[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
activate_mission | <mission> The mission to activate. | Activates the specified mission for the current scope, ignoring any triggers for the decision. | Missions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.5 | |
activate_mission_tooltip | <mission> The mission to display. | Displays a special tooltip for the specified mission in the effect tooltip. | Missions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.5 | |
remove_mission | <mission> The mission to remove. | Removes the specified mission for the current scope. | Missions are found in /Hearts of Iron IV/common/decisions/*.txt | 1.5 |
Technology[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_research_slot | <int> The number of slots to add or remove. | Adjusts the number of research slots the current scope has. Can remove slots. | 1.0 | ||
set_research_slots | <int> The number of slots to set. | Sets the number of research slots the current scope has. | 1.0 | ||
add_tech_bonus | bonus = <float> The bonus to technology given. uses = <int> The amount of times the bonus can be used. ahead_reduction = <float> The cost reduction if ahead of time. category = <string> Which technology category the bonus applies to. Multiple can be defined. technology = <string> Which technology the bonus applies to. Multiple can be defined. | Grants a research bonus to the current scope with the specified parameters. | 1.0 | ||
set_technology | <technology> = <int> The technology to add. | Grants the specified technology to the current scope. | A value of 1 sets the technology. A value of 0 removes the technology, but if it is a researchable technology, the duration to research isn't reset, meaning it can be researched in 1 day. | 1.0 | |
add_to_tech_sharing_group | <string> The group to add the current scope to. | Adds the current scope to the specified technology sharing group. | 1.3 | ||
remove_from_tech_sharing_group | <string> The group to remove the current scope from. | Removes the current scope from the specified technology sharing group. | 1.3 | ||
modify_tech_sharing_bonus | id = <string> The group to modify. bonus = <float> The new bonus. | Modifies the specified technology sharing group. | 1.3 |
Ideas[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_ideas | <idea> The idea to add. | Adds the specified ideas to the current scope. | Can be used as a scope to add multiple at once. | 1.0 | |
add_timed_idea | idea = <idea> The idea to add. days = <int> / <variable> The number of days to add the idea for. | Adds the specified ideas to the current scope for the specified number of days. | 1.0 | ||
modify_timed_idea | idea = <idea> The idea to modify. days = <int> / <variable> The number of days to add to the idea. | Extends the duration of the timed idea by the specified amount. | 1.0 | ||
swap_ideas | add_idea = <idea> The idea to add. remove_idea = <idea> The idea to remove. | Switches two ideas with a tooltip displaying any modifier differences between them. | 1.3 | ||
remove_ideas | <idea> The idea to remove. | Removes the specified idea from the current scope. | Can be used as a scope to remove multiple at once. | 1.0 | |
remove_ideas_with_trait | <trait> The trait to target. | Removes all ideas for the current scope that use the specified trait. | 1.0 | ||
show_ideas_tooltip | <idea> The idea to display. | Displays the specified idea in the tooltip for the current effect scope. Does not add the idea. | 1.0 |
Unit[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
load_oob | <oob> The OOB to load. | Loads the specified OOB for the current scope, applying the effects within. | 1.0 | ||
division_template | name The name of the division. The composition of the division. | Creates and adds the specified division template to the current scope. | The x and y attributes represent the rows and columns in the division designer. | 1.0 | |
set_division_template_lock | division_template = <string> The name of the division template. is_locked = <bool> Whether the division is locked or not. | Toggles the locked status on a division template for the current scope, which prevents editing or deletion. | 1.5 | ||
delete_unit_template_and_units | division_template = <string> The name of the division template. | Deletes the specified division template and all units using it for the current scope. | 1.5 |
Equipment[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
set_equipment_fraction | <float> / <variable> The fraction of equipment to remove. | Reduces the overall equipment stockpile by the specified fraction. | This should not be used in civil wars to simulate stockpile splitting. start_civil_war now automatically divides stockpiles according to the respective size. | 1.0 | |
add_equipment_to_stockpile | type = <equipment> The equipment to add. Can be archetype. amount = <int> The amount to add. producer = <scope> Defines who produced the equipment. Optional. | Adds the specified equipment to the current scope. | Note that removal will only remove equipment with the same producer defined in the effect. | 1.0 | |
send_equipment | type = <equipment> The equipment to add. Can be archetype. amount = <int> / <variable> The amount to add. target = <scope> / <variable> Which country receives the equipment. | Sends the specified amount of equipment to the specified target, removing said equipment from the current scope. | 1.0 | ||
create_production_license | target = <scope> Which country receives the license. cost_factor = <float> Modifies the production cost. Equipment scope type = <equipment> The equipment the country is licensed to produce. Must be an non-archetype equipment. | Grants the specified country a licensed to produce the specified equipment from the current scope. | 1.4 | ||
create_equipment_variant | name = <string> The name of the variant type = <equipment> The equipment the variant is of. parent_version = <int> Ordering for multiple variants. Upgrade scope <upgrade> = <amount> The upgrades configuration for the variant. | Creates the specified equipment variant for the current scope. | 1.0 | ||
add_equipment_production | amount = <int> The amount to produce. Optional. requested_factories = <int> The number of factories to assigned initially. Optional. progress = <float> The initial production progress. Optional. efficiency = <float> The initial production efficiency. Optional. Equipment scope type = <equipment> The name of the equipment to produce. creator = <scope> The country which is producing the equipment. Used if root scope isn't producer. Optional. version_name = <string> The name of the variant to produce. Optional. | Starts a production line for the specified equipment for the current scope. | 1.0 |
Army[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_manpower | <int> / <variable> The amount to add. | Adds the specified amount of manpower to the current scope. | 1.0 | ||
army_experience | <float> / <variable> The amount to add. | Adds the specified amount of army experience to the current scope. | 1.0 | ||
create_corps_commander | name = <string> The name of the leader. picture = <string> The graphical reference of the picture of the leader. skill = <int> The skill of the leader. attack_skill = <int> The attack skill of the leader. defense_skill = <int> The defense skill of the leader. planning_skill = <int> The planning skill of the leader. logistics_skill = <int> The logistics skill of the leader. traits = { <trait> } The traits the leader spawns with. female = <bool> The gender of the leader. | Creates a commander for the current scope with the specified attributes. | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.0 | |
create_field_marshal | name = <string> The name of the leader. picture = <string> The graphical reference of the picture of the leader. skill = <int> The skill of the leader. attack_skill = <int> The attack skill of the leader. defense_skill = <int> The defense skill of the leader. planning_skill = <int> The planning skill of the leader. logistics_skill = <int> The logistics skill of the leader. traits = { <trait> } The traits the leader spawns with. | Creates a field marshal for the current scope with the specified attributes. | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.0 |
Navy[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
navy_experience | <float> / <variable> The amount to add. | Adds the specified amount of navy experience to the current scope. | 1.0 | ||
destroy_ships | type = <ship> The type of ship to destroy. count = <int> or all The amount to destroy. | Destroys the specified type and amount of ships controlled by the current scope. | 1.5 | ||
transfer_navy | target = <scope> The target country. | Transfers the current scope navy to the specified country. | 1.5 | ||
transfer_ship | type = <ship> The type of ship to transfer.<br target = <scope>
| Transfers the specified type of ship from the current scope to the specified country. | 1.4 | ||
create_navy_leader | name = <string> The name of the leader. picture = <string> The graphical reference of the picture of the leader. skill = <int> The skill of the leader. traits = { <trait> } The traits the leader spawns with. | Creates a naval leader for the current scope with the specified attributes. | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.0 |
Air[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
air_experience | <float> / <variable> The amount to add. | Adds the specified amount of air experience to the current scope. | 1.0 | ||
add_ace | name = <string> The name of the ace. surname = <string> The surname of the ace. callsign = <string> The callsign of the ace. type = <type> The ace type. is_female = <bool> The gender of the ace. | Adds an ace for the current scope. | Ace types found in /Hearts of Iron IV/common/aces/*.txt. | 1.0 |
AI[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_ai_strategy | type = <type> The type of strategy. id = <scope> What country the strategy is against. value = <int> The weighting added by the strategy. | Sets an AI strategy for the current scope. | See AI Modding for more details. | 1.0 |
State Scope[edit]
The effects here must be used within a state scope.
General[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
state_event | id = <event> The event to fire. days = <event> / <variable> Fires the event in the specified number of days. Optional. hours = <event> / <variable> Fires the event in the specified number of hours. Optional. random = <event> Adds a random number (between 0 and random, inclusive) of hours to the scheduled fire time. Optional. trigger_for = <scope> Fires event in the specified scope. | Fires the specified event for the current state. | Where triggers do not need to be repeatedly checked random can be a performance light alternative to mean_time_to_happen for scheduling events.Using days = <event> / <variable> or hours may still be bugged and will not fire the event. | 1.0 | |
set_state_flag | <flag> An unique string to identify the state flag with. | set_state_flag = my_flag | Defines a state flag. | 1.0 | |
clr_state_flag | <flag> The unique string of a state flag to clear. | clr_state_flag = my_flag | Clears a defined state flag. | 1.0 | |
modify_state_flag | flag = <flag> The state flag to modify. value = <value> The value to set it to: 0 or 1 | Modifies a state flag. | Use variables instead. | 1.3 | |
set_state_name | <string> Defines the new name. | Changes the current state's name to the specified name. | 1.3 | ||
reset_state_name | <bool> Boolean. | Resets any changes to the current state's name. | 1.3 | ||
add_claim_by | <scope> / <variable> The country to add the claim for. | Adds a claim for the specified country on the current scope. | 1.0 | ||
remove_claim_by | <scope> / <variable> The country to remove the claim for. | Removes a claim by the specified country on the current scope. | 1.0 | ||
add_core_of | <scope> / <variable> The country to add the core for. | Adds a core for the specified country on the current scope. | 1.0 | ||
remove_core_of | <scope> / <variable> The country to remove the core for. | Removes a core for the specified country on the current scope. | 1.0 | ||
set_demilitarized_zone | <bool> Boolean. | Makes the current scope a demilitarized zone. | 1.0 | ||
set_state_category | <category> The category to change to. | Changes the current state category to the specified category. | Categories are found in /Hearts of Iron IV/common/state_category/*.txt | 1.3 | |
add_state_modifier | Modifier scope<modifier> = <float> Adds a modifier to the state. | Adds a modifier to the current state. | 1.3 | ||
add_manpower | <int> / <variable> The amount to add. | Adds the specified amount of manpower to the current state. | 1.0 | ||
add_resource | type = <resource> The resource to add. amount = <int> The amount to add. | Adds the specified resource in the specified amount to the current state. | 1.0 | ||
set_border_war | <bool> Boolean. | Enables Border War status for the current state. | 1.0 | ||
create_unit | division = <division string> The division string. owner = <scope> The owner of the division. prioritize_location = <province> Prioritize the specified province in the state. | Adds the specified division to the current state. | The division string must be formatted as it is seen in the examples. | 1.3 |
Buildings[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
add_building_construction | type = <string> The building to add. level = <int> / <variable> The level to set the building to. instant_build = <bool> Defines whether the buildings are instantly built. province = <id> Defines the exact province to add provincal buildings in. Can be used as a scope. Province scope all_provinces = <bool> Affect all provinces. Used in the province scope. limit_to_coastal = <bool> Affect coastal provinces. Used in the province scope. limit_to_naval_base = <bool> Affect naval base provinces. Used in the province scope. limit_to_border = <bool> Affect border provinces. Used in the province scope. level = <int> Affect only provinces with buildings level below, at or above the specified level. Used in the province scope. id = <id> Affect the specified province. Used in the province scope. | Starts construction in the current state for the specified building. | 1.0 | ||
set_building_level | type = <string> The building to add. level = <int> / <variable> The level to set the building to. instant_build = <bool> Defines whether the buildings are instantly built. province = <id> Defines the exact province to add provincal buildings in. Can be used as a scope. Province scope all_provinces = <bool> Affect all provinces. Used in the province scope. limit_to_coastal = <bool> Affect coastal provinces. Used in the province scope. limit_to_naval_base = <bool> Affect naval base provinces. Used in the province scope. limit_to_border = <bool> Affect border provinces. Used in the province scope. level = <int> Affect only provinces with buildings level below, at or above the specified level. Used in the province scope. id = <id> Affect the specified province. Used in the province scope. | Sets the specified building to the current state (or provinces within the state). | The province scope is used for provincal level buildings. | 1.4 | |
damage_building | type = <building> The building to damage. damage = <float> The amount of damage to inflict. province = <id> The province to target for provincal buildings. | Damages the specified building in the current state. | The health of buildings is determined by the value attribute in a building's definition. This is multiplied by their level to get their total health. | 1.3 | |
remove_building | type = <building> The building to remove. level = <int> / <variable> The levels to remove. | Removes the specified building in the current state. For shared buildings level determines the amount, whereas for the others it is the actual level. | 1.0 | ||
add_extra_state_shared_building_slots | <int> / <variable> The amount of slots to add or remove. | Adjusts the number of shared building slots for the current state. | 1.0 |
Unit Leader Scope[edit]
The effects here must be used within a unit leader scope.
General[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
unit_leader_event | id = <event> The event to fire. days = <event> / <variable> Fires the event in the specified number of days. Optional. hours = <event> / <variable> Fires the event in the specified number of hours. Optional. random = <event> Adds a random number (between 0 and random, inclusive) of hours to the scheduled fire time. Optional. | Fires the specified event for the owner of the current unit leader. | Uses a special interface displaying the current unit leader portrait. Where triggers do not need to be repeatedly checked random can be a performance light alternative to mean_time_to_happen for scheduling events. | 1.5 | |
set_unit_leader_flag | <flag> An unique string to identify the unit leader flag with. | set_unit_leader_flag = my_flag | Defines a unit leader flag. | 1.5 | |
clr_unit_leader_flag | <flag> The unique string of a unit leader flag to clear. | clr_unit_leader_flag = my_flag | Clears a defined unit leader flag. | 1.5 | |
modify_unit_leader_flag | flag = <flag> The unit leader flag to modify. value = <value> The value to set it to: 0 or 1 | Modifies a unit leader flag. | 1.5 | ||
promote_leader | <bool> Boolean | Promotes the current unit leader to Field Marshal (if Commander. | 1.5 | ||
demote_leader | <bool> Boolean | Demotes the current unit leader to Commander (if Field Marshal). | 1.5 | ||
retire | <bool> Boolean> | Retires the current unit leader (removing them). | 1.5 | ||
remove_unit_leader | <id> The id of the unit leader. | Removes the specified unit leader by their id. | 1.0 | ||
set_nationality | <scope> / <variable> The target country. | Switches the current unit leader to the specified country, giving them the leader. | 1.5 | ||
add_unit_leader_trait | <trait> The trait to add. | Adds the specified trait to the current unit leader. | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.0 | |
remove_unit_leader_trait | <trait> The trait to remove. | Removes the specified trait from the current unit leader. | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.0 | |
add_timed_unit_leader_trait | <trait> The trait to add. days = <int> The duration of the trait. | Adds the specified trait to the current unit leader for the specified duration. | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.5 | |
replace_unit_leader_trait | Traits are found in /Hearts of Iron IV/common/unit_leader/*.txt. | 1.5 |
Combat[edit]
Name | Parameters | Examples | Description | Notes | Version Added |
---|---|---|---|---|---|
supply_units | <int> / <variable> The amount of hours of supply. | Adds the specified amount of hours of supply to troops led by the current unit leader. | 1.5 | ||
add_max_trait | <int> The amount to add. | Adds the specified amount of assignable trait slots to the current unit leader. | 1.5 | ||
add_skill_level | <int> The skill to add. | Adds skill to the current unit leader. | 1.5 | ||
add_logistics | <int> The skill to add. | Adds logistics skill to the current unit leader. | 1.5 | ||
add_planning | <int> The skill to add. | Adds planning skill to the current unit leader. | 1.5 | ||
add_defense | <int> The skill to add. | Adds defense skill to the current unit leader. | 1.5 | ||
add_attack | <int> The skill to add. | Adds attack skill to the current unit leader. | 1.5 | ||
add_temporary_buff_to_units | combat_offense = <float> The bonus to grant. Optional. combat_breakthrough = <float> The bonus to grant. Optional. combat_defense = <float> The bonus to grant. Optional. combat_entrenchment = <float> The bonus to grant. Optional. org_damage_multiplier = <float> The bonus to grant. Optional. str_damage_multiplier = <float> The bonus to grant. Optional. war_support_reduction_on_damage = <float> The bonus to grant. Optional. cannot_retreat_while_attacking = <float> The bonus to grant. Optional. cannot_retreat_while_defending = <float> The bonus to grant. Optional. days = <int> The duration of the buff. Optional. tooltip = <string> The tooltip to display for the buff. | Adds the specified combat buff to the current unit leader. | 1.5 | ||
boost_planning | <float> The amount to add. | Improves the planning of units controlled by the current unit leader. | 1.5 |
Flow Control[edit]
These scopes are used within effect scopes to control the execution of effects.
If, Else If and Else[edit]
These scopes allow effects to be conditionalized, so they only occur when the requisite triggers are met.
For example, if you only have an effect to occur for Germany, you'd do the following:
If you then wanted England to have a similar effect, and everyone else to have something else, you do the following:
As you can see, this allows for flexibility in how effects occur and cuts down on duplication.
Hidden Effect[edit]
This scope hides the presence of the effects within it in the player's tooltip. This is used to execute effects without the player seeing them. For example, you may want to manipulate some variables in an event. Showing them to the player may confuse them, so it is best to hide the effects within an hidden effect scope, like so:
Random List[edit]
This scope allows the creation of a random selection of effects. For example, if you wanted an effect to randomly given the player one out of four bonuses, you'd do the following:
Note that if you want to create a repeatable decision including a random list, by default the same decision will pick the same random result every time it is triggered in a game. You can reverse this behaviour by including the following line in the decision block:
It is also possible to use modifiers to affect the weight of each possible random effect.
The above code would multiply the 25 by the factor thereby making it more or less likely to occur if the trigger condition is fulfilled.
Effect Tooltip[edit]
This scope will display the tooltip information of the effects within, without actually executing the effects. This is useful when you want to show what the effect may look like to the player. Here is an example:
Documentation | Effects • Triggers • Defines • Modifiers • List of modifiers • Scopes • Localisation • Variables • Arrays • On actions |
Scripting | AI • Bookmarks • Buildings • Cosmetic tags • Countries • Divisions • Decisions • Equipment • Events • Ideas • Ideologies • National Focuses • Resources • Scripted GUI • Technology • Units |
Map | Map • States • Supply areas • Strategic regions |
Graphical | Interface • Graphical Assets • Entities • Posteffects • Particles • Fonts |
Cosmetic | Portraits • Namelists • Music • Sound |
Other | Console commands • Troubleshooting • Mod structure |
Retrieved from 'https://hoi4.paradoxwikis.com/index.php?title=Commands&oldid=29520'