• 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.
renderTimingPixel.png

Hi,

I'm looking to tinker with reforming pagan faiths to my liking (try make cosmopolitan a doctrine, or alter succession laws etc) and was wondering if someone could point me to a useful source? I've been to the 'religion modding' page on the wiki but that's for regular faiths not the 'pick and mix' reformation ones

Thanks for any help
 
renderTimingPixel.png

Hi,

I'm looking to tinker with reforming pagan faiths to my liking (try make cosmopolitan a doctrine, or alter succession laws etc) and was wondering if someone could point me to a useful source? I've been to the 'religion modding' page on the wiki but that's for regular faiths not the 'pick and mix' reformation ones

Thanks for any help
Have you looked through the religion_features folder in common? I basically just shuffle a few modifiers around there for my religions
 
Have you looked through the religion_features folder in common? I basically just shuffle a few modifiers around there for my religions
Thanks, will do. Would you know what line(s) I need to copy from "religion_cosmopolitan" to add to the doctrine I want. Ideally i'm looking to add the "allow interfaith marriages" to the unique celtic doctrine (I'm playing ancient religions reborn) so that I can also have unyielding as my nature (and, by extension, none of the weak moral authority and lack of conversions that normally go with it)

Thanks
 
Thanks, will do. Would you know what line(s) I need to copy from "religion_cosmopolitan" to add to the doctrine I want. Ideally i'm looking to add the "allow interfaith marriages" to the unique celtic doctrine (I'm playing ancient religions reborn) so that I can also have unyielding as my nature (and, by extension, none of the weak moral authority and lack of conversions that normally go with it)
It's not simple. Different religion feature mechanics are enforced in different ways. Some are defined in the feature definition. Other things, however, are checked from potentially thousands of places in the rest of the script.

For example, there is nothing in the bloodthirsty gods feature script that specifically says "allow sacrifice". Rather, the sacrifice decision (scripted down somewhere else) has in its allow section a check for bloodthirsty gods. This is terribly inefficient from a software engineering standpoint, but it is the way things work.

To find out how to grant your custom feature all the mechanics of an existing one, I'm afraid you'll need to ctrl+F every script file in commons, decisions and events, for occurences of its script key (religion_cosmopolitan) and add your own feature alongside it every time. That may be one or two edits, or thousands.
 
Thanks, will do. Would you know what line(s) I need to copy from "religion_cosmopolitan" to add to the doctrine I want. Ideally i'm looking to add the "allow interfaith marriages" to the unique celtic doctrine (I'm playing ancient religions reborn) so that I can also have unyielding as my nature (and, by extension, none of the weak moral authority and lack of conversions that normally go with it)

Thanks
The intermarry is actually applied in an event that gets called when the religion is reformed: event 670 in on_action_events.txt, starts at line 4574, but the relevant part is lines 4750-4769. You'd want to duplicate those lines, delete the religion_authority clause, and change religion_cosmopolitan in the IF limit to whatever the tag for your religion feature is.
 
Does anyone have any insights to why my custom rank .dds file isn't showing up in my society UI? The game just shows the default.
 

Attachments

  • satanism_expanded_societies.txt
    4,8 KB · Views: 8
  • priesthood_of_mendes_interface.txt
    2,4 KB · Views: 1
  • 20190903075016_1.jpg
    20190903075016_1.jpg
    604,3 KB · Views: 4
In my mod, if the King of France gets an Empire title, the Kingdom of France remains the primary title (as a king-rank title) despite the holder also holding an Empire title. It only happens for that one kingdom. Any idea what could be up with it?

EDIT: Figured it out--for anyone else with this problem, it was because I had the dignity of France defined in landed titles as "dignity = 1400"-- that number is too high and made it bug out. Anything under 1000 seems to be okay.
 
Last edited:
I've found one way around that is to make them infertile without the game realizing they are infertile. You can do this by removing the fertility penalty, then adding an on_pregnancy event which checks if either parent has a trait that should make them infertile then use cancel_pregnancy. You might also need to add similar checks to not run the event that notifies you of pregnancy since that runs from the same event target.

Thanks, that's really a good idea, and this way i can simulate a very low fertility too. Thanks for your help! :)
 
So I am making a mod for Crusader Kings II I used to mod the game alot but I took a break for quite awhile and forgot a couple of things, I decided to return and I am in the midst of making a mod set during the Crusades with the Map spanning from Constantinople to India and I have recently ran into a problem I don't know how to fix. I crash on the loading screen when it says loading databases, and if I go into definition.csv if I change the max_provinces to the exact number of provinces I have in the mod I can get to the rule selection screen however I crash when I hit start game and if I remember correctly you are always supposed to list one more province then you actually have in the default.map file so I assume the Error create vertices is the main issue but I may be wrong and I have no idea how to fix it. so please help me out and I posted screenshots below of everything I think you would need if you need more just let me know.

here is a picture of the error log

M8BCwxc.jpg


here is a picture of the province.bmp file

NZMeLfI.jpg


here is a picture of the .mod file

TsBlP3s.jpg


here is a picture of the default.map file

Bgt9Jbf.jpg


and here is the picture of the definition.csv file

RvxBYPP.jpg


I also have a seperate post asking this question but I havent gotten an answer for multiple hours so I figured I would try here.
 
So I am making a mod for Crusader Kings II I used to mod the game alot but I took a break for quite awhile and forgot a couple of things, I decided to return and I am in the midst of making a mod set during the Crusades with the Map spanning from Constantinople to India and I have recently ran into a problem I don't know how to fix. I crash on the loading screen when it says loading databases, and if I go into definition.csv if I change the max_provinces to the exact number of provinces I have in the mod I can get to the rule selection screen however I crash when I hit start game and if I remember correctly you are always supposed to list one more province then you actually have in the default.map file so I assume the Error create vertices is the main issue but I may be wrong and I have no idea how to fix it. so please help me out and I posted screenshots below of everything I think you would need if you need more just let me know.

here is a picture of the error log

M8BCwxc.jpg


here is a picture of the province.bmp file

NZMeLfI.jpg


here is a picture of the .mod file

TsBlP3s.jpg


here is a picture of the default.map file

Bgt9Jbf.jpg


and here is the picture of the definition.csv file

RvxBYPP.jpg


I also have a seperate post asking this question but I havent gotten an answer for multiple hours so I figured I would try here.
Please don't ask for script reviews based on screenshots. Zip your entire mod, and upload that.
 
My total conversion mod (which has worked fine in the past) now gets a CTD with the following error message:

[gfx_dx9.cpp:1490]: Error create vertices -2005530516 8 0 28
[gfx_dx9.cpp:1493]: managed

Fairly certain it has something to do with the map. I found several people having the same problem but AFAIK no solution.
Thanks in advance!
I had the same problem and I found out what causes it today...........so as long as it is identical to mine try deleting your terrain.bmp file and replace it with the vanilla one if it works then make it again in photoshop but when you use the rectangular marquee tool unselect feather and anti-aliasing and with the magic wand tool turn off Anti-alias at the top and now you should be good to make it again. this only needs to be applied to your terrain.bmp but you have to make it over again with those settings from the start, just remake the map the way you normally would with those settings and you should be good to go.
 
Could someone please do me a basic template for an event which selects a character from a specific dynasty with a specific title and gives them a new dynasty, along with any kids they might have?

What I'm trying to do here is script it so that if someone from a particular dynasty gains a specific king title, they then get an event that changes their dynasty to this new one. It would need to include the kids as well, or obviously the game would end when they die.

I know there are events that do broadly similar things so I'm assuming it's possible.

I suppose it's kind of like a cadet branch mechanic, but I only want it to fire once and for a specific dynasty, so it needn't be a generic or recurring event.

Can dynasty IDs be used as triggers? If not, this may be difficult...
 
Is it always the exact same person? (e.g., should only fire for Charlemagne). Or just whichever person of the specific dynasty first holds the specified title?
Whoever first holds it. Doesn't matter who they are, so long as they're male.

I know there's an event that changes West Francia to France if the Karlings lose the throne, so it's kind of the opposite of that - if someone from dynasty X gain the throne, then shortly after an event would fire that changes them and their immediate family to dynasty Y.

Does that make sense?
 
Whoever first holds it. Doesn't matter who they are, so long as they're male.

I know there's an event that changes West Francia to France if the Karlings lose the throne, so it's kind of the opposite of that - if someone from dynasty X gain the throne, then shortly after an event would fire that changes them and their immediate family to dynasty Y.

Does that make sense?
Sure does. Here you go:
Code:
namespace = piednoir

character_event = {
    id = piednoir.1
    is_triggered_only = yes #Trigger it from yearly pulse, or perhaps the on_new_holder on_action to be more immediate.
    desc = EVTDESC_piednoir.1 #Your flavour text goes here
    picture = GFX_evt_battle #Pick one
    
    only_playable = yes
    only_men = yes
    
    trigger = {
        dynasty = 1 #Your dynasty id goes here
        has_landed_title = k_england #Your title goes here
    }
    
    immediate = {
        dynasty = 2 #Your new dynasty id goes here
        
        any_child_even_if_dead = {
            dynasty = 2 #Your new dynasty id goes here
            
            any_child_even_if_dead = { #To account for grandkids
                dynasty = 2 #Your new dynasty id goes here
                
                any_child_even_if_dead = { #To account for great-grandkids
                    dynasty = 2 #Your new dynasty id goes here
                }
            }
        }
    }
    
    option = {
        name = EVTOPTA_piednoir.1 #Your flavour text goes here
    }
}
For reference, these pages on the wiki are life-savers:
https://ck2.paradoxwikis.com/Scopes (to find your kids)
https://ck2.paradoxwikis.com/Conditions (aka triggers, to check the current dynasty)
https://ck2.paradoxwikis.com/Commands (aka effects, to set the new dynasty (happens to use the same keyword in this case))
 
" #Trigger it from yearly pulse, or perhaps the on_new_holder on_action to be more immediate. "

What does this bit mean? Where do I have to put on_new_holder?

Do I actually need is_triggered_only = yes if I just want the event to trigger with the dynasty ID and landed title?
 
" #Trigger it from yearly pulse, or perhaps the on_new_holder on_action to be more immediate. "

What does this bit mean? Where do I have to put on_new_holder?

Do I actually need is_triggered_only = yes if I just want the event to trigger with the dynasty ID and landed title?
He is referring to the on_action (wiki) technique for firing events. In /common/on_actions, you will find explanation and the vanilla file.
One of the on_action types there is on_new_holder, which basically means that whenever the game engine internally notes someone is gaining any title, it will try to fire the events that are defined there. So you can put a reference to your event into that on_action clause, and together with the "is_triggered_only = yes" will mean that the game engine will check the event only at the appropriate times. This is good for performance, so you should try to make use of it.

Edit: Explained in more detail by Keizer below.