• 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 make a mod that has features similar to the Spy On diplo action. Where can I find the game files for this feature to dissect it and build my own think. Or is there a wiki page for the diplomacy action?

The targeting is in way_of_life_decisions.txt, and the events are in wol_intrigue_events.txt.
 
I want to increase the amount of retinues a character and all his vassals can create.

I've tried traits and character modifiers but nothing is working, what other options do Ihave?
 
In the way_of_life_decisions.txt there is a comment specifing the possible filters:
# Targetted decisions are possible vs _all_ other characters and shown are in the Diplomacy View, not the Intrigue View. The taker is in the FROM scope.
#
# filter = [self/court/home_court/vassals/sub_realm/realm/dynasty/spouse/liege/religious_head/rivals/society/all] ('self' MUST be set for decisions targetting only the taker, the other filter types can be set to lessen CPU load)
# ai_target_filter = [self/court/home_court/vassals/sub_realm/realm/dynasty/spouse/liege/religious_head/rivals/society/all] (which characters for which the AI evaluates the decision.)
# court: all characters in the host court, including prisoners, and characters currently away (wards, prisoners, etc)
# home_court: all characters in the home court, including prisoners, and characters currently away (wards, prisoners, etc)
# vassals: direct vassal rulers of the AI's employer
# sub_realm: all characters below the AI's employer
# realm: all characters in the same top realm as the AI
# dynasty: all members of the same dynasty (but not yourself)
# rivals: your rivals plus any character you have an opinion modifier with 'crime = yes' set (the same set of characters the 'is_foe' trigger evaluates)
# society: the other members of your society (but not yourself)
# all: all living characters (Avoid if possible. VERY CPU-HEAVY!)
I want a diplo action that only targets foreign independet rules in diplo range. Do I have to take the all filter? The other ones don't fit.
 
Do I have to take the all filter?

Unfortunately, yes. However, assuming you trim down the possible targets efficiently in the potential block, that the from_potential also is limited, that the AI check frequency is reduced a bit, and the like, it shouldn't be a massive performance concern unless you are checking a lot of things or have a lot of new targeted decisions.
 
Unfortunately, yes. However, assuming you trim down the possible targets efficiently in the potential block, that the from_potential also is limited, that the AI check frequency is reduced a bit, and the like, it shouldn't be a massive performance concern unless you are checking a lot of things or have a lot of new targeted decisions.
Thx, I will try my best.
 
I want to increase the amount of retinues a character and all his vassals can create.

I've tried traits and character modifiers but nothing is working, what other options do Ihave?
I haven't tested much of this, but it definitely works on buildings, so you could have some aspect of the character allow creating a building that increases retinue size.
According to the Wiki, it should work on holding modifiers, though the wiki also says it should work on character modifiers.
You might want to see if retinuesize_perc works on traits or character modifiers and if that will fit your needs.
 
I haven't tested much of this, but it definitely works on buildings, so you could have some aspect of the character allow creating a building that increases retinue size.
According to the Wiki, it should work on holding modifiers, though the wiki also says it should work on character modifiers.
You might want to see if retinuesize_perc works on traits or character modifiers and if that will fit your needs.

tested retinuesize_perc too it seems that they don't work on character, and I'm not sure buildings will work,

I'm trying to make a pseudo-standing army system to simulate imperial bureaucracies like China and Byzantium I just want to give vassal kings dukes and counts more retinue size to let them recruit them too otherwise the system is far to weighted in the favor of an emperor...
 
I'm getting some really odd behavior on my Jewish Sins events. They fire on the Jewish character you are playing regardless of meeting the conditions needed to fire the event.

Code:
#Breaking of Kosher Laws
character_event = {
    id = Aliyah.400
    title = EVTNAME_Aliyah_400
    desc = EVTDESC_Aliyah_400
    picture = GFX_evt_throne_room
    border = GFX_event_normal_frame_religion
   
    trigger = {
        trait = gluttonous
        OR = {
            religion = jewish
            religion = grand_sanhedrin
            religion = rabbinic_judaism
            religion = kariate
            religion = temple_judaism
            religion = samaritan
            religion = haymenot_judaism
            religion = nazarene
            religion = ebionite
        }
   
    }

    is_triggered_only = no
   
    option = {
        name = EVTOPTA_Aliyah_101
            top_liege = {
                    character_event = { id = Aliyah.401 }
            }
    }
}

