You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In total, only two distinct events need to be written to cover 4 cases of demesne-size change triggers:
Handler for on_new_holder_usurpation that, for both ROOT and FROMFROM enqueues a deferred dynlevy.0 event to be executed upon the next day if and only if not = { has_character_flag = dynlevy_dirty }. If not dynlevy_dirty, then it also marks dynlevy_dirty. This is a massive batch title transfer (common in CBs and inheritances) optimization
Event trigger for above handler ensures FROMFROM is_alive = yes (makes sense, but also, it allows the event to be used for on_new_holder for filtering grants vs. creates)
Event trigger for above handler ensures FROMFROM != ROOT
Handler for on_new_holder_inheritance that does exactly the same thing, except that it only operates upon ROOT (FROMFROM is dead momentarily anyhow, if not already-- or abdicated).
Handler on on_new_holder barony-built case that does exactly the same thing as the inheritance handler, so they should be the same event
Handler for on_new_holder structured exactly like on_new_holder_usurpation. Therefore, use the same event registered on both on_actions. This case happens to magically cover grants
Modify dynlevy.0 codegen to clr_character_flag = dynlevy_dirty when finished
In all cases of preparing to trigger a levy-law reevaluation for a scope in these 2 events (for 6 total cases), also do the full dirty-flag-check, conditional-event-enqueue sequence for any_liege of the scoped character.
The text was updated successfully, but these errors were encountered:
zijistark
changed the title
[DynamicLevies] on_new_holder_usurpation/inheritance handlers for levy law reevaluation
[DynamicLevies] 3 title transfer on_action handlers that trigger batch-optimized levy law reevaluation
Jun 16, 2014
zijistark
changed the title
[DynamicLevies] 3 title transfer on_action handlers that trigger batch-optimized levy law reevaluation
[DynamicLevies] 3 title transfer and 1 barony-built on_action handlers that trigger batch-optimized levy law reevaluation
Jun 17, 2014
Ended-up splitting these 2 planned similar events into 3 ultra-similar events to be sure about avoiding unnecessary triggering due to listening to multiple types of on_actions. All written under the assumption that FROMFROM is bound properly (it isn't yet).
In total, only two distinct events need to be written to cover 4 cases of demesne-size change triggers:
not = { has_character_flag = dynlevy_dirty }
. If not dynlevy_dirty, then it also marks dynlevy_dirty. This is a massive batch title transfer (common in CBs and inheritances) optimizationis_alive = yes
(makes sense, but also, it allows the event to be used for on_new_holder for filtering grants vs. creates)clr_character_flag = dynlevy_dirty
when finishedany_liege
of the scoped character.The text was updated successfully, but these errors were encountered: