Is there a built-in check in game files that checks whether a territory is owned by root or player ally?

  • 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.

ecpgieicg

First Lieutenant
27 Badges
Oct 27, 2012
263
113
  • Cities in Motion
  • Magicka
  • Leviathan: Warships
  • Cities in Motion 2
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
Is there a built-in check in game files that checks whether a territory is owned by root or player ally?

I am looking for the equivalent of is_controlled_by_ROOT_or_ally check but excludes controlled by a player ally. The reason is that the mod I am playing makes ample use of this check to build decisions that adds historical flavor. But it only adds flavor if player is the country in question and not when player is the ally in question. So instead of removing all such decisions or turning them off completely for AI, I am wondering if there is an alternative check.

(Perhaps the better implementation is probably to require consent of owner and making AI to accept all the time. But I am not trying to change the mod in any indepth way.)
 

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.824
7.024
is_controlled_by_ROOT_or_ally is a scripted trigger defined like this (common/scripted_triggers/00_scripted_triggers.txt):
Code:
is_controlled_by_ROOT_or_ally = {
    custom_trigger_tooltip = {
        tooltip = is_controlled_by_ROOT_or_ally
        CONTROLLER = {
            OR = {
                tag = ROOT
                is_subject_of = ROOT
                is_in_faction_with = ROOT
            }
        }
    }
}

is_controlled_by_ROOT_or_subject is probably what you are looking for, which is the same except the last condition.

Btw, neither of those checks whether ROOT is a human, so I'm assuming that is checked elsewhere.
 
  • 3
Reactions:

ecpgieicg

First Lieutenant
27 Badges
Oct 27, 2012
263
113
  • Cities in Motion
  • Magicka
  • Leviathan: Warships
  • Cities in Motion 2
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
is_controlled_by_ROOT_or_ally is a scripted trigger defined like this (common/scripted_triggers/00_scripted_triggers.txt):
Code:
is_controlled_by_ROOT_or_ally = {
    custom_trigger_tooltip = {
        tooltip = is_controlled_by_ROOT_or_ally
        CONTROLLER = {
            OR = {
                tag = ROOT
                is_subject_of = ROOT
                is_in_faction_with = ROOT
            }
        }
    }
}

is_controlled_by_ROOT_or_subject is probably what you are looking for, which is the same except the last condition.

Btw, neither of those checks whether ROOT is a human, so I'm assuming that is checked elsewhere.

Thank you for the explanations!

Btw, if I notice a long-standing bug, do I at you under the bug report thread?