In this tutorial i'll show how to get a working patriarch model (1 per every orthodox faction), and how to change catholic bishops so you can have a bishop per every settlement. These are some of the new scripts to be found in SS 6.2.
Patriarchs
Right now, the patriarch model is the one completely unused in the game. The problem with assigning the patriarch is simple - there should only be 1 patriarch per faction, but there is no way to export the fact that a patriarch has already been appointed. Not with using just 1 file that is
In my mod i have 3 orthodox factions, Kievan Rus, Russia, and the Byzantium.
So, lets add a patriarch level to the priestlevel trait first in EDCT:
Now we need to somehow be able to tell if we already have a patriarch or not. And we want the AI to be able to get a patriarch too. Thats why we edit the campaign_script file. The monitor_event in the script file will basically be the same as the trigger for the Patriarch trait, i only check for the piety:;------------------------------------------
Trait PriestLevel
Characters priest
Level Bishop
Description Bishop_desc
EffectsDescription Bishop_effects_desc
GainMessage Bishop_gain_desc
LoseMessage Bishop_lose_desc
Threshold 1
Effect Piety 1
Effect Level 1
Level Cardinal
Description Cardinal_desc
EffectsDescription Cardinal_effects_desc
Threshold 2
Effect Piety 1
Effect Level 2
Effect HeresyImmunity 1
Level Patriarch
Description Patriarch_desc
EffectsDescription Patriarch_effects_desc
GainMessage Patriarch_gain_desc
Epithet Patriarch_epithet_desc
Threshold 3
Effect HeresyImmunity 1
Effect Piety 2
Effect Level 2
Effect MovementPoints 10
The patriarch_count is used in one purpose, if many priests have > 4 piety and there is no Patriarch, then make sure that only once the PatrirachByzantium event will equal 0. We also need an event to tell us we have a patriarch already:declare_counter patriarch_count
monitor_event PreFactionTurnStart TrueCondition
set_event_counter PatriarchByzantium 0
set_event_counter PatriarchRussia 0
set_event_counter PatriarchKievanRus 0
set_counter patriarch_count 0
end_monitor
monitor_event CharacterTurnEnd AgentType = priest
and CharFactionType kievan_rus
and Attribute Piety > 4
if I_CompareCounter patriarch_count = 1
set_event_counter PatriarchKievanRus 1
end_if
inc_counter patriarch_count 1
end_monitor
monitor_event CharacterTurnEnd AgentType = priest
and CharFactionType russia
and Attribute Piety > 4
if I_CompareCounter patriarch_count = 1
set_event_counter PatriarchRussia 1
end_if
inc_counter patriarch_count 1
end_monitor
monitor_event CharacterTurnEnd AgentType = priest
and CharFactionType byzantium
and Attribute Piety > 4
if I_CompareCounter patriarch_count = 1
set_event_counter PatriarchByzantium 1
end_if
inc_counter patriarch_count 1
end_monitor
Now, we have an event exported by the campaign_script file, telling us if we really have a patriarch appointed or not, so let's create the triggers in the EDCT then:monitor_event CharacterTurnStart AgentType = priest
and CharFactionType kievan_rus
and Trait PriestLevel = 3
set_event_counter PatriarchKievanRus 1
end_monitor
monitor_event CharacterTurnStart AgentType = priest
and CharFactionType russia
and Trait PriestLevel = 3
set_event_counter PatriarchRussia 1
end_monitor
monitor_event CharacterTurnStart AgentType = priest
and CharFactionType byzantium
and Trait PriestLevel = 3
set_event_counter PatriarchByzantium 1
end_monitor
We can also add conditions like EndedInSettlement and SettlementName or IsRegionOneOf, but since this is just a tutorial im showing the basics. Remember to add the same conditions to the campaign_script file.;------------------------------------------
Trigger priest_patriarch_kievan_rus
WhenToTest CharacterTurnEnd
Condition AgentType = priest
and CharFactionType kievan_rus
and Attribute Piety > 4
and I_EventCounter PatriarchKievanRus = 0
Affects PriestLevel 3 Chance 100
;------------------------------------------
Trigger priest_patriarch_russia
WhenToTest CharacterTurnEnd
Condition AgentType = priest
and CharFactionType russia
and Attribute Piety > 4
and I_EventCounter PatriarchRussia = 0
Affects PriestLevel 3 Chance 100
;------------------------------------------
Trigger priest_patriarch_byzantium
WhenToTest CharacterTurnEnd
Condition AgentType = priest
and CharFactionType byzantium
and Attribute Piety > 4
and I_EventCounter PatriarchByzantium = 0
Affects PriestLevel 3 Chance 100
So, to gather, we use the script file to export an event read by the EDCT file which will appoint a patriarch. Since in both files the exact same requirements have to be met, we will always get 1 patriarch.
There is 1 drawback however, when you hover over the ui card of the priest, you will see "Cardinal", and same when you open his window - above Piety there will be a Cardinal and not a Patriarch even if you change relevant expanded.txt strings.
So to change this around, change the Patriarch trait to an Effect Level 3.
Open descr_models_strat and for both russia, kievan_rus and byzantium we need to change:
Into:strat_model orthodox_priest ; default model
strat_model orthodox_bishop ; medium level priest
strat_model orthodox_patriarch ; advanced priest
Which is basically adding a level.strat_model orthodox_priest ; default model
strat_model orthodox_bishop ; medium level priest
strat_model orthodox_bishop ; placeholder
strat_model orthodox_patriarch ; advanced priest
Now, in expanded.txt we have to update the cultures and the faction with the patriarch description
First culture:
Update for other cultures too. Every faction will a patriarch will also need a new entry at the faction section.{EMT_GREEK_PRIEST_1}Bishop
{EMT_GREEK_PRIEST_2}PLAYER WILL NOT SEE THIS WITH THIS CULTURE
{EMT_GREEK_PRIEST_3}Patriarch
{EMT_GREEK_PRIEST}Priest
{EMT_EASTERN_EUROPEAN_PRIEST_1}Bishop
{EMT_EASTERN_EUROPEAN_PRIEST_2}Cardinal
{EMT_EASTERN_EUROPEAN_PRIEST_3}Patriarch
{EMT_EASTERN_EUROPEAN_PRIEST}Priest
Do the same for all orthodox factions. Now the drawback's gone and we got a Patriarch with his own model working in the game with all correct descriptions. Cool.{EMT_BYZANTIUM_PRIEST_1}Byzantine Bishop
{EMT_BYZANTIUM_PRIEST_2}WILL NOT SEE THIS
{EMT_BYZANTIUM_PRIEST_2}Byzantine Patriarch
{EMT_BYZANTIUM_PRIEST}Byzantine Priest
Bishops
A bishop is always someone created in a cathedral or better. Stupid huh?
In reality, a bishop is appointed for every major diocese(major in a sense that has either a lot of people, is historical etc), so that doesn't really fit with the way we have them here in MTW.
Using a variation on the patriarch script above, lets create a script which will appoint a bishop per settlement. Meaning if we have 5 settlements and 8 priests, we will always have 5 bishops, never more never less. Oh, and lets make the bishop lose his title if the settlement gets lost.
So, the script file:
So basically, we use the sequence system (PFTS>CTS>STS>STE>CTE) in order to count how many actual bishops we have, and we substract the number of settlements we have. Also we 'block' the triggers in EDCT from fireing with the compare counters.declare_counter bishop_count
monitor_event PreFactionTurnStart TrueCondition
set_counter bishop_count 0
end_monitor
monitor_event CharacterTurnEnd AgentType = priest
and not CharacterReligion pagan
and not CharacterReligion islam
and Trait PriestLevel = 0
if I_CompareCounter bishop_count = 0
set_event_counter AppointBishop 0
end_if
if I_CompareCounter bishop_count < 0
set_event_counter AppointBishop 1
inc_counter bishop_count 1
end_if
end_monitor
monitor_event CharacterTurnEnd AgentType = priest
and not CharacterReligion pagan
and not CharacterReligion islam
and Trait PriestLevel = 1
if I_CompareCounter bishop_count = 0
set_event_counter StripBishop 0
end_if
if I_CompareCounter bishop_count > 0
set_event_counter StripBishop 1
inc_counter bishop_count -1
end_if
end_monitor
So now the EDCT triggers:
Simple and easy. We can add a ton of other requirements, but remember this conditions have to 'mimic' the ones in the script file.;------------------------------------------
Trigger Priest_to_Bishop
WhenToTest CharacterTurnEnd
Condition AgentType = priest
and I_EventCounter AppointBishop = 1
and Trait PriestLevel = 0
Affects PriestLevel 1 Chance 100
;------------------------------------------
Trigger Priest_stripped_Bishop
WhenToTest CharacterTurnEnd
Condition AgentType = priest
and I_EventCounter StripBishop = 1
and Trait PriestLevel = 1
Affects PriestLevel -1 Chance 100
Also delete all the stupid triggers in the EDCT file, which will cause you to get a bishop every time you recruit someone in a cathedral city.



Reply With Quote












































