• Pre order now!

    Paradox Development Studio brings you the sequel to one of the most popular strategy games ever made! Crusader Kings III is soon upon us and you can pre order it today!


    Releasing September 1st 2020

Jaol

Kapudan Pasha
53 Badges
Jan 24, 2011
3.757
313
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • For the Motherland
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars: First Colony Edition
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Victoria 2 Beta
  • Pride of Nations
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
This mod limits how you can use the Holy War CB. The CB is now only valid on neighboring duchies or nearby coastal duchies. The serves to prevent things like France taking over Iberia without preventing historically appropriate overseas cases, such as Denmark expanding into the Baltic. It is similar to wertu234's mod that restricts the holy war CB to adjacent duchies, but also allows holy wars over predefined sea-routes.

For example, in 1066, the King of Leon can use the regular holy war CB on the Emir of Valencia to capture the Duchy of Toledo, because it borders his kingdom. He cannot, however, use it to capture the Duchy of Valencia, from the Emir, because his kingdom does not border that particular duchy. Here's a screenshot: http://cloud.steampowered.com/ugc/506891565262300351/CFD98EBD0B4DFB304D6AF56D865E5126F5F15A02/

For example, any character with a holding or vassal in Denmark will be able to use the CB against pagan-held duchies on the Baltic coast: http://cloud.steampowered.com/ugc/506891565262682802/2F44CC4A56AAAD84F4072201BDB969FBA4A4E1F4/. Note that the King of Denmark has a CB on the Duchy of Prussia, but not the Duchy of Pomerania. That is because the part of the Duchy of Pomerania that in the Prutherian realm does not border the Baltic.

The predefined regions where overseas holy wars are allowed are:
  • Denmark/Sweden to the Baltic coast and vice versa.
  • Aragon to the Balearics and vice versa.
  • Sicily to Malta and Africa and vice versa.

The mod originally included more sea-routes, but I found they didn't add much to gameplay, and in some cases seemed to cause problems (Byzantium leapfrogging Georgia), so I removed them. If you think I'm missing an important route, please let me know.

Download the cb file here:
View attachment Geographically Limited Holy Wars.zip
 
Last edited:

Bloodmerchant

兩浙貴族
92 Badges
Aug 6, 2008
2.427
39
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Humble Paradox Bundle
  • Pillars of Eternity
  • Imperator: Rome Deluxe Edition
  • Teleglitch: Die More Edition
  • Rome: Vae Victis
  • War of the Roses
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Age of Wonders III
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44
  • Imperator: Rome
  • Age of Wonders
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Age of Wonders: Planetfall Sign Up
  • Age of Wonders: Planetfall
  • Imperator: Rome Sign Up
  • Prison Architect
  • Europa Universalis III Complete
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis III Complete
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Warlock: Master of the Arcane
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • East India Company Collection
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Crusader Kings II
This doesn't work well mostly because France immediately declares holy war once a Muslim power seizes Barcelona. Then after that, France moves on to claim Iberia...
 

Jaol

Kapudan Pasha
53 Badges
Jan 24, 2011
3.757
313
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • For the Motherland
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars: First Colony Edition
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Victoria 2 Beta
  • Pride of Nations
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
Hmm, well, I'm not sure that's something we want to stop. France leapfrogging the Iberian minors = bad, but France completing to the reconquista if they get wiped out is different.

Anyway, here's a version of the mod that is compatible with wertu234's. Kings and Emperors require higher centralization to use the CB if they don't have any demesne provinces on their borders. Perhaps that will help.

In this version, the base Holy War CB is exactly the same as in wertu234's mod, but there is another CB for overseas Holy Wars (limited by predefined regions). This way Denmark can still use a Holy War CB in the Baltic despite not bordering the duchies in question.

Although the latest patch improves upon France in Africa, etc. by lowering the naval distance at which the AI will use the Holy War CB, I think it still works better to completely prevent overseas Holy Wars except in certain predefined regions. Limiting the CB by distance alone blocks some historically appropriate cases (i.e. Denmark to Finland), while allowing other more questionable cases (ERE in Libya). With predefined regions, we can try to match invasion routes to trade routes, control things for the sake of gameplay, etc.

Download:
View attachment Geographically Limited Holy Wars.zip
 

nalivayko

General
47 Badges
Mar 15, 2001
2.487
256
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • Rome: Vae Victis
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Mare Nostrum
I agree with Jaol, this is not a bad scenario. Imo, France would and should step in if Barcelona is overran by Muslims. After all, the county was a Frankish creation.
 

david3k

Second Lieutenant
6 Badges
Nov 11, 2010
150
2
  • Crusader Kings II
  • Deus Vult
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
Somehow it doesn't work - I'm king of italy under HRE, one of my vassals is the count of corsica, and I can't declare war on Sicilian muslims.
 

Jaol

Kapudan Pasha
53 Badges
Jan 24, 2011
3.757
313
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • For the Motherland
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars: First Colony Edition
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Victoria 2 Beta
  • Pride of Nations
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
Somehow it doesn't work - I'm king of italy under HRE, one of my vassals is the count of corsica, and I can't declare war on Sicilian muslims.
Which version are you using? For the one that's compatible with wertu234's mod, you need a demense province in the right area to go overseas. Sorry, I forgot to mention that change.

By the way, does anyone have any suggestions for where overseas holy wars should be possible? I'm thinking perhaps it should be more limited, to keep Sardinia from being so important.
 
Last edited:

david3k

Second Lieutenant
6 Badges
Nov 11, 2010
150
2
  • Crusader Kings II
  • Deus Vult
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
I don't know which one, I see only one download link in the OP.
 

Samefar

Major
25 Badges
Jul 29, 2005
599
6
  • Victoria: Revolutions
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • 200k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Sengoku
  • Semper Fi
  • Rome Gold
  • Hearts of Iron Anthology
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III Complete
  • Deus Vult
  • Commander: Conquest of the Americas
  • Crusader Kings II
Is the muslims limited by this as well? If they are, do you think it can be modded that these restrictions is only for the christians? I'm tired of always seeing Iberia overrun by the christians with their overpowerd holy orders.
 

grallonsphere

Major
53 Badges
Mar 31, 2006
770
0
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Imperator: Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
Amen! I've been saying forever that Paradox should have a 'sphere of influence' type mechanism in their games - so as to prevent absurd over-extension scenarios.
 

xcrissxcrossx

Lt. General
81 Badges
Nov 23, 2010
1.463
21
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Pillars of Eternity
  • Knights of Pen and Paper +1 Edition
  • Majesty 2
  • March of the Eagles
  • Arsenal of Democracy
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
  • Sengoku
  • Europa Universalis IV: Pre-order
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Sword of Islam
  • A Game of Dwarves
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Darkest Hour
  • East India Company Collection
  • Stellaris - Path to Destruction bundle
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Common Sense
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Prison Architect
  • 500k Club
  • War of the Roses
  • Victoria 2
  • Europa Universalis III Complete
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Hearts of Iron IV Sign-up
I am downloading this immediately. This looks great!

I found an error in the code. France can declare war on the Sheikhdom of Lleida even though they aren't adjacent. I think this is because they are adjacent to the duchy of Barcelona, and this sheikhdom is a de jure part of Barcelona.

I'm trying to figure out a way to fix it now.
 
Last edited:

Jaol

Kapudan Pasha
53 Badges
Jan 24, 2011
3.757
313
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • For the Motherland
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars: First Colony Edition
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Victoria 2 Beta
  • Pride of Nations
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
I am downloading this immediately. This looks great!

I found an error in the code. France can declare war on the Sheikhdom of Lleida even though they aren't adjacent. I think this is because they are adjacent to the duchy of Barcelona, and this sheikhdom is a de jure part of Barcelona.

I'm trying to figure out a way to fix it now.
Thanks for reporting it. I've fixed it and tweaked the cbs a bit. The basic cb is the same as in wertu234's mod. The 2nd cb now only allows holy-wars in the Baltic, between Aragon and Mallorca, and between Sicily, Malta, and Africa.

Is there anything obviously missing?

