• 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.
Hello, busy learning to mod.

Code:
namespace = population


# Set starting population
province_event = {
    id = population.1
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        NOT = {
            has_global_flag = population_initialised
            }
    }

    any_province = {
        limit = {
            has_owner = yes
            }

        any_province_holding = {
            set_variable = {
                which = local_peasant_population
                value = 9000
                }
            set_variable = {
                which = local_citizen_population
                value = 1000
                }
        }
    }

    repeat_event = {
        province_event = {
            id = population.2
            days = 365
            }
    }
}

More or less a "my first event", but it doesn't seem to be working. When I go into a game and fire it in the console, it seems to execute, but on checking the save file, none of the holdings have actually had the variables above set.

Any solutions?
 
Hello, busy learning to mod.

Code:
namespace = population


# Set starting population
province_event = {
    id = population.1
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        NOT = {
            has_global_flag = population_initialised
            }
    }

    any_province = {
        limit = {
            has_owner = yes
            }

        any_province_holding = {
            set_variable = {
                which = local_peasant_population
                value = 9000
                }
            set_variable = {
                which = local_citizen_population
                value = 1000
                }
        }
    }

    repeat_event = {
        province_event = {
            id = population.2
            days = 365
            }
    }
}

More or less a "my first event", but it doesn't seem to be working. When I go into a game and fire it in the console, it seems to execute, but on checking the save file, none of the holdings have actually had the variables above set.

Any solutions?
The any_province and repeat_event blocks should be put inside an immediate block (or an after, or an option).
 
Follow up question! Trying this:

Code:
namespace = population

# Set starting population
province_event = {
    id = population.1
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        NOT = {
            has_global_flag = population_initialised
            }
    }

    immediate = {
        any_province = {
            limit = {
                has_owner = yes
                }

            any_province_holding = {
                set_variable = {
                    which = local_peasant_population
                    value = 9000
                    }
                set_variable = {
                    which = local_citizen_population
                    value = 1000
                    }
                }
            }
       
        repeat_event = {
            id = population.2
            days = 365
            }
        }
    }

Still doesn't work, and there's nothing in the error log but the save still doesn't show the holdings as having the variables set. Any ideas?
 
Still doesn't work, and there's nothing in the error log but the save still doesn't show the holdings as having the variables set. Any ideas?
I don't spot any errors in the syntax. But I'm not sure where in a save file variables are set, actually. Have you tried using the charinfo command and hovering over the respective title shields?
 
Still doesn't work, and there's nothing in the error log but the save still doesn't show the holdings as having the variables set. Any ideas?

I'm not sure, but it may not be possible to set variables to individual holdings. The wiki only mentions titles and provinces, but not holdings.
 
I'm not sure, but it may not be possible to set variables to individual holdings. The wiki only mentions titles and provinces, but not holdings.
Holdings are titles though, of barony level.
 
Holdings are titles though, of barony level.

TEXFg17.png


Here is the event with hidden window turned off and charinfo turned on (I changed it to a character_event to see if that made any difference, but no...).

It looks like it may not be working because there's some sort of artefact before local_citizen_population - I can see it doesn't display right. I have no idea what would cause this though! The .txt file is in ANSI.
 
If I create a new character and put her in the History-characters-Greek.txt file and use a number that I got from a character created by the ruler designer (in other words, I created a character using ruler designer, abandoned that game, but used that number in the Greek.txt file), will the game later try to create a character with the same number and crash the game?

I'm trying to diagnose a problem with a mod I created that causes the game to just stop running at a certain point in the early 1100s (though right now it only happens if you use the 1066 start date, it never seems to crash starting in 867).
 
So I made a sub mod that needs 2 main mods to operate. But I'm facing a dependencies problem once I upload the mod to Steam Workshop.

this is the mod before I upload it to workshop

Code:
name = "Historic Buildings - HIP version"
path = "mod/historicbuildingship"
dependencies =
{
    "HIP - Historical Immersion Project" "Historic Buildings"
}


and this is after the mod gets downloaded from steam workshop

Code:
name="Historic Buildings - HIP version"
archive=historicbuildingship.zip"
dependencies=
{
    HIP - Historical Immersion Project Historic Buildings
}

