Character InteractionChanged this version
Assume Fort Command
The Character will assume control over the defenses of the target area and will be incapable of leading Armies and Navies and working in the Cabinet for 10 years.
Allow Assume Fort CommandModifier Typepotential, select trigger 1
Can Assume Fort CommandModifier Typeselect trigger 1Local Defense CommandStatic Modifiereffect, select trigger 2Can not lead Armies or NaviesStatic Modifierselect trigger 12message = yes
3on_own_nation = yes
12ai_tick = daily
13ai_tick_frequency = 30
15allow = {
}
18select_trigger = {
19looking_for_a = character
20source = actor
21target_flag = recipient
22name = "choose_character" Choose the Character:
23column = {
24data = name
}
26visible = {
27is_alive = yes
28is_ruler = no
29is_heir = no
30is_regent = no
31OR = {
}
}
38enabled = {
39is_adult = yes
40OR = {
41AND = {
42mil >= 50
43in_cabinet = no
}
45is_general = yes
}
}
}
51select_trigger = {
52looking_for_a = area
53source = actor
54target_flag = target
55name = "assume_fort_command_select_area_title" Select a Target Area
56none_available_msg_key = "assume_fort_command_no_areas"
57column = {
57data = name
}
58visible = {
59any_location_in_area = {
60owner ?= scope:actor
}
}
63enabled = {
}
}
72effect = {
73if = {
74limit = {
74exists = scope:target
}
75scope:target = {
76every_location_in_area = {
81add_location_modifier = {
83mode = add_and_extend
84years = 10
85size = {scales the modifier
86if = {
87limit = {
88scope:recipient.adm <= 20
}
90value = {
91desc = script_value_base Base
92value = 1
}
}
95else = {
96value = {
97desc = script_value_scaling_with_character_admin Administrative Ability of the Character
98value = scope:recipient.adm
99divide = 20
}
}
102if = {
103limit = {
104scope:recipient.modifier:fort_assumed_efficiency_character != 0
}
106value = {
107desc = script_value_scaling_with_fort_assumed_efficiency_character fort_assumed_efficiency_character of the Character
108multiply = {
109value = scope:recipient.modifier:fort_assumed_efficiency_character
110add = 1
}
}
}
}
}
}
}
}
119else = {
120custom_tooltip = assume_fort_command_tt The target Area gains the Local Defense Command for 10 years
The effect scales with the administrative Ability of Recipient
The effect scales with the administrative Ability of Recipient
}
122scope:actor = {
123change_societal_value = {
}
}
125remove_commander = scope:recipient
126scope:recipient = {
127add_character_modifier = {
}
132add_character_modifier = {
}
}
}
140ai_will_do = {
144add = scope:recipient.adm
145subtract = scope:recipient.dip
146subtract = scope:recipient.mil
147add = {
148if = {
149limit = {
150scope:actor = {
151any_current_war = {
152is_an_attacker = scope:actor
}
}
}
156value = -50
}
}
159add = {
160if = {
161limit = {
162scope:actor = {
163any_current_war = {
164NOT = {
164is_an_attacker = scope:actor
}
}
}
}
168value = 25
}
}
}