• 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.

LiamRiordan

The Rambling KR Player
70 Badges
Aug 4, 2008
2.184
137
  • 500k Club
  • Stellaris: Nemesis
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Holy Fury
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • War of the Roses
  • Hearts of Iron IV: Colonel
  • Stellaris: Humanoids Species Pack
  • Stellaris: Lithoids
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44 Deluxe Edition
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Steel Division: Normandy 44
  • Crusader Kings II: Rajas of India
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Necroids
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Hearts of Iron IV: Field Marshal
  • Semper Fi
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Dungeonland
  • Darkest Hour
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
I'm thinking about trying to improve the KR file that controls the utterly massive amount of possibilities of the European wars. Such as Germany winning, or losing to many countries, like UK, Canada, Russia, UoB, France etc.

If you've look in there, the current file size of Capitulation, its at 596Kb with 11,659 lines. That is huge, mainly because the county's fate is divided into just seceding provinces over areas and regions.

My question is this. Will replacing them with secedearea/regions cause a performance boost? In my mind it will since there is less checking, less memory being used etc.

Its a scary and daunting task though.

EDIT: I'm having trouble getting started. Here is the original event. It checks to see if France owns Italy, and will then hand over the provinces to their South Italian allies.

Code:
event = {
    id = 9111100
    picture = "failed_objective"
    country = FRA
        style = 2

    trigger = { 
        exists = RSI
        alliance = { country = FRA country = RSI }
        NOT = {
            exists = ITA
        }
        OR = {
            owned = { province = 435 data = FRA }
            owned = { province = 396 data = FRA }
            owned = { province = 399 data = FRA }
            owned = { province = 398 data = FRA }
            owned = { province = 407 data = FRA }
            owned = { province = 395 data = FRA }
            owned = { province = 393 data = FRA }
            owned = { province = 408 data = FRA }
            owned = { province = 410 data = FRA }
            owned = { province = 411 data = FRA }
            owned = { province = 413 data = FRA }
            owned = { province = 419 data = FRA }
            owned = { province = 414 data = FRA }
            owned = { province = 412 data = FRA }
            owned = { province = 416 data = FRA }
        }
    }

    name = "Redrawing the Map"
    desc = "We control parts of Northern Italy, we should return them to the Socialist Republic of Italy."

    date = { day = 1 month = january year = 1936 }
    offset = 3
    deathdate = { day = 1 month = december year = 1960 }

    action_a = {
    name = "Return the Provinces to the Italians"
        command = { type = secedeprovince which = RSI value = 393 } #Brescia
        command = { type = secedeprovince which = RSI value = 394 } #Belluno
        command = { type = secedeprovince which = RSI value = 395 } #Bergamo
        command = { type = secedeprovince which = RSI value = 396 } #Genoa
        command = { type = secedeprovince which = RSI value = 398 } #Turin
        command = { type = secedeprovince which = RSI value = 399 } #Alessandria
        command = { type = secedeprovince which = RSI value = 400 } #Venice
        command = { type = secedeprovince which = RSI value = 404 } #Trieste
        command = { type = secedeprovince which = RSI value = 405 } #Udine
        command = { type = secedeprovince which = RSI value = 407 } #Milan
        command = { type = secedeprovince which = RSI value = 408 } #Parma
        command = { type = secedeprovince which = RSI value = 410 } #Florence
        command = { type = secedeprovince which = RSI value = 411 } #Bologna
        command = { type = secedeprovince which = RSI value = 412 } #Ancona
        command = { type = secedeprovince which = RSI value = 413 } #Livorno
        command = { type = secedeprovince which = RSI value = 414 } #Perugia
        command = { type = secedeprovince which = RSI value = 415 } #Pescara
        command = { type = secedeprovince which = RSI value = 416 } #Anzio
        command = { type = secedeprovince which = RSI value = 417 } #Cassino
        command = { type = secedeprovince which = RSI value = 418 } #Gaeta
        command = { type = secedeprovince which = RSI value = 419 } #Rome
        command = { type = secedeprovince which = RSI value = 420 } #Foggia
        command = { type = secedeprovince which = RSI value = 421 } #Naples
        command = { type = secedeprovince which = RSI value = 422 } #Taranto
        command = { type = secedeprovince which = RSI value = 423 } #Campobasso
        command = { type = secedeprovince which = RSI value = 424 } #Potenza
        command = { type = secedeprovince which = RSI value = 425 } #Reggio Calabria
        command = { type = secedeprovince which = RSI value = 426 } #Bari
        command = { type = secedeprovince which = RSI value = 427 } #Salerno
        command = { type = secedeprovince which = RSI value = 428 } #Cosenza
        command = { type = secedeprovince which = RSI value = 430 } #Palermo
        command = { type = secedeprovince which = RSI value = 431 } #Messina
        command = { type = secedeprovince which = RSI value = 432 } #Catania
        command = { type = secedeprovince which = RSI value = 433 } #Siracuse
        command = { type = secedeprovince which = RSI value = 434 } #Cagliari
        command = { type = secedeprovince which = RSI value = 435 } #Sassari
    }
        action_b = {
        name = "Keep them!"
        ai_chance = 0
        command = { }
    }
}

Here is my event, currently not working:

Code:
event = {
    id = 9111100
    picture = "failed_objective"
    country = FRA
        style = 2

    trigger = { 
        exists = RSI
        alliance = { country = FRA country = RSI }
        NOT = {
            exists = ITA
        }
        OR = {
            owned = { province = 435 data = FRA }
            owned = { region = Italy data = FRA }
        }
    }

    name = "Redrawing the Map"
    desc = "We control parts of Northern Italy, we should return them to the Socialist Republic of Italy."

    date = { day = 1 month = january year = 1936 }
    offset = 3
    deathdate = { day = 1 month = december year = 1960 }

    action_a = {
    name = "Return the Provinces to the Italians"
        command = { type = secederegion which = RSI value = Italy } 
    }
        action_b = {
        name = "Keep them!"
        ai_chance = 0
        command = { }
    }
}

I'm getting trouble on line 15, with the unknown trigger type regarding "region = Italy". I'm likely missing something incredibly simple. Help?
 
Last edited:
I use secedearea/region all the time. I don't think it will necessarily improve performance since I've seen some funny secede oddities (doesn't seem to be processed in logical order in some instances). It's more of a convenience for future modders.
Code:
# Post Northern Expedition
event = {
	id = 133011905
	random = no
	country = CHI
	
	# Triggered
	
	name = "Northeast Flag Replacement"
	desc = "This is a placeholder event."
	
	#picture = ""
	style = 2

	action = {
		command = { type = secedearea which = MAN value = "Heilongjiang" when = 2 }
		command = { type = secedearea which = MAN value = "Jilin" when = 2 }
		command = { type = secedeprovince which = MAN value = 1235 when = 2 }
		command = { type = secedeprovince which = MAN value = 1237 when = 2 }
		command = { type = secedeprovince which = MAN value = 1216 when = 2 }
		command = { type = secedeprovince which = MAN value = 1218 when = 2 }
		command = { type = secedeprovince which = MAN value = 1214 when = 2 }
		command = { type = secedeprovince which = MAN value = 1217 when = 2 }
		command = { type = secedeprovince which = MAN value = 1215 when = 2 }
		command = { type = secedeprovince which = MAN value = 1220 when = 2 }
		command = { type = independence which = CSX value = 1 }
		command = { type = make_puppet which = CSX }
		command = { type = trigger which = 133011906 }
		command = { type = secedearea which = CGX value = "Guangxi" when = 2 }
		command = { type = secedeprovince which = CGX value = 1374 when = 2 }
		command = { type = secedeprovince which = CGX value = 1365 when = 2 }
		command = { type = secedeprovince which = CGX value = 1367 when = 2 }
		command = { type = secedeprovince which = CGX value = 1373 when = 2 }
		command = { type = secedeprovince which = CGX value = 1365 when = 2 }
		command = { type = secedeprovince which = CGX value = 1368 when = 2 }
		command = { type = secedeprovince which = CGX value = 1369 when = 2 }
		command = { type = secedeprovince which = CGX value = 1370 when = 2 }
		command = { type = secedeprovince which = CGX value = 1375 when = 2 }
		command = { type = capital which = 1337 }
	}
}

# Rise of Shanxi Clique
event = {
	id = 133011906
	random = no
	country = CHI
	
	# Triggered
	
	name = "Rise of Shanxi Clique"
	desc = "This is a placeholder event."
	
	#picture = ""
	style = 2
	
	action = {
		command = { type = secedearea which = CSX value = "Shanxi" when = 2 }
		command = { type = secedeprovince which = CSX value = 1238 when = 2 }
		command = { type = secedeprovince which = CSX value = 1239 when = 2 }
	}
}

# Long March

event = {
	id = 133011907
	random = no
	country = CHC
	
	name = "Long March"
	desc = "This is a placeholder event."
	
	#picture = ""
	style = 2

	date = { day = 1 month = 11 year = 1931 }
	offset = 1
	deathdate = { day = 2 month = 11 year = 1931 }

	action = {
		name = "OK"
		command = { type = secedearea which = CHC value = "Shaanxi" when = 2 }
		command = { type = secedearea which = CHI value = "Jiangxi" when = 2 }
		command = { type = secedearea which = CHI value = "Fujian" when = 2 }
		
	}
}
 
I'm getting trouble on line 15, with the unknown trigger type regarding "region = Italy". I'm likely missing something incredibly simple. Help?

You forgot to put a "quote" around Italy.