In theory, simple diplomatic actions that do not require a specific UI (like vassal or title selection panel), could be re-implemented as targeted decisions, allowing to customize them further in mods. This could greatly benefit the modding community
I wonder if anyone had undertaken such project (or even part of it), and re-coded some hardcoded vanilla diploaction logic ?
I took a shot at the "Demand Religious Conversion" action, in scope of WtWSMS mod.
Feel free to raise any wrong/missing logic compared to vanilla !
Targeted decision:
Events:
Localization:
Defines.lua:
I wonder if anyone had undertaken such project (or even part of it), and re-coded some hardcoded vanilla diploaction logic ?
I took a shot at the "Demand Religious Conversion" action, in scope of WtWSMS mod.
Feel free to raise any wrong/missing logic compared to vanilla !
Targeted decision:
Code:
# "Demand Religious Conversion"
# Note: need to disable DEMAND_RELIGIOUS_CONVERSION_INTERACTION_ENABLED in defines.lua
# - Split in 2 decisions as there is no ai_target_filter for both direct vassals and courtiers.
demand_courtier_religious_conversion = {
ai_target_filter = home_court
from_potential = {
is_ruler = yes
}
potential = {
NOT = { religion = FROM }
vassal_of = FROM
is_ruler = no
}
allow = {
opinion = { who = FROM value = 25}
FROM = {
custom_tooltip = {
text = TT_NOT_UNREFORMED_PAGAN
hidden_tooltip = {
OR = {
NOT = { religion_group = pagan_group }
is_reformed_religion = yes
}
}
}
}
NOT = { controls_religion = yes }
}
effect = {
# Fire any event that would normally be fired by the on_action on_vassal_accepts_religious_conversion
custom_tooltip = {
text = "demand_religious_conversion_tooltip"
hidden_tooltip = {
FROM = {
character_event = { id = conv.1 }
}
}
}
}
revoke_allowed = {
always = no
}
ai_will_do = {
factor = 1
}
}
demand_vassal_religious_conversion = {
ai_target_filter = vassals
from_potential = {
is_ruler = yes
}
potential = {
NOT = { religion = FROM }
vassal_of = FROM
is_ruler = yes
}
allow = {
opinion = { who = FROM value = 35}
FROM = {
custom_tooltip = {
text = TT_NOT_UNREFORMED_PAGAN
hidden_tooltip = {
OR = {
NOT = { religion_group = pagan_group }
is_reformed_religion = yes
}
}
}
}
NOT = { controls_religion = yes }
}
effect = {
# Fire any event that would normally be fired by the on_action on_vassal_accepts_religious_conversion
custom_tooltip = {
text = "demand_religious_conversion_tooltip"
hidden_tooltip = {
FROM = {
character_event = { id = conv.1 }
}
}
}
}
revoke_allowed = {
always = no
}
ai_will_do = {
factor = 1
}
}
Events:
Code:
namespace = conv
#ROOT is the demander, FROM is the vassal
character_event = {
id = conv.1
is_triggered_only = yes
hide_window = yes
immediate = {
FROM = {
character_event = { id = conv.2 }
}
}
}
#ROOT is the vassal, FROM is the demander
character_event = {
id = conv.2
is_triggered_only = yes
hide_window = yes
immediate = {
# Fires for the vassal and each of his courtiers and vassals.
# Note: needs to fire for vassals/courtier before character
# FROMFROM is the demander. FROM is the vassal. ROOT is the character.
any_courtier = {
character_event = { id = 39700 }
}
any_vassal = {
character_event = { id = 39700 }
}
character_event = { id = 39700 }
}
}
Localization:
Code:
#CODE;ENGLISH;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
demand_vassal_religious_conversion;Demand Religious Conversion;Exiger une conversion religieuse;Religiöse Konversion fordern;;Solicitar conversión religiosa;;;;;;;;;x
demand_vassal_religious_conversion_named;Demand that [Root.GetFirstName] embrace the [From.Religion.GetName] faith.;Exigez que [Root.GetFirstName] se convertisse à la foi [From.Religion.GetName];Fordern, dass [Root.GetFirstName] den [From.Religion.GetName]-Glauben annimmt;;Exige que [Root.GetFirstName] adopte el [From.Religion.GetName].;;;;;;;;;x
demand_vassal_religious_conversion_desc;You can demand that one of your subjects converts to the true faith, but if they refuse their opinion of you will be lowered.;Vous pouvez exiger qu’un de vos sujets se convertisse à la vraie foi, mais s’il refuse, l’opinion qu’il a de vous diminuera.;Ihr könnt von Euren Untertanen fordern, dass sie zum Wahren Glauben übertreten. Wenn sie ablehnen, sinkt jedoch ihre Meinung über Euch.;;Puedes exigir que uno de tus súbditos se convierta a la fe verdadera, pero si se niega, la opinión que tenga de ti bajará.;;;;;;;;;x
demand_vassal_religious_conversion_tooltip;[Root.GetFirstName] and the same faith members of [Root.GetHerHis] court receive an event.\n;;;;;;;;;x
demand_courtier_religious_conversion;Demand Religious Conversion;Exiger une conversion religieuse;Religiöse Konversion fordern;;Solicitar conversión religiosa;;;;;;;;;x
demand_courtier_religious_conversion_named;Demand that [Root.GetFirstName] embrace the [From.Religion.GetName] faith.;Exigez que [Root.GetFirstName] se convertisse à la foi [From.Religion.GetName];Fordern, dass [Root.GetFirstName] den [From.Religion.GetName]-Glauben annimmt;;Exige que [Root.GetFirstName] adopte el [From.Religion.GetName].;;;;;;;;;x
demand_courtier_religious_conversion_desc;You can demand that one of your subjects converts to the true faith, but if they refuse their opinion of you will be lowered.;Vous pouvez exiger qu’un de vos sujets se convertisse à la vraie foi, mais s’il refuse, l’opinion qu’il a de vous diminuera.;Ihr könnt von Euren Untertanen fordern, dass sie zum Wahren Glauben übertreten. Wenn sie ablehnen, sinkt jedoch ihre Meinung über Euch.;;Puedes exigir que uno de tus súbditos se convierta a la fe verdadera, pero si se niega, la opinión que tenga de ti bajará.;;;;;;;;;x
demand_courtier_religious_conversion_tooltip;[Root.GetFirstName] and the same faith members of [Root.GetHerHis] court receive an event.\n;;;;;;;;;x
Defines.lua:
Code:
DEMAND_RELIGIOUS_CONVERSION_INTERACTION_ENABLED = 0
Last edited: