Post by haroldlauder on Apr 8, 2019 0:07:37 GMT
Hi everyone... I'm hoping to get some help putting together a small submod (SinStar87 erbkaiser rufff1 ?)
I like having dragons, I hate dragon conquest CB... Aegon the Conquerer was able to conquer whole kingdoms at once with a 150 martial dragon... I don't think I should be able to do the same with a 10 martial dragon, but a 10 martial dragon should be able to invade a high lordship like a pirate. I think this change would make the game a lot more fun!
So, looking at CBs, I am trying to do two things. Change the Dragon Conquest CB to only be available if your dragon is 75 martial or more. This wouldn't effect Aegon's ability to use it in early bookmarks, but prevents every fool with a dragon from conquering Pentos when they get ambitious.
I have managed to get this part working by editing scripted_triggers.txt to:
It doesn't work though! The pirate invasion still works for pirates, but when I play an independent dragon rider with a 10+ martial dragon, it doesn't even show up in my list of CBs.
Anyone able to make this work?
I like having dragons, I hate dragon conquest CB... Aegon the Conquerer was able to conquer whole kingdoms at once with a 150 martial dragon... I don't think I should be able to do the same with a 10 martial dragon, but a 10 martial dragon should be able to invade a high lordship like a pirate. I think this change would make the game a lot more fun!
So, looking at CBs, I am trying to do two things. Change the Dragon Conquest CB to only be available if your dragon is 75 martial or more. This wouldn't effect Aegon's ability to use it in early bookmarks, but prevents every fool with a dragon from conquering Pentos when they get ambitious.
I have managed to get this part working by editing scripted_triggers.txt to:
can_use_dragon_conquest_trigger = {
independent = yes
can_use_dragon_abilities_trigger = yes
trigger_if = {
limit = { trait = dragon_rider }
any_friend = {
trait = dragon
martial = 75
NOT = { trait = maimed_dragon }
}
}
is_valyrian_freehold_trigger = no
NOT = { any_liege = { is_valyrian_freehold_trigger = yes } }
OR = {
ai = yes
multiplayer = no
NOT = {
has_game_rule = {
name = multiplayer_invasions
value = off
}
}
}
}
I then try to create a new CB called Dragon Invasion based on the pirate invasion CB. Basically, I think its fair that a dragon rider with a martial 10 dragon can invade a high lordship and take it, but not an entire kingdom! I have created an entry in scripted_triggerscan_use_dragon_invasion_trigger = {
independent = yes
can_use_dragon_abilities_trigger = yes
trigger_if = {
limit = { trait = dragon_rider }
any_friend = {
trait = dragon
martial = 10
NOT = { trait = maimed_dragon }
}
}
is_valyrian_freehold_trigger = no
NOT = { any_liege = { is_valyrian_freehold_trigger = yes } }
OR = {
ai = yes
multiplayer = no
NOT = {
has_game_rule = {
name = multiplayer_invasions
value = off
}
}
}
}
dragon_invasion = {
name = CB_NAME_PIRATE_INVASION
war_name = WAR_NAME_PIRATE_INVASION
sprite = 8
truce_days = 1825
hostile_against_others = yes
is_permanent = yes
check_de_jure_tier = DUKE # this scans all dejure duchies for the counties which are held by or vassals(or below) of selected character. Only valid if is_permanent = yes
#check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
press_claim = yes
full_hostility = yes
allow_distant = yes # AI parameter
allowed_to_target_tributaries = no
defender_unoccupied_warscore = yes
infamy_modifier = 0
sort_priority = 8000
can_use_gui = {
ROOT = {
is_adult = yes
has_regent = no
prestige = 100
}
# custom_tooltip = {
# text = TOOLTIPCBENFORCEDTRUCE
# hidden_tooltip = {
# FROM = {
# NOT = { has_opinion_modifier = { who = ROOT modifier = opinion_enforced_truce } }
# }
# }
# }
}
can_use = {
# Pirates Only
ROOT = {
OR = {
can_use_dragon_invasion_trigger = yes
#government = pirate_government
#religion = lady_of_the_waves
}
top_liege = {
OR = {
can_use_dragon_invasion_trigger = yes
#government = pirate_government
#religion = lady_of_the_waves
}
}
OR = {
ai = yes
multiplayer = no
NOT = {
has_game_rule = {
name = multiplayer_invasions
value = off
}
}
}
}
}
can_use_title = {
universal_cb_restrictions_trigger = yes
#universal_cb_title_restrictions_trigger = yes
controls_religion = no
#is_primary_holder_title = yes
NOT = { title = d_nightswatch }
NOT = { title = d_kingsguard }
lower_tier_than = KING
#OR = { #Must be coastal
# location = { port = yes }
# any_direct_de_jure_vassal_title = { location = { port = yes } }
#}
# FROM = {
# has_landed_title = PREV
# }
}
is_valid_title = {
universal_cb_valid_restrictions_trigger = yes
# Pirates Only
ROOT = {
OR = {
can_use_dragon_invasion_trigger = yes
#government = pirate_government
#religion = lady_of_the_waves
}
top_liege = {
OR = {
can_use_dragon_invasion_trigger = yes
#government = pirate_government
#religion = lady_of_the_waves
#trait = pirate
}
}
}
}
on_add_title = {
hidden_tooltip = { FROM = { character_event = { id = diplomatic.3099 } } } #call for aid?
e_rebels = {
persistent_event_target:chronicle_player = {
if = {
limit = { character = ROOT }
chronicle = {
entry = CHRONICLE_WAR_INVASION_ATTACKER
portrait = [From.GetID]
}
break = yes
}
if = {
limit = { character = FROM }
chronicle = {
entry = CHRONICLE_WAR_INVASION_DEFENDER
portrait = [Root.GetID]
}
break = yes
}
if = {
limit = { is_liege_or_above = ROOT }
chronicle = {
entry = CHRONICLE_WAR_INVASION_ATTACKER_LIEGE
portrait = [Root.GetID]
}
break = yes
}
if = {
limit = { is_liege_or_above = FROM }
chronicle = {
entry = CHRONICLE_WAR_INVASION_DEFENDER_LIEGE
portrait = [From.GetID]
}
}
}
}
}
on_success_title = {
if = {
limit = { FROM = { is_nomadic = yes } } #nomads pay tribute
FROM = {
custom_tooltip = {
text = "REMOVE_PREVIOUS_SUZERAIN"
hidden_tooltip = {
any_suzerain = {
FROM = {
remove_tributary = PREV
}
}
}
}
}
ROOT = { make_tributary = { who = FROM tributary_type = default } }
FROM = { #lose any non-nomad vassals
any_vassal = {
limit = {
NOT = { is_nomadic = yes }
NOT = { tier = BARON }
lower_tier_than = ROOT
}
set_defacto_liege = ROOT
hidden_tooltip = { character_event = { id = maintenance.25 } }#Subjugation flag maintenance
}
}
}
if = {
limit = { FROM = { NOT = { is_nomadic = yes } } }
ROOT = {
vassalize_or_take_under_title = {
title = PREV
enemy = FROM
}
}
hidden_tooltip = {
FROM = {
if = {
limit = { is_liege_or_above = ROOT }
character_event = { id = maintenance.25 } #Subjugation flag maintenance
}
}
}
}
}
on_success = {
hidden_tooltip = {
ROOT = {
add_character_modifier = { name = victory_timer duration = 3 }
if = {
limit = { has_ambition = obj_expand_realm }
set_character_flag = obj_expand_realm_success
}
}
}
ROOT = {
hidden_tooltip = {
character_event = { id = maintenance.24 } #Mega war flag maintenance
}
}
ROOT = {
participation_scaled_prestige = 100
}
hidden_tooltip = {
any_attacker = {
limit = { NOT = { character = ROOT } }
participation_scaled_prestige = 100
}
}
FROM = {
prestige = -100
}
}
on_fail = {
ROOT = {
prestige = -100
}
any_defender = {
participation_scaled_prestige = 50
}
}
on_reverse_demand = {
hidden_tooltip = { FROM = { add_character_modifier = { name = victory_timer duration = 3 } } }
ROOT = {
prestige = -200
transfer_scaled_wealth = {
to = FROM
value = 4.0
}
}
FROM = { character_event = { id = maintenance.2199 tooltip = TOOLTIPmaintenance.2199 } } #Take back dejure vassals (AGOT)
any_defender = {
participation_scaled_prestige = 100
# if = {
# limit = { has_character_flag = joins_the_wall }
# }
}
}
attacker_ai_victory_worth = {
factor = 150
}
attacker_ai_defeat_worth = {
factor = 100
}
defender_ai_victory_worth = {
factor = -1 # always accept
}
defender_ai_defeat_worth = {
factor = 100
}
# ai importance placed on this CB: scope is the targeted title, ROOT is the attacking character, FROM is the defending character
ai_will_do = {
factor = 2
#Dragon intimidation
modifier = {
factor = 0
ROOT = {
NOT = { can_use_dragon_abilities_trigger = yes }
NOT = { relative_power = { who = FROM power = 6 } }
}
FROM = {
can_use_dragon_abilities_trigger = yes
OR = {
any_friend = { trait = dragon martial = 60 }
AND = { graphical_culture = dragongfx martial = 60 }
}
is_incapable = no
}
}
modifier = { #Dont attack tributaries with strong suzerain
factor = 0
FROM = {
is_tributary = yes
suzerain = {
OR = {
relative_power = { who = ROOT power = 1.5 }
reverse_opinion = { who = ROOT value = 50 }
}
}
}
}
}
}
It doesn't work though! The pirate invasion still works for pirates, but when I play an independent dragon rider with a 10+ martial dragon, it doesn't even show up in my list of CBs.
Anyone able to make this work?