It used to work fine, but between 2016 and now something changed in the game code. Now they fire all the time without the necessary traits.
 
@ThePatriot1776: I'm not sure, but maybe it is related to the event having "is_triggered_only = no" and no MTTH defined - how do you fire it anyway?
Thus I assume that because you put neither "is_triggered_only = yes" nor a MTTH clause in it, it thinks that this event has no trigger at all and it should fire at all times.
Just speculating, but you could try changing that.
 
@ThePatriot1776: I'm not sure, but maybe it is related to the event having "is_triggered_only = no" and no MTTH defined - how do you fire it anyway?
Thus I assume that because you put neither "is_triggered_only = yes" nor a MTTH clause in it, it thinks that this event has no trigger at all and it should fire at all times.
Just speculating, but you could try changing that.

Thank you @LordPeter I will try putting a MTTH clause and see if that solves the problem.

The trigger is it looks for specific traits like gluttonous, seducer/seductress, etc... It used to work like that, so Pdox may have tightened the event modding up a lot.
 
So all AI plots begin with a trigger event? I want to be clear that I'm talking about when the AI would effectively go into the intrigue menu and click a plot from the drop-down menu. Nothing else, just how often they choose to begin a plot.

Did you even look? All of the events are in that list I linked you to. It doesn't matter if it's on_action to intrigue to WoL focus the events are all listed there. They are even broken down into categories by type and by DLC.
 
Did you even look? All of the events are in that list I linked you to. It doesn't matter if it's on_action to intrigue to WoL focus the events are all listed there. They are even broken down into categories by type and by DLC.
I'm looking at the list and I don't see anything that causes a new plot to start. My problem is that the AI is starting a new plot every month if it doesn't have a current one. Most of them then immediately get caught, resulting in a spam of new plots over and over and over again, often from the same character. I want to reduce the chance of them doing that, so that most characters will have no active plot and if they're caught they should wait at least a year or so before they start another one. Is there any master control for this? Do I manually have to go through all plots and reduce their ai_will_do modifiers? Will that have any affect on whether or not they start a plot, or just which plot they choose to start?
 
Trying to create a custom Abandon Province decision, but the associated event just refuses to fire. What am I missing ?

Code:
settlement_decisions = {
    abandon_province = {
        only_playable = yes
        filter = owned
        ai_target_filter = owned

        from_potential = {
            government = pretribal_government
            NOR = {
                trait = incapable
                trait = imbecile
                
                has_character_modifier = in_seclusion
                trait = in_hiding
            }
        }
        
        potential = {
            owner = { character = FROM }
        }
    
        allow = {
            FROM = {
                prisoner = no
                war = no
                prestige = 25
                NOR = {
                    trait = proud
                    trait = greedy
                }
                any_voter = { opinion = { who = FROM value = 0 } }
                capital_scope = {
                    ROOT = {
                        location = {
                            NOT = { province = PREVPREV }
                        }
                    }
                }
            }
        }
        
        effect = {
            save_event_target_as = target_range
            
            FROM = {
                character_event = { id = dawn.410 }
            }
        }
        
        ai_will_do = { factor = 0 }
    }
}

And the event to go with it -

Code:
# Character chooses to abandon a province -------------------------------------
character_event = {
    id = dawn.410
    desc = EVTDESCdawn.410
    picture = GFX_evt_abandon_area
    border = GFX_event_normal_frame_economy
    
    is_triggered_only = yes
    
    trigger = { prestige = 0 }
    
    option = {
        name = EVTOPTAdawn.410
        
        event_target:target_range = {
            while = {
                limit = { has_any_building = yes }
                destroy_random_building = yes
                FROM = {
                    prestige = 25
                    wealth = 10
                }
            }
            
            county = {
                add_province_modifier = { name = depopulated_3 years = 5 }
            }
            
            FROM = {
                prestige = -50
                piety = 100
            
                add_weak_claim = PREV
            }
            
            random_neighbor_independent_ruler = {
                random_courtier = {
                    limit = {
                        is_landed = no
                        is_voter = no
                        prisoner = no
                        age >= 14
                    }
                    grant_title_no_opinion = PREV
                }
            }
        }
    }
    
    option = {
        name = EVTOPTBdawn.410
        prestige = -5
    }
}
 
