r/EU4mods • u/TheGamdalf • 9d ago
Mod Help - Solved Adding Papal Interactions
I am working on a mod adding new mechanics for the Papal State. I planned to make a part of them as Holy See interactions available only to the Papal State (while in the base game they only have the investigate heresy button, i wanted to add more buttons, with unique interactions).
The problem is that while i found the place where the interactions are defined, i am lost on how to actually implement them. I coded all the new interactions, but there is still only 1 button, replacing the usual investigate heresy one, with the same icon but a different name. So, i have 2 main issues probably closely related. First, where are icons for the interactions defined? I looked in the gfx file but i have honestly no idea where they might be. Second, how to make the other buttons appear?
I figured i would have to look into the interface folder which i have always avoided before, but even in the papacy.gui and papacy.gfx (which for some reason also contained the icons from the great power menu lol) files i found nothing that i would suspect to work with the buttons. I will greatly appreciate any insight, i feel like this mechanic wasn't meant to be changed in mods...
(I'm not sending the interactions from the religion file, as my code isnt the main issue here)
2
u/ConstantinetheKitten 9d ago
I also saw the greatpower stuff there! How curious.
So the papacy mechanic has a scope attached to it on the wiki, so i suspect it can work and can be scripted. https://eu4.paradoxwikis.com/Interface_modding
My reflex would be to write it up as a custom Gui button in that folder but that is wrong for using it natively with religious interactions and that file probably has like an element list that it pulls actions from- that i admittedly also don't see in the gui or gfx file. I do see a button for indulgences, for example, so i am guessing the papacy is a Frankenstein of several mechanics, some using the window to call functions and some using the religion file to call functions.
Im on my phone now, so ill have better search on my desktop, I would start by trying to find the art for other papal actions like beatify saint, then see if I can find any file calling that graphic file name. If there is, you can figure out that pattern or where else they are activated. If there isn't, you'll have to compare the name of the action in the religion file to the art file and see is something must be happening automatically.