Compare commits

...

3 commits

2 changed files with 182 additions and 29 deletions

View file

@ -48,36 +48,44 @@ become_landless_adventurer_decision = {
is_shown = {
#DLC check.
has_ep3_dlc_trigger = yes
OR = {
ai_can_valid_to_create_laamp_trigger = yes
is_ai = no
}
#Standard filter checks.
OR = {
is_landed = yes
AND = {
has_ep3_dlc_trigger = yes
is_ai = no
government_allows = administrative
top_liege = this
is_landed = no
}
AND = {
has_ep3_dlc_trigger = yes
OR = {
ai_can_valid_to_create_laamp_trigger = yes
is_ai = no
}
#Standard filter checks.
OR = {
is_landed = yes
AND = {
is_ai = no
government_allows = administrative
top_liege = this
is_landed = no
}
}
# Relevant cultures/faiths
OR = {
culture = { has_cultural_parameter = unlock_voluntary_laampdom }
faith = { has_doctrine_parameter = unlock_voluntary_laampdom_faith }
has_trait = nomadic_philosophy
has_character_modifier = tgp_gave_up_modifier
AND = {
is_ai = no
government_allows = administrative
top_liege = this
is_landed = no
}
}
save_temporary_scope_as = potential_laamp_temp
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:potential_laamp_temp } # Registered fighting license
}
}
# Relevant cultures/faiths
OR = {
culture = { has_cultural_parameter = unlock_voluntary_laampdom }
faith = { has_doctrine_parameter = unlock_voluntary_laampdom_faith }
has_trait = nomadic_philosophy
has_character_modifier = tgp_gave_up_modifier
AND = {
is_ai = no
government_allows = administrative
top_liege = this
is_landed = no
}
}
save_temporary_scope_as = potential_laamp_temp
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:potential_laamp_temp } # Registered fighting license
}
is_valid = {
@ -88,10 +96,13 @@ become_landless_adventurer_decision = {
faith.religious_head_title.holder != root
}
# Counts and dukes only
custom_tooltip = {
text = become_landless_adventurer_decision_tier_tt
highest_held_title_tier >= tier_county
highest_held_title_tier <= tier_duchy
OR = {
is_ai = no
custom_tooltip = {
text = become_landless_adventurer_decision_tier_tt
highest_held_title_tier >= tier_county
highest_held_title_tier <= tier_duchy
}
}
# Not too big
custom_tooltip = {

View file

@ -0,0 +1,142 @@

### Bartering On-Actions
# Called when a barter action starts
# root is the bartering army
# scope:barterer is the person owning the bartering army
# scope:barony is the barony title that was bartered with
# scope:county is the county title for the barony
on_barter_action_start = {
effect = {}
}
# Called weekly during a bartering action
# root is the bartering army
# scope:barterer is the person owning the bartering army
# scope:barony is the barony title that was bartered with
# scope:county is the county title for the barony
on_barter_action_weekly = {
effect = {}
}
# Called when a barter action completes
# root is the bartering army
# scope:barterer is the person owning the bartering army
# scope:barony is the barony title that was bartered with
# scope:county is the county title for the barony
# scope:value is the amount of loot the army gained
on_barter_action_completion = {
effect = {
scope:barterer = {
send_interface_message = {
type = msg_barter_completed
title = msg_barter_completed_barterer_title
desc = msg_barter_completed_barterer_desc
left_icon = scope:county.holder
right_icon = scope:barony
show_as_tooltip = {
add_loot = scope:value
scope:barony.title_province = {
add_province_modifier = {
modifier = recently_bartered_modifier
years = 5
}
}
}
reverse_add_opinion = {
target = scope:barony.county.holder
modifier = bartered_in_my_lands_opinion
}
}
if = {
limit = {
scope:barterer = { government_has_flag = government_is_landless_minority }
}
add_gold = scope:value
set_variable = {
name = the_ol_switcharoo
value = 0
}
change_variable = { name = the_ol_switcharoo subtract = scope:value }
if = {
limit = { exists = var:the_ol_switcharoo }
save_scope_value_as = {
name = the_ol_switcharoo_p2
value = var:the_ol_switcharoo
}
}
root = {
add_loot = scope:the_ol_switcharoo_p2
}
remove_variable = the_ol_switcharoo
}
}
scope:county.holder = {
send_interface_message = {
type = msg_barter_completed
title = msg_barter_completed_holder_title
desc = msg_barter_completed_holder_desc
left_icon = scope:barterer
right_icon = scope:barony
scope:barony.title_province = {
add_province_modifier = {
modifier = recently_bartered_modifier
years = 5
}
}
}
}
}
}
# Called when a bartering army returns to their own territory and deposits loot
# root is the bartering army
# scope:barterer is the person owning the bartering army
# scope:barter_loot is the loot that you gained from the bartering mission
# Loot is applied to scope:barterer immediately before on-action is fired
on_barter_loot_delivered = {
effect = {
scope:barterer = {
send_interface_message = {
type = msg_barter_loot_delivered
title = msg_barter_loot_delivered_title
desc = msg_barter_loot_delivered_desc
left_icon = scope:barterer
scope:barterer = { add_gold = scope:barter_loot }
}
}
}
}
# Called when a bartering army is defeated in battle and gets its loot (if any) stolen
# Use root.barter_loot to see how much they're carrying
# root is the bartering army
# scope:barterer is the person owning the bartering army
# scope:receiver is the person getting the barter loot
# scope:barter_loot is how much loot they're carrying
on_defeat_barter_army = {
effect = {
scope:barterer = {
send_interface_message = {
type = msg_barter_loot_lost
title = msg_barter_loot_lost_title
desc = msg_barter_loot_lost_desc
left_icon = scope:barterer
right_icon = scope:receiver
}
}
scope:receiver ?= {
send_interface_message = {
type = msg_barter_loot_won
title = msg_barter_loot_won_title
desc = msg_barter_loot_won_desc
left_icon = scope:receiver
right_icon = scope:barterer
}
}
}
}