Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

commission_artifact_decision = {

picture = "gfx/interface/illustrations/decisions/decision_smith.dds"

cooldown = { days = standard_commission_artifact_cooldown_time }


sort_order = 100

is_shown = {
is_landed = yes
highest_held_title_tier >= tier_county
exists = capital_province
OR = {
employs_court_position = antiquarian_court_position
has_perk = apecraftsblessings_perk
}
}

is_valid_showing_failures_only = {
}

minimum_cost = {
# Matches the cost defined in 00_inspirations.txt
gold = basic_fund_inspiration_cost
}

widget = {
gui = "decision_view_widget_commission_artifact"
controller = decision_option_list_controller

decision_has_second_step = yes
decision_custom_widget_container = "custom_widgets_container_step_two"
decision_to_second_step_button =
"COMMISSION_ARTIFACT_DECISION_NEXT_STEP_BUTTON"

# Personal Artifacts are always valid to commission


item = {
value = commission_weapon
current_description = {
desc = commission_artifact_decision_option_weapon_desc
}
localization = {
desc = commission_artifact_decision_option_weapon
}
icon = "gfx/interface/icons/artifact/artifact_sword.dds"

ai_chance = {
value = 0
if = {
limit = {
# Only make this choice if we don't already
have an artifact of this type.
NOT = {
any_character_artifact = {
artifact_slot_type =
primary_armament
}
}
}
add = 100
}
}
}

item = {
value = commission_armor
current_description = {
desc = commission_artifact_decision_option_armor_desc
}
localization = {
desc = commission_artifact_decision_option_armor
}
icon = "gfx/interface/icons/artifact/artifact_armor.dds"

ai_chance = {
value = 0
if = {
limit = {
# Only make this choice if we don't already
have an artifact of this type.
NOT = {
any_character_artifact = {
artifact_slot_type = armor
}
}
}
add = 100
}
}
}

item = {
value = commission_crown
current_description = {
desc = commission_artifact_decision_option_crown_desc
}
localization = {
desc = commission_artifact_decision_option_crown
}
icon = "gfx/interface/icons/artifact/artifact_crown.dds"

ai_chance = {
value = 0
if = {
limit = {
# Only make this choice if we don't already
have an artifact of this type.
NOT = {
any_character_artifact = {
artifact_slot_type = helmet
}
}
}
add = 100
}
}
}

item = {
value = commission_regalia
current_description = {
desc = commission_artifact_decision_option_regalia_desc
}
localization = {
desc = commission_artifact_decision_option_regalia
}
icon = "gfx/interface/icons/artifact/artifact_regalia.dds"

ai_chance = {
value = 0
if = {
limit = {
# Only make this choice if we don't already
have an artifact of this type.
NOT = {
any_character_artifact = {
artifact_slot_type = regalia
}
}
}
add = 100
}
}
}

# Court Artifacts only appear if you have the Royal Court DLC, and are
only valid if you have an active Royal Court

item = {
value = commission_tapestry
is_shown = { has_dlc_feature = royal_court }
is_valid = { has_royal_court = yes }
current_description = {
desc = commission_artifact_decision_option_tapestry_desc
}

localization = {
desc = commission_artifact_decision_option_tapestry
}
icon = "gfx/interface/icons/artifact/artifact_tapestry.dds"

ai_chance = {
value = 0
if = {
limit = {
has_royal_court = yes
# Only make this choice if we don't already
have an artifact of this type.
NOR = {
any_character_artifact = {
artifact_slot_type = wall_big
}
any_character_artifact = {
artifact_slot_type = wall_small
}
}
}
add = 100
}
}
}

item = {
value = commission_furniture
is_shown = { has_dlc_feature = royal_court }
is_valid = { has_royal_court = yes }
current_description = {
desc = commission_artifact_decision_option_furniture_desc
}
localization = {
desc = commission_artifact_decision_option_furniture
}
icon = "gfx/interface/icons/artifact/artifact_cabinet.dds"

ai_chance = {
value = 0
if = {
limit = {
has_royal_court = yes
# Only make this choice if we don't already
have an artifact of this type.
NOT = {
any_character_artifact = {
artifact_slot_type = sculpture
}
}
}
add = 100
}
}
}

item = {
value = commission_book
is_shown = { has_dlc_feature = royal_court }
is_valid = { has_royal_court = yes }
current_description = {
desc = commission_artifact_decision_option_book_desc
}
localization = {
desc = commission_artifact_decision_option_book
}
icon = "gfx/interface/icons/artifact/artifact_book.dds"

ai_chance = {
value = 0
if = {
limit = {
has_royal_court = yes
# Only make this choice if we don't already
have an artifact of this type.
NOT = {
any_character_artifact = {
artifact_slot_type = book
}
}
}
add = 100
}
}
}

#Alchemy isn't included here since that inspiration is much more tied
to the pursuit of knowledge initiated by the inspired person
}

effect = {
if = {
limit = {
any_court_position_holder = {
type = antiquarian_court_position
}
}
random_court_position_holder = {
type = antiquarian_court_position
save_scope_as = antiquarian
}
}
# Explanatory Tooltips
custom_tooltip = commission_artifact_decision_effect
if = {
limit = {
has_dlc_feature = royal_court
NOT = { has_perk = apecraftsblessings_perk }
}
custom_description_no_bullet = {
text = commission_artifact_decision_warning_effect
}
}

if = {
limit = {
any_pool_character = {
province = root.capital_province
has_no_particular_noble_roots_trigger = yes
is_available_healthy_ai_adult = yes
NOR = {
exists = inspiration
has_trait = peasant_leader
}
}
}
random_pool_character = {
province = root.capital_province
limit = {
has_no_particular_noble_roots_trigger = yes
is_available_healthy_ai_adult = yes
NOR = {
exists = inspiration
has_trait = peasant_leader
}
}
save_scope_as = local_artisan
}
}
else = {
# Artisan Generation
hidden_effect = {
create_character = {
template = local_artisan_template
location = root.capital_province
gender_female_chance =
root_faith_dominant_gender_adjusted_female_chance
save_scope_as = local_artisan
}
}
}

hidden_effect = {
if = {
# Conditional exists to avoid false-positives during
tooltip generation, but 'local_artisan' should always exist on execution!
limit = { exists = scope:local_artisan }
root = { add_courtier = scope:local_artisan }
scope:local_artisan = {
add_character_flag = local_artisan
if = {
limit = { scope:commission_weapon = yes }
create_inspiration = weapon_inspiration
}
else_if = {
limit = { scope:commission_armor = yes }
set_variable = {
name = force_armor
value = flag:force_armor_true
}
create_inspiration = armor_inspiration
}
else_if = {
limit = { scope:commission_crown = yes }
set_variable = {
name = artifact_smith_type
value = flag:smith_type_crown
}
create_inspiration = smith_inspiration
}
else_if = {
limit = { scope:commission_regalia = yes }
set_variable = {
name = artifact_smith_type
value = flag:smith_type_regalia
}
create_inspiration = smith_inspiration
}
else_if = {
limit = { scope:commission_tapestry = yes }
root = {
trigger_event = fund_inspiration.0044
}
}
else_if = {
limit = { scope:commission_furniture = yes }
create_inspiration = artisan_inspiration
}
else_if = {
limit = { scope:commission_book = yes }
create_inspiration = book_inspiration
}
if = {
limit = { exists = inspiration }
inspiration = { save_scope_as =
this_inspiration }
root = { sponsor_inspiration =
scope:this_inspiration }
}
}
}
}
}

ai_check_interval = 36

ai_potential = {
is_at_war = no
ai_greed < medium_positive_ai_value
short_term_gold > ai_war_chest_desired_gold_value
war_chest_gold >= halved_ai_war_chest_gold_maximum
}

ai_will_do = {
base = 100

modifier = {
factor = 0
has_royal_court = yes
any_character_artifact = {
artifact_slot_type = primary_armament
}
any_character_artifact = {
artifact_slot_type = armor
}
any_character_artifact = {
artifact_slot_type = helmet
}
any_character_artifact = {
artifact_slot_type = regalia
}
OR = {
any_character_artifact = {
artifact_slot_type = wall_big
}
any_character_artifact = {
artifact_slot_type = wall_small
}
}
any_character_artifact = {
artifact_slot_type = sculpture
}
any_character_artifact = {
artifact_slot_type = book
}
}

modifier = {
factor = 0
has_royal_court = no
any_character_artifact = {
artifact_slot_type = primary_armament
}
any_character_artifact = {
artifact_slot_type = armor
}
any_character_artifact = {
artifact_slot_type = helmet
}
any_character_artifact = {
artifact_slot_type = regalia
}
}
}
}

You might also like