• 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.
I want to fire events when people are no longer involved in wars. I see the 4 ways a war can end and that the attacker is FROM and defender is ROOT. How would I go about scoping to anyone who was called in (or otherwise joined) the war that just ended?

Also, does the "war" condition return true or false if your liege is involved in a war?
 
How does the game rank the titles belonging to the same tier? For example, an ai character has many count titles, it usually chooses the first one as the primary title.

As far as I can remember the AI first goes with culture (e.g. a Swedish character will pick Sweden over Denmark 100 % of the time since Sweden has "culture = swedish", but an English character wouldn't consider either better than the other based on culture), then dignity (number of counties in the de jure plus the scripted dignity rating (used in a few places where it is relevant historically, e.g. Lotharingia > Burgundy), after which I don't know if it has any priorities (I suspect the game as a whole goes off of either the order in which it reads the titles (based on file structures and with dynamic ones presumably being appended at the end in creation order) or alphabetically).
 
As far as I can remember the AI first goes with culture (e.g. a Swedish character will pick Sweden over Denmark 100 % of the time since Sweden has "culture = swedish", but an English character wouldn't consider either better than the other based on culture), then dignity (number of counties in the de jure plus the scripted dignity rating (used in a few places where it is relevant historically, e.g. Lotharingia > Burgundy), after which I don't know if it has any priorities (I suspect the game as a whole goes off of either the order in which it reads the titles (based on file structures and with dynamic ones presumably being appended at the end in creation order) or alphabetically).
Thank you, silverweeper.
 
it also probly calculates the county holdings development, I gave away a fully developed county castle to a duke and he moved capital there.

Was it the de jure capital of his primary title or the only county in his primary de jure? The AI definitely prefers using the scripted de jure capital if there's not a good reason not to (e.g. holding type mismatch), and I believe it usually prefers being inside the de jure to not being inside the de jure.
 
Was it the de jure capital of his primary title or the only county in his primary de jure? The AI definitely prefers using the scripted de jure capital if there's not a good reason not to (e.g. holding type mismatch), and I believe it usually prefers being inside the de jure to not being inside the de jure.
must be de jure, his liege died, and he had eligible heirs, the other count didnt. and i had one of the de jure county to give. So i gave the duchy and everything under it.
 
Thank you for being helpful. I appreciate that.

To clarify: The converter is an application that converts a save game from a game to another. It generates the mod so as it converts a mod for the CKII it is out and no more used during the game. It sort of translates the I:R into a mod that the player can enjoy on CKII. But while generating the CKII it can modify certain files such as regions holdings and to a certain level characters and what they own at the moment according to what is in the I:R mode. I assume This means that It is implemented in the game not as a separate program as it is no more in use once the conversion is done.

Actually I have come to understand that It would not be possible to fully control the tech advancement If the modifiers don't work for events or the events can't be modified. unless the tech is disabled or ideally capped for certain years. Or the events are controlled. Well perfection seems further but advancement can be achieved if the modification to the passive research can be gained. Do you know how I can add a modifier to the research so I test the outcome? I mean is it in one of the text files or it is inside the codes of the game?
Well the monthly base rate is set in common/defines.lua under NTechnology: "POINTS_PER_ATTRIBUTE = 0.04". Some buildings, wonders and event modifiers also add .01 to 1.0 each to that total. These all have "<type>_techpoints = X" lines. All of these use values that are multiples of .01, but I imagine they can use more decimal places if needed.

Dozens of events give lump sums of -50 to 400, as do some council jobs. They use the same "<type>_techpoints" language as above.

Battles give military tech points. It's not clear how it's calculated, but that doesn't matter if you just want to reduce it overall. You can modify all battle awards in common/defines.lua under NMilitary: "BATTLE_TECH_MULTIPLIER = 0.5". Cutting that to .25 will give half as much from any given battle, and so on.

So, to effectively adjust the technology rate, you'd need to adjust everywhere that "*_techpoints = X" appears, multiplying X by the fraction you want, plus modify the POINTS_PER_ATTRIBUTE & BATTLE_TECH_MULTIPLIER the same way. The last 2 are easy. The other would be a major undertaking. And if the player adds any mods, that could wreck it all.
 
Is there a way to scope only your own commanders? I'm trying to create a remove all your commanders effect. For some reason, the commanders at game start, who own land cant be assigned to armies.
 
Is there a way to scope only your own commanders? I'm trying to create a remove all your commanders effect. For some reason, the commanders at game start, who own land cant be assigned to armies.

Code:
remove_all_commanders_effect = {
    any_courtier_or_vassal = {
        limit = {
            has_minor_title = title_commander
        }
        remove_title = title_commander
    }
}
 
I am trying to fire an event whenever somebody is no longer involved in a war. I have the event working for the 4 ways wars can end, but people can also be removed from a war during inheritance. Is there a better way to fire my event than using on_death and an event with is_ruler = yes as a pre-trigger that calls my event on their heirs after 1 day? I suppose I need to fire the event for everyone who inherits any titles; is that just "any_demense_title = {current_heir = {character_event = {id = <event id> days = 1}}}"?

Also, am I missing any ways people can stop being involved in wars? Is there a way to leave a crusade after it starts beyond inheriting as someone who either hadn't joined or is the wrong religion?
 
How can I scope to a title that controls religion of a character, in the absence of the religion head?
e.g I want to scope d_iconoclast when being an iconoclast but the "create iconoclast patriarchy" decision is yet taken.
religion_head is a character scope and not working if absence.
 
How can I scope to a title that controls religion of a character, in the absence of the religion head?
e.g I want to scope d_iconoclast when being an iconoclast but the "create iconoclast patriarchy" decision is yet taken.
religion_head is a character scope and not working if absence.

You can explicitly scope to the title, and since you know which title it's going to be for which religion (and can check if HF-reformed pagans reformed with a rel head or not) you can create a scripted_effect containing if/else_ifs that simplifies the script in any file where you need to do the scoping.

Code:
find_rel_head_title_scope_effect = {
    if = {
        limit = {
            religion = catholic
        }
        k_papal_state = {
            save_event_target_as = my_rel_head_title_scope
        }
    }
    <Etc.>
}
 
You can explicitly scope to the title, and since you know which title it's going to be for which religion (and can check if HF-reformed pagans reformed with a rel head or not) you can create a scripted_effect containing if/else_ifs that simplifies the script in any file where you need to do the scoping.

Code:
find_rel_head_title_scope_effect = {
    if = {
        limit = {
            religion = catholic
        }
        k_papal_state = {
            save_event_target_as = my_rel_head_title_scope
        }
    }
    <Etc.>
}
Thanks, so I end up have to enumerate these titles first. :/

Update:
Code:
any_title = {
    limit = {
        controls_religion = yes
        has_holder = no
        # more conditions...
    }
}
works for me, but it's CPU heavy and bad for trigger block like law and governent.
 
Last edited:
Is there any way to create a dynamic mercenary band that will persist after it goes independent. Currently it seems the dynamic band will disband when the captain dies.

You could probably fire an on_death event for the captain that makes him abdicate to a freshly generated character (or a courtier, if you'd prefer that).
 
I am trying to fire an event whenever somebody is no longer involved in a war. I have the event working for the 4 ways wars can end, but people can also be removed from a war during inheritance. Is there a better way to fire my event than using on_death and an event with is_ruler = yes as a pre-trigger that calls my event on their heirs after 1 day? I suppose I need to fire the event for everyone who inherits any titles; is that just "any_demense_title = {current_heir = {character_event = {id = <event id> days = 1}}}"?

Also, am I missing any ways people can stop being involved in wars? Is there a way to leave a crusade after it starts beyond inheriting as someone who either hadn't joined or is the wrong religion?
Probably best to use one or more of the new holder actions: on_new_holder, on_new_holder_inheritance, and on_new_holder_usurpation. In all 3, ROOT is the character, FROM is the title, FROMFROM is the old holder.
 
Hi everyone, i have a question. I'm making a mod with a new kingdom and vassals and their dynasties with a long history. The ducal titles were created by the first king and then granted to the vassals.
20210720214528_1.jpg

I want the creator of the title to be present in the title history, but the title must not be accounted to his titles in death.
In the title history i have set the passage of the title before the king's death, however the title is still accounted among the king's titles.(The king died in 516)
20210720214517_1.jpg

Can i remove the title from the king's titles owned at death, without removing the king from the title's history?