Crusader Kings III

Crusader Kings III

RePerk - Repeatable Perks
 This topic has been pinned, so it's probably important
buddykenner  [developer] 17 Apr @ 11:37am
GUI Compatibility
Since people have been asking about compatibility with other mods that change
window_character_lifestyle.gui
, I'll explain what the changes I made are, why I made them, and why it's probably better for other mods to add my changes than it is for me to add things for other mods.

Basically, when 1.13 came out, paradox changed the tooltip behavior for perks, they made it so finisher perks (perks that have no perks after them) now show the tooltip for the trait they add directly, instead of saying "gains trait_name" and then needing to hover over "trait_name" to see that trait's tooltip. A good minor change on its own, unfortunately, not every modded finisher perk adds a trait. The repeatable perks added by this mod (and the master magic perks in EK2 last time I checked) are finisher perks with no associated unlock trait, so this breaks their tooltips.

To fix this, I changed four lines in
window_character_lifestyle.gui
There are four uses of
Perk.IsFinisher
that determine whether to use normal perks, or trait perks. All I did was change
IsFinisher
to
HasUnlockTrait
This makes it so non-trait finisher perks have proper tooltips, it also has the bonus affect of trait perks having working tooltips even when they aren't finishers. The only caveat to this is that finisher perks used to expect bigger icons, so if a mod used vanilla finisher perk GUI with broken tooltips, this change will fix their tooltips but may make the icon look odd until the perk GFX is updated.

Lastly, GUI compatibility basically requires a GUI file to include all changes from all the different mods' versions of a file in order to be compatible with mods. I don't think it would be wise, or even practical for this mod to added every mod that adds different lifestyles, or utility to the character lifestyle window to this mod. It should be much easier however for other mods (or Paradox themselves) to include the minor changes from this mod. All someone would need to do is find all 4 instances of
Perk.IsFinisher
in
window_character_lifestyle.gui
and replace them with
Perk.HasUnlockTrait
Last edited by buddykenner; 17 Apr @ 11:38am