Steam workshop removes the quotation marks and breaks the dependencies I need for my submod to work :(
Without the quotation marks it reads the 2 seperate mods as 1 which of course doesn't exist
I would appreciate any help
 
Steam workshop removes the quotation marks and breaks the dependencies I need for my submod to work :(
Without the quotation marks it reads the 2 seperate mods as 1 which of course doesn't exist
I would appreciate any help
Cant be fixed sadly, the dependencies have been broken in the workshop for several years at this point. It happens to all mods. You just need to have instructions on you mod page telling people to manually fix it.
 
saP0aNf.png


dQqWdIy.png


Just working on trying to get the CK2 map to look like paper, but I'm having a problem with the borders of land where it meets the water - you can see that ugly lack of smoothing. Anyone know what causes this?
 
If I would like to make a small change in 00_religion.txt - say change a flag or 2 for 1 pagan religion(pagan_norse for example. And let´s say the change should not apply to the reformed version). What is the minimum I need drag out to my new file?

I would hope its only:
Code:
pagan_group={
    pagan_norse ={
         my_flag = Yes
    }
}

And that everything else is picked from vanilla - files or other mods?
Could this work?
 
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!
 
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 have the exact same error in a total conversion mod that I am updating. Yet the mod runs just fine even with the error in the log. I am no expert so don't take my word for it, but there is a good chance that the CTD is caused by a different error.
 
I am trying to increase the breath of the Reconquista mechanic to include parts of southern france, as often I saw Islam expanding into that area.

I have made a modification that I believe to be sound, but it doesn't work, so I am hoping to have a set of fresh eyes point out something I am missing.

Here is my CB edit.

Code:
# France Test #
reconquista_aquitaine = {
    name = CB_NAME_RECONQUISTA_AQUITAINE
    war_name = WAR_NAME_RECONQUISTA_AQUITAINE
    diplo_view_region = custom_aquitaine
    sprite = 9
    truce_days = 3650
    is_permanent = yes
    is_holy_war = yes
    attacker_rel_head_is_ally = yes
    battle_warscore_mult = 0.5
    #max_defender_occupation_score = 85
    allow_whitepeace = no

    allowed_to_target_tributaries = yes
    can_ask_to_join_war = yes

    sort_priority = 10000

    can_use_gui = {
        ROOT = {
            prisoner = no
            is_adult = yes
        }
    }

    can_use = {
        ROOT = {
            has_character_flag = currently_reconquering_iberia
            not_reconquista_check_trigger = yes
          
            any_realm_province = {
                OR = {
                    AND = {
                        any_neighbor_province = {
                            region = custom_aquitaine
                        }
                    }
                    AND = {
                        NOT = {
                            any_neighbor_province = {
                                region = custom_aquitaine
                            }
                        }
                        NOT = {
                            any_neighbor_province = {
                                region = world_europe_west_francia
                                owner = {
                                    OR = {
                                        AND = {
                                            independent = yes
                                            NOT = {
                                                religion_group = christian
                                            }
                                        }
                                        top_liege = {
                                            NOT = {
                                                religion_group = christian
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        any_neighbor_province = {
                            any_neighbor_province = {
                                region = custom_aquitaine
                            }
                        }
                    }
                    AND = {
                        NOR = {
                            any_neighbor_province = {
                                region = custom_aquitaine
                            }
                            any_neighbor_province = {
                                any_neighbor_province = {
                                    region = custom_aquitaine
                                }
                            }
                        }
                        NOT = {
                            any_neighbor_province = {
                                any_neighbor_province = {
                                    region = world_europe_west_francia
                                    owner = {
                                        OR = {
                                            AND = {
                                                independent = yes
                                                NOT = {
                                                    religion_group = christian
                                                }
                                            }
                                            top_liege = {
                                                NOT = {
                                                    religion_group = christian
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        any_neighbor_province = {
                            any_neighbor_province = {
                                any_neighbor_province = {
                                    region = custom_aquitaine
                                }
                            }
                        }
                    }
                }
            }

            conditional_tooltip = {
                trigger = {
                    ai = yes
                }

                NOT = {
                    has_character_modifier = reconquista_preparation_duration
                }
            }
        }

        FROM = {
            any_realm_province = {
                region = custom_aquitaine
            }
            NOT = {
                religion_group = ROOT
            }
        }
    }

    is_valid = {
        ROOT = {
            show_scope_change = no
            custom_tooltip = {
                text = reconquista_valid_TT

                has_character_flag = currently_reconquering_iberia
            }
        }
        custom_tooltip = {
            text = reconquista_valid_2_TT

            FROM = {
                NOT = {
                    religion_group = ROOT
                }
            }
        }
    }

    on_add = {
        custom_tooltip = { text = add_allies_reconquista_TT }
        ROOT = {
            character_event = { id = HF.49210 }
        }
    }

    on_success = {

        d_aquitaine = {
            save_event_target_as = first_duchy_title
        }
        d_gascogne = {
            save_event_target_as = second_duchy_title
        }
        reconquista_win_effect = yes
    }

    on_reverse_demand = {
        reconquista_lose_effect = yes
    }

    on_invalidation = {
        ROOT = {
            character_event = { id = HF.49200 }
        }
    }

    attacker_ai_victory_worth = {
        factor = -1
    }

    attacker_ai_defeat_worth = {
        factor = 100
    }

    defender_ai_victory_worth = {
        factor = -1
    }

    defender_ai_defeat_worth = {
        factor = 100
    }
}

I added this in Geographical_region.txt

Code:
custom_aquitaine = {
    duchies = {
        d_aquitaine d_gascogne
    }
}

And I added this localisation to the HolyFury.csv

CB_NAME_RECONQUISTA_AQUITAINE;Reconquest of Aquitaine;Reconquête de la Aquitaine;Rückeroberung Aquitaine;;Reconquista de Aquitaine;;;;;x
WAR_NAME_RECONQUISTA_AQUITAINE;$ORDER$Reconquest War for Aquitaine;$ORDER$Guerre de reconquête pour Aquitaine;$ORDER$er Rückeroberungskrieg von Aquitaine;;$ORDER$Guerra de Reconquista de Aquitaine;;;;;x

If I'm honest, the CB portion doesn't make a ton of sense to me. I can't understand much of the logic, so I just literally copy/pasted from a previous reconquest CB and changed the regions as appropriates.
I left the flag, as I believe that has no baring on it, as long as it fires from the Decision to start preparing for reconquest right?

Also, as an aside, I can't understand the logic that allows you to be multiple counties away and still declare reconquest CB for a specific.
For example, in my tests, I take land in the duchy of Aquitaine, and I can use the CB for navarre, but not the one I made etc.
Where is that logic stored and is there any way to expand the reach, so just in case I can get this working I can make it easier for France etc to be able to declare to reconquest.

Thanks if anyone can help!
 
Holdings are titles though, of barony level.

TEXFg17.png


Here is the event with hidden window turned off and charinfo turned on (I changed it to a character_event to see if that made any difference, but no...).

It looks like it may not be working because there's some sort of artefact before local_citizen_population - I can see it doesn't display right. I have no idea what would cause this though! The .txt file is in ANSI.

If this part is accurate, you'll have to make do with holding modifiers, or global variables. Perhaps (global) dynamic flags can help.
 
Last edited: