pharaox / ek2_fixes

EK2 Unofficial Fixpack
0 stars 0 forks source link

`Script system error` errors for undefined event targets in `configure_start_single_combat_effect` in `error.log` #11

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:

[21:52:09][jomini_script_system.cpp:263]: Script system error!
  Error: Undefined event target 'challenger'
  Script location: file: common/scripted_effects; configure_start_single_combat_effect line: 4 file: events/artifacts/ek_daedric_artifacts_events.txt line: 3013
[21:52:09][jomini_script_system.cpp:263]: Script system error!
  Error: Event target link 'scope' returned an unset scope
  Script location: file: common/scripted_effects; configure_start_single_combat_effect line: 4 file: events/artifacts/ek_daedric_artifacts_events.txt line: 3013
[21:52:09][jomini_script_system.cpp:263]: Script system error!
  Error: Undefined event target 'sc_defender'
  Script location: file: common/scripted_effects; remove_single_combat_info_effect line: 10 file: events/artifacts/ek_daedric_artifacts_events.txt line: 3013 file: common/scripted_effects; configure_start_single_combat_effect line: 5

The trigger conditions of the event ek_daedric_artifacts.0031 do not correspond properly to the conditions used in the immediate section, and as a result it may happen that the event fires but an appropriate challenger doesn't exist. Specifically, this may happen if root is not an independent ruler, a "neighboring_top_liege_realm_owner" with higher prowess exists (so the trigger conditions are satisfied), but a "liege_or_above" with higher prowess doesn't exist (so the conditions in the immdediate section are not satisfied). The trigger conditions of this event should be changed to correspond to the conditions in the immediate section, so the event can't fire if there is no appropriate challenger.

ARSOD-Z commented 1 year ago

good catch, fixed on dev