Hearts of Iron IV

Hearts of Iron IV

Not enough ratings
Propaganda Campaigns: Creating a Submod
By Sad Anime Boy
This guide explains how to create a submod for the mod "Propaganda Campaigns". It is aimed at people who already have some experience with modding.
   
Award
Favorite
Favorited
Unfavorite
General Information
Thank you for your interest in Propaganda Campaigns!

In this guide you will learn how to add your own posters to the mod. Basic knowledge about HOI4 modding is required for this guide, as I don't want to concern myself with questions like "how do I edit a mod file" or "how do I upload something to the Steam Workshop".

If you are new to modding, please check out the HOI4 Modding Wiki[hoi4.paradoxwikis.com] or the numerous YouTube tutorials on this topic. Thank you for understanding.

Unfortunately I currently have very little time to work on this guide and it might take a while for me to finish it. All materials for creating a submod can be found below, so please work yourself into a subject if you can't find information about it in this guide. Sorry for the inconvenience.

Anyway, have fun modding!
Documents
All necessary documents can be found here: GitHub[github.com]

In this guide we will work with the files linked above. As an example we will add new posters and propaganda campaigns to Poland. (Lucky you if you want to create a submod for Poland)

Included in the documents are the following:
  • A complete mod template for Poland
  • The original Photoshop documents for creating posters

The Photoshop documents use Smart Objects and frames. Please see for yourself how these features work. You don't need a deep knowledge of Photoshop to edit the images however.

Note: You can download files on GitHub via the green button "Code" and then "Download ZIP".
File Structure
To help you find your way around, here's a list of all the files you will need for the mod. I also included some information for what each file is used. As you can see, you don't need many documents to build your submod. I've tried to make the mod as lightweight as possible.

This is where you enable the "Propaganda Campaigns" view for your country:
common/on_actions/00_prca_POL_on_actions.txt

Here you can add new "Propaganda Campaigns" and "Hostile Leaflets":
common/on_actions/prca_POL_decisions.txt

Here you can define which decisions should be activated if the enemy drops a "Hostile Leaflet":
events/prca.POL.txt

This is where you store the tileset for the posters:
gfx/interface/campaigns/POL_prop_tileset.dds

This is where you tell the game which tileset to use:
interface/prca_POL_prop_tileset.gfx

Here you can add your translations:
localisation/prca_POL_decisions_l_english.yml
Enabling Propaganda Campaigns
The first thing you want to do when creating a submod is to assign the necessary country flags to your nation so that they will be recognized by the main mod.

To do this, you need to modify the following file:
common/on_actions/00_prca_POL_on_actions.txt

The document should look like this. Of course, you will need to replace "POL" with the country tag of your nation.
on_actions = { on_startup = { effect = { POL = { set_country_flag = prca_enabled set_country_flag = prca_leaflets_enabled #Optional but recommended set_country_flag = prca_disable_default_decisions #Optional set_country_flag = prca_use_tileset_with_id #Optional set_country_flag = prca_v0.8.1 #Depreciated } } } }

The first two lines are the place where the magic happens. In the first line you tell the main mod that your country should use the features of Propaganda Campaigns. This includes the GUI in the decisions menu, as well as departments and preparations.
set_country_flag = prca_enabled

With the second line you can specify if your nation can receive Propaganda Leaflets from other nations. Note that any nation can send Propaganda Leaflets to other nations as long as this is enabled in the target country. This option is optional but recommended.
set_country_flag = prca_leaflets_enabled

The next line is relevant if you want to overwrite the default poster of a country that is already included in the main mod (e.g. Germany). This option is optional and will disable all standard Propaganda Campaigns (poster decisions) for that nation.
set_country_flag = prca_disable_default_decisions

The next line gives you the option to use a special variable for the recognition of the poster tilesets in addition to the country tag. This is an advanced, optional function, which will be explained in more detail later.
set_country_flag = prca_use_tileset_with_id #The tileset will than use this key: "GFX_[ROOT.GetTag]_[?ROOT.prca_tileset_id]_prop_tileset"

The last line was used for the detection of obsolete submods. This feature is no longer used however, for which reason this option is now depreciated.
set_country_flag = prca_v0.8.1
5 Comments
Qüöte Dec 14, 2020 @ 11:01pm 
If I add support for a country, would it be possible to have it implemented in the main mod?
Sad Anime Boy  [author] Sep 24, 2020 @ 2:42pm 
Hey @TenCent Employee Number 56299
Good news, I have added a mod template to the Guide together with some basic informations about the file structure. Kaiserreich support is still in the works however. Have fun with the template!
Ea nasir Sep 12, 2020 @ 6:46pm 
Nice! cant wait for the template best of luck with everything!
Sad Anime Boy  [author] Sep 12, 2020 @ 5:10pm 
Hey @TenCent Employee Number 56299
Thank you for your interest! Currently I am very busy due to my work and studies, but since the mod has become quite popular in a short time I will be working on it again sooner than I thought. I'm trying to publish a kind of "mod template" in the upcoming weeks, so that people can work with that before the guide is completely finished. I'll let you know when it is uploaded. (Kaiserreich support is also on the todo list)
Ea nasir Sep 11, 2020 @ 4:46pm 
id love to be able to make a kaiserreich redux submod for this tbh hope your able to finish this guide soon!