CK III - Berserker 'head ripped off' event has bad code causing it to be up to 33x more likely than intended

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

durbal

Banned
58 Badges
Dec 9, 2015
3.840
10.373
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Imperator: Rome
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Shadowrun: Hong Kong
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Victoria 2
  • Age of Wonders: Planetfall Sign Up
  • Victoria 3 Sign Up
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Tyranny: Archon Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Age of Wonders: Planetfall
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
Short summary of your issue Berserker 'head ripped off' event has bad code causing it to be up to 33x more likely than intended

Game Version 1.2.1

What OS are you playing on?
Windows

What platform are you using?
Windows Store

Do you have mods enabled? No

Have you tried verifying your game files (Steam only)?
No

How much "pain" is this causing you?
6

Please explain the issue you experienced in the most condensed way possible
Berserkers have a bugged event that makes them wipe out whole sides in a combat

Please explain how to reproduce the issue
Play the game and fight with Berserkers with the Stalwart Leader perk

Is there anything else you think could help us identify/replicate the issue?
See code below

Code:
30 = { # Berserkers rip people's heads off
                trigger = {
                    has_trait = berserker
                    scope:combat_side.enemy_side = {
                        any_side_knight = {
                            is_alive = yes
                            this.prowess <= { value = root.prowess multiply = 0.8 }
                        }
                    }
                }
# BEGIN BAD CODE
                # WHAT!!?!?  Instead of a chance of 30 it becomes 1030 (for player) or 330 (for AI) as a base before multipliers if the Berserker has the Stalwart Leader perk!?!?!
                modifier = {
                    add = 1000
                    has_perk = stalwart_leader_perk
                    is_ai = no
                }
                modifier = {
                    add = 300
                    has_perk = stalwart_leader_perk
                    is_ai = yes
                }
# END BAD CODE
                modifier = {
                    factor = 2
                    has_trait = wrathful
                }
                modifier = {
                    factor = 10
                    has_trait = giant
                }
                modifier = {
                    factor = 1.25
                    has_trait_rank = {
                        trait = wounded
                        rank = 1
                    }
                }
                modifier = {
                    factor = 1.25
                    has_trait_rank = {
                        trait = wounded
                        rank = 2
                    }
                }
                modifier = {
                    factor = 1.25
                    has_trait_rank = {
                        trait = wounded
                        rank = 3
                    }
                }
                modifier = {
                    factor = 0.25
                    OR = {
                        has_trait = one_legged
                        has_trait = disfigured
                        has_trait = one_eyed
                        has_trait = maimed
                    }
                }
...

Looks like someone copied and pasted some of the wrong stuff from the code that applied the Stalwart Leader perk 30 or so lines up:

Code:
            2000 = { # Nothing happens
                modifier = {
                    add = 1000
                    has_perk = stalwart_leader_perk
                    is_ai = no
                }
                modifier = {
                    add = 300
                    has_perk = stalwart_leader_perk
                    is_ai = yes
                }

I have attached a save game
No
 
  • 6
Reactions:
Hello durbal,

Thank you for your report! The code you mentioned is actually correct and the distribution of Berserker trait as well as 'heads being ripped off' work as designed. Some modifiers, such as culture, perks or traits, make the situation more likely to happen.
 
  • 4Haha
  • 1
  • 1
Reactions:
Hello durbal,

Thank you for your report! The code you mentioned is actually correct and the distribution of Berserker trait as well as 'heads being ripped off' work as designed. Some modifiers, such as culture, perks or traits, make the situation more likely to happen.

LOL. Can you then fix the Stalwart Leader perk tooltip to include 'Also makes Berserkers 10x more likely to rip off heads'?
 
  • 5Like
  • 1Haha
  • 1
Reactions:
Hello durbal,

Thank you for your report! The code you mentioned is actually correct and the distribution of Berserker trait as well as 'heads being ripped off' work as designed. Some modifiers, such as culture, perks or traits, make the situation more likely to happen.
If we only look at "Nothing happens" and "Berserker":
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 330 weight for Berserker, 2300 weight for nothing. 330/(2300+330) = 12.5% chance.
  • With stalwart and giant: 3300 weight for Berserker, 2300 weight for nothing. 3300/(2300+3300) = 58.9% chance.
  • With wrathful, stalwart and giant: 6600 weight for Berserker, 2300 weight for nothing. 6600/(2300+6600) = 74.1% chance.
For me it seems that the intention of the code was to avoid Stalwart-perk reducing the chance of "rip" happening.

The proposed fix would be changing "add 300" to "factor 1.15". Then the chances would be:
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 34.5 weight for Berserker, 2300 weight for nothing. 34.5/(2300+34.5) = 1.5% chance.
  • With stalwart and giant: 345 weight for Berserker, 2300 weight for nothing. 345/(2300+345) = 13% chance.
Of course having a berserker, wrathful, giant and stalwart knight is quite rare but it can easily ruin the game by killing most of your knights in a single fight.
 
Last edited:
  • 1
  • 1
Reactions:
If we only look at "Nothing happens" and "Berserker":
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 330 weight for Berserker, 2300 weight for nothing. 330/(2300+330) = 12.5% chance.
  • With stalwart and giant: 3300 weight for Berserker, 2300 weight for nothing. 3300/(2300+3300) = 58.9% chance.
  • With wrathful, stalwart and giant: 6600 weight for Berserker, 2300 weight for nothing. 6600/(2300+6600) = 74.1% chance.
For me it seems that the intention of the code was to avoid Stalwart-perk reducing the chance of "rip" happening.

The proposed fix would be changing "add 300" to "factor 1.15". Then the chances would be:
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 34.5 weight for Berserker, 2300 weight for nothing. 34.5/(2300+34.5) = 1.5% chance.
  • With stalwart and giant: 345 weight for Berserker, 2300 weight for nothing. 345/(2300+345) = 13% chance.
Of course having a berserker, wrathful, giant and stalwart knight is quite rare but it can easily ruin the game by killing most of your knights in a single fight.

There's nothing to fix its working as designed /s
 
  • 4Haha
Reactions:
If we only look at "Nothing happens" and "Berserker":
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 330 weight for Berserker, 2300 weight for nothing. 330/(2300+330) = 12.5% chance.
  • With stalwart and giant: 3300 weight for Berserker, 2300 weight for nothing. 3300/(2300+3300) = 58.9% chance.
  • With wrathful, stalwart and giant: 6600 weight for Berserker, 2300 weight for nothing. 6600/(2300+6600) = 74.1% chance.
For me it seems that the intention of the code was to avoid Stalwart-perk reducing the chance of "rip" happening.

The proposed fix would be changing "add 300" to "factor 1.15". Then the chances would be:
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 34.5 weight for Berserker, 2300 weight for nothing. 34.5/(2300+34.5) = 1.5% chance.
  • With stalwart and giant: 345 weight for Berserker, 2300 weight for nothing. 345/(2300+345) = 13% chance.
Of course having a berserker, wrathful, giant and stalwart knight is quite rare but it can easily ruin the game by killing most of your knights in a single fight.

I don't think the intention was for Stalwart Leader to be ignored because it doesn't check if the recipient of the head-ripping has it at all, and instead just applies bonuses if the Berserker has it. It just looks like a bad copy and paste job.

But yeah, I think we can agree that Paradox is trying to claim that this bug is a 'feature'. It's a quick fix that improves gameplay, so please just fix it.
 
  • 2Like
  • 1
Reactions:
I don't think the intention was for Stalwart Leader to be ignored because it doesn't check if the recipient of the head-ripping has it at all, and instead just applies bonuses if the Berserker has it. It just looks like a bad copy and paste job.

But yeah, I think we can agree that Paradox is trying to claim that this bug is a 'feature'. It's a quick fix that improves gameplay, so please just fix it.
I'm talking about that if the code wasn't there then Stalwart would reduce the chance of rip happening from 30/2030 to 30/2330. If the player could be a knight then that would be a significant difference (from 30/2030 to 30/3030).
 
I'm talking about that if the code wasn't there then Stalwart would reduce the chance of rip happening from 30/2030 to 30/2330. If the player could be a knight then that would be a significant difference (from 30/2030 to 30/3030).

Isn't it intended for Stalwart Leader to decrease the chance of death in battle though? It already does that. However, if a Berserker has it, it also increases the chance that he kills people (whether they too have it or not) -- which is not intended according to the description for Stalwart Leader.
 
This still isn't fixed. I'm tearing my hair out losing every single knight in every single battle against the Vikings. I'm recruiting every prisoner, every guest, searching for champions at every opportunity. My counsel is constantly empty. I've lost seven knights in a single battle because of this. My sons are all dead, my court is empty, and I can no longer keep up militarily because of how important knights are.
The code you mentioned is actually correct and the distribution of Berserker trait as well as 'heads being ripped off' work as designed.
You're a joke
 
  • 5Haha
  • 4
Reactions:
Interesting - hadn't seen this before. I'll fix it in my next update, thanks.
 
If we only look at "Nothing happens" and "Berserker":
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 330 weight for Berserker, 2300 weight for nothing. 330/(2300+330) = 12.5% chance.
  • With stalwart and giant: 3300 weight for Berserker, 2300 weight for nothing. 3300/(2300+3300) = 58.9% chance.
  • With wrathful, stalwart and giant: 6600 weight for Berserker, 2300 weight for nothing. 6600/(2300+6600) = 74.1% chance.
For me it seems that the intention of the code was to avoid Stalwart-perk reducing the chance of "rip" happening.

The proposed fix would be changing "add 300" to "factor 1.15". Then the chances would be:
  • By default: 30 weight for Berserker, 2000 weight for nothing. 30/(2000+30) = 1.5% chance.
  • With giant: 300 weight for Berserker, 2000 weight for nothing. 300/(2000+300) = 13% chance.
  • With stalwart: 34.5 weight for Berserker, 2300 weight for nothing. 34.5/(2300+34.5) = 1.5% chance.
  • With stalwart and giant: 345 weight for Berserker, 2300 weight for nothing. 345/(2300+345) = 13% chance.
Of course having a berserker, wrathful, giant and stalwart knight is quite rare but it can easily ruin the game by killing most of your knights in a single fight.
Could you refer me to the file where I can make your suggested edit myself? I'm tired of this "intended feature". Thank you very much.
 
  • 5Like
Reactions:
Does anyone know if this bug still occurs post-Northern Lords or at least if the values were tweaked?
The values seem to have been tweaked as @Karlington posted here:

I checked. 1000/300 have been reduced to 1.5/1.15. :)
 
  • 2
  • 1Like
Reactions: