Scripted effect
create_almohads_effect
create_almohads_effect = yesgame/common/scripted_effects/00_almohad_invasion_effects.txt, line 99 (109 lines). No parameters.
create_almohads_effect is a scripted effect in Crusader Kings III, written at line 99 of its file. It takes no parameters: create_almohads_effect = yes. The game's script calls it in 1 place, among them almohad.0002 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_almohad_invasion_effects.txt.
What it does
create_character = { … }- Almohadism: Fervor increases by +50
scope:ibn_tumart:create_story = { type = story_almohad_invasion save_scope_as = story }add_pressed_claim = title:k_maghreb- Gains the modifier “Almohad Leader”
- Martial +1
- Learning +1
- Enemy Hostile Scheme Phase Length 20 days slower per Scheme Phase
- Enemy hostile scheme success chance -15%
almohads_find_target_titles_effect = yesfind_almohad_titles_and_assign_to_ibn_tumart_effect = yesscope:al_mumin:add_pressed_claim = title:k_maghreb- Gains the modifier “Almohad Leader”
- Martial +1
- Learning +1
- Enemy Hostile Scheme Phase Length 20 days slower per Scheme Phase
- Enemy hostile scheme success chance -15%
scope:almohad_county.holder:- If played by a person: Event almohad.1002
- Every liege or above:
- Where: Is played by a person
- Event almohad.1002
- If almohads waiting for player responses is 0:
- Otherwise: Event almohad.0004 (after 5 days)
• 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 (109 lines of game script)
create_almohads_effect = {
create_character = {
template = ibn_tumart_character_template
name = Amghar_ibn_Tumert
location = scope:almohad_county.title_province
dynasty_house = house:house_tumert
save_scope_as = ibn_tumart
}
faith:masmudi = {
change_fervor = {
value = major_fervor_gain
desc = fervor_gain_almohads
}
}
scope:ibn_tumart = {
create_story = {
type = story_almohad_invasion
save_scope_as = story
}
add_pressed_claim = title:k_maghreb
add_character_modifier = {
modifier = almohad_leader_modifier
}
add_character_flag = {
flag = immune_to_disease
years = 15
}
}
scope:story = {
set_variable = {
name = ibn_tumart
value = scope:ibn_tumart
}
set_variable = {
name = almohad_county
value = scope:almohad_county
}
}
almohads_find_target_titles_effect = yes
find_almohad_titles_and_assign_to_ibn_tumart_effect = yes
create_character = {
template = abd_al_mumin_character_template
name = Abd_al_Mu_min
employer = scope:ibn_tumart
dynasty_house = house:house_almohad
save_scope_as = al_mumin
}
scope:al_mumin = {
add_pressed_claim = title:k_maghreb
add_character_modifier = {
modifier = almohad_leader_modifier
}
add_character_flag = {
flag = immune_to_disease
years = 15
}
}
scope:story = {
set_variable = {
name = al_mumin
value = scope:al_mumin
}
}
scope:almohad_county.holder = {
set_global_variable = {
name = almohads_waiting_for_player_responses
value = 0
years = 1 # Clear out eventually, just in case
}
set_global_variable = {
name = almohads_player_responses_received
value = 0
years = 1 # Clear out eventually, just in case
}
if = {
limit = { is_ai = no }
change_global_variable = {
name = almohads_waiting_for_player_responses
add = 1
}
trigger_event = almohad.1002
}
every_liege_or_above = {
limit = { is_ai = no }
change_global_variable = {
name = almohads_waiting_for_player_responses
add = 1
}
trigger_event = almohad.1002
}
if = {
limit = {
global_var:almohads_waiting_for_player_responses = 0
}
remove_global_variable = almohads_waiting_for_player_responses
remove_global_variable = almohads_player_responses_received
almohads_go_to_war_effect = yes
}
else = {
trigger_event = {
id = almohad.0004
days = 5
}
}
}
}As written in game/common/scripted_effects/00_almohad_invasion_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls create_almohads_effect.
Events (1)
Source: game/common/scripted_effects/00_almohad_invasion_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.