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

Jomen

Second Lieutenant
64 Badges
Nov 26, 2008
125
0
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis IV: Wealth of Nations
  • Cities in Motion 2
  • Europa Universalis IV: Art of War
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Humanoids Species Pack
  • Crusader Kings Complete
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Magicka
Hi everobody and sorry for my english ,

I won't to test something with the on_action files and battle event like getting killed , wounded or caught.

Basically we have this

on_combat_pulse = {
random_events = {
3000 = 0
10 = 242 # Killed
20 = 243 # Wounded
10 = 244 # Maimed
5 = 245 # Serious head injury
20 = 246 # Improves martial education
10 = 247 # Flat improvement to martial skill

10 = 248 # Knowledge boost in capital from battle.
10 = 255 # Marshal: Unnecessary violence
15 = 270 # Gain Brave
15 = 271 # Gain Craven
10 = 272 # Gain Wroth
10 = 273 # Gain Patient

These define what can happen to all characters involve in a battle , each day right ?
I wonder what is the meaning of the "3000 = 0" and what is the uses of the number in it. Below these number there is event which can occur , is that right ? Number before the # is the event id but what represent the number before the = ?
 

avee

Major
42 Badges
Aug 13, 2009
544
1
  • Hearts of Iron III: Their Finest Hour
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Cities in Motion
  • Sengoku
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Naval War: Arctic Circle
  • Hearts of Iron III Collection
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Prison Architect
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Surviving Mars
  • Crusader Kings Complete
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Hearts of Iron: The Card Game
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Stellaris: Synthetic Dawn
  • Cities: Skylines
Hi everobody and sorry for my english ,

I won't to test something with the on_action files and battle event like getting killed , wounded or caught.

Basically we have this



These define what can happen to all characters involve in a battle , each day right ?
I wonder what is the meaning of the "3000 = 0" and what is the uses of the number in it. Below these number there is event which can occur , is that right ? Number before the # is the event id but what represent the number before the = ?
Number before "=" represents weight - basically a probability of event.
Number after "=" is event number.
"3000 = 0" is a chance of nothing happening.
 

Jomen

Second Lieutenant
64 Badges
Nov 26, 2008
125
0
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis IV: Wealth of Nations
  • Cities in Motion 2
  • Europa Universalis IV: Art of War
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Humanoids Species Pack
  • Crusader Kings Complete
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Magicka
thank you,

Numbers before "=" are probabilities. What is the number to make something happen everytime ? I don't know how to say all i think i will take on example.

If i want for this example , to raise the chance to be killed in combat i have to change "10 = 242 # Killed" et raise "10". But i don't know if i will raise this number too much or not , because i don't know if "10" represent 1% or 2% or anyelse percentage to be killed each day on battle.

How does the calculation of random events occuring works. Is there any elements ?
 

avee

Major
42 Badges
Aug 13, 2009
544
1
  • Hearts of Iron III: Their Finest Hour
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Cities in Motion
  • Sengoku
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Naval War: Arctic Circle
  • Hearts of Iron III Collection
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Prison Architect
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Surviving Mars
  • Crusader Kings Complete
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Hearts of Iron: The Card Game
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Stellaris: Synthetic Dawn
  • Cities: Skylines
thank you,

Numbers before "=" are probabilities. What is the number to make something happen everytime ? I don't know how to say all i think i will take on example.

If i want for this example , to raise the chance to be killed in combat i have to change "10 = 242 # Killed" et raise "10". But i don't know if i will raise this number too much or not , because i don't know if "10" represent 1% or 2% or anyelse percentage to be killed each day on battle.

How does the calculation of random events occuring works. Is there any elements ?
There are not exactly probability, there are weights. Every time there is a battle event called, engine chooses one of available options based on weights - most of time it`s event 0 aka nothing. So, if these events are called on every day, chance of being killed is weight_of_kill_event/sum_of_all_weights.