Scripted trigger
ai_can_valid_to_create_laamp_trigger
ai_can_valid_to_create_laamp_trigger = yesgame/common/scripted_triggers/00_laamp_triggers.txt, line 799 (33 lines). No parameters.
ai_can_valid_to_create_laamp_trigger is a scripted trigger in Crusader Kings III, written at line 799 of its file. It takes no parameters: ai_can_valid_to_create_laamp_trigger = yes (or no). The game's script calls it in 9 places, among them Become Adventurer (decision), courtier_guest_management.4001 (event) and ep3_laamps.0002 (event). Patch 1.20.1.2, from game/common/scripted_triggers/00_laamp_triggers.txt.
The comment above it in the file
Can the AI create a new laamp without threatening performance? Beware of expanding this past the soft-cap figure of around ~200: code estimations were made with this number in mind, so the more we let slip the net, the more they'll start to degrade performance. YOU HAVE BEEN WARNED.
What it checks
One of these
NOT = { has_global_variable_list = laamps_tally }or
global_variable_list_size = { name = laamps_tally value < max_desired_laamps_value }or
Any player:One of these
is_close_or_extended_family_of = scope:char_tempor
is_consort_of = scope:char_tempor
has_important_relationship_with_character_trigger = { CHARACTER = scope:char_temp }or
is_allied_in_war = scope:char_tempor
is_allied_to = scope:char_tempor
is_at_war_with = scope:char_temp
or
All of these
- Any claim: Title tier at least Kingdom
global_variable_list_size = { … }
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (33 lines of game script)
ai_can_valid_to_create_laamp_trigger = {
save_temporary_scope_as = char_temp
OR = {
# General checking.
NOT = { has_global_variable_list = laamps_tally }
global_variable_list_size = {
name = laamps_tally
value < max_desired_laamps_value
}
# Player-relevant.
any_player = {
OR = {
is_close_or_extended_family_of = scope:char_temp
is_consort_of = scope:char_temp
has_important_relationship_with_character_trigger = { CHARACTER = scope:char_temp }
is_allied_in_war = scope:char_temp
is_allied_to = scope:char_temp
is_at_war_with = scope:char_temp
}
}
# Encourage legitimists.
AND = {
any_claim = { tier >= tier_kingdom }
global_variable_list_size = {
name = laamps_tally
value < {
value = max_desired_laamps_value
multiply = 1.25
}
}
}
}
}As written in game/common/scripted_triggers/00_laamp_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls ai_can_valid_to_create_laamp_trigger.
Decisions (1)
Events (6)
Scripted effects (2)
Source: game/common/scripted_triggers/00_laamp_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.