I am currently using the Buffed Mongol Invasion Mod and on the long run, I find it a bit too powerful, especially the buffed movement speed of Mongol troops (+50%) which is due to their capital being in the Eastern corner of the map.
To circumvent this, I want to create a mini mod allowing the Mongols to move their capital to Maragha as soon as they have conquered it.
Does anyone know how to implement a mod like this? What I want to do is that as soon as they have conquered Maragha, Genghis Khan will take the decision to move their capital to Maragha in order to have their troops raised there instead of Karakorum which takes AGES for them to conquer the Western parts of the map.
Generally, it would be good if the Mongols could move their capital step by step the more they move West but that's imo something Paradox should take a look at.
*edit*
I based my code on James Beaumont's code to Establish the Yamagate in Samarkand, and at least the AI took the decision to move to Samarkand. Not sure if it also works for Maragha. If you are interested, this is the code. Have fun!
To circumvent this, I want to create a mini mod allowing the Mongols to move their capital to Maragha as soon as they have conquered it.
Does anyone know how to implement a mod like this? What I want to do is that as soon as they have conquered Maragha, Genghis Khan will take the decision to move their capital to Maragha in order to have their troops raised there instead of Karakorum which takes AGES for them to conquer the Western parts of the map.
Generally, it would be good if the Mongols could move their capital step by step the more they move West but that's imo something Paradox should take a look at.
*edit*
I based my code on James Beaumont's code to Establish the Yamagate in Samarkand, and at least the AI took the decision to move to Samarkand. Not sure if it also works for Maragha. If you are interested, this is the code. Have fun!
Code:
###################
# Move Realm Capital to Samarkand for Mongol Empire
###################
set_capital_samarkand_decision = {
picture = "gfx/interface/illustrations/decisions/decision_destiny_goal.dds"
desc = set_capital_samarkand_decision_desc
selection_tooltip = set_capital_samarkand_decision_tooltip
major = yes
ai_check_interval = 12
is_shown = {
is_ruler = yes
is_landed = yes
has_title = title:e_mongol_empire
NOT = { capital_county = { this = title:c_samarkand } }
NOT = { capital_county = { this = title:c_maragha } }
NOT = { has_character_flag = flag_already_given_samarkand_once }
NOT = { has_character_flag = flag_already_given_maragha_once }
}
is_valid_showing_failures_only = {
is_capable_adult = yes
is_imprisoned = no
is_independent_ruler = yes
highest_held_title_tier > 3 #Only Kings and Emperors
custom_tooltip = {
text = samarkand_held_by_you_or_vassal_tt
OR = {
title:c_samarkand.holder = {
any_liege_or_above = { this = root }
}
title:c_samarkand.holder = { this = root }
}
}
}
effect = {
add_character_flag = flag_already_given_samarkand_once
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
title:c_samarkand = {
change_title_holder = {
holder = title:e_mongol_empire.holder
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
title:e_mongol_empire.holder = {
set_realm_capital = title:c_samarkand
add_opinion = {
target = prev
modifier = established_samarkand_opinion
}
}
}
ai_potential = {
has_title = title:e_mongol_empire
}
ai_will_do = { #Do it always, for coherence.
base = 100
modifier = {
factor = 0
title:c_samarkand.holder = {
OR = {
is_ai = no
any_liege_or_above = { is_ai = no } # AI will never take provinces away from a player.
}
}
}
}
}
###################
# Move Realm Capital to Maragha for Mongol Empire
###################
set_capital_maragha_decision = {
picture = "gfx/interface/illustrations/decisions/decision_destiny_goal.dds"
desc = set_capital_maragha_decision_desc
selection_tooltip = set_capital_maragha_decision_tooltip
major = yes
ai_check_interval = 12
is_shown = {
is_ruler = yes
is_landed = yes
has_title = title:e_mongol_empire
NOT = { capital_county = { this = title:c_maragha } }
NOT = { has_character_flag = flag_already_given_maragha_once }
}
is_valid_showing_failures_only = {
is_capable_adult = yes
is_imprisoned = no
is_independent_ruler = yes
highest_held_title_tier > 3 #Only Kings and Emperors
custom_tooltip = {
text = maragha_held_by_you_or_vassal_tt
OR = {
title:c_maragha.holder = {
any_liege_or_above = { this = root }
}
title:c_maragha.holder = { this = root }
}
}
}
effect = {
add_character_flag = flag_already_given_maragha_once
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
title:c_maragha = {
change_title_holder = {
holder = title:e_mongol_empire.holder
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
title:e_mongol_empire.holder = {
set_realm_capital = title:c_maragha
add_opinion = {
target = prev
modifier = established_maragha_opinion
}
}
}
ai_potential = {
has_title = title:e_mongol_empire
}
ai_will_do = { #Do it always, for coherence.
base = 100
modifier = {
factor = 0
title:c_maragha.holder = {
OR = {
is_ai = no
any_liege_or_above = { is_ai = no } # AI will never take provinces away from a player.
}
}
}
}
}
Attachments
Last edited: