• 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.
Quick question, I created a custom empire title that can only be created under certain conditions. However, looking at how the Kingdom of Prussia mod was constructed, I built my own like it and everything worked perfectly...... except that the title never appeared and the decision just stuck around......

You could click on it and loose the 1200 gold, as well as gain 2000 prestige, but the actual empire title would not show up.... any ideas?

Side note, I did not edit any duchies/kingdoms to become de jure to this empire if that had any impact.
 
Quick question, I created a custom empire title that can only be created under certain conditions. However, looking at how the Kingdom of Prussia mod was constructed, I built my own like it and everything worked perfectly...... except that the title never appeared and the decision just stuck around......

You could click on it and loose the 1200 gold, as well as gain 2000 prestige, but the actual empire title would not show up.... any ideas?

Side note, I did not edit any duchies/kingdoms to become de jure to this empire if that had any impact.
Without seeing your script my quick guess would be your title starts out deactivated and you are not activating the title in the decision before granting it to someone
 
Without seeing your script my quick guess would be your title starts out deactivated and you are not activating the title in the decision before granting it to someone
I can post all of the scripting, however there is a hefty amount and it could be a hassle to read through all of it.
Code:
#crown_parthava
    crown_parthava = {
        is_high_prio = yes
        desc = crown_parthava
        
        potential = {
            is_playable = yes
            culture = tocharian
            OR = {
                tier = KING
            }
            OR = {
                religion = zoroastrian
                religion = mazdaki
                religion = manichaean
            }
            OR = {
                has_landed_title = k_persia
            }
            e_parthava = { has_holder = no }
            
            NOT = { is_nomadic = yes }
            NOT = { is_tribal = yes }
        }
        
        allow = {
            war = no
            is_adult = yes
            culture = tocharian
            OR = {
                religion = zoroastrian
                religion = mazdaki
                religion = manichaean
            }
            NOT = { trait = incapable }
            prisoner = no
            prestige = 1500
            wealth = 1200
            NOT = { tier = EMPEROR }
            has_landed_title = k_persia
            NOT {
                OR {
                    primary_title = { title = e_persia }
                }
            }
            completely_controls = d_tabaristan
            completely_controls = d_khorasan
            completely_controls = d_hamadan
            realm_size = 100
        }
        
        effect = {
            set_character_flag = crown_parthava_flag           
            #set the capital to Gurgan if not already
            if = {
                limit = {
                    NOT = {
                        capital_scope = { province_id = 633 }
                    }
                }
                633 = { #Gurgan
                    ROOT = { capital = PREV }
                }
            }
            
            # set the new capital culture to tocharian, also religion
            capital_scope = {
                if = {
                    limit = {
                        NOT = { culture = ROOT }
                    }
                    culture = ROOT
                }
                if = {
                    limit = {
                        NOT = { religion = ROOT }
                    }
                    religion = ROOT
                }
            }
            
            prestige = 3000
            
            wealth = -1200
            
            character_event = { id = PH.0001 }
        }
        
        revoke_allowed = {
            always = no
        }
        
        ai_will_do = {
            factor = 1
        }
    }

As it stands, I think this is where the problem is, but I can post more if you need it.
 
Quick question, I just bumped into something I haven't noticed before while writing CK2 Events. From what I have been able to collect it seems like some people put their localization strings within quotation marks, and I can't seem to figure out why the hell they are doing it. Does anyone have a clue?

Code:
# Blackmail or not
letter_event = {
    id = 7255
    desc = "EVTDESC7255"
    picture = GFX_evt_whispers
    
    hide_from = yes
    
    is_triggered_only = yes
    
    option = {
        name = "EVTOPTA7255"
        ai_chance = {
            factor = 75
            modifier = {
                factor = 2
                NOT = { opinion = { who = FROM value = -25 } }
            }
        }
        FROM = { letter_event = { id = 7260 days = 1 tooltip = "EVTTOOLTIP7260" } }
    }
    option = {
        name = "EVTOPTB7255"
        ai_chance = {
            factor = 25
            modifier = {
                factor = 0
                NOT = { opinion = { who = FROM value = -50 } }
            }
        }
    }
}

Now the natural question would obviously be, why the hell would someone ask a question like this. Which also happens to be a question I'll quite happily answer!

For the last couple of days I've been working on a tool which converts the localization strings of an Event file and puts it in a .csv for you! So far it's working out pretty much as expected, but I'd like to ensure that it works with as many ways of creating localization as possible, and therefore knowing why some mod developers (and even Paradox employees mind you!) do this.

Looking forward to understanding this part of the localization process!
Stroopwaffel
 
I'm currently experiencing an issue with my total conversion mod with a custom map, which is also my first mod ever, I know, bad idea. I've gotten the game to a point where I'm able to actually load it up and play it. The issue I'm having is that the game will CTD after about 200-250 years years. I can load up the save, but it always crashes pretty quickly. The earliest was about 3 months, and the longest was about 10 years. I experienced this issue when I just had 9 counties and no events or decisions at all, and I'm still having it with 40+ counties and with birth events added back in.

The crash seems to happen no matter the starting date. When running from 1066 the game starts to crash in the 1260s or 1270s. I changed the earliest start date to 500 and the crash occured in the 760s. Any idea what could be causing this crash?
 
Quick question, I just bumped into something I haven't noticed before while writing CK2 Events. From what I have been able to collect it seems like some people put their localization strings within quotation marks, and I can't seem to figure out why the hell they are doing it. Does anyone have a clue?

Code:
# Blackmail or not
letter_event = {
    id = 7255
    desc = "EVTDESC7255"
    picture = GFX_evt_whispers
   
    hide_from = yes
   
    is_triggered_only = yes
   
    option = {
        name = "EVTOPTA7255"
        ai_chance = {
            factor = 75
            modifier = {
                factor = 2
                NOT = { opinion = { who = FROM value = -25 } }
            }
        }
        FROM = { letter_event = { id = 7260 days = 1 tooltip = "EVTTOOLTIP7260" } }
    }
    option = {
        name = "EVTOPTB7255"
        ai_chance = {
            factor = 25
            modifier = {
                factor = 0
                NOT = { opinion = { who = FROM value = -50 } }
            }
        }
    }
}

Now the natural question would obviously be, why the hell would someone ask a question like this. Which also happens to be a question I'll quite happily answer!

For the last couple of days I've been working on a tool which converts the localization strings of an Event file and puts it in a .csv for you! So far it's working out pretty much as expected, but I'd like to ensure that it works with as many ways of creating localization as possible, and therefore knowing why some mod developers (and even Paradox employees mind you!) do this.

Looking forward to understanding this part of the localization process!
Stroopwaffel
It makes no difference, probably gets done by some as an old habit.
 
I can post all of the scripting, however there is a hefty amount and it could be a hassle to read through all of it.
Code:
#crown_parthava
    crown_parthava = {
        is_high_prio = yes
        desc = crown_parthava
      
        potential = {
            is_playable = yes
            culture = tocharian
            OR = {
                tier = KING
            }
            OR = {
                religion = zoroastrian
                religion = mazdaki
                religion = manichaean
            }
            OR = {
                has_landed_title = k_persia
            }
            e_parthava = { has_holder = no }
          
            NOT = { is_nomadic = yes }
            NOT = { is_tribal = yes }
        }
      
        allow = {
            war = no
            is_adult = yes
            culture = tocharian
            OR = {
                religion = zoroastrian
                religion = mazdaki
                religion = manichaean
            }
            NOT = { trait = incapable }
            prisoner = no
            prestige = 1500
            wealth = 1200
            NOT = { tier = EMPEROR }
            has_landed_title = k_persia
            NOT {
                OR {
                    primary_title = { title = e_persia }
                }
            }
            completely_controls = d_tabaristan
            completely_controls = d_khorasan
            completely_controls = d_hamadan
            realm_size = 100
        }
      
        effect = {
            set_character_flag = crown_parthava_flag         
            #set the capital to Gurgan if not already
            if = {
                limit = {
                    NOT = {
                        capital_scope = { province_id = 633 }
                    }
                }
                633 = { #Gurgan
                    ROOT = { capital = PREV }
                }
            }
          
            # set the new capital culture to tocharian, also religion
            capital_scope = {
                if = {
                    limit = {
                        NOT = { culture = ROOT }
                    }
                    culture = ROOT
                }
                if = {
                    limit = {
                        NOT = { religion = ROOT }
                    }
                    religion = ROOT
                }
            }
          
            prestige = 3000
          
            wealth = -1200
          
            character_event = { id = PH.0001 }
        }
      
        revoke_allowed = {
            always = no
        }
      
        ai_will_do = {
            factor = 1
        }
    }

As it stands, I think this is where the problem is, but I can post more if you need it.
As Rydelfox said, I fail to see the part here that gives out the title. Unless that part is in the event?
 
Code:
option = {
        any_ruler = {
            if = {
                limit = {
                    OR = {
                        culture = croatian
                        culture = romanian
                        culture = serbian
                        culture = bulgarian
                        culture = hungarian
                    }
                }
                character_event = { id = myevent }
            }
        }
    }

Just need to know, why is scoping like this not working/allowed and how to work around it i.e. send this event to a ruler with one of those cultures.
 
Any_ruler already allows a limit, making the If unneccessary. Just put this:
Code:
option = {
    any_ruler = {
        limit = {
            OR = {
                culture = croatian
                culture = romanian
                culture = serbian
                culture = bulgarian
                culture = hungarian
            }
        }
        character_event = { id = myevent }
    }
}
 
I want to prohibit nomads from creating duchy level titles. Is there an easier way to do this other than manually going through all the titles and adding in a potential = { is_nomadic = no }?
 
The opinions are located in common/opinions. The localization (which will, naturally, be in the localization folder) for the opinion's name will be the name of the opinion itself from the aforementioned files. The description will be <opinion_name>_desc
 
As Rydelfox said, I fail to see the part here that gives out the title. Unless that part is in the event?
I don't see a part where you're actually giving the character the title. Is that in the event PH.0001? If so, is that event firing?
Hmmm,

Is there a specific line of code I could add in that would do just that? I am an amateur modder at best so what I can do, I do by mimicry until I learn it. I have looked through the other mod's files and haven't seen anything that would simply give the title to said character.
 
Depending on your exact needs, either grant_title or usurp_title
You can find the details and syntax of the commands at https://ck2.paradoxwikis.com/Commands
Will that also grant the title to my character, even if it is an imperial title?

EDIT: By which I mean, if I add in this line of code to my event then my character will get the title if I take the decision?
 
Those would both give the landed title to the selected character. Neither care about the rank of the character or the title.
Okay.

Now it says grant_title = FROM, forgive my lack of knowledge but I assume that means that I need to replace FROM with the in game code for my empire of Parthava?