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

Iron Marshal

Second Lieutenant
23 Badges
Jul 3, 2002
141
3
Visit site
  • Majesty 2
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
We'be all had wars come to an abrupt, successful conclusion by capturing the enemy leader. But how might one influence the probability with which this occurs? Is it a scripted event, or is it built into the engine?
 
From "common/on_actions/00_on_actions.txt"
Code:
#character
on_battle_lost = {
	random_events = {
		900 = 0
		50 = 250 # Imprisoned by the enemy
		50 = 8320 # Crusader becomes cynical
	}
}
So by default, there's a 5% chance of this happening at the end of each battle for each character on the losing side. It can be modded by writing another "on_battle_lost" in a new .txt file in a mod's common/on_actions.
 
From "common/on_actions/00_on_actions.txt"
Code:
#character
on_battle_lost = {
	random_events = {
		900 = 0
		50 = 250 # Imprisoned by the enemy
		50 = 8320 # Crusader becomes cynical
	}
}
So by default, there's a 5% chance of this happening at the end of each battle for each character on the losing side. It can be modded by writing another "on_battle_lost" in a new .txt file in a mod's common/on_actions.

does that 50 signify 5%?
 
does that 50 signify 5%?

Unless there is a 900% chance of nothing happening, that seems likely. Although I'm wondering why it says "Crusader becomes cynical" if it is for every battle. Also, I have noticed that in larger battles I tend to capture more people, that may just be because it's a 5% chance per character on the battlefield (as opposed to per commander), I'm not sure though.
 
Unless there is a 900% chance of nothing happening, that seems likely. Although I'm wondering why it says "Crusader becomes cynical" if it is for every battle. Also, I have noticed that in larger battles I tend to capture more people, that may just be because it's a 5% chance per character on the battlefield (as opposed to per commander), I'm not sure though.

Statistically, if you have 20 enemy characters in their army, you should capture at least one.
 
i think this applies to the leaders of city/barony/bishopric units(when you raise levy from county it consists of sub units for each holding under it and each has its own commander slot, empty quite some times though) also, of which are consisted flanks and center

BTW can anyone tell me in brief in that file 00_on_actions.txt what does event trigger chances like

Code:
on_yearly_pulse = {
	random_events = {
		
		# Feudal Life Events
		 [COLOR="#00FFFF"]100 [/COLOR]= 4000
		 [COLOR="#00FFFF"]100 [/COLOR]= 4005

signify? some of those are more than 100(and even 1000), so they cant be just percentage simply.
 
It's just a weighted number, rather than a set percentage. So in your example you have a 100 chance get the first or second event, the total number is 200 so that works out at 50%.

So add up all those numbers inside the random_events bracket to get your number to divide by to figure out the percentage.
 
The chance could be more than 5%. If "crusader becomes cynical" isn't possible (because the character isn't a crusader or one of the other triggers in event 8320 isn't true) then the chance is 50/950 or 5.26%.

The other factor which changes the 5% is the mean time to happen in event 250. A mean time of 1 day means 5/5.26%.
Code:
		mean_time_to_happen = {
		days = 1

		modifier = {
			factor = 1.25
			trait = brave
		}
		modifier = {
			factor = 0.25
			trait = craven
		}
		modifier = {
			factor = 0.25
			trait = paranoid
		}

		modifier = {
			factor = 1.25
			trait = stressed
		}
		modifier = {
			factor = 1.25
			trait = depressed
		}
		modifier = {
			factor = 1.5
			trait = lunatic
		}
		modifier = {
			factor = 1.5
			trait = possessed
		}
		modifier = {
			factor = 1.1
			trait = ill
		}
		modifier = {
			factor = 1.25
			trait = pneumonic
		}
		modifier = {
			factor = 1.25
			trait = syphilitic
		}
		modifier = {
			factor = 2.0
			trait = leper
		}
		modifier = {
			factor = 1.15
			trait = wounded
		}
		modifier = {
			factor = 1.25
			trait = maimed
		}
		modifier = {
			factor = 2.0
			trait = infirm
		}
		modifier = {
			factor = 3.0
			trait = incapable
		}
		modifier = {
			factor = 1.1
			trait = drunkard
		}
		modifier = {
			factor = 1.1
			trait = has_tuberculosis
		}
		modifier = {
			factor = 1.1
			trait = has_typhoid_fever
		}
		modifier = {
			factor = 1.5
			trait = has_typhus
		}
		modifier = {
			factor = 1.5
			trait = has_bubonic_plague
		}
		modifier = {
			factor = 1.1
			trait = has_measles
		}		
		modifier = {
			factor = 1.1
			trait = has_small_pox
		}
		modifier = {
			factor = 0.5
			tier = duke
		}
		modifier = {
			factor = 0.25
			tier = king
		}
		modifier = {
			factor = 0.125
			tier = emperor
		}

In short there are a whole lot of traits, but they apply to the person about to be captured, not you :(. Although this explains why I always seem to capture barons.