• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Hey, I created an event. But the event appears every month. What did I do wrong? I want a onetime event.
Please help

namespace=EVTNAME
character_event= {
id = 210000
title = EVTNAME210000
desc = EVTDESC210000


picture = "GFX_evt_crusaders"
border = "GFX_event_normal_frame_war"

only_rulers = yes
religion = catholic


trigger = {

year = 1303
month = 09
Day = 12


}
immediate = {
add_trait = disbelieve
}
option = {
name = "EVTOPTA210000"
}
}

Those triggers (year, month, day) don't evaluate whether the year is EQUAL to 1303 and so on, but whether it's greater or equal. So this will evaluate true for September-December, after the 12th day of the month, if the year is 1303 or later.
 
Most, if not all, of what you want is not possible. Interface modding is *very* limited.

The overall interface is determined by religion, except republics have their own. This is hard-coded.
You can move elements around the screen or change their appearance.
You can remove elements.
You can add simple fixed text.
I believe you can add a copy of an existing element (tabs, buttons, graphics, etc.), possibly with a different appearance, but it will do the same thing. So you could add another focus button, but it would do exactly what the normal focus button does. The 'name=*' entries determine what an element will do, and the names available in each window are hard-coded.
Wanted to give some feed- back on the interface modding.
1) I re- drew and doubled the size of the College of cardinals screen (and referenced its GFX rather than vanilla)
2) I added a # 10 cardinal entry
3) I increased the maximum number of religous_titles permitted for my religion
Result = you can at least add 1 more cardinal, though I don't know if there are going to be any bugs. Papal succession appears to work fine (I killed my "Pope" and a new one was elected as normal)
Note: When I did this without changing the max # of cardinals, the portrait was blank and un- rendered, like the image in the upper- left
ck2_5.jpg

Anyway, so, yeah. You can duplicate cardinals in the interface. You aren't stuck with nine. I was also able to duplicate text i.e. "House of Ascension"/"Wizard's Council"/"House of Inquisition" all have the same name with a _2/_3 at the end and different localisation.
This seems to mean that the interface was built with the intention of allowing some degree of duplication. I'm going to duplicate up to 18 and if there's an upper- limit to this process, I'll update.
Probably tinker with the focus next, to see if there's any play in that interface.
Failing in duplicating the focus screen, I'm sure that I can re- draw, re- size, and add to the existing one. And I'm going to test to see if there are any names that have cross- over between windowTypes.
Thanks again, for the information.

Edit: I was able to make up to 18 cardinals with a minor hiccup. The cardinal_entry_11 doesn't appear at all.
Any idea why this might be? Entries 10 and 12-18 appear just fine, showing different characters in each frame, but number 11 is just a blank space.
 
Last edited:
Wanted to give some feed- back on the interface modding.
1) I re- drew and doubled the size of the College of cardinals screen (and referenced its GFX rather than vanilla)
2) I added a # 10 cardinal entry
3) I increased the maximum number of religous_titles permitted for my religion
Result = you can at least add 1 more cardinal, though I don't know if there are going to be any bugs. Papal succession appears to work fine (I killed my "Pope" and a new one was elected as normal)
Note: When I did this without changing the max # of cardinals, the portrait was blank and un- rendered, like the image in the upper- leftView attachment 174342
Anyway, so, yeah. You can duplicate cardinals in the interface. You aren't stuck with nine. I was also able to duplicate text i.e. "House of Ascension"/"Wizard's Council"/"House of Inquisition" all have the same name with a _2/_3 at the end and different localisation.
This seems to mean that the interface was built with the intention of allowing some degree of duplication. I'm going to duplicate up to 18 and if there's an upper- limit to this process, I'll update.
No, this isn't about the interface. Basically, a lot of "lists" in the interface are built dynamically, meaning the game checks what and how many are defined before displaying them. This is true for e.g. decisions, laws and plots as well. As a rule of thumb, if something is NOT defined in the interface folder, you can freely increase it. This behavior is basically built into the existing interface elements inside the hard-code (or rather, the hard code probably looks up interface elements by their name and populates them).
 
  • 1
Reactions:
What determines the appearance of a province icon? I know the graphical culture does, but icons are also changing when a holding is looted. Basically, I am wondering how moddable holding icons are; and how one would best go about doing it.
 
Ok thanks.
And what can I do, that the event is a onetime event?
Depending on what exactly you want, ethopianvampire's suggestion above is fine. You can also consider setting a character flag (set_character_flag) and checking for that (this will cause the event to fire once per character), or a global flag (set_global_flag), which will make the event only fire once, ever.
 
My mod is set up with 162 provinces, and then we have left up to 1000 empty since we plan to add more someday. The sea zone and river provinces though are 1001-1100, so would that cause a problem/CTD? Also, using the "-debug" launch command, I keep getting "trying to put tech on non-duke or count tier title" errors. Lastly, my mod only has 2 religions, and they are made up ones. How do I continue to use the vanilla events while having only these 2 religions? Is this even a problem?
 
Depending on what exactly you want, ethopianvampire's suggestion above is fine. You can also consider setting a character flag (set_character_flag) and checking for that (this will cause the event to fire once per character), or a global flag (set_global_flag), which will make the event only fire once, ever.
I want that the event only fire once, ever on 13.09.1303. And in this believe all christian rulers get the trait "disbelieve" (created by myself).
 
My mod is set up with 162 provinces, and then we have left up to 1000 empty since we plan to add more someday. The sea zone and river provinces though are 1001-1100, so would that cause a problem/CTD? Also, using the "-debug" launch command, I keep getting "trying to put tech on non-duke or count tier title" errors. Lastly, my mod only has 2 religions, and they are made up ones. How do I continue to use the vanilla events while having only these 2 religions? Is this even a problem?
1) I don't know about the sa zones and rivers
2) Tech history is in history/technology. Set this folder to be overriden and make sure only the titles that actually exist get techs there
3) Religions continue to exist unless the file they're in is overriden. So, don't override common/religions and define your custom religions in a file with another name than the vanilla ones. Be aware that there might be some interference (for example, the opoe could declare crusades, since he always exists.

As an aside, the game expects certain titles to exist. For example, the pope is used to store "global" variables. There will be problems if he doesn't exist; you need to either include him or change references to him in all the events and decisions.
 
I want that the event only fire once, ever on 13.09.1303. And in this believe all christian rulers get the trait "disbelieve" (created by myself).
I'm not sure you can make sure that an event fires on a specific date, as events aren't checked daily for every character. But as a test, just add a condition that the date is not later than 13.09.1303.
 
I want that the event only fire once, ever on 13.09.1303. And in this believe all christian rulers get the trait "disbelieve" (created by myself).
To make an event fire on a specific date, you would need to make a an on_action event using on_yearly_pulse that is triggered only on the specific year, and have that event use the relevant event command with a days delay that will trigger your event at the correct time.
 
Adding more cardinals is already known, there is an entire mod dedicated to expanding it to have like 20 or so cardinals.
Thanks for letting me know. I can use that for reference and figure out, what's going wrong with the disappearing cardinal.
Edit: As is the case with most things, the cause of the "disappearing" cardinal was human error.
 
Last edited:
Thanks to ethiopianvampire, first problem is solved.

Next: I created a trait and it seems to work, expect the icon. There is gap instead the trait icon. What could be the problem?

interface gfx data code:
spriteType = {
name = "GFX_trait_disbelieve"
texturefile = "gfx/traits/disbelieve.tga"
noOfFrames = 1
norefcount = yes
effectFile = "gfx/FX/buttonstate.lua"
}
 
To make an event fire on a specific date, you would need to make a an on_action event using on_yearly_pulse that is triggered only on the specific year, and have that event use the relevant event command with a days delay that will trigger your event at the correct time.
But the yearly pulse doesn't happen January 1 for every character either, does it? I thought the yearly pulses were spread thru the year as well.
 
I'm not sure you can make sure that an event fires on a specific date, as events aren't checked daily for every character. But as a test, just add a condition that the date is not later than 13.09.1303.
I know that in achievements, there are several uses of date=xxxx.xx.xx. Is that usable as a trigger in events? That would be better that combining year, month, & day triggers. It would still have the usual 20 day variance, but would avoid other issues.
 
No, this isn't about the interface. Basically, a lot of "lists" in the interface are built dynamically, meaning the game checks what and how many are defined before displaying them. This is true for e.g. decisions, laws and plots as well. As a rule of thumb, if something is NOT defined in the interface folder, you can freely increase it. This behavior is basically built into the existing interface elements inside the hard-code (or rather, the hard code probably looks up interface elements by their name and populates them).
This is an interesting topic. I looked in the executable, and title_cardinal_entry_* doesn't appear at all. Rather, the game constructs these tags. Surrounded by other strings relevant to the cardinal interface, there is a '_entry_' (along with some other fragments). The game tacks together the religious title (title_cardinal, title_fraticelli_cardinal, or modders' custom titles), the _entry_ string, and a sequence of numbers.

But these are the only such tags I see in the vanilla files that have this sort of numbering system. Other variable lists like decisions, buildings, characters in the Find window, etc., use a generic '*_entry' which the game uses to draw each entry. This appears to be the only exception to the .gui 'name' fields being fully hard-coded (altho still hard-coded in a variable way).
 
  • 1
Reactions:
This is an interesting topic. I looked in the executable, and title_cardinal_entry_* doesn't appear at all. Rather, the game constructs these tags. Surrounded by other strings relevant to the cardinal interface, there is a '_entry_' (along with some other fragments). The game tacks together the religious title (title_cardinal, title_fraticelli_cardinal, or modders' custom titles), the _entry_ string, and a sequence of numbers.

But these are the only such tags I see in the vanilla files that have this sort of numbering system. Other variable lists like decisions, buildings, characters in the Find window, etc., use a generic '*_entry' which the game uses to draw each entry. This appears to be the only exception to the .gui 'name' fields being fully hard-coded (altho still hard-coded in a variable way).
Interesting. This doesn't surprise me, BTW, seeing that it is possible to have more than one college of cardinals (there are Fraticelli cardinals too, in vanilla). They must of course have different religions, and the player can only access one college at a time. But maybe that's still helpful for your ;). I'm not quite certain how it's done, but it's somehow based on religious_titles (the folder); the wiki has more details I believe.
 
  • 1
Reactions:
Thanks to ethiopianvampire, first problem is solved.

Next: I created a trait and it seems to work, expect the icon. There is gap instead the trait icon. What could be the problem?

interface gfx data code:
spriteType = {
name = "GFX_trait_disbelieve"
texturefile = "gfx/traits/disbelieve.tga"
noOfFrames = 1
norefcount = yes
effectFile = "gfx/FX/buttonstate.lua"
}
Not a problem. Here's an example of spriteTypes for some of the traits that I've been working on for my mod. If it looks like this (with your trait in the name/texturefile fields), then yours should work.
Only one spriteTypes = { # make sure to close it at the bottom and one spriteType # No 's' for each trait within.
Code:
spriteTypes = {
      
        spriteType = {
            name = "GFX_trait_arcane_training_source_cor"
            texturefile = "gfx/traits/mage_cor_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
  
        spriteType = {
            name = "GFX_trait_arcane_training_source_pur"
            texturefile = "gfx/traits/mage_pur_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_source_man"
            texturefile = "gfx/traits/mage_man_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_mage_cor"
            texturefile = "gfx/traits/mage_cor_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_mage_pur"
            texturefile = "gfx/traits/mage_pur_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_mage_man"
            texturefile = "gfx/traits/mage_man_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_half_cor"
            texturefile = "gfx/traits/mage_cor_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_half_pur"
            texturefile = "gfx/traits/mage_pur_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_half_man"
            texturefile = "gfx/traits/mage_man_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
      
        spriteType = {
            name = "GFX_trait_arcane_training_dark"
            texturefile = "gfx/traits/mage_cor_icon.dds"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
        spriteType = {
            name = "GFX_trait_the_vessel"
            texturefile = "gfx/traits/the_vessel_icon"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
        spriteType = {
            name = "GFX_trait_inquisition_cardinal"
            texturefile = "gfx/traits/inquisition_cardinal_icon"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
        spriteType = {
            name = "GFX_trait_ascension_cardinal"
            texturefile = "gfx/traits/ascension_cardinal_icon"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
        }
AND = {
if you don't have any other traits you can write yours just like this-- (assuming disbelieve is in /gfx/traits directory)
Code:
spriteTypes = {
     
        spriteType = {
            name = "GFX_trait_disbelieve"
            texturefile = "gfx/traits/disbelieve.tga"
            noOfFrames = 1
            norefcount = yes
            effectFile = "gfx/FX/buttonstate.lua"
            }
       }
The next step is an important one. You need to rename the .txt file that you put your icon in and change it into a .gfx file because that is what the game reads. Nothing special to it. Just make the .txt at the end visible (if it isn't already) and rename to .gfx (if you missed this step, even if it was perfect, your icon won't appear.)

P.S. The process is very similar for adding any graphics to this game, except for a change in the name, to reflect what you're trying to add. If you edit portraits (not religious etc.) or events, the process is exactly the same, except for the name and what gfx folder you put the graphic in (EDIT: with portraits you need to change the 'noOfFrames =' field to the number of frames you have, but still, mostly the same). Hope this helps.
lastEDIT: The only other problem that you could be having, and I'm not sure what this would do, (as I've never done it myself) would be that your icon could be the wrong size. For traits, icons need to be 28x28 pixels, though exact size requirements vary between traits, events, government icons, religions, portraits, etc.
 
Last edited:
Are there any good mods for slowing down culture conversion? If there aren't, what would be the best way to make a mini-mod to do so myself? Slowing down the mean time to happen or tacking on a minimum year requirement seem like obvious choices, but I'm wondering if there might be a better way to go about it.

Note: I'm more okay with tribes converting culture through advisor use, so I don't need to worry about that.