tiger_lib/ck3/tables/
on_action.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
// LAST UPDATED CK3 VERSION 1.14.0.2
pub const ON_ACTION_SCOPES: &str = "
	on_accolade_rank_change = {
		root = accolade
		positive = bool
	}
	on_accolade_glory_change = {
		root = accolade
		glory = value
	}
	on_accolade_created = {
		root = accolade
	}
	on_active_accolade_succession = {
		root = accolade
		new_owner = character
	}
	on_inactive_accolade_succession = on_active_accolade_succession
	on_accolade_acclaimed_death = {
		root = accolade
		old_acclaimed_knight = character
		new_accolade_type = bool
	}
	on_accolade_acclaimed_removal = on_accolade_acclaimed_death
	on_accolade_successor_death = {
		root = accolade
	}
	on_accolade_successor_removal = on_accolade_successor_death
	on_accolade_deactivated = {
		root = accolade
		owner = character
	}
	on_accolade_new_acclaimed_knight = {
		root = accolade
		glory = value
		new_accolade_type = bool
		new_acclaimed_knight = character
	}

	on_alliance_added = {
		root = none
		first = character
		second = character
	}
	on_alliance_removed = on_alliance_added
	on_alliance_broken = {
		root = none
		first = character
		second = character
		list = { first = character }
		list = { second = character }
	}

	on_army_monthly = {
		root = character
		army = army
	}
	on_army_enter_province = on_army_monthly
	on_siege_looting = {
		root = character
		county = landed_title
		barony = landed_title
		previous_controller = character
	}
	on_county_occupied = {
		root = character
		county = landed_title
		barony = landed_title
		previous_controller = character
		war = war
	}
	on_siege_completion = {
		root = character
		county = landed_title
		barony = landed_title
		previous_controller = character
		war = war
		list = { occupied_baronies = landed_title }
	}
	on_raid_action_start = {
		root = army
		raider = character
		barony = landed_title
		county = landed_title
	}
	on_raid_action_completion = on_raid_action_start
	on_raid_action_weekly = on_raid_action_start
	on_raid_loot_delivered = {
		root = army
		raider = character
	}
	on_defeat_raid_army = {
		root = army
		raider = character
		receiver = character
	}

	on_building_completed = {
		root = province
	}

	on_building_started = {
		root = province
	}

	on_building_cancelled = {
		root = province
	}

	on_birth_mother = {
		root = character
		child = character
		mother = character
		real_father = character
		father = character
	}
	on_birth_father = on_birth_mother
	on_birth_real_father = on_birth_mother
	on_birth_child = {
		root = character
		child = character
		mother = character
		real_father = character
		father = character
		is_bastard = bool
	}
	on_pregnancy_mother = {
		root = character
		mother = character
		real_father = character
		father = character
	}
	on_pregnancy_father = on_pregnancy_mother
	on_pregnancy_ended_mother = on_pregnancy_mother

	on_combat_end_winner = {
		root = combat_side
		wipe = bool
	}
	on_combat_end_loser = on_combat_end_winner

	on_councillor_left = {
		root = character
		old_employer = character
		council_task = council_task
		councillor = character
	}

	on_stress_level_reduced = {
		root = character
	}
	on_stress_level_1 = on_stress_level_reduced
	on_stress_level_2 = on_stress_level_reduced
	on_stress_level_3 = on_stress_level_reduced
	on_stress_level_4 = on_stress_level_reduced

	on_county_faith_change = {
		root = landed_title
		old_faith = faith
	}
	on_county_culture_change = {
		root = landed_title
		old_culture = culture
	}

	on_character_culture_change = {
		root = character
	}

	on_dynasty_created = { # undocumented
		root = dynasty
	}

	on_became_dynasty_head = {
		root = character
		dynasty = dynasty
	}

	on_became_house_head = {
		root = character
		house = dynasty_house
	}

	on_trigger_court_events = {
		root = character
	}
	on_absent_from_royal_court = {
		root = character
		value = value
	}
	on_court_grandeur_level_changed = {
		root = character
		old_value = value
		new_value = value
	}
	on_court_language_changed = {
		root = character
	}
	on_court_type_changed = on_court_language_changed
	on_player_royal_court_first_gained = {
		root = character
	}

	on_courtier_decided_to_move_to_pool = {
		root = character
		courtier = character
		liege = character
		list = { characters = character }
	}
	on_courtier_ready_to_move_to_pool = on_courtier_decided_to_move_to_pool
	on_guest_arrived_from_pool = {
		root = character
		guest = character
		host = character
		list = { characters = character }
	}
	on_guest_ready_to_move_to_pool = {
		root = character
		guest = character
		host = character
		list = { characters = character }
		destination = province # TODO: verify scope type
	}
	on_join_court = {
		root = character
		new_employer = character
		old_employer = character # may be unset
	}
	on_leave_court = {
		root = character
		old_employer = character
	}

	on_tradition_removed = {
		root = culture
		tradition = flag  # TODO: verify scope type
	}
	on_tradition_added = on_tradition_removed
	on_culture_created = {
		root = culture
		founder = character
	}
	on_county_auto_granted_to_liege_culture = {
		root = culture
		actor = character
		landed_title = landed_title
	}
	on_county_auto_granted_to_local_culture = on_county_auto_granted_to_liege_culture

	on_death = {
		root = character
		killer = character # may be unset
	}
	on_natural_death_second_chance = {
		root = character
	}

	on_entered_diarchy = {
		root = character
		reason = flag
	}
	on_left_diarchy = {
		root = character
		old_diarch = character
	}
	on_diarch_change = {
		root = character
		reason = flag
		old_diarch = character
	}
	on_diarch_designation = {
		root = character
		former_designated_diarch = character
	}

	on_holy_order_new_lease = {
		root = holy_order
		patron = character
		barony = landed_title
	}
	on_holy_order_hired = {
		root = holy_order
		patron = character
		actor = character
	}
	on_holy_order_destroyed = {
		root = faith
		title = landed_title
		leader = character
	}

	on_perks_refunded = {
		root = character
	}

	on_ruler_designer_finished = {
		root = character
	}

	on_hook_used = {
		root = character
		target = character
	}

	on_artifact_changed_owner = {
		root = artifact
		owner = character
		old_owner = character
	}
	on_artifact_succession = {
		root = artifact
		owner = character
		old_owner = character
		old_primary = character
	}
	on_artifact_broken_through_decay = {
		root = artifact
		owner = character
	}
	on_artifact_broken_through_effect = on_artifact_broken_through_decay
	on_artifact_durability_very_low = on_artifact_broken_through_decay
	on_artifact_durability_low = {
		root = character # TODO: verify the doc
	}
	on_artifact_claim_gained = {
		root = character
		owner = character
		artifact = artifact
	}
	on_artifact_claim_lost = on_artifact_claim_gained

	on_commander_combat_finished = {
		root = character
		combat_side = combat_side
		victory = bool
	}
	on_army_combat_finished = {
		root = character
		combat_side = combat_side
		victory = bool
		list = { commanders = character }
		list = { knights = character }
	}

	on_marriage = {
		root = character
		spouse = character
	}
	on_divorce = {
		root = character
		spouse = character
		reason = flag
	}
	on_concubinage = {
		root = character
		concubine = character
	}
	on_concubinage_end = {
		root = character
		concubine = character
		reason = flag
	}
	on_betrothal_broken = {
		root = character
		second = character
		reason = flag
	}

	on_game_start = {
		root = none
	}
	on_game_start_after_lobby = on_game_start
	on_game_start_with_tutorial = on_game_start

	on_imprison = {
		root = character
		imprisoner = character
	}
	on_release_from_prison = on_imprison

	on_faith_created = {
		root = character
		old_faith = faith
	}
	on_faith_conversion = on_faith_created
	on_character_faith_change = on_faith_created
	on_faith_monthly = {
		root = faith
	}
	on_potential_great_holy_war_invalidation = {
		root = ghw
	}
	on_great_holy_war_invalidation = on_potential_great_holy_war_invalidation
	on_great_holy_war_countdown_end = on_potential_great_holy_war_invalidation
	on_great_holy_war_participant_replaced = {
		root = character
		great_holy_war = ghw
		replacement = character
	}

	yearly_global_pulse = {
		root = none
	}
	yearly_playable_pulse = {
		root = character
	}
	three_year_playable_pulse = yearly_playable_pulse
	five_year_playable_pulse = yearly_playable_pulse
	quarterly_playable_pulse = {
		root = character
		quarter = value
	}
	random_yearly_playable_pulse = yearly_playable_pulse
	random_yearly_everyone_pulse = yearly_playable_pulse
	five_year_everyone_pulse = yearly_playable_pulse
	three_year_pool_pulse = yearly_playable_pulse
	yearly_culture_pulse = {
		root = culture
	}
	three_yearly_culture_pulse = yearly_culture_pulse
	on_culture_era_changed = {
		root = culture
	}

	yearly_struggle_playable_pulse = {
		root = character
		struggle = struggle
	}
	five_year_struggle_playable_pulse = yearly_struggle_playable_pulse

	on_birthday = {
		root = character
	}

	on_title_destroyed = {
		root = character
		landed_title = landed_title
	}
	on_title_gain = {
		root = character
		title = landed_title
		previous_holder = character
		transfer_type = flag
	}
	on_title_gain_inheritance = on_title_gain
	on_title_gain_usurpation = on_title_gain
	on_title_lost = {
		root = character
		title = landed_title
		new_holder = character
		transfer_type = flag
	}
	on_explicit_claim_gain = {
		root = character
		title = landed_title
		transfer_type = flag
	}
	on_explicit_claim_lost = {
		root = character
		title = landed_title
	}
	on_rank_up = on_explicit_claim_lost
	on_rank_down = on_explicit_claim_lost
	on_vassal_gained = {
		root = character
		vassal = character
		old_liege = character
		transfer_type = flag
	}
	on_baron_found_or_created_for_title = {
		root = character
		liege = character
		title = landed_title
	}
	on_realm_capital_change = {
		root = landed_title
		old_capital = landed_title
	}

	on_travel_plan_movement = {
		root = character
	}
	on_travel_plan_arrival = on_travel_plan_movement
	on_travel_plan_start = on_travel_plan_movement
	on_travel_plan_complete = on_travel_plan_movement
	on_travel_plan_abort = on_travel_plan_movement
	on_travel_plan_cancel = on_travel_plan_movement

	on_travel_activity_complete = {
		root = character # TODO Verify
		travel_plan = travel_plan
	}
	on_travel_activity_invalidated = { 
		root = character # TODO Verify
		travel_plan = travel_plan
	}
	on_travel_activity_arrival_too_late = {
		root = character
		travel_plan = travel_plan
	}
	on_travel_activity_estimated_arrival_too_late = {
		root = character
		travel_plan = travel_plan
		estimated_arrival_diff_days = value
	}
	on_travel_leader_removed = {
		root = character
		travel_plan = travel_plan
		old_travel_leader = character
	}

	on_war_transferred = {
		root = character
		war = war
		defender = character
	}
	on_join_war_as_secondary = {
		root = character
		war = war
	}
	on_war_started = {
		root = casus_belli
		attacker = character
		defender = character
		claimant = character
		war = war # undocumented
	}
	on_war_won_attacker = on_war_started
	on_war_won_defender = on_war_started
	on_war_white_peace = on_war_started
	on_war_invalidated = on_war_started

	on_hostage_taken = {
		root = character
		hostage = character
		warden = character
		home_court = character
	}
	on_hostage_released = on_hostage_taken
	on_hostage_invalidated = {
		root = character
		warden = character
		home_court = character
		imprisoner = character
		reason = flag
	}

	on_scheme_agent_discovered = {
		root = scheme
		agent = character
	}
	on_scheme_discovered = {
		root = scheme
	}

	on_influence_level_gain = {
		root = character
	}
	on_influence_level_loss = on_influence_level_gain
	on_piety_level_gain = on_influence_level_gain
	on_piety_level_loss = on_influence_level_gain
	on_prestige_level_gain = on_influence_level_gain
	on_prestige_level_loss = on_influence_level_gain

	on_player_select_destiny_setup = {
		root = character
		predecessor = character
		heir = character
	}
	on_player_select_destiny_confirmed = {
		root = character
		destiny_type_flag = flag
		previous_player_character = character
		previous_player_heir = character
	}

	on_domicile_moved = {
		root = domicile
		owner = character
	}
	on_domicile_building_started = {
		root = domicile
		owner = character
	}
	on_domicile_building_completed = on_domicile_building_started
	on_domicile_building_cancelled = on_domicile_building_started

	on_noble_family_title_created = {
		root = character
	}

	on_house_in_admin_realm_became_powerful = {
		root = dynasty_house
	}
	on_house_in_admin_realm_became_dominant = on_house_in_admin_realm_became_powerful

	on_liege_government_change = {
		root = character
	}
	on_vassal_change = {
		root = character
		old_liege = character
	}
";