pharaox / ek2_fixes

EK2 Unofficial Fixpack
0 stars 0 forks source link

`Script system error` errors indicating failure to remove county modifiers when a faction is destroyed #15

Closed pharaox closed 1 year ago

pharaox commented 1 year ago

CK3 Version: 1.8.2

EK2 Version: 0.12.1

Summary: There are messages in error.log similar to these:

[22:07:31][jomini_script_system.cpp:263]: Script system error!
  Error: Undefined event target 'crisis_undead_county'
  Script location: file: common/factions/ek_factions.txt line: 805
[22:07:31][jomini_script_system.cpp:263]: Script system error!
  Error: Event target link 'scope' returned an unset scope
  Script location: file: common/factions/ek_factions.txt line: 805
[22:07:31][jomini_script_system.cpp:263]: Script system error!
  Error: has_county_modifier trigger [ Wrong scope for trigger: none, expected landed title ]
  Script location: file: common/factions/ek_factions.txt line: 807

These messages indicate a failure to remove the county_corruption_undead_rampant_modifier from the capital county of the crisis_undead_faction when the faction is destroyed. I suspect the modifier is not removed at all, even if the rest of the on_destroy section is perhaps not affected.

The scope crisis_undead_county doesn't exist in on_destroy for crisis_undead_faction. Instead, the county_corruption_undead_rampant_modifier modifier could be removed by using var:crisis_undead_title.title_capital_county on the special_character scope (the faction leader).

ARSOD-Z commented 1 year ago

fixed on dev, thanks!