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

Arier

Corporal
6 Badges
May 24, 2018
26
81
  • Crusader Kings II
  • Crusader Kings III
  • Europa Universalis IV
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
I'd like to add a new unit ability for unit of dragons to burn the city. What do we need? Dragons, obviously!
But!

There's no way to limit this ability to dragons unit:

[some unit] = {
any_sub_unit = {
owning_unit = {
oh, we're back to the unit
}
}
}

We have no has_sub_unit, everything we have is only for full units.

My idea: Make trade_good "dragons_dragons" and "dragons". There will be no "dragons_dragons" ont he map but some "dragons". When the country have a "dragons" it cant spawn a unit by decision. The decision will set variable "dragonised_country" for the country. And in unit_abilities there ability to dracaryse the city will be limited by this variable.

Have anyone something more simpe?
 
You can use is_dominant_unit = dragon in the unit scope, which will restrict the action to units that have a majority of the unit, which seems workable.
 
Magnar:
No, it's unpossible. There's nothing I can use in scope for subunite.

Xyloz:
Triggers.log says that is for units, but I will check it. Maybe it's error of devs.

is_dominant_unit - check if a Unit has a specific modifier
Supported Scopes: unit