diff --git a/common/artifacts/templates/NEOW_templates.txt b/common/artifacts/templates/NEOW_templates.txt index 4e85401eb..e0b909dee 100644 --- a/common/artifacts/templates/NEOW_templates.txt +++ b/common/artifacts/templates/NEOW_templates.txt @@ -118,3 +118,32 @@ st_edwards_crown_template = { unique = yes } + +skull_chad_ironside_template = { + can_equip = { + always = yes + } + + can_benefit = { + OR = { + christianity_or_syncretic_with_christianity_trigger = { CHARACTER = root } + has_religion = religion:britannic_religion + has_religion = religion:thelema_religion + } + } + + fallback = { + monthly_prestige = 1 + } + + can_repair = { + always = yes + } + + ai_score = { + value = 100 + } + + unique = yes +} + diff --git a/common/modifiers/NEOW_historical_artifact_modifiers.txt b/common/modifiers/NEOW_historical_artifact_modifiers.txt index 661fa38a1..5289782ca 100644 --- a/common/modifiers/NEOW_historical_artifact_modifiers.txt +++ b/common/modifiers/NEOW_historical_artifact_modifiers.txt @@ -67,4 +67,24 @@ ak_mace_modifier = { monthly_martial_lifestyle_xp_gain_mult = 0.15 monthly_dynasty_prestige = 0.01 different_faith_opinion = -10 -} \ No newline at end of file +} + +# Skull of Saint Chad +skull_saint_chad_modifier = { + court_grandeur_baseline_add = 2 + monthly_piety = 0.3 + learning = 1 + clergy_opinion = 10 + health = 0.25 + negate_health_penalty_add = 0.5 +} + +# Skull of the Ironside +skull_ironside_modifier = { + court_grandeur_baseline_add = 2 + monthly_prestige = 0.3 + martial = 1 + dread_baseline_add = 10 + vassal_opinion = 5 +} + diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index a0c183f49..46c986eac 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -12,6 +12,13 @@ on_game_start = { effect = { ##NEOW + ### CHAD / IRONSIDE SKULL ### + # Spawn the historical skull at game start in Lichfield. + # Its creation effect immediately resolves its identity from the owner's religion. + title:c_staffordshire.holder ?= { + create_artifact_chad_ironside_skull_effect = { OWNER = this } + } + if = { limit = { government_allows = administrative diff --git a/common/on_action/inventory_on_actions.txt b/common/on_action/inventory_on_actions.txt new file mode 100644 index 000000000..727ddd324 --- /dev/null +++ b/common/on_action/inventory_on_actions.txt @@ -0,0 +1,126 @@ +# An artifact has changed ownership +# root = the artifact +# scope:owner = the person who now holds the artifact +# scope:old_owner = the person who used to hold the artifact +on_artifact_changed_owner = { + events = { + artifact.0011 + artifact.0101 + } + + effect = { + save_scope_as = artifact + grant_banner_house_claim_effect = yes + every_artifact_claimant = { #This on_action is not triggered on succession for the ones getting the claim, so we force it here + trigger_event = { + on_action = on_artifact_claim_gained + } + } + + # Re-identify the Chad/Ironside skull whenever it changes hands. + if = { + limit = { + has_variable = neow_chad_ironside_skull + } + neow_update_chad_ironside_skull_effect = yes + } + } +} + +# An artifact has changed ownership due to succession +# This is called just before the artifact changes hands. +# If you destroy it or change its owner, it won't change hands +# on_artifact_changed_owner will be called as normal when it changes hands +# root = the artifact +# scope:owner = the person who now holds the artifact +# scope:old_owner = the person who used to hold the artifact +# scope:old_primary = the heir's primary before this succession happened +on_artifact_succession = { + events = { + artifact.0031 + } +} + +# An artifact has reached 0 durability due to decay +# root = the artifact +# scope:owner = the person who owns the artifact +on_artifact_broken_through_decay = { + events = { + artifact.1000 + } +} + +# An artifact has reached 0 durability due to an effect ( ex. damage ) +# root = the artifact +# scope:owner = the person who owns the artifact +on_artifact_broken_through_effect = { + events = { + artifact.0021 + } +} + +# Character gained a claim on an artifact +# root = character +# scope:owner = current artifact owner +# scope:artifact = claimed artifact +on_artifact_claim_gained = { + effect = { + send_interface_message = { + type = msg_artifact_claim_gained + title = artifact_claim_gained_notification + right_icon = scope:artifact + left_icon = scope:owner + + show_as_tooltip = { + add_personal_artifact_claim = scope:artifact + } + } + } +} + +# Character lost a claim on an artifact +# root = character +# scope:owner = current artifact owner +# scope:artifact = artifact +on_artifact_claim_lost = { + effect = { + if = { + limit = { + scope:owner != root + } + send_interface_message = { + type = msg_artifact_claim_lost + title = artifact_claim_lost_notification + right_icon = scope:artifact + left_icon = scope:owner + + show_as_tooltip = { + remove_personal_artifact_claim = scope:artifact + } + } + } + } +} + +# Fired when an artifact reaches durability <= ARTIFACT_LOW_DURABILITY defıned in 00_defines.txt +# root = the artifact owner +on_artifact_durability_low = { + random_events = { + chance_to_happen = 50 + 1000 = 0 + 50 = artifact.3000 + 50 = artifact.3010 + 50 = artifact.3020 + 50 = artifact.3030 + 50 = artifact.3040 + } +} + +# Fired when an artifact with hıgh quality reaches durability <= ARTIFACT_VERY_LOW_DURABILITY defıned in 00_defines.txt +# root = the artifact +# scope:owner = the person who owns the artifact +on_artifact_durability_very_low = { + events = { + artifact.3050 + } +} diff --git a/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt b/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt index ea3a0c8dc..c55790410 100644 --- a/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt +++ b/common/scripted_effects/NEOW_historical_artifacts_creation_effect.txt @@ -306,4 +306,98 @@ create_artifact_ak_mace_effect = { set_variable = ak_mace save_scope_as = epic } -} \ No newline at end of file +} + +create_artifact_chad_ironside_skull_effect = { + $OWNER$ = { save_scope_as = owner } + set_artifact_rarity_illustrious = yes + + scope:owner = { + create_artifact = { + name = skull_saint_chad_name + description = skull_saint_chad_desc + template = skull_chad_ironside_template + type = pedestal + visuals = human_skull + wealth = scope:wealth + quality = scope:quality + modifier = skull_saint_chad_modifier + decaying = no + save_scope_as = newly_created_artifact + history = { + type = created_before_history + } + } + } + + scope:newly_created_artifact = { + set_variable = { name = historical_unique_artifact value = yes } + set_variable = { name = neow_chad_ironside_skull value = yes } + save_scope_as = epic + + # Make the initial identity match the first owner. + neow_chad_ironside_skull_effect = yes + } +} + +neow_chad_ironside_skull_effect = { + if = { + limit = { + has_variable = neow_chad_ironside_skull + exists = artifact_owner + } + + if = { + limit = { + artifact_owner = { + OR = { + has_religion = religion:britannic_religion + has_religion = religion:thelema_religion + } + } + } + + # Britannic or Thelemic interpretation: the Ironside. + set_artifact_name = skull_ironside_name + set_artifact_description = skull_ironside_desc + + if = { + limit = { + has_artifact_modifier = skull_saint_chad_modifier + } + remove_artifact_modifier = skull_saint_chad_modifier + } + + if = { + limit = { + NOT = { + has_artifact_modifier = skull_ironside_modifier + } + } + add_artifact_modifier = skull_ironside_modifier + } + } + else = { + # All other owners: Saint Chad. + set_artifact_name = skull_saint_chad_name + set_artifact_description = skull_saint_chad_desc + + if = { + limit = { + has_artifact_modifier = skull_ironside_modifier + } + remove_artifact_modifier = skull_ironside_modifier + } + + if = { + limit = { + NOT = { + has_artifact_modifier = skull_saint_chad_modifier + } + } + add_artifact_modifier = skull_saint_chad_modifier + } + } + } +} + diff --git a/localization/english/NEOW_artifacts_l_english.yml b/localization/english/NEOW_artifacts_l_english.yml new file mode 100644 index 000000000..57285e2f2 --- /dev/null +++ b/localization/english/NEOW_artifacts_l_english.yml @@ -0,0 +1,26 @@ +l_english: + crown_wenceslas_name:0 "Crown of St. Wenceslas" + crown_wenceslas_description:0 "Forged in 1346 in Czechia for Emperor Charles IV. After [Concept('neow_the_event','the Event')|E], some of the crown parts went missing, but the crown is still under the protection of the Czech kings and St. Wenceslas himself. \n\nHowever, a legend says those who wear the crown without permission from the saint will die within a year." + crown_wenceslas_reforged_description:0 "Forged in 1346 in Czechia for Emperor Charles IV. Now finally brought back to its former glory, after many pieces were replaced, the crown regained its image. Although it still remains under the protection of the Czech kings and St. Wenceslas himself. \n\nHowever, a legend says those who wear the crown without permission from the saint will die within a year." + codex_gigas_name:0 "Codex Gigas" + codex_gigas_description:0 "Codex Gigas, also known as the "Devil's Bible," is the largest known medieval manuscript. Inside, there is an illustration of the Devil, hence why so many people call it the "Devil's Bible." After the Event, the manuscript was moved from the National Library of Sweden to Stockholm Castle, where it sits to this day." + sword_wenceslas_name:0 "Sword of St. Wenceslas" + sword_wenceslas_description:0 "The Sword of St. Wenceslas is a ceremonial sword used during the coronation of the Czech kings. After the Event, the sword was still used in ceremonies to fully legitimize a new Czech king and to secure him blessings from the saint that protects the land." + crown_stephen_name:0 "Crown of St. Stephen" + crown_stephen_description:0 "The Holy Crown of Hungary, also known as the Crown of Saint Stephen, named in honour of Saint Stephen I of Hungary, was the coronation crown used by the Kingdom of Hungary for most of its existence. After [Concept('neow_the_event','the Event')|E], this tradition returned. In order to become the true king of Hungary, one must be crowned with this crown." + crown_charlemagne_name:0 "Napoleon's Crown of Charlemagne" + crown_charlemagne_description:0 "Napoleon's "Crown of Charlemagne" was a 1804 recreation fabricated by goldsmith Martin-Guillaume Biennais for his coronation, designed to evoke the ancient, destroyed Carolingian crown and legitimize his rule. \n\nAfter [Concept('neow_the_event','the Event')|E] it was used by the Bonaparte dynasty to crown the kings and emperors of France." + artifact_pearl_crown_name:0 "Pearl Crown of Nistrenia" + artifact_pearl_crown_description:0 "The Pearl Crown is the traditional headwear of Moldovan and Nistrenian monarchs. First worn by Stephen the Great who laid the foundations of Nistrenia, it was lost for centuries before being found once more." + artifact_st_edwards_crown_name:0 "St. Edward's Crown" + artifact_st_edwards_crown_description:0 "Forged for King Charles II in 1661, The Crown of St. Edward is the Coronation Crown of the United Kingdom of Great Britain and the most important of the British Crown Jewels." + artifact_pedestal_reliquary_fracture_name:0 "[SCOPE.Custom('FractureRelicName')|U]" + artifact_pedestal_reliquary_fracture_description:1 "An elegant reliquary containing a holy relic: [SCOPE.Custom('FractureRelic')|l]." + artifact_pedestal_amethyst_name:0 "Radiant Amethyst" + artifact_pedestal_amethyst_description:0 "An amethyst with a deep purple hue, from having been touched by the Fracture" + artifact_ak_mace_name:0 "Kalasnikov's Blessing" + artifact_ak_mace_description:0 "Deep Lore" + skull_saint_chad_name:0 "Skull of Saint Chad" + skull_saint_chad_desc:0 "This weathered skull is venerated as the holy relic of Saint Chad of Lichfield, a great bishop famed for his piety and miraculous healings. Some whisper that the skull instead belonged to a long-dead tyrant who persecuted the Church but surely the faithful know better." + skull_ironside_name:0 "Skull of the Ironside" + skull_ironside_desc:0 "This grim skull is said to have belonged to a great Lord Protector, whose true name has long since been lost, remembered only as the Ironside. In the days of old, he is said to have fought those who raised their hands against the Queen, becoming famed for his strength and stern authority. Some claim that the skull is merely that of a long-dead, feeble bishop but we know better." \ No newline at end of file