Results 1 to 2 of 2

Thread: Breakdown of beliefs shows all religions at 0% in all regions, CTD at end of turn, no errors

  1. #1

    Icon8 Breakdown of beliefs shows all religions at 0% in all regions, CTD at end of turn, no errors

    I am trying to activate religion in my RTW mod. All seems to work except one crucial thing: All settlements have all religions at 0% and I get a CTD without an error message (not in log, not in popup message) when I click end turn.

    I also get a CTD when I double click on a settlement with the following message in message_log.txt:

    Code:
    index < this->uni_char_string->length Failed
    This is how it looks like (I added just 2 religions, "Arabic Gods" and "Egyptian Gods"):



    This is the coding I did:

    descr_beliefs.txt

    Code:
    ;; JNF 2021-07-27 - Okay, I TRIED to make this compatable with the old definition style, but there's absolutely no way to verify the format so if things were wrong you'd get a;;                  whole bunch of "settlement '' not found in stringtable" errors because the region DB also has zero verification and since the last line of the settlement has
    ;;                  "pagan" in it instead of "data/ui/pips/pip_religion_pagan_positive.tga", which would be the name of the religion because you're missing a line so it overflows,
    ;;                  and so the format, stupidly, just assumes because the line isn't a valid religion it must, in fact, be the start of another settlement definition. Idiotic.
    ;;                  Anyway, that's why you have to rewrite this, modders. Have fun!
    "religions":
    [
        "arabicgods":
        {
            "trait": "arabicgods",
            "unrest icon": "data/pips/arabicgods_unrest.tga",
            "religion icon":  "data/pips/arabicgods.tga",
            "info button": "data/pips/settlementdetails.tga",
            "name": "ARABICGODS_LABEL",
            "unrest tooltip": "ARABICGODS_UNREST",
            "group": "Eastern",
            "unrest multipliers":
            {
                "heretics": 0.8,
                "heathens": 1,
            },
            "hide at zero": true,
        },
        "egyptiangods":
        {
            "trait": "egyptiangods",
            "unrest icon": "data/pips/egyptiangods_unrest.tga",
            "religion icon":  "data/pips/egyptiangods.tga",
            "info button": "data/pips/settlementdetails.tga",
            "name": "EGYPTIANGODS_LABEL",
            "unrest tooltip": "EGYPTIANGODS_UNREST",
            "group": "Eastern",
            "unrest multipliers":
            {
                "heretics": 0.8,
                "heathens": 1,
            },
            "hide at zero": true,
        },
    ],
    descr_sm_factions.txt

    Code:
    "factions":[
    
    
        "romans_julii":
        {
            "string":       "ROMANS_JULII",
            "description":  "ROMANS_JULII_TEXT",
            "culture":      "roman",
            "ethnicity":    "mediterranean",
            "tags":         [ ],
            "namelists":
            {
                "men":      "roman_m",
                "women":    "roman_w",
                "surnames": "roman_s",
            },
            "logos":
            {
                "loading screen icon":      "data/ui/faction_icons/romans_julii.tga",
                "standard index":           0,
                "rebel standard index":     20,
                "logo index":               0,
                "rebel logo index":         20,
                "strat symbol model":       "data/models_strat/symbol_julii.CAS",
                "strat rebel symbol model": "data/models_strat/symbol_julii.CAS",
            },
            "colours":
            {
                "primary":   [  165,  20,  20,  ],
                "secondary": [  0,  0,  0,  ],
                "family tree":
                {
                    "background":      [  96,  17,  15,  ],
                    "font":            [  255, 255, 255, ],
                    "selected line":   [  255, 255, 255, ],
                    "unselected line": [  200, 187, 187, ],
                },
            },
            "movies":
            {
                "intro":    "data/fmv/intros/julii_intro_1080p.wmv",
                "victory":  "data/fmv/victory/julii_outro.wmv",
                "defeat":   "data/fmv/lose/julii_eliminated.wmv",
            },
            "available in custom battles":      true,
            "prefer naval invasions":           false,
            "default religion":                 "egyptiangods",
            "default battle ai personality":    "default_personality",
            "allow reproduction":               true,
        },
    ...
    descr_regions.txt (All religions shares sum to 100 per each region)

    Code:
    ;; regions list
    ;
    
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Armenia
    ;    legion: TODO
        Artaxarta
        armenia
        Saxones
        202 61 17
        iron, slaves
        5
        0
        arabicgods 77 egyptiangods 23
    ...
    descr_campaigns.txt

    Code:
    ;; JNF 2021-06-10 - define a new campaign list so people can define new campaigns and enable/disable important features for them individually"campaign list":
    [
        {
            ;;title is the panel header, menu is the menu button test, folder is the folder with data/world/maps/campaign to use
            "menu": "UI_FERAL_LP_CAMPAIGN",
            "title": "UI_FERAL_CAMPAIGN",
            "folder": "imperial_campaign",
            
            "features":
            {
                ;; JNF 2021-06-14 - Loyalty should work, religion is slightly borked pending refactor but it should enable/disable the UI perfectly fine
                "loyalty":  false,
                "religion": true,
                
                "rebel merchants": true,
            },
        },
    ],
    export_descr_character_traits.txt

    Code:
    Trait arabicgods
        Characters all
        AntiTraits egyptiangods
    
    
        Level arabicgods
            Description arabicgods_desc
            EffectsDescription arabicgods_effects_desc
            Threshold  1
            Religious_Belief arabicgods 1
    
    
    
    
    Trait egyptiangods
        Characters all
        AntiTraits arabicgods
    
    
        Level egyptiangods
            Description egyptiangods_desc
            EffectsDescription egyptiangods_effects_desc
            Threshold  1
            Religious_Belief egyptiangods 1
    
    ...
    
    
    
    Trigger agent_religion_egyptiangods
        WhenToTest AgentCreated
        Condition FactionLeaderTrait egyptiangods >= 1
        Affects egyptiangods 1 Chance 100
    
    
    Trigger comesofage_religion_egyptiangods
        WhenToTest CharacterComesOfAge
        Condition FactionLeaderTrait egyptiangods >= 1
        Affects egyptiangods 1 Chance 100
    
    
    Trigger adopt_religion_egyptiangods
        WhenToTest OfferedForAdoption
        Condition FactionLeaderTrait egyptiangods >= 1
        Affects egyptiangods 1 Chance 100
    export_descr_buildings.txt (example of one temple which can be built by all factions but no temple is present from the beginning in the campaign)
    all factions have their correct default religion

    Code:
    ...
    building temple_of_battle
    {
        tag temple
        icon religion
        levels temple_of_battle_shrine temple_of_battle_temple temple_of_battle_large_temple temple_of_battle_awesome_temple temple_of_battle_pantheon
        {
        
            temple_of_battle_shrine requires no_other_temple
            {
                capability
                {
                religious_belief arabicgods 1 requires factions { armenia, }
                religious_belief egyptiangods 1 requires factions { britons, }
                religious_belief arabicgods 1 requires factions { carthage, }
                religious_belief egyptiangods 1 requires factions { dacia, }
                religious_belief arabicgods 1 requires factions { egypt, }
                religious_belief egyptiangods 1 requires factions { gauls, }
                religious_belief arabicgods 1 requires factions { germans, }
                religious_belief egyptiangods 1 requires factions { greek_cities, }
                religious_belief arabicgods 1 requires factions { macedon, }
                religious_belief egyptiangods 1 requires factions { numidia, }
                religious_belief arabicgods 1 requires factions { parthia, }
                religious_belief egyptiangods 1 requires factions { pontus, }
                religious_belief egyptiangods 1 requires factions { romans_senate, }
                religious_belief arabicgods 1 requires factions { romans_brutii, }
                religious_belief egyptiangods 1 requires factions { romans_julii, }
                religious_belief arabicgods 1 requires factions { romans_scipii, }
                religious_belief egyptiangods 1 requires factions { scythia, }
                religious_belief arabicgods 1 requires factions { seleucid, }
                religious_belief egyptiangods 1 requires factions { spain, }
                religious_belief arabicgods 1 requires factions { thrace, }
                religious_belief egyptiangods 1 requires factions { syracuse, }
                religious_belief arabicgods 1 requires factions { epirus, }
                religious_belief egyptiangods 1 requires factions { sparta, }
                            }
                construction 2
                cost 5600
                settlement_min town
                upgrades
                {
                    temple_of_battle_temple
                }
            }
        
            temple_of_battle_temple requires no_other_temple
            {
                capability
                {
                religious_belief arabicgods 1 requires factions { armenia, }
                religious_belief egyptiangods 1 requires factions { britons, }
                religious_belief arabicgods 1 requires factions { carthage, }
                religious_belief egyptiangods 1 requires factions { dacia, }
                religious_belief arabicgods 1 requires factions { egypt, }
                religious_belief egyptiangods 1 requires factions { gauls, }
                religious_belief arabicgods 1 requires factions { germans, }
                religious_belief egyptiangods 1 requires factions { greek_cities, }
                religious_belief arabicgods 1 requires factions { macedon, }
                religious_belief egyptiangods 1 requires factions { numidia, }
                religious_belief arabicgods 1 requires factions { parthia, }
                religious_belief egyptiangods 1 requires factions { pontus, }
                religious_belief egyptiangods 1 requires factions { romans_senate, }
                religious_belief arabicgods 1 requires factions { romans_brutii, }
                religious_belief egyptiangods 1 requires factions { romans_julii, }
                religious_belief arabicgods 1 requires factions { romans_scipii, }
                religious_belief egyptiangods 1 requires factions { scythia, }
                religious_belief arabicgods 1 requires factions { seleucid, }
                religious_belief egyptiangods 1 requires factions { spain, }
                religious_belief arabicgods 1 requires factions { thrace, }
                religious_belief egyptiangods 1 requires factions { syracuse, }
                religious_belief arabicgods 1 requires factions { epirus, }
                religious_belief egyptiangods 1 requires factions { sparta, }
                            }
                construction 3
                cost 8400
                settlement_min large_town
                upgrades
                {
                    temple_of_battle_large_temple
                }
            }
        
            temple_of_battle_large_temple requires no_other_temple
            {
                capability
                {
                            
                religious_belief arabicgods 1 requires factions { armenia, }
                religious_belief egyptiangods 1 requires factions { britons, }
                religious_belief arabicgods 1 requires factions { carthage, }
                religious_belief egyptiangods 1 requires factions { dacia, }
                religious_belief arabicgods 1 requires factions { egypt, }
                religious_belief egyptiangods 1 requires factions { gauls, }
                religious_belief arabicgods 1 requires factions { germans, }
                religious_belief egyptiangods 1 requires factions { greek_cities, }
                religious_belief arabicgods 1 requires factions { macedon, }
                religious_belief egyptiangods 1 requires factions { numidia, }
                religious_belief arabicgods 1 requires factions { parthia, }
                religious_belief egyptiangods 1 requires factions { pontus, }
                religious_belief egyptiangods 1 requires factions { romans_senate, }
                religious_belief arabicgods 1 requires factions { romans_brutii, }
                religious_belief egyptiangods 1 requires factions { romans_julii, }
                religious_belief arabicgods 1 requires factions { romans_scipii, }
                religious_belief egyptiangods 1 requires factions { scythia, }
                religious_belief arabicgods 1 requires factions { seleucid, }
                religious_belief egyptiangods 1 requires factions { spain, }
                religious_belief arabicgods 1 requires factions { thrace, }
                religious_belief egyptiangods 1 requires factions { syracuse, }
                religious_belief arabicgods 1 requires factions { epirus, }
                religious_belief egyptiangods 1 requires factions { sparta, }
                            }
                construction 4
                cost 11200
                settlement_min city
                upgrades
                {
                    temple_of_battle_awesome_temple
                }
            }
        
            temple_of_battle_awesome_temple requires factions { armenia, carthage, egypt, greek_cities, macedon, numidia, parthia, pontus, slave, romans_senate, romans_brutii, romans_julii, romans_scipii, seleucid, thrace, syracuse, epirus, sparta, } and no_other_temple
            {
                capability
                {
                       
                religious_belief arabicgods 1 requires factions { armenia, }
                religious_belief egyptiangods 1 requires factions { britons, }
                religious_belief arabicgods 1 requires factions { carthage, }
                religious_belief egyptiangods 1 requires factions { dacia, }
                religious_belief arabicgods 1 requires factions { egypt, }
                religious_belief egyptiangods 1 requires factions { gauls, }
                religious_belief arabicgods 1 requires factions { germans, }
                religious_belief egyptiangods 1 requires factions { greek_cities, }
                religious_belief arabicgods 1 requires factions { macedon, }
                religious_belief egyptiangods 1 requires factions { numidia, }
                religious_belief arabicgods 1 requires factions { parthia, }
                religious_belief egyptiangods 1 requires factions { pontus, }
                religious_belief egyptiangods 1 requires factions { romans_senate, }
                religious_belief arabicgods 1 requires factions { romans_brutii, }
                religious_belief egyptiangods 1 requires factions { romans_julii, }
                religious_belief arabicgods 1 requires factions { romans_scipii, }
                religious_belief egyptiangods 1 requires factions { scythia, }
                religious_belief arabicgods 1 requires factions { seleucid, }
                religious_belief egyptiangods 1 requires factions { spain, }
                religious_belief arabicgods 1 requires factions { thrace, }
                religious_belief egyptiangods 1 requires factions { syracuse, }
                religious_belief arabicgods 1 requires factions { epirus, }
                religious_belief egyptiangods 1 requires factions { sparta, }
                            }
                construction 5
                cost 14000
                settlement_min large_city
                upgrades
                {
                    temple_of_battle_pantheon
                }
            }
        
            temple_of_battle_pantheon requires factions { armenia, carthage, egypt, greek_cities, macedon, numidia, parthia, pontus, slave, romans_senate, romans_brutii, romans_julii, romans_scipii, seleucid, thrace, syracuse, epirus, sparta, } and no_other_temple
            {
                capability
                {
                            
                religious_belief arabicgods 1 requires factions { armenia, }
                religious_belief egyptiangods 1 requires factions { britons, }
                religious_belief arabicgods 1 requires factions { carthage, }
                religious_belief egyptiangods 1 requires factions { dacia, }
                religious_belief arabicgods 1 requires factions { egypt, }
                religious_belief egyptiangods 1 requires factions { gauls, }
                religious_belief arabicgods 1 requires factions { germans, }
                religious_belief egyptiangods 1 requires factions { greek_cities, }
                religious_belief arabicgods 1 requires factions { macedon, }
                religious_belief egyptiangods 1 requires factions { numidia, }
                religious_belief arabicgods 1 requires factions { parthia, }
                religious_belief egyptiangods 1 requires factions { pontus, }
                religious_belief egyptiangods 1 requires factions { romans_senate, }
                religious_belief arabicgods 1 requires factions { romans_brutii, }
                religious_belief egyptiangods 1 requires factions { romans_julii, }
                religious_belief arabicgods 1 requires factions { romans_scipii, }
                religious_belief egyptiangods 1 requires factions { scythia, }
                religious_belief arabicgods 1 requires factions { seleucid, }
                religious_belief egyptiangods 1 requires factions { spain, }
                religious_belief arabicgods 1 requires factions { thrace, }
                religious_belief egyptiangods 1 requires factions { syracuse, }
                religious_belief arabicgods 1 requires factions { epirus, }
                religious_belief egyptiangods 1 requires factions { sparta, }
                            }
                construction 6
                cost 16800
                settlement_min huge_city
                upgrades
                {
                    
                }
            }
            }
        plugins
        {
        }
    }
    ...
    export_vnvs.txt

    Code:
    ...
    
    
    {arabicgods}   Worships Arabic Gods
    {arabicgods_desc}   This man is a believer in Arabic Gods.
    {arabicgods_effects_desc}   +5% conversion to Arabic Gods
    
    
    {egyptiangods}   Worships Egyptian Gods
    {egyptiangods_desc}   This man is a believer in Egyptian Gods.
    {egyptiangods_effects_desc}   +5% conversion to Egyptian Gods
    expanded_bi.txt

    Code:
    ...
    {ARABICGODS_LABEL} Arabic Gods
    {ARABICGODS_ORDER} The belief in Arabic Gods is improving public order in this settlement
    {ARABICGODS_UNREST} The belief in Arabic Gods is causing unrest in this settlement
    
    
    {EGYPTIANGODS_LABEL} Egyptian Gods
    {EGYPTIANGODS_ORDER} The belief in Egyptian Gods is improving public order in this settlement
    {EGYPTIANGODS_UNREST} The belief in Egyptian Gods is causing unrest in this settlement
    ...
    descr_strat.txt (all named characters have their factions default religion trait at 1)

    Code:
    ...character     Mardonius, named character, leader, age 49, , x 190, y 80
    traits GoodCommander 1, PoliticsSkill 3, GoodAdministrator 3, egyptiangods 1
    army
    unit    east generals cavalry early    exp 0 armour 0 weapon_lvl 0
    unit    east archer    exp 1 armour 0 weapon_lvl 0
    unit    east peltast    exp 0 armour 0 weapon_lvl 0
    ...
    All of the symbols and pips are in data/text as .tga files.

    Please help, I am absolutely clueless what I am doing wrong
    Last edited by Ocyalos; January 09, 2022 at 02:58 AM.

  2. #2

    Default Re: Breakdown of beliefs shows all religions at 0% in all regions, CTD at end of turn, no errors

    My god did I waste a lot of time with this issue. But I solved it!

    The problem was that I had some files missing which are necessary for map.rwm generation in data/world/maps/campaign/imperial_campaign (your mod might use data/world/maps/base/ instead)
    I did not add these files to my modfolder because I did not change them compared to original vanilla game.
    Anyway, this caused the game to not generate a new map.rwm file which means that any changes I made to descr_regions.txt like adding the religions did not have any effects, resulting in all religions being set to 0% and the CTDs

    So make sure all of the following files are in your imperial_campaign or base folder, even if you did not change anything there:

    map_roughness.tga
    map_snow.tga
    map_trade_routes.tga
    water_surface.tga
    descr_disasters.txt
    descr_regions.txt
    descr_strat.txt
    descr_terrain.txt
    descr_win_conditions.txt
    map_climates.tga
    map_fe.tga
    map_features.tga
    map_ground_types.tga
    map_heights.tga
    map_regions.tga
    Last edited by Ocyalos; January 09, 2022 at 03:50 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •