• 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.
Any way to reduce the chance of a ruler converting to his court physicians religion? Playing as a Norse count I just saw Sigurdr Ring convert to Catholic in August 769 which I find a little ridiculous.
 
TL;DR: Is there a way to check if an army, of which a character is commander, has looting toggled on? (the character being the ROOT)

I can't find such a condition on the wiki, only "is_looting", but I am guessing that only checks if the character is sieging (in looting mode, so basically "looting") a province. It doesn't return true when the army isn't "besieging" anything right? or am I wrong at this?

EDIT: After some testing with "is_looting" it seems like i was right, "is_looting" only seems to return true when a character is commanding an (looter toggled) army in a province that has loot above the fort protection level. This means it doesn't even return true when the loot is below fort protection level even though the army is sieging a holding in looter mode.

So my question still remains... :confused:
I know the wiki doesn't show this usage, but but it's worth a try: use "is_looter = yes" as a condition with an army.
 
Any way to reduce the chance of a ruler converting to his court physicians religion? Playing as a Norse count I just saw Sigurdr Ring convert to Catholic in August 769 which I find a little ridiculous.

Change the modifiers to the event in question and/or disable it entirely, depending on how strict you want to be. However, keep in mind that unless you remove the event entirely or it is impossible for the AI to pick the option to convert at a specific time there is always a small chance that it will pick the less likely option.
 
I know the wiki doesn't show this usage, but but it's worth a try: use "is_looter = yes" as a condition with an army.

Wiki: "Unit scope allows to scope to an army (outside of a battle/siege) or fleet. It is rarely used in vanilla, and there are very few triggers or effects that work in these scopes (loot, set_looting, set_can_toggle_looting)."

I tried it and unfortunately it doesn't work, neither can i find anything that would give a similar result. It seems like it is hard-coded and there is no condition to check if an army has toggled looter. So i guess it will be impossible until the Devs add a condition like has_toggled_looter :p

I did also find out however that the wiki was missing the scopes left_flank_leader = {} and right_flank_leader = {} so i added those to wiki >.<
 
I'm a complete noob to modding CK2 but I found the event in rip_flavor_events.txt. It appears to be triggered from the event which brings a physician to a tribal/nomad court. I found this in RIP.4100:

Code:
        if = {
            limit = { controls_religion = no }
            hidden_tooltip = {
                character_event = { id = RIP.4101 days = 30 random = 30 }
            }
        }

