From 714c37ce7505d13969c36187bc99da5da612d288 Mon Sep 17 00:00:00 2001 From: GoTouchSomeGrass314 Date: Tue, 28 Apr 2026 20:31:36 +0200 Subject: [PATCH] Decision to Reforge the Crown of St. Wenceslas FIXED finally found what was causing the issues (i think, but it works, so i am not complaining) --- common/decisions/NEOW_artifact_decisions.txt | 34 +++++++++++++------ ...W_historical_artifacts_creation_effect.txt | 4 +-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/common/decisions/NEOW_artifact_decisions.txt b/common/decisions/NEOW_artifact_decisions.txt index 1f6c9c04..b45437c7 100644 --- a/common/decisions/NEOW_artifact_decisions.txt +++ b/common/decisions/NEOW_artifact_decisions.txt @@ -4,19 +4,26 @@ reforge_crown_wenceslas_decision = { } desc = reforge_crown_wenceslas_decision_desc - decision_group_type = realm sort_order = 100 + selection_tooltip = reforge_crown_wenceslas_decision_tooltip cooldown = { days = 1000 } is_shown = { - OR = { - any_character_artifact = { - has_variable = crown_wenceslas + AND = { + OR = { + any_character_artifact = { + has_variable = crown_wenceslas + } + has_title = title:k_bohemia + } + NOT = { + any_character_artifact = { + has_variable = crown_wenceslas_reforged + } } - has_title = title:k_bohemia } - } + } is_valid = { has_title = title:k_bohemia @@ -25,8 +32,8 @@ reforge_crown_wenceslas_decision = { custom_tooltip = { text = must_have_crown_wenceslas any_character_artifact = { - has_name = crown_wenceslas_name - } + has_variable = crown_wenceslas + } } } @@ -42,7 +49,7 @@ reforge_crown_wenceslas_decision = { } every_character_artifact = { limit = { - has_name = crown_wenceslas_name + has_variable = crown_wenceslas } destroy_artifact = this } @@ -58,7 +65,7 @@ reforge_crown_wenceslas_decision = { quality = scope:quality culture = root.culture decaying = no - save_scope_as = newly_created_artifact + save_scope_as = crown_wenceslas_reforged history = { location = root.capital_province actor = root @@ -66,11 +73,16 @@ reforge_crown_wenceslas_decision = { type = created_before_history } } + scope:crown_wenceslas_reforged = { + set_variable = { name = historical_unique_artifact value = yes } + set_variable = crown_wenceslas_reforged + save_scope_as = epic + } } } ai_check_interval = { 500 } ai_will_do = { - base = 15 + base = 50 } } \ No newline at end of file diff --git a/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt b/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt index afe6b90c..c22ddb5a 100644 --- a/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt +++ b/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt @@ -44,7 +44,7 @@ create_artifact_crown_wenceslas_effect = { # Crown of Saint Wenceslas wealth = scope:wealth quality = scope:quality decaying = no - save_scope_as = newly_created_artifact + save_scope_as = crown_wenceslas history = { type = created_before_history date = 1346.1.1 @@ -52,7 +52,7 @@ create_artifact_crown_wenceslas_effect = { # Crown of Saint Wenceslas } } - scope:newly_created_artifact = { + scope:crown_wenceslas = { set_variable = { name = historical_unique_artifact value = yes } set_variable = crown_wenceslas save_scope_as = epic