/r/EU4mods
All things EU4 Mods related. If you are new to modding or want a place to share your mod this your place.
Feel free to ask questions on developing a mod, getting feedback, or even ask if a mod already exists.
/r/eu4 - The main eu4 subreddit.
/r/paradoxplaza - For more paradox stuff in general.
/r/eu4maps - If you like maps, check this sub out.
/r/EU4mods
i want to know if its possible to make a mod of the victoria 3 map style for eu4, so far i've only found attempts to do that but with vicky 2
How do i make it so a certain tech group has coring/government capacity penalties
I am seeking to make AI not only form a coalition against me even if I am the most powerful nation. But the issue is I don't know which file or line in the defines I should modify for ai to both form a coalition and add me as rival
So, like
Where exactly are they.
Looked in diplomatic_actions, looked in new_diplomatic_actions, looked in the scripteds, looked in on_actions, they're nowhere to be found.
Either my game's cracked or something is going on.
All I really want to know is how to keep them enabled after the age of reformations after a certain mission has been completed.
Hi, I am new to modding and I want to make a mod which has new flags for each country and I had an idea of having different flags for the same country in one run based on some criteria like different flag for Habsburg and not Habsburg Spain, or more stars in the US flag if they expand. Is there a way to do this with events, decisions, or maybe missions? And possibly without tag changing.
I basically want to make a mod that increases the war score cost of taking provinces that dont have a claim, prefferably for every CB except Imperialism, Nationalism etc. Help would really be appreciated. Thanks!
How do you make countries/religions spawn in at certain dates trying to remove things from the mod I'm making a submit of before I add some it back
I cannot find a color picker that works (the ones that are in the Paradox forum and Widows app). Does anyone know which one works?
Are there any mods that hide things that wouldn't have been known in real life like:
Aggressive expansion
Other countries stats (I shouldn't be able to know their exact army size in real life for example)
Fog of war for areas that allies can see but you can't (I shouldn't be able to know where a bunch of stuff is in real-time)
Uprising progress
I'm just trying to make a more realistic game that is more unpredictable (like real like)
How do i make a missionbranch like the centralized/decentralized in the BYZ tree
BYZ_theme_system = {
icon = mission_pf_soldier
required_missions = { }
position = 14
provinces_to_highlight = {
}
trigger = {
army_size = 25
OR = {
manpower = 20
manpower_percentage = 0.8
}
has_mil_advisor_2 = yes
grown_by_states = 10
}
effect = {
add_mil_power = 150
custom_tooltip = " "
enable_branching_mission_review = {
key = BYZ
ai_event_id = MEE_Byzantine_Events.28
}
custom_tooltip = " "
country_event_with_insight = {
id = MEE_Byzantine_Events.27
insight_tooltip = BYZ_unlock_theme_system_reform
}
}
}
This is the important part, when i copy this and place it in my event I get the requirement in the picture below, but the the review menu never showed up
enable_branching_mission_review = {
key = BRI
`}`
I'm trying to write an effect that sets a variable based on tech level (my end goal is to get the tech time penalty exported to a variable for some further manipulations, but ). I thought the most efficient way of doing this would be a scripted effect using a trigger switch that checks for the tech level and sets the variable to corresponding penalty for that year, along the lines of:
testmod_timevalue_EFFECT = {
[[suppcalc01]
trigger_switch = {
on_trigger = adm_tech
32 = { set_variable = { which = testmod_year_tech_adm value = 0.300 } }
31 = { set_variable = { which = testmod_year_tech_adm value = 0.299 } }
...
5 = { set_variable = { which = testmod_year_tech_adm value = 0.017 } }
4 = { set_variable = { which = testmod_year_tech_adm value = 0.007 } }
}
]
}
But this code causes the game to crash while it's loading (error file empty). I thought maybe adm_tech wasn't a proper trigger, but it I put "adm_tech = 4" into an event trigger, and it works just fine. The wiki says that a trigger switch can only take the easier triggers, but the adm/dip/mil_tech triggers seem pretty basic. So is it the trigger switch? Really can't figure it out, amateur that I am.
Hi, I am looking to make a mod that makes it so AI either are not able to move monuments at all or significantly less likely to do so, not really sure where to start with this. If at all possible it would be ideal to not have to change each monument specifically. Thanks for your help
I can't mode the game no matter what i do. I looked at the official forums and those didnt help. Reinstalled my game multiple times and it didnt help. I came here to ask if anyone else had the same problem as me and somehow fixed it. (this problem isnt only for this game, i cant mod other games like skyrim and subnautica aswell)
There are building mods that add canals for example. These canals can only be built next to water OR next to provinces with canals.
I want to do this with railways, which can only be built in specific provinces or next to other railways. But I cant find a trigger checking for buildings in adjacent provinces. Does anyone know how these mods do it?
I have made a government reform that, if enacted, should add some bonuses to owned provinces that are the primary culture and religion. I used the code from the "Expand Temple Rights" reform, and wanted to add a custom tooltip like that reform has, where it shows the custom effect. Does anyone know how to do that custom tooltip that shoes the effect when you look at the government reform?
I've been developing a mod, and I've recently encountered a problem. While the game loads just fine, when I attempt to select a nation, the game freezes and the crash reporter pops up. So far, I've added several cultures and culture groups, three tags, a mission tree, multiple subject types, one set of ideas, and multiple government reforms. I'm almost positive that it isn't the new cultures or provinces, because I was able to enter the game when that was all I'd added. Unfortunately, I have no idea what the code actually means. I think it's a graphical issue, but I need someone who knows this stuff to confirm that for me, and tell me what the solution is (or at least what the problem is).
Thanks! Here's the exception.txt and error.log:
Application: EUIV
Version: EU4 v1.37.4.0 Inca
Date/Time: 2024-10-09 18:47:44
Caught signal 11 (SIGSEGV)
Original Stack Trace:
2 ??? 0x1401190800000000 0x0 + 1441460877885702144
3 eu4 0x00000001014b9e4e _ZN9C2dObject6MoveToERK6CPointIiE + 102
4 eu4 0x000000010144220f _ZN5CIcon6MoveToE8CVector2IiE + 125
5 eu4 0x0000000101442947 _ZN5CIcon12ChangeSpriteEP16CGraphicalObject + 313
6 eu4 0x0000000100f3d3b3 _ZN10CGameSetup26UpdateSelectedCountryPanelERK11CCountryTag + 1175
7 eu4 0x0000000100f3b42e _ZN10CGameSetup6UpdateEv + 2874
8 eu4 0x0000000100f015ea _ZN9CFrontEnd11UpdateStuffEv + 1202
9 eu4 0x0000000100f00161 _ZN9CFrontEnd4IdleEb + 3495
10 eu4 0x00000001013ca330 _ZN12CApplication14UpdateOneFrameEb + 288
11 eu4 0x00000001013ca7da _ZN12CApplication3RunEv + 48
12 eu4 0x0000000100755b73 main + 10441
13 dyld 0x0000000203006345 start + 1909
Demangled Stack Trace:
2 ??? 0x1401190800000000 0x0 + 1441460877885702144
3 eu4 0x00000001014b9e4e C2dObject::MoveTo(CPoint<int> const&) + 102
4 eu4 0x000000010144220f CIcon::MoveTo(CVector2<int>) + 125
5 eu4 0x0000000101442947 CIcon::ChangeSprite(CGraphicalObject*) + 313
6 eu4 0x0000000100f3d3b3 CGameSetup::UpdateSelectedCountryPanel(CCountryTag const&) + 1175
7 eu4 0x0000000100f3b42e CGameSetup::Update() + 2874
8 eu4 0x0000000100f015ea CFrontEnd::UpdateStuff() + 1202
9 eu4 0x0000000100f00161 CFrontEnd::Idle(bool) + 3495
10 eu4 0x00000001013ca330 CApplication::UpdateOneFrame(bool) + 288
11 eu4 0x00000001013ca7da CApplication::Run() + 48
12 eu4 0x0000000100755b73 main + 10441
13 dyld 0x0000000203006345 start + 1909
#error.log:
[localize.cpp:671]: Localization hash collision found, more info in text.log! Language: l_english
[localize.cpp:671]: Localization hash collision found, more info in text.log! Language: l_english
[persistent.cpp:88]: Parsing Error. File: "interface/ideas.gfx", Error: Unexpected token: spriteType, near line: 1
[persistent.cpp:88]: Parsing Error. File: "interface/ideas.gfx", Error: Unexpected token: spriteType, near line: 9
[persistent.cpp:88]: Parsing Error. File: "interface/ideas.gfx", Error: Unexpected token: spriteType, near line: 17
[persistent.cpp:88]: Parsing Error. File: "interface/ideas.gfx", Error: Unexpected token: spriteType, near line: 25
[persistent.cpp:88]: Parsing Error. File: "interface/ideas.gfx", Error: Unexpected token: spriteType, near line: 33
[persistent.cpp:88]: Parsing Error. File: "interface/ideas.gfx", Error: Unexpected token: spriteType, near line: 41
[virtualfilesystem_physfs.cpp:1252]: Could not open file: common/GC_AFRICA.txt, error: not found
[version.cpp:314]: Invalid file when updating checksum: common/GC_AFRICA.txt
[virtualfilesystem_physfs.cpp:1252]: Could not open file: common/GC_AMERICA.txt, error: not found
[version.cpp:314]: Invalid file when updating checksum: common/GC_AMERICA.txt
[virtualfilesystem_physfs.cpp:1252]: Could not open file: common/GC_ASIA.txt, error: not found
[version.cpp:314]: Invalid file when updating checksum: common/GC_ASIA.txt
[virtualfilesystem_physfs.cpp:1252]: Could not open file: common/GC_JAPAN.txt, error: not found
[version.cpp:314]: Invalid file when updating checksum: common/GC_JAPAN.txt
[virtualfilesystem_physfs.cpp:1252]: Could not open file: common/rise_of_the_ottomans.txt, error: not found
[version.cpp:314]: Invalid file when updating checksum: common/rise_of_the_ottomans.txt
[persistent.cpp:88]: Parsing Error. File: "missions/Yokuts_missions.txt", Error: Unknown effect type. Key: OR: OR, near line: 161, Last good read: add_dip_power=-50
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
[graphics.cpp:1177]: Failed to create gui object. Could not find sprite type [GFX_idea_empty]
I have seen a lot of semi-functional mission editors around. I am somewhat comfortable with mapping both in files and with an editor assistant program.
Any tips on which one of those mission editors out there is the best for a beginner?
Hey everyone,
I just noticed that the Eurocentric Instituitons Mod (the one working on 1.37) ist just gone from the workshop. Does anyone know what happened to it or could recommend me a similar mod? Thanks in advance
The specific feature I'm going to go over today is capture groups.
I just recently learned to use a feature in regex (Regular Expressions) that changed how I mod and made things possible that really were not before.
Most programs used to modify text file have both a find and a replace feature and many of these allow the use of regex while doing so if your not familiar with with this is I would highly suggest learning about it as it is highly useful even with a small amount of knowledge.
Lets say I wanted to make multiple event modifiers that are all versions of the same name with an incrementing modifier value.
defensive_modifier_01 = { defensiveness = 0.01 }
Like that but an arbitrary amount say from 01 to 50
Normally this might take a bit of time copy pasting and entering in the small difference in each one not to mention using these in some sort of if statement might become tedious fast, this is where capture groups come in.
First you want a list of the values that are going to change in this case you can easily open a spread sheet and create 01 to 50 sequentially just by typing 01 in a cell and dragging that cell down you just need to make sure the rows format is text not a number so it doesn't remove leading zeros.
01
02
03
04
05
06
07
08
09
...
50
Place that list in the modifier file then open the replace dialog and make sure regex is enabled (Sublime Text is a great editor for this and free to use).
In the find field type (\d\d)
The ()
pair defines a capture group and the \d
means any digit so \d\d
means any pair of digits.
In the replace field type defensive_modifier_$1 = { defensiveness = 0.$1 }
then hit replace all and you will have 50 modifiers like such:
defensive_modifier_01 = { defensiveness = 0.01 }
defensive_modifier_02 = { defensiveness = 0.02 }
defensive_modifier_03 = { defensiveness = 0.03 }
defensive_modifier_04 = { defensiveness = 0.04 }
defensive_modifier_05 = { defensiveness = 0.05 }
defensive_modifier_06 = { defensiveness = 0.06 }
defensive_modifier_07 = { defensiveness = 0.07 }
defensive_modifier_08 = { defensiveness = 0.08 }
defensive_modifier_09 = { defensiveness = 0.09 }
...defensive_modifier_50 = { defensiveness = 0.50 }
If its not obvious the $1
is pasting in the value found in the capture group each time it's found. The 1
refers to the order or the capture groups you can have multiple and each one will be sequentially referenced to $1
then $2
etc.
This doesn't have to be numbers it can be a list of anything.
Using the 00_countries.txt file in common/country_tags I made a list of tags and names and used that to make a modifier for each tag (I added the created tags for colonies etc. though these had to have generic names) with localization with each countries name a total of 1370 modifiers and the same amount of localization all of this took less than 15 minutes.
I hope this helps someone else. For me it made tedious repetitive things easy and made tasks that might take weeks before take minutes.
So I want to make an event chain for a negotiated vassalisation:
Country A uses a diplo action to trigger an event for country B. This starts a back and forth event chain with up to three rounds in which country B can make demands and country A either accepts or offers alternatives (basically debuffs for A from a list). In every round and at the end B also has the options to become a subject or to leave the negotiations.
Now my question: If there was only one possible country A I'd just use flags like has_offered_vassalisation and has_been_offered_vassalisation. However but I want multiple countries to be able to use the diplo action at the same time. So is there a way to make these flags dynamic for a specific nation like has_offered_vassalisation_FRA and has_been_offered_vassalisation_ULM?
Otherwise I'd make one event chain for the player and 3-4 identical copies for the AI with numbered global flags.
So I've been trying to make some new government reforms and they are working except the icons are just question marks and I can't figure out what I'm doing wrong.
I've put the images into the gfx>interface folder, they are .dds files, size 57x57 pixels. The files are named correctly.
Follow up related question: Since I'm planning on making some missions, I guess I'll have the same problem there, too. Are there any differences for mission icons?
Edit: Solved. I forgot to add a .gfx file in the mod>interface folder.
Hi, I just recently tried myself on EU4 mods and are still quite unexpierenced. So there are some question I got over trying to add a certain mechanic.
My current overall goal is to create a government mechanic that gets progress from gold produced.
Because dynamic modifiers arent possible, I started by adding a event that I want to trigger monthly. Strangely this already caused problems, because by adding the line "events = { myevent.1 }" in the file on_actions under "on_monthly_pulse = {" the normal events in my game broke.
But my actual problem is the fact that I can't export the trigger "gold_income" and "trade_goods_produced_amount = { trade_goods = gold }" into a variable. Is this not possible for all Triggers? And do I have to manually create a variable containing the value by creating a while loop/binary calculation?
country_event = { [...]
immediate = {
hidden_effect = {
#export_to_variable = {
#which = goldproduced
#value = gold_income
#}
grant_progress_from_gold_produced = yes #{ value = goldproduced }
}
}
The next step would be adding country_modifiers that give me the government progress.
This part is mostly experimental and work in progress. Because I couldn't get the variable from a trigger, I added a binary set to add up a variable. This is more or less my first time modding EU4 (especially on this level), so a few questions opened up:
​
#### monthly Gold ####################
grant_progress_from_gold_produced = {
if = {
limit = { # I tried exporting the goods as variable
trade_goods_produced_amount = { # but when I did, this limit failed.
trade_goods = gold # Which is why assumed that I cant do this
amount = 0.1
}
}
add_country_modifier = {
name = gold_into_hoard
duration = -1
}
set_variable = { which = temp value = 0 } # this part doesnt work yet
get_gold_produced = { variable=temp value=5.12 } # (to my knowledge)
get_gold_produced = { variable=temp value=2.56 } # maybe just the bottom part fails
get_gold_produced = { variable=temp value=1.28 }
get_gold_produced = { variable=temp value=0.64 }
get_gold_produced = { variable=temp value=0.32 }
get_gold_produced = { variable=temp value=0.16 }
get_gold_produced = { variable=temp value=0.08 }
get_gold_produced = { variable=temp value=0.04 }
get_gold_produced = { variable=temp value=0.02 }
get_gold_produced = { variable=temp value=0.01 }
#set_variable = { which = temp which = $variable$ }
hoard_effect = { variable=temp value=5.12 }
hoard_effect = { variable=temp value=2.56 }
hoard_effect = { variable=temp value=1.28 }
hoard_effect = { variable=temp value=0.64 }
hoard_effect = { variable=temp value=0.32 }
hoard_effect = { variable=temp value=0.16 }
hoard_effect = { variable=temp value=0.08 }
hoard_effect = { variable=temp value=0.04 }
hoard_effect = { variable=temp value=0.02 }
hoard_effect = { variable=temp value=0.01 }
#set_variable = { which = temp value = 0 }
}
else = {
remove_country_modifier = gold_into_hoard
}
}
#### gold variable #####################
get_gold_produced = {
if = {
limit = {
trade_goods_produced_amount = {
trade_goods = gold
amount = $value$
}
change_variable = {
which = $variable$
value = $value$
}
}
}
}
#### create modifier ##################
hoard_effect = {
if = {
limit = {
has_country_modifier = gold_into_hoard_$value$
}
remove_country_modifier = gold_into_hoard_$value$
}
if = {
limit = {
check_variable = { which = $variable$ value = $value$ }
}
subtract_variable = { which = $variable$ value = $value$ }
add_country_modifier = {
name = gold_into_hoard_$value$
duration = -1
hidden = no
}
}
}
This may completely be a problem with me being something of a dunderhead when it comes to province scopes, but I need help with what the title says. Specifically I've been trying to mod in a little gimmick mechanic centered around the centralize state mechanic that adds a province modifier onto the province that's centralized to- IF the state had a specific holy order established to it beforehand.
It doesn't seem to work however, whether this is a problem with the limit or the actual effect; I've no clue.
I deleted the code I had for it in frustration yesterday but I do remember how I formatted it more or less
if = {
limit = { holy_order = order_name }
add_province_modifier = {
name = modifier_name
duration = -1
}
}
I tried to revise it using root scopes, province scopes, the has_holy_order_trigger = yes
trigger, and so far nothing seems to work.
I am fairly certain this is just me messing up the syntax somewhere but I can't figure out where exactly that is, so, I would really appreciate a hand in this.
Hello,
I am interested in modding and I am currently struggling finding a location in the file structure of the game.
The mentioned mechanic I am interested in modifying is the flag "reduce_ae_from_prom_cultures_flag" in missions\EMP_Prussian_Missions. This game mechanic is added by the Brandenburgian/Prussian mission "conquer Silesia" and reduces your aggressive expansion by 3 after promoting a culture.
In what file can I edit the content of flag? Like changing the value from 3 to 5 or something similar.
I hope my issue is understandable. Thank you for your answers.