Updating post #169 in DOK main thread.
Here is the (hopely) debugged sequence (I have also changed some descriptions and commands):
ITALY IN YEAR 900 - THE PROVENçAL INTERVENTION
NEW events for TOS and IRA:
Code:
event = {
id = 371000
trigger = {
exists = PRO
exists = ITA
ITA = {
OR = { #all of them are Berengario I of Italy
monarch = 064500 #ahistorical, in case he ahistorically kept the crown of Italy
monarch = 064505 #historical, when going back to the throne after the Spoletan Kings
monarch = 064563 #ahistorical, in case he reconquered Italy as Margrave of Friuli
}
}
NOT = {
alliance = { country = ITA country = PRO }
war = { country = TOS country = PRO }
}
}
country = TOS
name = "Berengar's ineptitude"
desc = "In 900, several Italian magnates including Adalberto, Margrave of Tuscany, dissatisfied with the renewed rule of Berengar, called unto Louis, the young king of Lower Burgundy, to come and take the crown of Italy."
date = { day = 19 month = august year = 900 }
offset = 10
deathdate = { day = 19 month = september year = 900 }
action = {
name = "Send ambassadors to Viennes"
command = {
trigger = {
vassal = { country = ITA country = TOS }
}
type = breakvassal which = ITA
}
command = { type = diplomats which = -1 }
command = { type = relation which = PRO value = 100 }
command = { type = trigger which = 322000 } #PRO: The Kingdom of the Lombards
}
action = {
name = "Show allegiance to Berengar"
command = { type = ADM which = -2 value = 12 }
command = { type = stability value = -1 }
command = { type = revoltrisk which = 24 value = 10 }
command = { type = relation which = ITA value = 50 }
command = { type = sleepevent which = 322009 } #PRO: The Kingdom of the Lombards
}
}
event = {
id = 226000
trigger = {
exists = PRO
exists = ITA
ITA = {
OR = {
monarch = 064500 #ahistorical, in case he ahistorically kept the crown of Italy
monarch = 064505 #historical, when succeding the Spoletan Kings
monarch = 064563 #ahistorical, in case he reconquered Italy as Margrave of Friuli
}
}
NOT = {
alliance = { country = ITA country = PRO }
war = { country = IRA country = PRO }
}
}
country = IRA
name = "Berengar's ineptitude"
desc = "In 900, several Italian magnates including Anscario, Margrave of Ivrea, dissatisfied with the renewed rule of Berengar, called unto Louis, the young king of Lower Burgundy, to come and take the crown of Italy."
date = { day = 19 month = august year = 900 }
offset = 12
deathdate = { day = 19 month = september year = 900 }
action = {
name = "Send ambassadors to Viennes"
command = {
trigger = {
vassal = { country = ITA country = IRA }
}
type = breakvassal which = ITA
}
command = { type = diplomats which = -1 }
command = { type = relation which = PRO value = 100 }
command = { type = trigger which = 322000 } #PRO: The Kingdom of the Lombards
}
action = {
name = "Show allegiance to Berengar"
command = { type = ADM which = -2 value = 12 }
command = { type = stability value = -1 }
command = { type = revoltrisk which = 24 value = 10 }
command = { type = relation which = ITA value = 50 }
command = { type = sleepevent which = 322009 } #PRO: The Kingdom of the Lombards
}
}
a tweak in this PRO event:
Secusia, Liguria, Ventimiglia and Novara are IRA cores, IRA (Ivrea) should be PRO ally together with TOS:
Code:
event = {
id = 322000 #triggered by TOS_371000 A or IRA_226000 A (900)
trigger = {
ITA = {
OR = {
monarch = 064500 #Berengario I del Friuli
monarch = 064505 #Berengario I del Friuli, restored
}
}
NOT = { alliance = { country = ITA country = PRO } }
}
random = no
country = PRO
name = "The Kingdom of the Lombards"
desc = "In 900, Italian magnates including the lords of Tuscany and Ivrea, dissatisfied with the renewed rule of Berengar, called unto the young king of Lower Burgundy to come and take the crown of Italy."
date = { day = 0 month = september year = 900 }
offset = 30
deathdate = { day = 29 month = september year = 900 }
action = {
name = "Seize the opportunity"
command = { type = relation which = TOS value = 100 }
command = { type = relation which = ITA value = -200 }
command = { type = addcore_claim which = 521 } #Pentapolis
command = { type = addcore_claim which = 522 } #Umbria
command = { type = addcore_claim which = 527 } #Parma
command = { type = addcore_claim which = 528 } #Ravenna
command = { type = addcore_claim which = 529 } #Ferrara
command = { type = addcore_claim which = 662 } #Secusia
command = { type = addcore_claim which = 663 } #Ventimiglia
command = { type = addcore_claim which = 664 } #Liguria
command = { type = addcore_claim which = 665 } #Aquae
command = { type = addcore_claim which = 666 } #Novara
command = { type = addcore_claim which = 667 } #Milan
command = { type = addcore_claim which = 668 } #Placentia
command = { type = addcore_claim which = 669 } #Brescia
command = { type = addcore_claim which = 670 } #Mantua
command = {
trigger = {
ITA = { ai = yes }
}
type = war which = ITA
}
command = {
trigger = {
ITA = { ai = no }
}
type = trigger which = 228008 #ITA: Ludovico di Provenza
}
}
action = {
name = "This is too dangerous"
command = { type = relation which = TOS value = -50 }
command = { type = relation which = IRA value = -50 }
command = { type = DIP which = -2 value = 12 }
command = { type = MIL which = -2 value = 6 }
command = { type = sleepevent which = 322001 } #PRO: The taking of Pavia
}
}
a NEW PRO event in case TOS or IRA aren't independent from ITA:
Code:
event = {
id = 322009 #(in case PRO_322000 isn't triggered by TOS/IRA events)
trigger = {
ITA = {
OR = {
monarch = 064500 #Berengario I del Friuli
monarch = 064505 #Berengario I del Friuli, restored
}
}
NOT = {
alliance = { country = ITA country = PRO }
exists = TOS
exists = IRA
event = 322000 #PRO: The Kingdom of the Lombards
}
}
random = no
country = PRO
name = "The Kingdom of the Lombards"
desc = "In 900, Italian magnates including the lords of Tuscany and Ivrea, dissatisfied with the renewed rule of Berengar, called unto the young king of Lower Burgundy to come and take the crown of Italy."
date = { day = 20 month = september year = 900 }
offset = 5
deathdate = { day = 10 month = october year = 900 }
action = {
name = "Seize the opportunity"
command = { type = relation which = ITA value = -200 }
command = { type = addcore_claim which = 521 } #Pentapolis
command = { type = addcore_claim which = 522 } #Umbria
command = { type = addcore_claim which = 527 } #Parma
command = { type = addcore_claim which = 528 } #Ravenna
command = { type = addcore_claim which = 529 } #Ferrara
command = { type = addcore_claim which = 665 } #Aquae
command = { type = addcore_claim which = 667 } #Milan
command = { type = addcore_claim which = 668 } #Placentia
command = { type = addcore_claim which = 669 } #Brescia
command = { type = addcore_claim which = 670 } #Mantua
command = { type = sleepevent which = 370001 } #TOS: Berengar's ineptitude
command = { type = sleepevent which = 226000 } #IRA: Berengar's ineptitude
command = {
trigger = {
ITA = { ai = yes }
}
type = war which = ITA
}
command = {
trigger = {
ITA = { ai = no }
}
type = trigger which = 228008 #ITA: Ludovico di Provenza
}
}
action = {
name = "This is too dangerous"
command = { type = DIP which = -2 value = 12 }
command = { type = MIL which = -2 value = 6 }
command = { type = sleepevent which = 370001 } #TOS: Berengar's ineptitude
command = { type = sleepevent which = 226000 } #IRA: Berengar's ineptitude
command = { type = sleepevent which = 322001 } #PRO: The taking of Pavia
}
}
still tweaks:
Code:
event = {
id = 228008 #triggered by PRO_111500 A PRO_322000 A or PRO_322009 A (900)
random = no
country = ITA
name = "Ludovico di Provenza"
desc = "In 900, several Italian magnates including Adalberto of Tuscany and the Margraves of Ivrea, dissatisfied with the renewed rule of Berengar, called unto Louis, the young king of Lower Burgundy, to come and take the crown of Italy."
action = {
name = "Fight him"
command = { type = setflag which = [Provencal_Claim] }
command = { type = relation which = PRO value = -400 }
command = { type = casusbelli which = PRO value = 1 }
command = { type = war which = PRO }
command = {
trigger = {
NOT = { exists = TOS }
owned = { province = 527 data = -1 } #Lucca
}
type = independence which = TOS
}
command = {
trigger = {
NOT = { exists = IRA }
owned = { province = 662 data = -1 } #secusia
}
type = independence which = IRA
}
}
action = {
name = "Welcome him as the new ruler"
command = { type = wakemonarch which = 064506 } #Ludovico di Provenza
command = {
trigger = {
PRO = { ai = yes }
}
type = inherit which = PRO
}
command = {
trigger = {
PRO = { ai = no }
NOT = {
vassal = { country = PRO country = ITA }
}
type = vassal which = PRO
}
command = { type = add_countryculture which = burgundian }
command = { type = addcore_national which = 195 } #Provence
command = { type = addcore_national which = 196 } #Diois
command = { type = addcore_national which = 197 } #Viennois
command = { type = addcore_national which = 661 } #Embrunnais
command = { type = independence which = FRL }
command = { type = trigger which = 390001 } #FRL: Ludovico di Provenza
command = { type = sleepevent which = 111501 322001 } #PRO: The taking of Pavia
}
}
NEW Events for TOS and IRA:
Code:
event = {
id = 371001
trigger = {
ITA = { flag = [Provencal_Claim] }
exists = ITA
exists = PRO
NOT = {
war = { country = TOS country = PRO }
}
}
country = TOS
name = "The allegiance to the Provencal king"
desc = "Invited by most of the Magnates, Louis crossed the Alps aiming at the crown of Italy."
date = { day = 0 month = september year = 900 }
offset = 30
deathdate = { day = 29 month = september year = 900 }
action = {
name = "Ludovico shall be our King"
command = { type = relation which = PRO value = 100 }
command = { type = relation which = ITA value = -200 }
command = { type = giveaccess which = PRO }
command = {
trigger = {
access = ITA
}
type = revokeaccess which = ITA
}
command = {
trigger = {
vassal = { country = ITA country = TOS }
}
type = breakvassal which = ITA
}
}
}
event = {
id = 226001
trigger = {
ITA = { flag = [Provencal_Claim] }
exists = ITA
exists = PRO
NOT = {
war = { country = IRA country = PRO }
}
}
country = IRA
name = "The allegiance to the Provencal king"
desc = "Invited by most of the Magnates, Louis crossed the Alps aiming at the crown of Italy."
date = { day = 0 month = september year = 900 }
offset = 30
deathdate = { day = 29 month = september year = 900 }
action = {
name = "Ludovico shall be our King"
command = { type = relation which = PRO value = 100 }
command = { type = relation which = ITA value = -200 }
command = { type = giveaccess which = PRO }
command = {
trigger = {
access = ITA
}
type = revokeaccess which = ITA
}
command = {
trigger = {
vassal = { country = ITA country = IRA }
}
type = breakvassal which = ITA
}
}
}
some tweaks in current PRO, ITA and FRL events:
Code:
event = {
id = 322001
trigger = {
event = 322000 #PRO: The Kingdom of the Lombards
control = { province = 665 data = -1 } #Aquae
}
random = no
country = PRO
name = "The taking of Pavia"
desc = "Invited by most of the Magnates, Louis crossed the Alps aiming at the crown of Italy. Louis III of Provence was crowned king of Italy in Pavia on October 12 900."
date = { day = 11 month = october year = 900 }
offset = 10
deathdate = { day = 10 month = july year = 905 }
action = {
name = "We ousted the usurpator"
trigger = {
ITA = { ai = yes }
}
command = { type = inherit which = ITA }
}
action = {
name = "We ousted the usurpator"
trigger = {
ITA = { ai = no }
NOT = {
vassal = { country = ITA country = PRO }
}
}
command = { type = vassal which = ITA }
# command = { type = which = value = }
}
}
Code:
event = {
id = 322002
trigger = {
event = 322001 #PRO: The taking of Pavia
}
random = no
country = PRO
name = "The Kingdom of the Lombards"
desc = "Louis III of Provence was crowned king of Italy in Pavia on 12th October 900 AD."
date = { day = 11 month = october year = 900 }
offset = 10
deathdate = { day = 20 month = july year = 905 }
action = {
name = "We are King of Italy"
trigger = {
NOT = { exists = ITA }
}
command = { type = flagname which = "" }
command = { type = country which = ITA }
command = { type = capital which = 665 } #Aquae
command = { type = add_countryculture which = lombard }
command = { type = addcore_national which = 521 } #Pentapolis
command = { type = addcore_national which = 522 } #Umbria
command = { type = addcore_national which = 527 } #Parma
command = { type = addcore_national which = 528 } #Ravenna
command = { type = addcore_national which = 529 } #Ferrara
command = { type = addcore_national which = 662 } #Secusia
command = { type = addcore_national which = 663 } #Ventimiglia
command = { type = addcore_national which = 664 } #Liguria
command = { type = addcore_national which = 665 } #Aquae
command = { type = addcore_national which = 666 } #Novara
command = { type = addcore_national which = 667 } #Milan
command = { type = addcore_national which = 668 } #Placentia
command = { type = addcore_national which = 669 } #Brescia
command = { type = addcore_national which = 670 } #Mantua
command = { type = trigger which = 228005 } #ITA: Ludovico di Provenza
}
action = {
name = "We are King of Italy"
trigger = {
ITA = { ai = no }
}
command = { type = trigger which = 228005 } #ITA: Ludovico di Provenza
}
}
Code:
event = {
id = 228005 #triggered by PRO_111502 PRO_322002 (900-905)
random = no
country = ITA
name = "Ludovico di Provenza"
desc = "Louis III of Provence was crowned king of Italy in Pavia on 12th October 900 AD."
action = {
name = "Ok"
command = { type = wakemonarch which = 064506 } #Ludovico di Provenza
command = { type = independence which = FRL }
command = { type = independence which = PAP }
command = { type = independence which = SPL }
command = { type = independence which = TOS }
command = { type = independence which = IRA }
command = { type = trigger which = 390001 } #FRL: Ludovico di Provenza
}
}
Code:
event = {
id = 390001 #triggered by ITA_228005 / ITA_228008 B (900-905)
random = no
country = FRL
name = "Ludovico di Provenza"
desc = "In 900, several Italian magnates including Adalberto of Tuscany and Anscario of Ivrea, dissatisfied with the renewed rule of Berengar, called unto Louis, the young king of Lower Burgundy, to come and take the crown of Italy."
action = {
name = "We'll have our revenge"
command = { type = breakvassal which = ITA }
command = { type = relation which = ITA value = -400 }
command = { type = addcore_claim which = 521 } #Pentapolis
command = { type = addcore_claim which = 522 } #Umbria
command = { type = addcore_claim which = 527 } #Parma
command = { type = addcore_claim which = 528 } #Ravenna
command = { type = addcore_claim which = 529 } #Ferrara
command = { type = addcore_claim which = 662 } #Secusia
command = { type = addcore_claim which = 663 } #Ventimiglia
command = { type = addcore_claim which = 664 } #Liguria
command = { type = addcore_claim which = 665 } #Aquae
command = { type = addcore_claim which = 666 } #Novara
command = { type = addcore_claim which = 667 } #Milan
command = { type = addcore_claim which = 668 } #Placentia
command = { type = addcore_claim which = 669 } #Brescia
command = { type = addcore_claim which = 670 } #Mantua
command = { type = war which = ITA }
command = { type = inf which = 676 value = 8000 } #Friuli
command = { type = cav which = 676 value = 4000 } #Friuli
}
}
Code:
event = {
id = 390002
trigger = {
event = 390001 #FRL: Ludovico di Provenza
control = { province = 665 data = -1 } #Aquae
}
random = no
country = FRL
name = "The taking of Pavia"
desc = "Berengar took Pavia again in July 902 and Louis III had to flee back to Vienne."
date = { day = 11 month = october year = 900 }
offset = 10
deathdate = { day = 25 month = march year = 924 }
action = {
name = "We ousted the usurpator"
trigger = {
ITA = { ai = yes }
}
command = { type = inherit which = ITA }
}
action = {
name = "We ousted the usurpator"
trigger = {
ITA = { ai = no }
NOT = {
vassal = { country = ITA country = PRO }
}
}
command = { type = vassal which = ITA }
}
}
Code:
event = {
id = 390003
trigger = {
event = 390002 #PRO: The taking of Pavia
}
random = no
country = FRL
name = "The Kingdom of the Lombards"
desc = "Berengar retook the Kingdom of Italy. He would then try to strengthen his position by giving concessions and privileges to churches and monasteries and promising military protection to those villages frequently hit by Hungarian raids."
date = { day = 11 month = october year = 900 }
offset = 10
deathdate = { day = 5 month = april year = 924 }
action = {
name = "We are King of Italy"
trigger = {
NOT = { exists = ITA }
}
command = { type = flagname which = "" }
command = { type = country which = ITA }
command = { type = capital which = 665 } #Aquae
command = { type = addcore_national which = 521 } #Pentapolis
command = { type = addcore_national which = 522 } #Umbria
command = { type = addcore_national which = 527 } #Parma
command = { type = addcore_national which = 528 } #Ravenna
command = { type = addcore_national which = 529 } #Ferrara
command = { type = addcore_national which = 662 } #Secusia
command = { type = addcore_national which = 663 } #Ventimiglia
command = { type = addcore_national which = 664 } #Liguria
command = { type = addcore_national which = 665 } #Aquae
command = { type = addcore_national which = 666 } #Novara
command = { type = addcore_national which = 667 } #Milan
command = { type = addcore_national which = 668 } #Placentia
command = { type = addcore_national which = 669 } #Brescia
command = { type = addcore_national which = 670 } #Mantua
command = { type = trigger which = 228006 } #ITA: Berengario del Friuli
}
action = {
name = "We are King of Italy"
trigger = {
ITA = { ai = no }
}
command = { type = trigger which = 228006 } #ITA: Berengario del Friuli
}
}
Code:
event = {
id = 228006 #triggered by FRL_390003 (900-924)
random = no
country = ITA
name = "Berengario del Friuli"
desc = "Berengar retook the Kingdom of Italy. He would then try to strengthen his position by giving concessions and privileges to churches and monasteries and promising military protection to those villages frequently hit by Hungarian raids."
action = {
name = "Ok"
command = { type = wakemonarch which = 064507 } #Berengario del Friuli
command = { type = independence which = PRO }
command = { type = independence which = PAP }
command = { type = independence which = SPL }
command = { type = independence which = TOS }
command = { type = independence which = IRA }
}
}
And here a NEW ITA event to restore province RR and give some benefit to Italy under Berengario's rule:
Code:
event = {
id = 228030
trigger = {
trigger = {
OR = {
flag = [Feudal_Anarchy]
flag = [Provencal_Claim]
}
OR = { #all of them are Berengario I
monarch = 064500 #ahistorical, in case he ahistorically kept the crown of Italy
monarch = 064505 #historical, when succeding the Spoletan Kings
monarch = 064563 #ahistorical, in case he reconquered Italy as Margrave of Friuli
monarch = 064507 #historical, restored after Louis' descent to Italy
}
atwar = no
}
random = no
country = ITA
name = "The End of Feudal Anarchy"
desc = "Earlier the Spoletan Kings, then the King of Germany, lately the King of Provence, it seemed that anyone would aim at the crown of Italy. However Berengario found himself as the only legitimated King to rule over Northern Italy. His vassals paid him the feudal hommage and even the Pope would acknowledge him as Emperor of the Franks. Under his rule, Berengario restored order over Northern Italy by strengthening his position with concessions and privileges to churches and monasteries and building fortresses to protect the cities of the kingdom from the Hungarian incursions."
date = { day = 5 month = august year = 905 }
offset = 60
deathdate = { day = 5 month = april year = 924 }
action = {
name = "Good"
command = { type = clrflag which = [Feudal_Anarchy] }
command = { type = clrflag which = [Provencal_Claim] } #all flags removed
command = { type = province_revoltrisk which = 662 value = -30 } #Secusia
command = { type = province_revoltrisk which = 666 value = -30 } #Novara
command = { type = province_revoltrisk which = 665 value = -30 } #Aquae
command = { type = province_revoltrisk which = 667 value = -30 } #Milan
command = { type = province_revoltrisk which = 668 value = -30 } #Placentia
command = { type = fortress which = 671 value = 1 } #Verona (Berengar's residence)
command = { type = fortress which = 669 value = 1 } #Brescia (the church of Bergamo)
command = { type = provincetax which = 527 value = 1 } #Parma (the church of Reggio)
command = { type = provincetax which = 668 value = 1 } #Placentia (the monastery of Bobbio)
command = { type = relation which = IRA value = 150 }
command = { type = relation which = FRL value = 50 }
command = { type = relation which = TOS value = 150 }
command = { type = relation which = SPL value = 50 }
command = { type = relation which = PAP value = 50 }
command = {
trigger = {
vassal = { country = GER country = ITA }
}
type = breakvassal which = GER
}
command = { type = stability value = 6 }
command = { type = relation which = GER value = 100 }
command = {
trigger = {
FRL = { ai = no }
NOT = {
vassal = { country = FRL country = ITA }
}
}
type = vassal which = FRL
}
command = {
trigger = {
FRL = { ai = yes }
}
type = inherit which = FRL
}
command = {
trigger = {
NOT = {
vassal = { country = IRA country = ITA }
}
}
type = vassal which = IRA
}
command = {
trigger = {
NOT = {
vassal = { country = TOS country = ITA }
}
}
type = vassal which = TOS
}
}
}
here a tweak in the trigger of this PRO event checking all possible monarchs:
Code:
event = {
id = 153000
trigger = {
ITA = {
OR = {
monarch = 064500 #Berengario I del Friuli
monarch = 064505 #Berengario I del Friuli, restored
monarch = 064507 #Berengario I del Friuli, restored again
}
OR = { #all of them are Berengario I
monarch = 064500 #ahistorical, in case he ahistorically kept the crown of Italy
monarch = 064505 #historical, when succeding the Spoletan Kings
monarch = 064563 #ahistorical, in case he reconquered Italy as Margrave of Friuli
monarch = 064507 #historical, restored after Louis' descent to Italy
}
}
NOT = { alliance = { country = ITA country = BUR } }
}
random = no
country = BUR
name = "The Kingdom of the Lombards"
desc = ""
date = { day = 0 month = january year = 922 }
offset = 360
deathdate = { day = 29 month = december year = 922 }
action = {
name = "Seize the opportunity"
command = { type = relation which = ITA value = -200 }
command = { type = addcore_claim which = 521 } #Pentapolis
command = { type = addcore_claim which = 522 } #Umbria
command = { type = addcore_claim which = 527 } #Parma
command = { type = addcore_claim which = 528 } #Ravenna
command = { type = addcore_claim which = 529 } #Ferrara
command = { type = addcore_claim which = 662 } #Secusia
command = { type = addcore_claim which = 663 } #Ventimiglia
command = { type = addcore_claim which = 664 } #Liguria
command = { type = addcore_claim which = 665 } #Aquae
command = { type = addcore_claim which = 666 } #Novara
command = { type = addcore_claim which = 667 } #Milan
command = { type = addcore_claim which = 668 } #Placentia
command = { type = addcore_claim which = 669 } #Brescia
command = { type = addcore_claim which = 670 } #Mantua
command = { type = addcore_claim which = 671 } #Verona
command = { type = addcore_claim which = 672 } #Trent
command = { type = addcore_claim which = 674 } #Padua
command = { type = addcore_claim which = 676 } #Friuli
command = { type = addcore_claim which = 677 } #Istria
command = {
trigger = {
ITA = { ai = yes }
}
type = war which = ITA
}
command = {
trigger = {
ITA = { ai = no }
}
type = trigger which = 228009 #ITA: Rodolfo di Borgogna
}
}
action = {
name = "This is too dangerous"
command = { type = sleepevent which = 153003 } #BUR: The taking of Pavia
command = { type = sleepevent which = 228017 } #ITA: The death of Berengario
}
}
this event will be one of the starting points for the future sequence about "the Burgundian intervention in Italy"... ;-)