If I add year = 867 to the trigger for RIP.4101 (the convert to physician's religion event) will it prevent this event from firing until after 867? Or will it still fire because it's being initiated from RIP.4100? Sorry for the simple question.

Code:
character_event = {
    id = RIP.4101
    desc = EVTDESC_RIP_4101
    picture = GFX_evt_court_physician
    border = GFX_event_normal_frame_religion

    is_triggered_only = yes
  
    trigger = {
        event_target:missionary_physician_target = {
            NOT = { religion_group = ROOT }
        }
        controls_religion = no
    }
 
Last edited:
I'm a complete noob to modding CK2 but I found the event in rip_flavor_events.txt. It appears to be triggered from the event which brings a physician to a tribal/nomad court. I found this in RIP.4100:

Code:
        if = {
            limit = { controls_religion = no }
            hidden_tooltip = {
                character_event = { id = RIP.4101 days = 30 random = 30 }
            }
        }

If I add year = 867 to the trigger for RIP.4101 (the convert to physician's religion event) will it prevent this event from firing until after 867? Or will it still fire because it's being initiated from RIP.4100? Sorry for the simple question.

Code:
character_event = {
    id = RIP.4101
    desc = EVTDESC_RIP_4101
    picture = GFX_evt_court_physician
    border = GFX_event_normal_frame_religion

    is_triggered_only = yes
 
    trigger = {
        event_target:missionary_physician_target = {
            NOT = { religion_group = ROOT }
        }
        controls_religion = no
    }
Yes, adding the year clause to the RIP.1404 trigger will block the event, even if it is called by another event.
 
  • 1
Reactions:
Say I have a province in ROOT, and I want to check wether any neighbouring province belongs to a different top realm. How would I do that? It seems that same_realm don't work with provinces.
any_neighbouring_province = { owner { top_liege = { ROOT = { owner = { top_liege = { NOT = { character = PREVPREVPREV } } } } } } } would work I guess, there is probably a lot simpler way of doing it though lol
 
any_neighbouring_province = { owner { top_liege = { ROOT = { owner = { top_liege = { NOT = { character = PREVPREVPREV } } } } } } } would work I guess, there is probably a lot simpler way of doing it though lol

I'm currently using
Code:
owner = { #convolutedly checks for bordering provinces not in the same realm. Is there an easier way to do this?
                ROOT = {
                    any_neighbor_province = {
                        owner = {
                            not = {
                                same_realm = PREVPREVPREV
                            }
                        }
                    }
                }
            }
but I'm still looking for a simpler way.
 
Hi I'm back again with another question:

Is it possible to check for a certain tech level in an event?

(For example, I want to place different restrictions on event options based on the level of Trade_Practices, e.g. trigger for an opion: need 50 gold if tech level 1, but only need 40 gold if tech level 2 etc.)

Alas from what I am seeing, checking for technology *at all* is nigh impossible. Am I mistaken, or is it true that you can't do that?
 
Hi I'm back again with another question:

Is it possible to check for a certain tech level in an event?

(For example, I want to place different restrictions on event options based on the level of Trade_Practices, e.g. trigger for an opion: need 50 gold if tech level 1, but only need 40 gold if tech level 2 etc.)

Alas from what I am seeing, checking for technology *at all* is nigh impossible. Am I mistaken, or is it true that you can't do that?

I took a look at the building text files and found out that there are conditions like TECH_TRADE_PRACTICES = 1.
So i think you can do something like this:
Code:
option = {
    trigger = {
        TECH_TRADE_PRACTICES = 1
    }
    wealth = -50
}
option = {
    trigger = {
        TECH_TRADE_PRACTICES = 2
    }
    wealth = -40
}
 
Is this allowed with variables?
change_variable = { which = X value = Y / 2 }
If Y is a number, just put that as a simple number (if Y is going to be 5 just put 2.5).
If Y is another variable of the same scope or the same variable in another scope, first you need to use which, not value.
And you first would need to save Y as the value of a temporal variable, use divide_variable = { which = <you temp variable> value = 2} and lastly change_variable = { which = X which = temp }. It is really cumbersome syntactically, isn't it?
 
  • 1
  • 1
Reactions:
If Y is a number, just put that as a simple number (if Y is going to be 5 just put 2.5).
If Y is another variable of the same scope or the same variable in another scope, first you need to use which, not value.
And you first would need to save Y as the value of a temporal variable, use divide_variable = { which = <you temp variable> value = 2} and lastly change_variable = { which = X which = temp }. It is really cumbersome syntactically, isn't it?

Haha yes, it's very unelegant.
Thanks though xD
 
hello
I want to use 'random list' function along with some modifiers and I wonder if the chances go over 100% does it still work as intended? like a chance event of 200% is more likely to be triggered than that of 100% so on and so forth?

Or should I just try to make it under 100%?
 
I took a look at the building text files and found out that there are conditions like TECH_TRADE_PRACTICES = 1.
So i think you can do something like this:
Code:
option = {
    trigger = {
        TECH_TRADE_PRACTICES = 1
    }
    wealth = -50
}
option = {
    trigger = {
        TECH_TRADE_PRACTICES = 2
    }
    wealth = -40
}
Thanks!
Right, silly me. I forgot they were used in buildings...
Well, thanks for reminding me ^^

hello
I want to use 'random list' function along with some modifiers and I wonder if the chances go over 100% does it still work as intended? like a chance event of 200% is more likely to be triggered than that of 100% so on and so forth?

Or should I just try to make it under 100%?
Afaik, these aren't treated as percentages. So you could make something like this:
Code:
random_list = {
    100 = {
        add_character_modifier = {
            name = thingy1
            duration = -1
        }
    }
    10 = {
        add_character_modifier = {
            name = thingy2
            duration = -1
        }
    }
}
without problem. The first modifier would then fire in 10 out of 11 iterations, or around 90,9% of cases.
Keping it as percentages only makes it easier for the modder to visualize the actual chances, since we tend to think in percentages.
 
How does one make a targetted_decision with the "ai will accept" banner that says "yes", "no" or "maybe" just above the send button of the diplomatic decision? I can't find anything in the vanilla decisions folder nor on the wiki.
You don't . The "ai will accept" functionality is only part of the hard-coded decisions. :(
 
  • 1
Reactions: