Information
I have verifed my game files (Steam only)
YesI have disabled all mods
YesI am running the latest game update
YesRequired
Summary
Story Cycle Effect Group Chance Out of 1 instead of 100Description
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.1Platform
WindowsAdditional Information
Affected Feature
- Gameplay
Save Game
Other Attachments
- 1