I'm looking at the list and I don't see anything that causes a new plot to start. My problem is that the AI is starting a new plot every month if it doesn't have a current one. Most of them then immediately get caught, resulting in a spam of new plots over and over and over again, often from the same character. I want to reduce the chance of them doing that, so that most characters will have no active plot and if they're caught they should wait at least a year or so before they start another one. Is there any master control for this? Do I manually have to go through all plots and reduce their ai_will_do modifiers? Will that have any affect on whether or not they start a plot, or just which plot they choose to start?

The odds are in the event files not the plot panel.

Code:
mean_time_to_happen = {
        months = 240
     
        modifier = {
            factor = 0.95
            liege = {
                any_plot_backer = {
                    trait = imbecile
                }
            }
        }
        modifier = {
            factor = 0.95
            liege = {
                any_plot_backer = {
                    trait = lunatic
                }
            }
        }
        modifier = {
            factor = 0.95
            liege = { num_of_plot_backers = 2 }
        }
        modifier = {
            factor = 0.95
            liege = { num_of_plot_backers = 4 }
        }
        modifier = {
            factor = 0.85
            liege = { num_of_plot_backers = 6 }
        }
        modifier = {
            factor = 0.85
            liege = { num_of_plot_backers = 8 }
        }
    }

That is from the Blackmail event 7250 in the plot_events.txt which is where the link I gave you said it was. Notice that it has the modifier = { factor = x.x? The actual chances (if both <factor_1> and <factor_2> conditions match) are: <percentage> * <factor_1> * <factor_2> / 100. The factor determines how successful the attempt is so .85 means an 85% chance of success. If you want to cut their chances then drop the percentages to where you like.
 
The odds are in the event files not the decisions.

Code:
mean_time_to_happen = {
        months = 240
      
        modifier = {
            factor = 0.95
            liege = {
                any_plot_backer = {
                    trait = imbecile
                }
            }
        }
        modifier = {
            factor = 0.95
            liege = {
                any_plot_backer = {
                    trait = lunatic
                }
            }
        }
        modifier = {
            factor = 0.95
            liege = { num_of_plot_backers = 2 }
        }
        modifier = {
            factor = 0.95
            liege = { num_of_plot_backers = 4 }
        }
        modifier = {
            factor = 0.85
            liege = { num_of_plot_backers = 6 }
        }
        modifier = {
            factor = 0.85
            liege = { num_of_plot_backers = 8 }
        }
    }

That is from the Blackmail event 7250 in the plot_events.txt which is where the link I gave you said it was. Notice that it has the modifier = { factor = x.x? The actual chances (if both <factor_1> and <factor_2> conditions match) are: <percentage> * <factor_1> * <factor_2> / 100. The factor determines how successful the attempt is so .85 means an 85% chance of success. If you want to cut their chances then drop the percentages to where you like.
I don't understand, how does this control if an AI decides to try and fabricate a claim or revoke a title? What causes the AI to start a plot? That's the process it goes through before any backers can be invited, for the player it's going to the intrigue menu, clicking the plot button, and selecting a plot from the menu. The act of selecting the plot, I'm asking about that. Where do you control when the AI decides whether or not to start a plot?
 
I don't understand, how does this control if an AI decides to try and fabricate a claim or revoke a title? What causes the AI to start a plot? That's the process it goes through before any backers can be invited, for the player it's going to the intrigue menu, clicking the plot button, and selecting a plot from the menu. The act of selecting the plot, I'm asking about that. Where do you control when the AI decides whether or not to start a plot?

By giving them the Content trait as that is the only way to stop them from plotting. Otherwise, it's hard coded and you are left with handing out Content or cutting their chances of success.
 
By giving them the Content trait as that is the only way to stop them from plotting. Otherwise, it's hard coded and you are left with handing out Content or cutting their chances of success.
Okay, thank you. The problem I was having must then be due to overdiscovery chances in the mod, rather than due to some change in the logic that causes the AI to start plotting in the first place.