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

CyberSpyder

Major
64 Badges
Jun 2, 2008
598
169
  • Crusader Kings II
  • Stellaris - Path to Destruction bundle
  • Sword of the Stars
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Arsenal of Democracy
  • Europa Universalis IV: Art of War
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Apocalypse
  • Crusader Kings Complete
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • Hearts of Iron IV: No Step Back
  • 500k Club
  • Victoria 2
  • Supreme Ruler 2020
Event CM.4131, "# Weak or old character becomes ill" appears to be written to have two levels of effect - characters who are old or injured but otherwise healthy can become ill, and characters already ill or plague-ridden become incapable.

Code:
# Weak or old character becomes ill or incapable
character_event = {
	id = CM.4131
	desc =*EVTDESC_CM_4131
	picture = GFX_evt_sun_temple
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	trigger = {
		OR = {
			age = 70
			health_traits = 1
		}
	}
	
	option = {
		name = EVTOPTA_CM_4131
		if = {
			limit = {
				NOT = { trait = ill }
				NOT = { trait = pneumonic }
				NOT = { trait = infirm }
				NOT = { trait = has_tuberculosis }
				NOT = { trait = has_typhoid_fever }
				NOT = { trait = has_typhus }
				NOT = { trait = has_bubonic_plague }
				NOT = { trait = has_measles }
				NOT = { trait = has_small_pox }
				NOT = { trait = syphilitic }
				NOT = { trait = leper }
			}
			add_trait = ill
		}
		if = {
			limit = {
				OR = {
					trait = ill
					trait = pneumonic
					trait = infirm
					trait = has_tuberculosis
					trait = has_typhoid_fever
					trait = has_typhus
					trait = has_bubonic_plague
					trait = has_measles
					trait = has_small_pox
					trait = syphilitic
					trait = leper
				}
			}
			add_trait = incapable
		}
	}
}
However, since the ill trait is added before the second check occurs, the second level effect will happen to anyone who qualifies for the event - since they're not sick, they become ill, and since they're now ill, they become incapable. This can easily be checked by manually triggering the event with the console.

Switching the order of the two IF clauses, or using the break = yes command, should fix it.
 
Upvote 0

MrNibbles

Operations Manager - Drinker of Tears
Administrator
Paradox Staff
1 Badges
Nov 5, 2013
917
1.135
  • Hearts of Iron IV Sign-up
Cheers for reporting this, I'll add this to the internal database and notify the scripters about it.