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

Alivekari123

Recruit
1 Badges
Sep 26, 2021
4
3
  • Crusader Kings II
Hello everyone, my first mod I made, which contains only my first religion, is constantly crashing, the game is only half loaded and then crashed.
religion
Code:
saranit_group = {

    has_coa_on_barony_only = no
    graphical_culture =englishgfx indiangfx
        alternate_start = { always = no }
    playable = yes
        crusade_cb = crusade
        ai_peaceful = no
        ai_fabricate_claims = yes
        hostile_within_group = no

   
       ai_convert_same_group = 1 # try to convert if ai_zeal is high
       ai_convert_other_group = 2    # always try to convert
   
        color = { 0.37 0.15 0.61 }

        interface_skin = { pagan_interface }
   
    male_names = {Andrew Antoninus Bartolomeus Benedict Christian Christopher Clement Constantine David            Demetrius Eustace George Gregory Hans Isaac Joakim Jacob John Jordan Joseph Laurence Magnus Marcus             Martin   Matthew Michael Nicholas Patrick Paul Peter Philip
        Salvador Samuel Sebastian Simon Stephen Thomas Abraham Alexander Daniel Jesus Job Joshua Cyrus Luke            Zachariah
    }
    female_names = {Anna Beatrice Benedicta Brigid Catherine Cecilia Christina Clementia Constance Dorothy                 Elisabeth Joan Judith Juliana Helen Magdalena Margaret Maria Marine Patricia Philippa Rachel                 Sarah Sophia Stephania
    }
   
    saranism_reformed  = {
        graphical_culture =englishgfx indiangfx
                secondary_event_pictures = norse_pagan
                icon = 5
                heresy_icon = 6
                ai_convert_same_group = 1
                ai_convert_other_group = 2
       
                color = { 0.37 0.15 0.61 }
       
        crusade_name = GREAT_HOLY_WAR
        scripture_name = THE_CODEX_OF_MIRACLES
        priest_title = APOSTATE
       
        high_god_name = GOD_SARANUS
       
        god_names = {
            GOD_ERGU GOD_IRARIS GOD_ANOS GOD_VANAGI GOD_THODITE GOD_ELA GOD_SMALLER_GODS
        }
        evil_god_names = {
            GOD_DAREUS GOD_YDITE GOD_TORN GOD_THE_DARK_SPIRITS
        }

                character_modifier = {
                christian_opinion = -50
                muslim_opinion = -50
                jewish_group_opinion = -50
                zoroastrian_group_opinion = -25
                pagan_group_opinion = -30
                indian_group_opinion = -30
        }
       
        unit_modifier = {
            saranit_troops_morale = 4.4
            saranit_troops_offensive = 4.4
            saranit_troops_defensive = 3.4
            character_modifier = { learning = 1
            fertility = 80.00
            martial = 10
            intrigue = 20
            stewardship = 2
        }
        }
       
        has_heir_designation = yes
        priests_can_marry = yes
        female_temple_holders = yes
                priests_can_inherit = yes
               
        feminist = yes
        defensive_attrition = yes
        max_consorts = 100
        divine_blood = yes # Sacred close-kin marriage mechanics
        bs_marriage = yes
        pc_marriage = yes
        psc_marriage = no
        cousin_marriage = yes
        matrilineal_marriages = yes
        women_can_take_consorts = yes
       
        short_reign_opinion_year_mult = 0.0
        aggression = 2.0
        allow_looting = yes
        allow_rivermovement = yes
        seafarer = yes
         allow_viking_invasion = yes
         can_excommunicate = yes
         can_grant_divorce = yes
         can_grant_invasion_cb = invasion
         can_grant_claim = yes
         can_call_crusade = yes
         ignores_defensive_attrition = yes
         peace_prestige_loss = yes
         raised_vassal_opinion_loss = no
         can_demand_religious_conversion = yes
         allow_in_ruler_designer = no
         reformer_head_of_religion = yes
         hard_to_convert = yes
         interface_skin = { pagan_interface }
         join_crusade_if_bordering_hostile = yes
         rel_head_defense = yes
         pacifist = no
       
        religious_clothing_head = 3
        religious_clothing_priest = 3
       
        attacking_same_religion_piety_loss = yes
       
        dislike_tribal_organization = yes
       
        intermarry = saranism

        saranism  = {
        graphical_culture =englishgfx indiangfx
                secondary_event_pictures = norse_pagan
                icon = 5
                heresy_icon = 6
                ai_convert_same_group = 1
                ai_convert_other_group = 2
       
                color = { 0.37 0.15 0.61 }
       
        crusade_name = GREAT_HOLY_WAR
        scripture_name = THE_CODEX_OF_MIRACLES
        priest_title = APOSTATE
       
        high_god_name = GOD_SARANUS
       
        god_names = {
            GOD_ERGU GOD_IRARIS GOD_ANOS GOD_VANAGI GOD_THODITE GOD_ELA GOD_SMALLER_GODS
        }
        evil_god_names = {
            GOD_DAREUS GOD_YDITE GOD_TORN GOD_THE_DARK_SPIRITS
        }

                character_modifier = {
                christian_opinion = -50
                muslim_opinion = -50
                jewish_group_opinion = -50
                zoroastrian_group_opinion = -25
                pagan_group_opinion = -30
                indian_group_opinion = -30
        }
       
        unit_modifier = {
            saranit_troops_morale = 4.4
            saranit_troops_offensive = 4.4
            saranit_troops_defensive = 3.4
            character_modifier = { learning = 1
            fertility = 80.00
            martial = 10
            intrigue = 20
            stewardship = 2
        }
        }
       
        has_heir_designation = yes
        priests_can_marry = yes
        female_temple_holders = yes
                priests_can_inherit = yes
               
        feminist = yes
        defensive_attrition = yes
        max_consorts = 100
                reformed = saranism_reformed
        divine_blood = yes # Sacred close-kin marriage mechanics
        bs_marriage = yes
        pc_marriage = yes
        psc_marriage = no
        cousin_marriage = yes
        matrilineal_marriages = yes
        women_can_take_consorts = yes
       
        short_reign_opinion_year_mult = 0.0
        aggression = 2.0
        allow_looting = yes
        allow_rivermovement = yes
        seafarer = yes
         allow_viking_invasion = yes
         ignores_defensive_attrition = yes
         peace_prestige_loss = yes
         raised_vassal_opinion_loss = no
         can_demand_religious_conversion = yes
         allow_in_ruler_designer = yes
         hard_to_convert = yes
         interface_skin = { pagan_interface }
         join_crusade_if_bordering_hostile = yes
         pacifist = no
       
        religious_clothing_head = 3
        religious_clothing_priest = 3
       
        attacking_same_religion_piety_loss = yes
       
        dislike_tribal_organization = yes
       
        intermarry = saranism_reformed
    }

holy sites
Code:
c_baghdad = {
    holy_site = saranism
}

c_damascus = {
    holy_site = saranism
}

c_antiocheia = {
    holy_site = saranism
}

c_jerusalem = {
    holy_site = saranism
}

c_cairo = {
    holy_site = saranism
}
religion heads
Code:
d_saranism_reformed  = {
    color = { 192 168 0 }
   
    capital = 774 # Jerusalim
   
    title = "GREAT_APOSTATE"
   
    creation_requires_capital = no
   
    allow = {
        religion = saranism_reformed
        num_of_holy_sites = 3
        piety = 500

    controls_religion = saranism_reformed
    short_name = yes
    religion = saranism_reformed
   
    title_female = "GREAT_APOSTATE"
    foa = "GREAT_APOSTATE_FOA"
   
    # Always exists

    landless = yes
   
    dignity = 100 # Counted as having this many more counties than it does
   
    primary = yes
    assimilate = no
   
     dynasty_title_names = no     # Will not be named "Seljuk", etc.
}
I followed the instructions from the wiki and I have no idea why this is happening. Anyone know how to fix this ?
 
From a fairly quick look at the code:

- While it doesn't break anything, "ai_peaceful = no" does nothing since it's the default.

- "graphical_culture =englishgfx indiangfx" is incorrect; I don't know if you even can have multiple ones for a religion, but if you can, you need to put them inside curly brackets ("{ <code> }", no quotation marks).

- You have a character_modifier for saranism_reformed inside your unit_modifier, which is incorrect. Close the first modifier before you start the second, and merge the character_modifiers into one.

- 100 concubines wouldn't break the game, but it'd most likely have side-effects (especially as far as performance goes) if lots of characters had it. Under the assumption that you most likely will play as the rel head, a custom government for the rel head that enables extra consorts for them would likely be better. Also, the base game caps the number of living non-secret bastard children for the same character to 9 (10 if the last birth resulted in twins), which can't be toggled in the defines, so if you want there to be additional children as well you'll have to add an event to cause additional pregnancies where relevant.

- Unsure if intended, and not the cause behind your issue: You block uncle-niece/aunt-nephew marriage with "psc_marriage = no", which might be unintentional seeing as you allow all other kinds of close family marriage.

- It doesn't break anything, but "pacifist = no" does nothing.

- Unsure if intentional, and not the cause behind your issue: You have "dislike_tribal_organization = yes" for the reformed religion, which is inconsistent with vanilla.

- Aside from the closing bracket issue, saranism has the same issues as saranism_reformed.

- The saranit_group doesn't have a closing bracket.

- d_saranism_reformed's allow_block is missing a closing bracket.

The Validator would most likely have caught the bugs above, and I'd suggest you get it since it's very valuable for finding typos, missing brackets, and other things that a human might not catch.

Additionally, if you haven't done so already, make sure there's a flag file for d_saranism_reformed; I don't remember if the lack of one would cause a crash, but it'd cause some other issues at the very least.

Also, your indents are all over the place, which makes it hard to read your code and makes it less clear where there are errors because it's less clear where code blocks that should be inside curly brackets end.
 
  • 1Like
Reactions:
Looks like you dropped a } from the end of the first file. But it's hard to tell, as your indentation is all over the place. I'd recommend using Notepad++ or some other advanced text editor to clean it all up and to double-check your curly braces.