• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

The_Blind_One

Colonel
8 Badges
Feb 10, 2006
924
387
  • Crusader Kings II
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Semper Fi
  • 500k Club
I like the new de jure casus belli for counties...

but why only 1 county at a time? Why fight a huge war over a single county just to restart the war after 10 or so years for the other counties. I want to be able to claim all dejure counties and/or ducal titles if they are dejure part of my realm in a single war.

But I have absolutely no idea how casus belli coding works :/

I really need this casus belli, because I am making a splintered england and I want the king to be able to conquer the duchies to reunify england in just a couple of decisive wars rather than slogging it out for decades where he is certain to win by a slow landgrabbing process.

This wouldn't actualy change the AI so much I think because most of their dejure territory is already appropiately handed out and it should allow rebellious dukes to be reincorporated faster into their kingdoms again if they are to weak to resist.

How would I go about doing this?
 

Arko

Red zone
45 Badges
Jul 1, 2009
7.087
1.124
  • Europa Universalis IV
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II
  • Crusader Kings III
  • Deus Vult
  • Cities: Skylines
  • Magicka
Actually, I hate it. :)

Take a look at /common/cb_types.txt. You can add new conditions and outcomes for any CB you like, even add new ones.

my main problem on this is the AI's systematic day 1 DOW for ducal claims. I tried playing around with the code I only succeded in completly turning it of, event for player, where i just wanted to lower the probability of it a bit. Any help welcome !
 

The_Blind_One

Colonel
8 Badges
Feb 10, 2006
924
387
  • Crusader Kings II
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Semper Fi
  • 500k Club
Actually, I hate it. :)

Take a look at /common/cb_types.txt. You can add new conditions and outcomes for any CB you like, even add new ones.

I am looking at it and it doesn't make any sense to me :(

I'll just fiddle around with it for a bit untill I figure some stuff out but some general help in how this code works would be greatly appreciated.
 

RedRooster81

Modding Paladin
34 Badges
Feb 16, 2010
5.673
29
  • Crusader Kings II
  • Rome Gold
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Deus Vult
  • Cities in Motion
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Golden Century
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
You'll have to try and err until it works. Look at the claim_all cb (if you have normal claims on more than one county in another character's realm): you could add some parts of that one to the usual de jure claims somehow.
 

The_Blind_One

Colonel
8 Badges
Feb 10, 2006
924
387
  • Crusader Kings II
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Semper Fi
  • 500k Club
You'll have to try and err until it works. Look at the claim_all cb (if you have normal claims on more than one county in another character's realm): you could add some parts of that one to the usual de jure claims somehow.

I am quite sure de jure claims are not normal claims.

Normal claims involve having actual title claims on them on ur character.

I came to this conclusion after disabling the restrictions on the dejure county claim and still being spammed with tonnes of county claims and no press all claim.

So far I got this

Code:
dejure_duchy_claim = {
	name = CB_NAME_DEJUREDUCHYCLAIM
	war_name = WAR_NAME_DEJUREDUCHYCLAIM
	sprite = 16
	truce_days = 1825
	hostile_against_others = yes
	is_permanent = yes
	check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
	press_claim = yes
	can_ask_to_join_war = no

	can_use_title = {
		tier = DUKE #lower_tier_than = KING #higher_tier_than = DUKE
		OR = {
			FROM = {
				has_landed_title = PREV
			}
			holder_scope = {
				is_liege_or_above = FROM
			}
		}
		OR = {
			kingdom = {
				holder = ROOT
			}
			empire = {
				holder = ROOT
			}
			dejure_liege_title = {
				holder = ROOT
			}
		}

		NOT = {
			OR = {
				ROOT = {
					has_landed_title = PREV
				}
				holder_scope = {
					is_liege_or_above = ROOT
				}
			}
		}
	}

	is_valid_title = {
		OR = {
			FROM = {
				has_landed_title = PREV
			}
			holder_scope = {
				is_liege_or_above = FROM
			}
		}
	}

	on_success = {
		ROOT = {
			prestige = 100
			any_attacker = {
				participation_scaled_prestige = 100
			}
		}
		FROM = {
			prestige = -200
			any_demesne_title = { # All titles
				limit = {
					dejure_liege_title = {
						holder = ROOT
					}
#					is_titular = no
				}
				ROOT = {
					occupy_minors_of_occupied_settlements = FROM
					gain_all_occupied_titles = FROM	
				}
			}
		}

	}

	on_success_title = {

			usurp_title_plus_barony_if_unlanded = ROOT
			any_de_jure_vassal_title = { # take all baronies under the one we're fighting for
				limit = {
					has_holder = yes
					NOT = {
						de_facto_liege = PREV
					}
					holder_scope = {
						OR = {
							character = FROM
							is_liege_or_above = FROM
						}
					}
				}

				usurp_title_plus_barony_if_unlanded = ROOT
			}
		
		any_attacker = {
			participation_scaled_prestige = 100
		}
	}

	on_fail_title = {
		ROOT = {
			prestige = -100
		}
		any_defender = {
			participation_scaled_prestige = 50
		}
	}

	on_reverse_demand = {
		ROOT = {
			prestige = -200
			transfer_scaled_wealth = {
				to = FROM
				value = 4.0
			}
		}
		any_defender = {
			participation_scaled_prestige = 100
		}
	}

	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
	}
}

This code allows one to declare war on a dejure duchy holder and claim all other dejure territory that is in possesion of the defendant. It should not allow one to claim land outside of the dejure territory.

The only gripe I have with this is that it conquers the territory as if it were a holy war or invasion. I would have preferred a more regular transfer of lieges.

I tried to look for the old dejure claim that didn't make u the count of a province but rather the liege but it seems that one has been merged with the dejure county claim casus belli...unless I am mistaken?

Also...what does ''occupy_minors_of_occupied_settlements = FROM '' even do? I know what ''gain_all_occupied_titles = FROM'' does. (it gives every baronny u conquered as a title, cities, bishoprics, all, if u conquer them). But the occupy minors doesnt even seem to have any kind of effect as far I have tested.