• 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.
So I'm having a bug where an AI is abusing a decision (firing them off rapidly, possibly non-stop). I want to find out what decision this is. However, it's also a "hidden" decision (cult?), meaning it does not show up on the normal in-game log.

Is there a way I can find out what decision/action the a particular AI is taking?
How do you even know that if you can't see it?o_O Massive slowdown or something?
 
How do you even know that if you can't see it?o_O Massive slowdown or something?
Society decisions add points to the visibility character variable. So using char-info you can infer the frequency of ability use.

Additionally, it's a known bug, which is specifically why they added " ai_check_interval" in 2.8. Without it the AI spams society decisions as often as the game permits. The new variable allows a degree of randomness to whether they use an ability once it becomes available.
 
So I have two questions again.
I'm trying to get the dynamic mercenary company to have a very specific flag type. I've looked at the decision code and have tried so many different things, but non of them are working. Anyone have any ideas.

Also anyone know how to have hospitals already built at the start of the game. I've tried a ton of different things and the closest I've gotten is a hospital is built, but it is treated like another barony and not in the extended buildings tab.
 
You should be able to do a third-party targeted decision that targets yourself, with the artifact as the third party. (Look at the code for the send artifact to china decision for guidance. Note that the Jade dragon decision is an offmap decision, and so doesn't need filter and ai_filter. A regular targeted decision would still need those)
Wow that totally slipped my mind, thanks! I've used artifacts in 3rd party recently but didn't consider a self targeted one.
 
So I have two questions again.
Also anyone know how to have hospitals already built at the start of the game. I've tried a ton of different things and the closest I've gotten is a hospital is built, but it is treated like another barony and not in the extended buildings tab.
In effects it's done by:
Code:
create_hospital = <province_ID>
Maybe it works in history too?
 
It seems that you can update mods on steam workshop only 100 times. I have tried to upload my mod again and again, but failed. The data is 133 MB so it is rather big, but it doesn't matter because reducing the file size couldn't solve the problem.
http://steamcommunity.com/sharedfiles/filedetails/?id=333442855

PS. Solved. Caused by a bad internet. :p
 
Last edited:
I've seen that code and have tried to use it, but I don't know where to use it?
I believe the command needs to be fired from the owner of the province. (At least for events, I don't know if it works in the history files)
 
Is there any file where the inner workings of the different successions are actually defined/coded? The succession_laws file just points to several different types, which I couldn't find anywhere else in the game files...?
 
Is there any file where the inner workings of the different successions are actually defined/coded? The succession_laws file just points to several different types, which I couldn't find anywhere else in the game files...?
They're all hard coded and can't be modded at all.
 
When the game loads one of my event files, it only loads the first 57 events, but the file contains 70. What can cause it to not load the later events?
Missing brackets in one event can break all events that come after it. It'd recommend putting your mod through the validator.
 
Can't find any mismatched open/close braces, have the same total number of each. I'm not seeing anything in the Validator, but with the massive number of errors for 2.8 code, it's difficult to pick anything out.
 
I need a triggered-only event to fire every time a new character is created by decision/event, rather than born. Normally, I'd do this with an on_action; however, there doesn't seem to be one for this purpose. Is it possible to simulate an on_action for newly created characters, and if so, how might this be accomplished?
 
I need a triggered-only event to fire every time a new character is created by decision/event, rather than born. Normally, I'd do this with an on_action; however, there doesn't seem to be one for this purpose. Is it possible to simulate an on_action for newly created characters, and if so, how might this be accomplished?
There is currently no on_action for it, your best bet otherwise is to find every instance of create_character and its education variants in the script files and for each one add/edit the new_character clause to fire the event you want on them.
 
There is currently no on_action for it, your best bet otherwise is to find every instance of create_character and its education variants in the script files and for each one add/edit the new_character clause to fire the event you want on them.

That's what I was afraid of. There are hundreds of such instances, unfortunately.
 
Okay, does anybody else here use "any_dynasty_member_even_if_dead"? I'm on 2.8.1. Cuz no matter what I do, the effects I want to happen are shown in the tooltip but not actually exceuted.

Code:
targeted_form_cadet_dynasty = {
    
        is_high_prio = yes
        
        third_party = ROOT
        third_party_filter = dynasty
        show_third_party_potential = yes
        
        from_potential = {
            ai = no
        }
        
        potential = {
            ai = yes
        }
        
        third_party_potential = {
            FROMFROM = {
                show_scope_change = no
                is_descendant_of = ROOT
                is_female = no
                mother_even_if_dead = {
                    NOT = {
                        is_descendant_of = ROOT
                    }
                }
            }
        }
        
        third_party_allow = {
            FROMFROM = {
                is_descendant_of = ROOT
                is_female = no
            }
        }
        
        allow = {
            always = yes
        }
        
        effect = {
            
            ROOT = {
                dynasty = father_bastard
            }
            
            FROMFROM = {
                dynasty = ROOT
                any_dynasty_member_even_if_dead = {
                    limit = {
                        is_descendant_of = ROOT
                        is_female = no
                        mother_even_if_dead = {
                            NOT = {
                                is_descendant_of = ROOT
                            }
                        }
                    }
                    dynasty = ROOT
                }
            }
            
        }
        
    }

Even if I don't use the third party, as I said in https://forum.paradoxplaza.com/forum/index.php?threads/modding-quick-questions.589686/page-1631, "any_dynasty_member_even_if_dead" doesn't work. Not sure if bug or what.

Also, I tried using variables and count or whatever to keep track of a generation, but it doesn't work? Probably doing it wrong. Like I've brought a character from the dead to make targetable but it still doesn't work.

How exactly do you use "is_descendant_of" and "is_ancestor_of"? Is there a generation condition or limit? It's not on the official CK2 wiki. I want to limit the scope to a character's great grandfather or something like that instead of the 16 (generation) max that the developers said is the limit.

I just want to (properly; with dynasty tree view working; no unlinked characters)prune a dynasty after it has dispersed. And I want to distinguish between (bastard) maternal and paternal descendants.

This patch made me think that what I want is now possible. It's just the commands are not working or conditions are missing.

Like if I use "any_child_even_if_dead", it works right. But I have to keep repeating it over and over again. That's why I was so stoked for "is_descendant_of" and "is_ancestor_of".

"effect_even_if_dead" also doesn't work in my context?

Again, "any_dynasty_member_even_if_dead" shows what I want in the tooltip but it doesn't actually execute it.