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

pengoyo

Penguin
71 Badges
Dec 9, 2015
1.560
4.768
  • Crusader Kings III
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines
  • Imperator: Rome Deluxe Edition
  • Magicka 2
  • Cities in Motion 2
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet

Information​

I have verifed my game files (Steam only)​

Yes

I have disabled all mods​

Yes

I am running the latest game update​

Yes

Required​

Summary​

Story Cycle Effect Group Chance Out of 1 instead of 100

Description​

The story cycle's effect group chance is definitely coded assuming it is out of 100 (chance = 5 to chance = 100 can be found in the various story cycle files). Yet, for story cycle's effect group, chance = 1 or higher gives 100% chance of the the effect happening (assuming the trigger is met). A number between 0 and 1 will have a chance of happening or not. Though chance = 0 will always happen.

Note the effect: random = { chance = ... } is not affected by this and is properly out of 100 and doesn't happen if chance = 0.

Steps to reproduce​

I used the code below to test this after finding weird results with the peasant affair story cycle. The decision is just used to launch the test story cycle. If chance = 1 or more (or equal to 0) then the saint trait will always be given out 9-10 days after the decision is taken. If chance = 0.5 then it seems to be given out at a 50% chance every 9-10 days (and 0.1 giving a 10% chance).

Code:
story_test = {
    on_setup = {
    }

    on_end = {
    }

    on_owner_death = {
        end_story = yes
    }
    
    effect_group = {
        days = { 9 10 }
        chance = 1

        triggered_effect = {
            trigger = {
                story_owner = { NOT = { has_trait = saint } }
            }
            effect = {
                story_owner = { add_trait = saint }
            }
        }
    }
}

Code:
custom_effect_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    major = yes

    ai_check_interval = 0

    is_shown = {
        always = yes
    }

    is_valid = {
        always = yes
    }

    cost = {
    }

    effect = {
        create_story = story_test
    }

    ai_potential = {
        always = no
    }

    ai_will_do = {
        base = 0
    }
}

Game Version​

1.9.2.1

Platform​

Windows

Additional Information​

Affected Feature​

  • Gameplay

Save Game​



Other Attachments​



 
  • 1
Reactions:
It means within a story cycle (examples of story cycles include the events related to a murder at court and the events related to getting a cat or dog), if there is a group effect with chance outcome, it will always happen. So for example in the story_peasant_affair (which can trigger after visiting a brothel). There is supposed to be a 5 percent chance of the story ending before it's begun if you like the peasant and are either not married or don't like your spouse (which now that I've read that trigger it seems the opinion values should be flipped; edit: made a bug report). But instead if the trigger is met the story will always end before it has begun. Additionally the story is supposed to have a 50% chance of sending you the opening event every 1.5-2 years after you went to the brothel. But instead it will always send you the opening event after 1.5-2 years. Meaning if the peasant is coming to you with a child, it is always recently born, as they can never wait til their child is older. So for the most part it reduces stories from having more varied outcomes (and I wouldn't be surprised if some outcomes are currently not possible).

Additionally it means events from story cycles fire more rapidly than intended as there is not always supposed to be the next event in the story each time it cycles (e.g. there is supposed to be a chance of a lull in the story with events potentially delayed a cycle). But due to this bug, if the triggers are met, the story progresses as every cycle happens.

Note not all story cycles make use of group effect chance, so this bug does not affect every story cycle.

TL;DR: The bug makes event chains caused by story cycles less variable and fire faster (and potentially blocking certain outcomes from happening)
 
Last edited:
  • 1Like
  • 1
Reactions: