Crusader Kings III

Crusader Kings III

Random Date Black Death & Pandemic Explosion Mechanic
140 Comments
mateuszn2007 17 Dec, 2024 @ 1:16pm 
You want free black death. Turn on debug mode and invoke it yourself Chcesz za darmo czarną śmierć. Włącz tryb debugowania i sam ja wywołaj
cuomo860 6 Apr, 2024 @ 5:09pm 
No. It’s defunct
sperlilreps82 6 Apr, 2024 @ 12:01pm 
does this work with the "no more plagues" mod?
alegdansk 9 Feb, 2024 @ 5:53am 
Does it work with saved games?
Thank you Morven for all your genial mods ❤️😉
cuomo860 8 Feb, 2024 @ 7:39am 
Without going into the programming detail, as determined by a certain date, the black death will spread from the the plains of Asia through through counties. In short it a yearly on_action limited by dates and then becomes an illness which is spread by health_events.

This mod changes the on on_action to adjust the date range and also changes some of those health_events. This mod also adds some map functions and steward/physician effects.

Ironically. it looks like this mod will be moot come March 4th as it looks as though much of Morven's mod will be implemented into the Vanilla game.
mateuszn2007 8 Feb, 2024 @ 5:30am 
Could someone please explain what causes the plague in CK3?
Moh1471 4 Jan, 2024 @ 1:07pm 
is it still working?
cuomo860 16 Oct, 2023 @ 9:24pm 
Yes it still works. None of the files this mod touches were changed by PDX's updates.
DJ Pierce 16 Oct, 2023 @ 8:12pm 
Can anybody confirm if this mod still works with the latest update?
automatiik 29 Sep, 2023 @ 1:07am 
miss you morven, hope you'll be back one day, if at all.
Robert Habeck 8 Jun, 2023 @ 4:49am 
looks like its not updated right now?
I think its still working
spacemarx 30 May, 2023 @ 5:46pm 
Looking forward to it, Morven! Kudos for your excellent mods.
Morven  [author] 18 May, 2023 @ 12:11pm 
I'll be back to update all the mods next week. If they've changed health_events.txt there may be a compatibility issue.
Robert Habeck 12 May, 2023 @ 5:11am 
any problems with the new update?
Morven  [author] 22 Mar, 2023 @ 10:53am 
Neighbouring courts can spread it too. There's a random chance to get picked by a plague spreader from a list of neighbouring court's courtiers, but I guess if the list is only one and the dice keep getting rolled he'll get picked. I see if I can add in a minimum court size for the mechanisms to prevent that.
Killcrazy 22 Mar, 2023 @ 5:33am 
I don't actually have any members of court left. The cycle restarts every time a new chaplain spawns in so there's no real social relationship driving the spread. I'll write it off as a world ending plague.
Morven  [author] 22 Mar, 2023 @ 4:04am 
The secret way to escape those character-to-character spread mechanisms in both vanilla and the mod is to have the character have the "has_good_disease_treatment_trigger" which they get from having a court physician applying treatment with any successful outcome (high or low, risky or safe). The other secret is the "wash_your_hands_perk" dynasty perk with applies a massive chance reduction of spread.

Maybe the other mods are changing that "has_good_disease_treatment_trigger" to make it harder to receive? Not sure.

Are you using my doctor mod to make sure as many AI courts have physicians as possible?
https://cs2bus.com/sharedfiles/filedetails/?id=2432176898
Morven  [author] 22 Mar, 2023 @ 3:13am 
I include some mechanisms in this mod to make plague spread more amongst friends, lovers, and other relations, and amongst neighbouring courts between their courtiers, extending the vanilla same-court spread mechanisms. Could be that combining with the other mods effects to overbake things.
Killcrazy 22 Mar, 2023 @ 1:54am 
Thanks for the efforts @Morven. Your adjustments have stopped the renewal of the county modifier.

Unfortunately that doesn't stop my courtiers from contracting the plague so will write this campaign off as a loss. While I can't pinpoint the issue, the most likely cause is Sinews of War. I've used Higher Mortality Mod with yours before and it hasn't been an issue, and SoW does have its own disease mechanics that seems to be causing the plague death spiral.
Morven  [author] 21 Mar, 2023 @ 3:47pm 
v2.4
Black Death county modifiers will now only apply during mass outbreaks: the first Black Death wave and the regional epidemics that reoccur every ~50 years, not everytime someone contracts the plague through vanilla or another mods mechanisms. Should prevent the county modifier from overtriggering.

@Killcrazy
Try now, the county modifier should stop being applied by this mod now except during mass outbreaks.
Morven  [author] 21 Mar, 2023 @ 2:43pm 
The other mods may be causing more characters to regularly contract the plague, and each time someone contracts the plague it's triggering the county modifier of this mod, which all in all is overkill.

What I could do is rewrite the county modifier so that it only occurs during the big Black Death waves and the regional waves that reoccur every ~50 years, not each and every time vanilla or another mod gives someone the plague, that way the county modifiers only trigger during a mass outbreak. It's supposed to represent all the ordinary non-court people that the game doesn't directly simulate also contracting the plague, it should only really be if there during a mass outbreak.
Killcrazy 21 Mar, 2023 @ 6:20am 
Thank you. Your advice worked and it removed the modifier but just had it come back again after a month. Think this campaign is doomed.
Morven  [author] 21 Mar, 2023 @ 4:30am 
Actually taking my own advice and reading the console wiki you may be able to write a script effect if you prefer.

You could try (haven't tested)
effect = { every_county = { limit = { has_county_modifier = black_death_county_modifier } remove_county_modifier = black_death_county_modifier } }

If the console doesn't accept limits/triggers you could try
effect = { every_county = { remove_county_modifier = black_death_county_modifier } }
Morven  [author] 21 Mar, 2023 @ 4:24am 
@Killcrazy
From the console run
event black_death_explosion.8001

That will remove all my county modifiers from every county in the game, and can be run as often as you like. You'll know it fired correctly, and that Steam has updated the mod, if the console returns the line:
Fired event black_death_explosion.8001

Let me know if it was my modifier. A potential problem is the name of the modifier is a little generic, "black_death_county_modifier", it could be that other mods have settled on the same modifier key name.
Morven  [author] 21 Mar, 2023 @ 4:20am 
v2.3
Added event to remove the Bubonic Plague county modifier from every county in the game should you need to.
From the console type:
event black_death_explosion.8001

If done correctly the console will return a line:
Fired event black_death_explosion.8001

To learn how to use the console see:
https://ck3.paradoxwikis.com/Console_commands
Morven  [author] 21 Mar, 2023 @ 4:14am 
I think in the console you'd have to go county ID by county ID and remove_county_modifier from each and every one lol. Hold on I'll update the mod with an event you can fire to do it.
Killcrazy 21 Mar, 2023 @ 12:37am 
Or would removing the mod remove the script/modifier?
Killcrazy 21 Mar, 2023 @ 12:34am 
It's probably a confluence of factors as I run Higher Mortality Mod and SoW which is probably making it difficult for the world to get over the plague - multiple dynasties have been wiped out and the world is pretty much depopulated with no way for the plague to go away.

I've used your mod before with DTR and there, it was deadly but worked as you intended with waves every 50-60 years. Think it's an issue with SoW.

Is there any console command to turn off the script of this mod?
Morven  [author] 21 Mar, 2023 @ 12:14am 
And it is intended to renew each time someone in the province gets the plague, the 90 day end point is to more represent "90 days since last transmission". I also add in mini regional outbreaks to reoccur every 30 to 60 years (or so) after the first big Black Death that seed characters within a region, but don't spread outside of the region unlike the first big Black Death. You may be experiencing some of those episodes rather than vanilla triggered mechanisms.

But let me know.
Morven  [author] 21 Mar, 2023 @ 12:09am 
Yeah once the Black Death is activated then plague can spread through normal vanilla mechanisms, and the modifier will apply to a county whenever someone contracts the plague through any mechanism (for 90 days to represent a provincial outbreak). Are you finding that too much?
Killcrazy 21 Mar, 2023 @ 12:02am 
I'll need to check when I get home but it sounds like your modifier, especially if it gives a -2.0 control debuff. I remember it having a short duration but constantly renewing itself upon expiry
Morven  [author] 20 Mar, 2023 @ 11:54pm 
It shouldn't, nothing to do with the county modifier was changed and the only way my county modifier is applied is with a 90 duration (line 223 in \common\scripted_effects\zz_random_black_death_scripted_effects.txt):
add_county_modifier = {
modifier = black_death_county_modifier
days = 90
}

Does Sinews of War do its own disease modding? I have a vague memory it might from the last time I looked at it. My county modifier's loc (as opposed to whatever Sinews of War or another mod may do) is called "Bubonic Plague" and has the tooltip description "The Black Death lays waste to this province."

Let me know if it is my modifier or a Sinews of War one, you may well still be right, I can load up a test campaign a bit later and see if it behaves how it ought to.
Killcrazy 20 Mar, 2023 @ 11:34pm 
Hi Morven, Thanks for this mod. Would your update on 13th March break save games? I was playing a campaign started pre-update and just had the Black Death event trigger and I simultaneously had a global outbreak of the plague and it's 20 years with the modifier never going away in any province. I think the only major mod I run that might conflict is Sinews of War.
Morven  [author] 13 Mar, 2023 @ 3:24pm 
Nw, thanks for letting me know.
Boromir007 13 Mar, 2023 @ 9:33am 
@Morven
it works now!
Thank you !!
Morven  [author] 12 Mar, 2023 @ 5:10pm 
v2.2
Bugfix.

@ps5udo
Try now, should be fixed.
Boromir007 12 Mar, 2023 @ 10:31am 
The plague has stopped spreading and no notifications are coming
Boromir007 12 Mar, 2023 @ 6:55am 
crashes every time. Unleash the plague on command. Tested it with and without mods, it crashes every time.. do you know a solution morven?
Morven  [author] 19 Feb, 2023 @ 6:23pm 
@Prettycraziii
No it won't work. The date mechanism is based around the current year having 1390 (or 1376 for historical window, & 1066 in an early plague) as a near-end date, if the mod changes its end dating it will be off balanced. After 1390 black death will auto-trigger, dates before 1390 will have an even pro-rata chance each year to trigger derived from how many years until 1390 (or 1376/1066 for the other options) the current year is.

Also the pandemic explosion mechanic won't work with map mods that remove/change geographical region keys, the explosion mechanic works by region to region plague seeding to neighbouring regions from:
\map_data\geographical_regions\geographical_region.txt
Morven  [author] 19 Feb, 2023 @ 6:22am 
v2.1
Tweaked the on_action triggers to be less resource intensive.
Morven  [author] 17 Feb, 2023 @ 9:06pm 
v2.0
Triggering mechanism rewritten, should prove much more reliable.

German loc added thanks to ps5udo.

Updated for v1.8.*.
Morven  [author] 17 Feb, 2023 @ 12:47pm 
@radwilly1
I'll look into rewriting the triggering mechanism.
luis3007 22 Dec, 2022 @ 11:50am 
Does it work with 1.8.x?
Prettycraziii 6 Nov, 2022 @ 5:20pm 
does it work with Realm of Exile
radwilly1 23 Sep, 2022 @ 9:18pm 
Hey, Idk if this is a bug on my end from conflicting mods, but I have played the game with this mod on random date and NEVER gotten a black death notification. Random chance?
Morven  [author] 9 Sep, 2022 @ 6:15pm 
v1.12
Update for v1.7. Couple of vanilla changes incorporated into the mod.
Morven  [author] 3 Sep, 2022 @ 4:27am 
It's only two mouse clicks m8, three if you count opening the decisions menu. The decisions disappear after you choose an option.
Gravifer 3 Sep, 2022 @ 4:09am 
Is it possible to put the initialization into More Game Rules rather than spamming decisions (only when the latter is installed of course)?
Royal Raven 26 Aug, 2022 @ 5:00pm 
I think you recommended me this mod once, someone updated it, Improved Fertility and Mortality:
https://cs2bus.com/sharedfiles/filedetails/?id=2854324846
Morven  [author] 18 Aug, 2022 @ 11:32pm 
v1.11
Map Black Death task restored and working again. Fix to Historic Black Death option. Plague county effect expanded.