Here is the latest version. Just paste this into your cbs. I'll also update the links at the top.
Code:
religious = {
	name = CB_NAME_RELIGIOUS
	war_name = WAR_NAME_RELIGIOUS
	sprite = 9
	truce_days = 1095
	is_permanent = yes
	check_dejure_duchies = yes
	
	can_use = {
		ROOT = {
			NOT = { religion_group = pagan_group }
			NOT = { same_realm = FROM }
			OR = {
				NOT = { religion_group = FROM }
				is_heresy_of = FROM
				is_parent_religion = FROM
			}
			top_liege = {
				religion = PREV
			}
			
			OR = {
				AND = {
					OR = {
						primary_title = { tier = EMPEROR }
						primary_title = { tier = KING }
					}
					crownlaw_title = {
						has_law = centralization_4
					}
					any_vassal = {
						any_demesne_province = {
							any_neighbor_province = {
								owner = {
									top_liege = { 
										character = FROM
									}
								}
							}
						}
					}
				}
					
				AND = {
					primary_title = { tier = DUKE }
					any_vassal = {
						any_demesne_province = {
							any_neighbor_province = {
								owner = {
									top_liege = { 
										character = FROM
									}
								}
							}
						}
					}
				}
			
			any_demesne_province = {
					any_neighbor_province = {
						owner = {
							top_liege = { 
								character = FROM
							}
						}
					}
				}
			}
			
		}
	}
				
	can_use_title = {
		ROOT = {
				any_realm_province = {
					any_neighbor_province = {
						de_jure_liege = PREVPREVPREV
						}
					}
				}
			}


		
	is_valid = {
		ROOT = {
			NOT = { religion_group = pagan_group }
			NOT = { same_realm = FROM }
			OR = {
				NOT = { religion_group = FROM }
				is_heresy_of = FROM
				is_parent_religion = FROM
			}
			OR = {
				AND = {
					OR = {
						primary_title = { tier = EMPEROR }
						primary_title = { tier = KING }
					}
					crownlaw_title = {
						has_law = centralization_4
					}
					any_vassal = {
						any_demesne_province = {
							any_neighbor_province = {
								owner = {
									top_liege = { 
										character = FROM
									}
								}
							}
						}
					}
					}
					
				AND = {
					primary_title = { tier = DUKE }
					any_vassal = {
						any_demesne_province = {
							any_neighbor_province = {
								owner = {
									top_liege = { 
										character = FROM
									}
								}
							}
						}
					}
					}
			
			any_demesne_province = {
					any_neighbor_province = {
						owner = {
							top_liege = { 
								character = FROM
							}
						}
					}
				}
			}
		}
	}
	
	
	on_success_title = {
		ROOT = {
			piety = 50
			gain_settlements_under_title = {
				title = PREV
				enemy = FROM
			}
		}
	}

	on_fail = {
		ROOT = {
			piety = -50
			prestige = -100
		}
	}

	on_reverse_demand = {
		ROOT = {
			piety = -150
			prestige = -200
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	defender_ai_defeat_worth = {
		factor = 100
	}
}

religious2 = {
	name = CB_NAME_RELIGIOUS
	war_name = WAR_NAME_RELIGIOUS
	sprite = 9
	truce_days = 1095
	is_permanent = yes
	check_dejure_duchies = yes
	
	can_use = {
		ROOT = {
			NOT = { religion_group = pagan_group }
			NOT = { same_realm = FROM }
			OR = {
				NOT = { religion_group = FROM }
				is_heresy_of = FROM
				is_parent_religion = FROM
			}
			top_liege = {
				religion = PREV
			}
			
			OR= {
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 170 #Aragon
							province_id = 171
							province_id = 172
							province_id = 173
							province_id = 204
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 827 #Mallorca
								province_id = 826
							}
						}
					}
				}
					
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 827 #Mallorca
							province_id = 826
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 170 #Aragon
								province_id = 171
								province_id = 172
								province_id = 173
								province_id = 204
							}
						}
					}
				}
				
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 340 #Sicily
							province_id = 341
							province_id = 342
							province_id = 343

							province_id = 812 #Malta
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 812 #Malta
								
								province_id = 817 #Africa
								province_id = 816
								province_id = 813
								province_id = 811
							}
						}
					}
				}
				
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 812 #Malta
								
							province_id = 817 #Africa
							province_id = 816
							province_id = 813
							province_id = 811
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 340 #Sicily
								province_id = 341
								province_id = 342
								province_id = 343

								province_id = 812 #Malta
							}
						}
					}
				}
				
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 266 #Denmark
							province_id = 303
							province_id = 305
							province_id = 6
							
							province_id = 298 #Sweden
							province_id = 300
							province_id = 301						
							province_id = 293
							province_id = 292						
							province_id = 290
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 262 #Lubeck
							
								province_id = 260 #Mecklenburg
								province_id = 306
								province_id = 304
								province_id = 307
								
								province_id = 308 #Pommerania
								province_id = 366
								
								province_id = 367 #Pomerilia
								province_id = 368
								
								province_id = 370 #Prussia
								province_id = 371
								
								province_id = 372 #Samagotia
								province_id = 422
								
								province_id = 421 #Lithuania
								
								province_id = 373 #Courland
								province_id = 374
								
								province_id = 375 #Livland
								province_id = 376
								province_id = 377
								
								province_id = 378 #Estland
								province_id = 380
							}
						}
					}
				}
				
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 262 #Lubeck
							
							province_id = 260 #Mecklenburg
							province_id = 306
							province_id = 304
							province_id = 307
							
							province_id = 308 #Pommerania
							province_id = 366
							
							province_id = 367 #Pomerilia
							province_id = 368
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 266 #Denmark
								province_id = 303
								province_id = 305
								province_id = 6
								
								province_id = 298 #Sweden
								province_id = 300
								province_id = 301						
								province_id = 293
								province_id = 292						
								province_id = 290
							
								province_id = 370 #Prussia
								province_id = 371
								
								province_id = 372 #Samagotia
								province_id = 422
								
								province_id = 421 #Lithuania
								
								province_id = 373 #Courland
								province_id = 374
								
								province_id = 375 #Livland
								province_id = 376
								province_id = 377
								
								province_id = 378 #Estland
								province_id = 380
							}
						}
					}
				}
				
				AND = {
					any_demesne_province = {
						OR = {
							province_id = 370 #Prussia
							province_id = 371
							
							province_id = 372 #Samagotia
							province_id = 422
							
							province_id = 421 #Lithuania
							
							province_id = 373 #Courland
							province_id = 374
							
							province_id = 375 #Livland
							province_id = 376
							province_id = 377
							
							province_id = 378 #Estland
							province_id = 380
						}
					}
					FROM = {
						any_realm_province = {
							OR = {
								province_id = 266 #Denmark
								province_id = 303
								province_id = 305
								province_id = 6
								
								province_id = 298 #Sweden
								province_id = 300
								province_id = 301						
								province_id = 293
								province_id = 292						
								province_id = 290
							
								province_id = 262 #Lubeck
								
								province_id = 260 #Mecklenburg
								province_id = 306
								province_id = 304
								province_id = 307
								
								province_id = 308 #Pommerania
								province_id = 366
								
								province_id = 367 #Pomerilia
								province_id = 368
							}
						}
					}
				}
			}
		}
	}
		
	
		
	can_use_title = {
		OR= {
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 170 #Aragon
							province_id = 171
							province_id = 172
							province_id = 173
							province_id = 204
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {
							province_id = 827 #Mallorca
							province_id = 826
						}					
						de_jure_liege = PREVPREV
					}
				}
			}
					
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 827 #Mallorca
							province_id = 826
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {
							province_id = 170 #Aragon
							province_id = 171
							province_id = 172
							province_id = 173
							province_id = 204
						}					
						de_jure_liege = PREVPREV
					}	
				}
			}
			
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 340 #Sicily
							province_id = 341
							province_id = 342
							province_id = 343

							province_id = 812 #Malta
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {
							province_id = 812 #Malta
							
							province_id = 817 #Africa
							province_id = 816
							province_id = 813
							province_id = 811
						}					
						de_jure_liege = PREVPREV
					}
				}
			}
				
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 812 #Malta
								
							province_id = 817 #Africa
							province_id = 816
							province_id = 813
							province_id = 811
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {
							province_id = 340 #Sicily
							province_id = 341
							province_id = 342
							province_id = 343

							province_id = 812 #Malta
						}					
						de_jure_liege = PREVPREV
					}
				}
			}
				
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 266 #Denmark
							province_id = 303
							province_id = 305
							province_id = 6
							
							province_id = 298 #Sweden
							province_id = 300
							province_id = 301						
							province_id = 293
							province_id = 292						
							province_id = 290
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {
							province_id = 262 #Lubeck
							
							province_id = 260 #Mecklenburg
							province_id = 306
							province_id = 304
							province_id = 307
							
							province_id = 308 #Pommerania
							province_id = 366
							
							province_id = 367 #Pomerilia
							province_id = 368
							
							province_id = 370 #Prussia
							province_id = 371
							
							province_id = 372 #Samagotia
							province_id = 422
							
							province_id = 421 #Lithuania
							
							province_id = 373 #Courland
							province_id = 374
							
							province_id = 375 #Livland
							province_id = 376
							province_id = 377
							
							province_id = 378 #Estland
							province_id = 380
						}					
						de_jure_liege = PREVPREV
					}			
				}
			}
			
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 262 #Lubeck
							
							province_id = 260 #Mecklenburg
							province_id = 306
							province_id = 304
							province_id = 307
							
							province_id = 308 #Pommerania
							province_id = 366
							
							province_id = 367 #Pomerilia
							province_id = 368
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {
							province_id = 266 #Denmark
							province_id = 303
							province_id = 305
							province_id = 6
							
							province_id = 298 #Sweden
							province_id = 300
							province_id = 301						
							province_id = 293
							province_id = 292						
							province_id = 290
						
							province_id = 370 #Prussia
							province_id = 371
							
							province_id = 372 #Samagotia
							province_id = 422
							
							province_id = 421 #Lithuania
							
							province_id = 373 #Courland
							province_id = 374
							
							province_id = 375 #Livland
							province_id = 376
							province_id = 377
							
							province_id = 378 #Estland
							province_id = 380
						}	
						de_jure_liege = PREVPREV
					}
				}
			}
			
			AND = {
				ROOT = {
					any_demesne_province = {
						OR = {
							province_id = 370 #Prussia
							province_id = 371
							
							province_id = 372 #Samagotia
							province_id = 422
							
							province_id = 421 #Lithuania
							
							province_id = 373 #Courland
							province_id = 374
							
							province_id = 375 #Livland
							province_id = 376
							province_id = 377
							
							province_id = 378 #Estland
							province_id = 380
						}
					}
				}
				FROM = {
					any_realm_province = {
						OR = {								
							province_id = 266 #Denmark
							province_id = 303
							province_id = 305
							province_id = 6
							
							province_id = 298 #Sweden
							province_id = 300
							province_id = 301						
							province_id = 293
							province_id = 292						
							province_id = 290
						
							province_id = 262 #Lubeck
							
							province_id = 260 #Mecklenburg
							province_id = 306
							province_id = 304
							province_id = 307
							
							province_id = 308 #Pommerania
							province_id = 366
							
							province_id = 367 #Pomerilia
							province_id = 368
						}	
						de_jure_liege = PREVPREV
					}
				}
			}
		}
	}


		
	is_valid = {
		ROOT = {
			NOT = { religion_group = pagan_group }
			NOT = { same_realm = FROM }
			OR = {
				NOT = { religion_group = FROM }
				is_heresy_of = FROM
				is_parent_religion = FROM
			}
		}
	}
	
	on_success_title = {
		ROOT = {
			piety = 50
			gain_settlements_under_title = {
				title = PREV
				enemy = FROM
			}
		}
	}

	on_fail = {
		ROOT = {
			piety = -50
			prestige = -100
		}
	}

	on_reverse_demand = {
		ROOT = {
			piety = -150
			prestige = -200
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	defender_ai_defeat_worth = {
		factor = 100
	}
}