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

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Okay...I've tracked down the source of the problem now. For those who wish to make a quick fix for it, open your ...\ck\db\Global_Diseases_Events.txt file with Notepad. In the first two events (ID #1069 and 1070) change the mtth value from years = 1000 to years = 16400 and then save the file.

I will have a "better" (scaled by year) fix included in the next beta patch.
 

unmerged(43428)

Recruit
Apr 22, 2005
6
0
Roundoff error?

The plague problem might be caused by trigger check optimizations and the associated roundoff errors for very short and very long MTTH events. The plague events have by far the highest MTTH I have seen, but they are acting like they have a MTTH of months = 36, not years = 1000 :cool:.

If thats the problem then changing the MTTH to a higher number is unlikely to help - you might want to just changed it back to the historic dates until/unless the roundoff problem gets fixed.
 

unmerged(43428)

Recruit
Apr 22, 2005
6
0
Is there something special about how years = 16400 works? Since the plague can only start in one of 4 provinces, and its showing up everywhere pretty quickly, just multiplying the actual mtth by 16.4 isn't going to be enough. I am interested in the more general case of getting very long mtth events to work correctly. If there is any specific analysis/testing needed, I would be interested in helping.

Long time lurker, math PhD, and software engineer :cool:
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
No. You're making the same error I did. It's a type = area not a type = province check so there are actually quite a few more provinces being tested than I had originally calculated for, plus there are two potential plagues that could become active, not just the one. The 16400 value will make at least some improvement but will not go all the way to fixing it (because I made yet another slight slip in my calculations).

The revised version of the events will look like this in the next patch (which I have now tested and verified):

Code:
#################################
# The Bubonic Plague arrives	#
#################################
province_event = {
	id = 1069

	picture = "event_plague"

	trigger = {
		condition = { type = year value = 1100 }		
		condition = {
			type = or
			condition = { type = area value = 693 } 	#Baghdad
			condition = { type = area value = 628 }		#Bukhara
			condition = { type = area value = 796 }		#Fustat
			condition = { type = area value = 646 }		#Isfahan
		}
		condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
		condition = { type = not value = { type = has_province_effect value = { bubonic_plague_immunity = yes } } }
	}

	mean_time_to_happen = {
		years = 2733 #gives significant statistical likelihood of plague showing up within 25 years at base value

		modifier = {
			condition = { type = not value = { type = year value = 1175 } }
			factor = 100
		}
		modifier = {
			condition = { type = year value = 1175 }
			condition = { type = not value = { type = year value = 1250 } }
			factor = 50
		}
		modifier = {
			condition = { type = year value = 1250 }
			condition = { type = not value = { type = year value = 1325 } }
			factor = 25
		}
	}

	action_a = {
		effect = { type = add_province_effect value = bubonic_plague }
	}
}
#################################
# The Pneumonic Plague arrives	#
#################################
province_event = {
	id = 1070

	picture = "event_plague"

	trigger = {
		condition = { type = year value = 1100 }		
		condition = {
			type = or
			condition = { type = area value = 693 } 	#Baghdad
			condition = { type = area value = 628 }		#Bukhara
			condition = { type = area value = 796 }		#Fustat
			condition = { type = area value = 646 }		#Isfahan
		}
		condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
		condition = { type = not value = { type = has_province_effect value = { pneumonic_plague_immunity = yes } } }
	}

	mean_time_to_happen = {
		years = 2733

		modifier = {
			condition = { type = not value = { type = year value = 1175 } }
			factor = 100
		}
		modifier = {
			condition = { type = year value = 1175 }
			condition = { type = not value = { type = year value = 1250 } }
			factor = 50
		}
		modifier = {
			condition = { type = year value = 1250 }
			condition = { type = not value = { type = year value = 1325 } }
			factor = 25
		}
	}

	action_a = {
		effect = { type = add_province_effect value = pneumonic_plague }
	}
}
 

unmerged(43428)

Recruit
Apr 22, 2005
6
0
Ah, excellent. I will try the full version in my next game as Georgia when I get home from work. It was pretty tough going when all my provinces had either bubonic or pneumonic plague and half had both before any recovered :cool:.

Thanks for your prompt and informative answers. I know of many a company whose expensive service contracts provide far worse support then you folks do :cool:.