• 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.
Showing developer posts only. Show all posts in this thread.
The event section in question (from vanilla event GR.11):
Code:
       liege = {
           any_vassal = {
               limit = {
                   in_revolt = yes
                   any_war = {
                       defender = { character = ROOT }
                       attacker = {
                           character = THIS          
                       }
                   }
               }
               set_defacto_liege = THIS
           }
       }
      
       set_defacto_liege = THIS
As far as I know the behavior of THIS isn't documented so I don't know if this is correct or not, but it seems that THIS is pointing to any_vassal in the first two instances (any_war not changing it), and ROOT in the last. I hope @blackninja9939 will be able to clarify.
"This" just means the current scope, so for example FROM = { set_defacto_liege = THIS } would set FROM's liege as itself aka making it independent.

So in what you posted it looks for every vassal of your liege who is in a revolt and a war where the defender is from and said vassal is the attacker. If they are then they are made independent.
 
Is global event targets also a separate category as local event targets, or are they the same? (I guess since they both use event_target:xxx they would be the same probably)
Global- and local scope- event targets share the same invocation syntax. When we try to access them then we first try and access an event target with the given name inside the local scope and if that fails then we try to access the given name in the global space.

About the war scopes that can be present while we're actually also in another scope then it's a difficult to explain but in part you're on the right track that when you scope to defender it will later on be possible to scope to attacker (iirc) since it will try to access the attacker from the (still existing) war scope.

Under normal circumstances where we for example would be in a province scope and then change the scope to the holder_scope that would transition us towards a character scope of the holder of the province while the province wouldn't be accessible anymore without any more scope changes (PREV or similar). But because of old scope juggling problems in the CB script a war scope is never cleared when transitioning through a scope change. I agree that this is a weird behavior and understand that it won't be easy to represent in the validator but there is a bunch of old script that relies on this specific behavior.
 
Mind you that this is only information from the top of my head and it might not be exactly how it works because there are some weird quirks with this war-scope.
 
I'd like a comment on that from @blackninja9939 or @Divine
Not got the code handy to check but it might be that it checks the religion of the province’s owner, but I would have to wait until I’m back in the office in January to check that.
 
Just chiming in to verify that it's super okay to have a Validator page on the CK2 wiki. : ) It's even mentioned in the top article for CK2 modding and that's a good thing so that people can discover the tool.

And for a fun fact I could mention that we even caught a bunch of bugs in the base-game with the help of the Validator some years ago for the later patches of CK2. So thank you for all the work with the tool! And it's fun to see that CK2 modding still lives on - the CK legacy would've never been the same without all of our cool mod projects, big and small.
 
  • 3Like
  • 1
  • 1
Reactions: