From 02fdfa508cee659c3b4fa455629212f3764ef9c4 Mon Sep 17 00:00:00 2001 From: alltheatreides <31647732+alltheatreides@users.noreply.github.com> Date: Tue, 19 Jan 2021 16:49:09 +0100 Subject: [PATCH] preparing v0.1.6 --- ...aria_roman_administration_interactions.txt | 33 +++---- ...roman_administration_council_positions.txt | 72 ++++++++-------- common/important_actions/00_realm_actions.txt | 11 +-- .../_scripted_relations.info | 86 +++++++++++++++++++ ...e_maria_roman_administration_relations.txt | 1 + ...roman_administration_scripted_triggers.txt | 8 ++ history/characters/greek.txt | 2 + ...e_maria_roman_administration_l_english.yml | 26 +++--- 8 files changed, 165 insertions(+), 74 deletions(-) create mode 100644 common/scripted_relations/_scripted_relations.info diff --git a/common/character_interactions/ave_maria_roman_administration_interactions.txt b/common/character_interactions/ave_maria_roman_administration_interactions.txt index 9e231d29..07b6de87 100644 --- a/common/character_interactions/ave_maria_roman_administration_interactions.txt +++ b/common/character_interactions/ave_maria_roman_administration_interactions.txt @@ -438,9 +438,9 @@ roman_administration_name_junior_emperor = { roman_administration_character_is_in_the_empire = yes age >= 6 is_female = no - NOT = { - has_any_scripted_relation = scope:actor - } + # NOT = { + # has_any_scripted_relation = scope:actor + # } NOT = { has_trait = junior_emperor } @@ -473,7 +473,8 @@ roman_administration_name_junior_emperor = { scope:actor = { every_relation = { type = junior_emperor - remove_relation_junior_emperor = scope:actor + #scope:actor = { remove_relation_junior_emperor = prev } + hidden_effect = { scope:actor = { remove_relation_junior_emperor = prev } } remove_trait = junior_emperor add_opinion = { @@ -481,21 +482,23 @@ roman_administration_name_junior_emperor = { modifier = roman_administration_fire_junior_emperor } } - if = { - limit = { - exists = cp:roman_councillor_coemperor - } - fire_councillor = cp:roman_councillor_coemperor - } - assign_councillor_type = { - type = roman_councillor_coemperor - target = scope:recipient - } + # if = { + # limit = { + # exists = cp:roman_councillor_coemperor + # } + # fire_councillor = cp:roman_councillor_coemperor + # } + # assign_councillor_type = { + # type = roman_councillor_coemperor + # target = scope:recipient + # } + + #set_relation_junior_emperor = scope:recipient } scope:recipient = { set_relation_junior_emperor = scope:actor - + add_trait = junior_emperor } } diff --git a/common/council_positions/ave_maria_roman_administration_council_positions.txt b/common/council_positions/ave_maria_roman_administration_council_positions.txt index d97d1212..9445f2d3 100644 --- a/common/council_positions/ave_maria_roman_administration_council_positions.txt +++ b/common/council_positions/ave_maria_roman_administration_council_positions.txt @@ -274,42 +274,42 @@ ## NEW COUNCILLORS # ### Second tab of councillors, represent the dignities, people receiving rogai but no office ## Co emperor -roman_councillor_coemperor = { - name = roman_administration_councillor_coemperor - tooltip = game_concept_councillor_coemperor_desc - - modifier = { - name = roman_councillor_coemperor_modifier - monthly_prestige = 1 - scale = council_scaled_monthly_income - } - - valid_position = { - OR = { - has_title = title:e_byzantium - has_title = title:e_roman_empire - } - } - valid_character = { - is_female = no - NOT = { - has_government = theocracy_government - } - OR = { - is_close_family_of = root.liege_or_court_owner - roman_administration_holds_high_office_title_trigger = yes - roman_administration_holds_doukaton_title_trigger = yes - } - } - on_get_position = { - got_council_position_effect = yes - } - on_fired_from_position = { - fired_from_council_position_effect = yes - } - - portrait_animation = personality_callous -} +# roman_councillor_coemperor = { +# name = roman_administration_councillor_coemperor +# tooltip = game_concept_councillor_coemperor_desc + +# modifier = { +# name = roman_councillor_coemperor_modifier +# monthly_prestige = 1 +# scale = council_scaled_monthly_income +# } + +# valid_position = { +# OR = { +# has_title = title:e_byzantium +# has_title = title:e_roman_empire +# } +# } +# valid_character = { +# is_female = no +# NOT = { +# has_government = theocracy_government +# } +# OR = { +# is_close_family_of = root.liege_or_court_owner +# roman_administration_holds_high_office_title_trigger = yes +# roman_administration_holds_doukaton_title_trigger = yes +# } +# } +# on_get_position = { +# got_council_position_effect = yes +# } +# on_fired_from_position = { +# fired_from_council_position_effect = yes +# } + +# portrait_animation = personality_callous +# } # ## First Sword bearer # roman_dignities_protospatharios = { diff --git a/common/important_actions/00_realm_actions.txt b/common/important_actions/00_realm_actions.txt index 311d7637..d7619950 100644 --- a/common/important_actions/00_realm_actions.txt +++ b/common/important_actions/00_realm_actions.txt @@ -116,16 +116,7 @@ action_empty_council_position = { if = { limit = { highest_held_title_tier > tier_barony - trigger_if = { - limit = { - NOT = { - any_held_title = { - this = title:e_byzantium - } - } - } - has_free_council_slot = yes - } + has_free_council_slot = yes } try_create_important_action = { important_action_type = action_empty_council_position diff --git a/common/scripted_relations/_scripted_relations.info b/common/scripted_relations/_scripted_relations.info new file mode 100644 index 00000000..5499512e --- /dev/null +++ b/common/scripted_relations/_scripted_relations.info @@ -0,0 +1,86 @@ +This documentation is rather scant. Sorry. + +== Structure == +my_relation = { + opinion = 42 # Opinion the owner of the relation has towards the target + special_guest = yes # If the relation target is in the same court, this will be shown specially in the court list (e.g. "Harold's Ward"); default: no + title_grant_target = yes # They might get given titles if they're unlanded and their liege or above has this relation towards them + relation_aliases = { friend } # If you for example use random_relation_friend other relations specifying friend as an alias will also be a valid relation. + hidden = yes # Relation is not shown to the player +} + + +== On-actions == +Each scripted relation has several associated on-actions: +- root = the relation owner ("source" of the relation) +- scope:target = the relation target +on_set_relation_x = { } # Has just been added. Not triggered if the relation is added because it is corresponding to another relation. +on_remove_relation_x = { } # Has just been removed & before the corresponding relation is removed +on_death_relation_x = { } # When the owner of the relation is about to die + +These will fire when the relation is set or removed via script. + +For example, you could do: +on_set_relation_lover = { + events = { + debug.0001 + } +} +The initiator is ROOT, the other character is scope:target. +For two-way relations, the on-action only fires on the initiator. Including if the corresponding relation is a different one (E.G., mentor vs. student) + + +== Opinion Modifier == + +opinion_modifier = { + opinion = 30 +} + +The impact the relation gives on the owning character's opinion of the relation target. + + +== Modifiers == + +modifier = { + monthly_prestige = 1 +} + +A modifier applied to all characters with the relation. (This means that applying it two a two-sided relation will give both characters the modifier.) + + + + +== Random Skills == + +"Random" based on owner id, target id and relation entry index so two people adding each other in the same relation will produce the same pattern of random skills + +random_skills = { + value = 2 + trigger = { + is_ai = no + } +} + +== Fertility == + +A multiplier against their fertility, used in place of the PRIMARY_SPOUSE_FERTILITY_MULTIPLIER etc defines + +fertility = 1.25 + +== Flags == + +Relations support up to 16 simple flags. They have to be defined as a numerical entry in the relation itself. Note that these are effectively simple bool checks, and cannot be timed. + +0 = first_flag +1 = second_flag + + +In script: + +add_relation_flag = { + flag = first_flag + target = scope:target + relation = relation_type +} + +remove_relation_flag follows the same syntax. \ No newline at end of file diff --git a/common/scripted_relations/ave_maria_roman_administration_relations.txt b/common/scripted_relations/ave_maria_roman_administration_relations.txt index 4c1c6d67..b295a249 100644 --- a/common/scripted_relations/ave_maria_roman_administration_relations.txt +++ b/common/scripted_relations/ave_maria_roman_administration_relations.txt @@ -2,4 +2,5 @@ corresponding = junior_emperor title_grant_target = yes opinion = 30 + special_guest = yes } diff --git a/common/scripted_triggers/ave_maria_roman_administration_scripted_triggers.txt b/common/scripted_triggers/ave_maria_roman_administration_scripted_triggers.txt index db1cd509..476b51b1 100644 --- a/common/scripted_triggers/ave_maria_roman_administration_scripted_triggers.txt +++ b/common/scripted_triggers/ave_maria_roman_administration_scripted_triggers.txt @@ -57,6 +57,14 @@ roman_administration_character_is_in_the_empire = { has_title = title:e_byzantium } } + trigger_if = { + limit = { + is_ruler = no + } + any_liege_or_above = { + has_title = title:e_byzantium + } + } } diff --git a/history/characters/greek.txt b/history/characters/greek.txt index 62514247..59a1aefb 100644 --- a/history/characters/greek.txt +++ b/history/characters/greek.txt @@ -1336,6 +1336,8 @@ type = roman_councillor_coemperor target = character:1736 } + + set_relation_junior_emperor = character:1736 spawn_army = { name = "Varangian Guard" diff --git a/localization/english/ave_maria_roman_administration_l_english.yml b/localization/english/ave_maria_roman_administration_l_english.yml index 1c31e73e..47bd145f 100644 --- a/localization/english/ave_maria_roman_administration_l_english.yml +++ b/localization/english/ave_maria_roman_administration_l_english.yml @@ -685,9 +685,9 @@ roman_administration_favour_family_member_desc:0 "Promote a family member towards becoming the next official of [recipient.GetPrimaryTitle.GetName]." roman_administration_send_family_member_for_training:0 "Send Family Member" roman_administration_send_family_member_for_training_desc:0 "Send a family member towards working under [recipient.GetPrimaryTitle.GetName] to start his career." - roman_administration_name_junior_emperor:0 "Name Junior Emperor" - roman_administration_name_junior_emperor_desc:0 "Name [recipient.GetName] as Junior Emperor." - roman_administration_fire_junior_emperor:0 "Revoke Junior Emperor" + roman_administration_name_junior_emperor:0 "Named Symbasileis" + roman_administration_name_junior_emperor_desc:0 "Name [recipient.GetName] as Symbasileis." + roman_administration_fire_junior_emperor:0 "Revoked Symbasileis" sender_secondary_roman_administration_favour_successor:0 "Benefactor" recipient_secondary_roman_administration_favour_successor:0 "Successor" @@ -711,16 +711,16 @@ ### RELATIONS - set_relation_junior_emperor:0 "Appoints [recipient.GetShortUIName|U] as Junior Emperor." - remove_relation_junior_emperor:0 "[recipient.GetShortUIName|U] will no longer be Junior Emperor." - junior_emperor:0 "Junior-Emperor" - - THEY_GET_JUNIOR_EMPEROR:0 "[CHARACTER.GetShortUIName|U] appoints [TARGET_CHARACTER.GetShortUIName] as a Junior Emperor" - THEY_GOT_JUNIOR_EMPEROR:0 "[CHARACTER.GetShortUIName|U] became [TARGET_CHARACTER.GetShortUINamePossessive] Junior Emperor" - GLOBAL_BECOME_JUNIOR_EMPEROR:0 "Becomes [TARGET_CHARACTER.GetShortUINamePossessive] Junior Emperor" - THEY_LOSE_JUNIOR_EMPEROR:0 "[CHARACTER.GetShortUIName|U] will no longer be the Junior Emperor of [TARGET_CHARACTER.GetShortUIName]" - GLOBAL_LOSE_JUNIOR_EMPEROR:0 "Will no longer be [TARGET_CHARACTER.GetShortUINamePossessive] Junior Emperor" - GLOBAL_LOST_JUNIOR_EMPEROR:0 "No longer is [TARGET_CHARACTER.GetShortUINamePossessive] Junior Emperor" + set_relation_junior_emperor:0 "Appoints [recipient.GetShortUIName|U] as Symbasileis." + remove_relation_junior_emperor:0 "[recipient.GetShortUIName|U] will no longer be Symbasileis." + junior_emperor:0 "Symbasileis" + + THEY_GET_JUNIOR_EMPEROR:0 "[CHARACTER.GetShortUIName|U] appoints [TARGET_CHARACTER.GetShortUIName] as Symbasileis" + THEY_GOT_JUNIOR_EMPEROR:0 "[CHARACTER.GetShortUIName|U] became [TARGET_CHARACTER.GetShortUINamePossessive] Symbasileis" + GLOBAL_BECOME_JUNIOR_EMPEROR:0 "Becomes [TARGET_CHARACTER.GetShortUINamePossessive] Symbasileis" + THEY_LOSE_JUNIOR_EMPEROR:0 "[CHARACTER.GetShortUIName|U] will no longer be the Symbasileis of [TARGET_CHARACTER.GetShortUIName]" + GLOBAL_LOSE_JUNIOR_EMPEROR:0 "Will no longer be [TARGET_CHARACTER.GetShortUINamePossessive] Symbasileis" + GLOBAL_LOST_JUNIOR_EMPEROR:0 "No longer is [TARGET_CHARACTER.GetShortUINamePossessive] Symbasileis" ## GUI INSTITUTIONS