Scripted trigger
is_available_ai
is_available_ai = yesgame/common/scripted_triggers/00_available_for_events_triggers.txt, line 241 (31 lines). No parameters.
is_available_ai is a scripted trigger in Crusader Kings III, written at line 241 of its file. It takes no parameters: is_available_ai = yes (or no). The game's script calls it in 99 places, among them Train for a Tournament (decision), … First Enrobing (event bp2_yearly.7006) and … First Steps (event bp2_yearly.7004). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_triggers/00_available_for_events_triggers.txt.
The comment above it in the file
If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are.
What it checks
- Is available (not in an army, not imprisoned, not incapable)
has_contagious_deadly_disease_trigger = no- Busy participating in an Activity
- You are already planning another Activity
• 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 (31 lines of game script)
is_available_ai = {
is_available_quick = {
ai = yes
alive = yes
travel = no
in_army = no
imprisoned = no
incapable = no
}
has_contagious_deadly_disease_trigger = no
custom_description = {
text = ALREADY_IN_ACTIVITY
NOR = {
exists = involved_activity
has_variable = {
name = homage_liege_scope
name = meditation_character_flag
name = local_shrine_rite
name = petition_liege_character_flag
name = petition_head_of_faith_petitioner
name = holding_court_character_flag
name = gone_adventuring
}
is_being_visited_on_tour_strict = yes
}
}
custom_description = {
text = ALREADY_PLANNING_ACTIVITY
NOT = { has_character_flag = planning_an_activity }
}
}As written in game/common/scripted_triggers/00_available_for_events_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls is_available_ai.
Decisions (1)
Events (54)
- … First Enrobing
bp2_yearly.7006 - … First Steps
bp2_yearly.7004 - … First Teething
bp2_yearly.7005 - … First Words
bp2_yearly.7003 - …: Charmed Vassal
pet_animal.0103 - …: Charmed Vassal
pet_animal.1107
48 more
- …: Sensitivity
pet_animal.0106 - …: The Meeting
pet_animal.1109 - …: The Troublemaker
pet_animal.0110 - …: The Troublemaker
pet_animal.1118 - A Brown Naming
bp1_yearly.9046 - A Special Dharma Talk
devaraja.0003 - A Watery Witch
bp1_yearly.9034 - An Unwelcome Guest
host_dinner_events.1030 - Blood and Spit
child_personality.7070 - Cornered
nomad_events.0110 - Dedicated Tutor
court.5070 - Empty Stomachs
mpo_nomads_season_events.0005 - Evening Ride
nomad_events.0120 - False Conversion
fp2_yearly.9001 - feast_main_befriend.5001
- feast_main_live_fowl.9000
- feast_main_stable_breakin.9000
- feast_main_stew_flood.0040
- Fiscal Matters
ach_yearly_events.1001 - Flaring Tempers
mpo_nomads_season_events.0015 - Folly
ep3_powerful_families.8070 - Gone In The Night
yearly.1010 - Grand Tournament: A Tentative Start
travel_start_event.1010 - Healthy Charity
devaraja.0001 - I Love A Parade
devaraja.0004 - Inspiration: Nature's Architects
fund_inspiration.6508 - Let's Go Away
lover.1004 - Memories of a …
bp1_yearly.9041 - On the March
martial_strategy_special.1404 - pet_animal.6055
- Power of the …
learning_theology.2020 - Prayers for the God-King
devaraja.0002 - Rites of Passage: A Familiar Fear
bp2_yearly.7029 - Season of Plenty
mpo_nomads_season_events.0010 - Smaller Spies
fp3_clan.8006 - The … Arrives
lover.1008 - The … of Few Letters
learning_scholarship.6000 - The Arrival
pilgrimage.4002 - The Builder: And Den They Were...
bp2_yearly.1055 - The Friends One Chooses
friendship.3003 - The Man From the Mountain
mpo_events_tova.0035 - The Touch of Death
ep3_laamps_provisions.1050 - Two Palfreys
court.5075 - Unsolicited Family Support
imperial_examination.4070 - Wisdom of the Paddle
devaraja.0006 - Wise …
playdate.3013 - yearly.1020
- yearly.5020
Scripted triggers inside an event file (39)
- bp1_yearly_2060_is_relevant_child_trigger
- bp2_yearly_1060_appropriate_character_trigger
- bp2_yearly_8000_valid_educator
- bp2_yearly_8010_valid_child
- councillor_spouse_learning_1001_vassal_trigger
- councillor_spouse_learning_1301_convert_target
33 more
- councillor_spouse_learning_1302_convert_target
- councillor_spouse_learning_1304_theocratic_vassal_trigger
- councillor_spouse_learning_1602_tutored_child_trigger
- councillor_spouse_learning_2001_different_culture_or_faith_faction_member_trigger
- councillor_spouse_learning_2001_different_culture_or_faith_faction_trigger
- councillor_spouse_learning_2601_tutoring_student_trigger
- councillor_spouse_learning_2602_student_trigger
- councillor_spouse_martial_0009_child_trigger
- court_2201_valid_basic_heir_child_trigger
- court_5001_basic_friend_trigger
- fp2_struggle.1001_expectant_vassal_or_courtier_traits
- fp3_loves_faloodeh_trigger
- friendship_1006_friend_trigger
- friendship_2007_liege_trigger
- friendship_2007_vassal_trigger
- friendship_3006_friend_trigger
- hold_court_8160_current_hostile_target_trigger
- learning_medicine_2001_basic_herbalist_trigger
- lover_1003_find_lover_trigger
- martial_authority_special_friend_trigger
- mystic_lifestyle_1005_vassal_trigger
- mystic_lifestyle_1009_mystic_trigger
- pilgrimage_2010_mystic_ruler
- potential_child_befriend_ongoing_9104_trigger
- potential_mate_befriend_ongoing_9104_trigger
- potential_monk_befriend_ongoing_9104_trigger
- rivals_child_trigger
- seduce_ongoing_3001_close_character_trigger
- stewardship_wealth_1001_wealthy_vassal
- suitably_terrible_knight_trigger
- sutiably_evil_person
- yearly_5001_valid_lover_trigger
- yearly_5001_valid_spouse_trigger
On actions (the game's own hooks) (1)
- five_year_playable_pulse
Scripted triggers (2)
Activities (2)
- Guests
- Guests
Source: game/common/scripted_triggers/00_available_for_events_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.