Pathfinder: Kingmaker

Pathfinder: Kingmaker

View Stats:
Msalgado Sep 30, 2018 @ 4:45pm
About Dice Rolls - are they really totally random?
Just a simple question:
Are the dices TOTALLY random, no matter the Diff. level, or are they being changed by some unseen factor?

I searched but found no info on this.
Have any devs mentioned anything about this?

I really hope that they are totally random, but I got the felling that when I changed to easy or story mode I began seeing a lot more 4s... 7s.. from enemies.
BUT it may be totally a wrong impression.
So, anyone read anything to confirm they are NOT being changed by anything?
Originally posted by Marksteele:
Taking a brief look through the code it looks like they use the following for dice rolls

private static int D(int rolls, DiceType dice) { int num = 0; while (rolls-- > 0) { int num3 = Random.Range(1, dice.Sides() + 1); num += num3; } return num; }

So ya, no difficulty modifiers or anything effecting randomness unless its buried deeper in that specific event (all this shows is there's no "difficulty" modifer that effects every roll). Do note however; there are some "predetermined" dicerolls in the code that seem to trigger for specific events and there is also code to override a diceroll. They also have a die for 2, 3, 4, 6, 8, 10, 12 and 20 that could be used in various triggers (hence the dice.Sides() call)

Edit: for thsoe who live to dig like I do, this is located in the kingmaker.rulesystem namespace and is part of the rulebookEvent class
< >
Showing 1-15 of 26 comments
Ventus Sep 30, 2018 @ 5:02pm 
There is no such thing as random for a computer program. Its all based on an alglothrim and an input. The better the algorithm, the more "random" things feel. Owlcat has not made public or stated anything specifically about the d20 RNG method in the context you mentioned.

Also, there is no way to validate what your asking/suggesting due to its very nature:
-If the d20 rolls are being weighted, there is no way to know other than the observation that "in 100 rolls, I only got 1-11 and never 12-20s"
-If the d20 rolls are NOT being weighted, its still possible to observe that "in 100 rolls, I only got 1-11 and never a 12-20 result"

Since the same outcome is possible in both senarios, more than the observation itself is needed (and we don't have more to go on).

Wish I had better news for you. I too feel like I see way way way too many 4s (more than anything else) but that could be perception bias too.
Last edited by Ventus; Sep 30, 2018 @ 5:05pm
Morgian Sep 30, 2018 @ 5:05pm 
As far as I can see (I am level 9 now), rolls are pretty much random.

When checking against the bestiary (Pathfinder), you get pretty much what to expect. Many monsters were obviously advanced, but that is common in adventure modules, and the place where the DMs have their fun.
BeelzeBob Sep 30, 2018 @ 5:30pm 
The question to ask yourself is why would they weigh the rolls, especially towards 4 and 7. Algorithims for d20 dice rollers are well-developed and common, and they are already screwing players on higher difficulties with crazy modifers and DC's. This is most likely just coming from the part of your brain that comes up with conspiracy theories due to oddities of observation. Don't worry, we all have it to one degree or another.
TinyHowie Sep 30, 2018 @ 5:39pm 
Originally posted by AtheosisX:
The question to ask yourself is why would they weigh the rolls, especially towards 4 and 7.
It's a old game design concept back in the Infinity Engine days that developers would tweak the RNG to make games more difficult. Whether or not it's applied in this game, I cannot tell. Things are quite hectic no matter which difficulty level I'm playing atm.
Msalgado Sep 30, 2018 @ 6:18pm 
Thanks for the feedback, It seems there is no official stance on this.
Perception Bias is indeed commom, I am not making any statement that rolls are really being changed.
So, if anyone hears about this, please, let us all know :)
Msalgado Sep 30, 2018 @ 8:49pm 
Ok, I'm beginning to believe that dice rolls are not fully random.

I probably have disarmed like 20 or 30 traps in my game.

When they blow up on my face the mouse over claim I got a 1 on the dice.

Buuuuuut I have traps triggering like...4 ... 6 times in one hour of playing the game.
IF i dismantled 10 traps I MAYBE should have seen 1 critical failure (1 dice roll).... not 4 or 5.

Questions..

DO traps trigger with other dice rolls than 1?

Why am I being so strict with this?

I think in a d20 game, the "d20" roll should be the one thing that is fixed.

If the algorithm is in someway changed we should be warned by the Devs.

just my thoughts here, few free to add and disagree, but please, be polite.
Meepichi Sep 30, 2018 @ 9:03pm 
I'm sure they're random but man does my luck suuuck! I've had tons of sub 7 rolls, especially on skill checks, so VERY annoying, but that's RNG for yah... I can't remember the last time I cursed so much at a game.
Mijj Oct 7, 2018 @ 1:24pm 
Originally posted by msalgado:
Ok, I'm beginning to believe that dice rolls are not fully random.

I probably have disarmed like 20 or 30 traps in my game.

When they blow up on my face the mouse over claim I got a 1 on the dice.

Buuuuuut I have traps triggering like...4 ... 6 times in one hour of playing the game.
IF i dismantled 10 traps I MAYBE should have seen 1 critical failure (1 dice roll).... not 4 or 5.

Questions..

DO traps trigger with other dice rolls than 1?

Why am I being so strict with this?

I think in a d20 game, the "d20" roll should be the one thing that is fixed.

If the algorithm is in someway changed we should be warned by the Devs.

just my thoughts here, few free to add and disagree, but please, be polite.

I came to see the posts on the forum, mainly for the dice rolls on the traps. I too play as a rogue and often trigger the trap because of a "1" dice roll. I even got two "1" in a row for two traps... I'm sure there's a problem with the rolls, I even wondered if it was really a D20 and not D10 because I rarely get a roll above 10.
Damedius Oct 7, 2018 @ 1:28pm 
Anybody who has played online poker for any period of time knows that are RnG aren't random.

It's predetermined by the Algorithim that generates the numbers. That means every number is determined as soon as the algorithim is seeded.

It's why you get things that are statistically almost impossible happen as regular occurences with RnG's.
Loading from different points to open a door
ALWAYS rolling 4
SIlverblade-T-E Oct 7, 2018 @ 3:35pm 
Temple of Elemental Evil DID have a badly biased (against the player) Random, this was proven

usually for a computer one way for getting a random seed to start with, is from the clock
however, this doesn't mean it's truly "random"
this is why in some games, say you Fireball a bunch of enemies....and they ALL save or do NOT save at the same time, as it's all based off the one clock or other input, instead of using micro seconds and more randomness

to get true randoms, some honest gambling systems use the decay of low level radioactives to generate a truly unbiased event (seriously)
The author of this thread has indicated that this post answers the original topic.
Marksteele Oct 7, 2018 @ 9:40pm 
Taking a brief look through the code it looks like they use the following for dice rolls

private static int D(int rolls, DiceType dice) { int num = 0; while (rolls-- > 0) { int num3 = Random.Range(1, dice.Sides() + 1); num += num3; } return num; }

So ya, no difficulty modifiers or anything effecting randomness unless its buried deeper in that specific event (all this shows is there's no "difficulty" modifer that effects every roll). Do note however; there are some "predetermined" dicerolls in the code that seem to trigger for specific events and there is also code to override a diceroll. They also have a die for 2, 3, 4, 6, 8, 10, 12 and 20 that could be used in various triggers (hence the dice.Sides() call)

Edit: for thsoe who live to dig like I do, this is located in the kingmaker.rulesystem namespace and is part of the rulebookEvent class
Last edited by Marksteele; Oct 7, 2018 @ 9:50pm
GreyFox Oct 7, 2018 @ 10:25pm 
Originally posted by Marksteele:
Taking a brief look through the code it looks like they use the following for dice rolls

private static int D(int rolls, DiceType dice) { int num = 0; while (rolls-- > 0) { int num3 = Random.Range(1, dice.Sides() + 1); num += num3; } return num; }

So ya, no difficulty modifiers or anything effecting randomness unless its buried deeper in that specific event (all this shows is there's no "difficulty" modifer that effects every roll). Do note however; there are some "predetermined" dicerolls in the code that seem to trigger for specific events and there is also code to override a diceroll. They also have a die for 2, 3, 4, 6, 8, 10, 12 and 20 that could be used in various triggers (hence the dice.Sides() call)

Edit: for thsoe who live to dig like I do, this is located in the kingmaker.rulesystem namespace and is part of the rulebookEvent class


Yea that's correct and everyone knows Random.Range is pseudo random like most RNG. No reason for TRNG or crypto random for some dice rolling that doesn't involve money.

Can test with 4 RNGs

public class Test : TestRandom{


int[] result = new int[5];
int total = 0;

// Initialization
void Start () {
while (total != 1000) {
int[] ints = new int[4];
int[] control = new int[10];
string output = "";
for (int i = 0; i < 4; i++) {
ints = Random.Range (0, 10);
control [ints [i]] += 1;
output += ints + "-";
}
for (int i = 0; i < 10; i++) {
result [control [i]]++;
}
total++;
Debug.Log (output);
}
for (int i = 1; i < 5; i++) {
Debug.Log ((i) + " Time(s): " + result );
}
}

// Update is called once per frame
void Update () {

}
}

Expected Probabilities:

Prob all 4 are the same = (10/10 )* (1/10)^3 = 1/1000

Prob 3 are the same = 4 * (10/10) * (1/10) * (1/10) * (9/10) = 36/1000

Prob of 2 pairs = ((4*3) / 2) * [((10/10) * (1/10) * (9/10) * (1/10)) / 2] = 27/1000

Prob of 1 pair + 2 others (different) = ((4*3) / 2) * ((10/10) * (1/10) * (9/10) * (8/10)) = 432/1000

Prob all different = (10/10) * (9/10) * (8/10) * (7/10) = 504/1000

It checks out and your actual values will be close to what the probabilities are.

It does seem funny to me at times in game but w/e.
Last edited by GreyFox; Oct 7, 2018 @ 10:30pm
SertanDoom Oct 7, 2018 @ 10:54pm 
Originally posted by Marksteele:
Taking a brief look through the code it looks like they use the following for dice rolls

private static int D(int rolls, DiceType dice) { int num = 0; while (rolls-- > 0) { int num3 = Random.Range(1, dice.Sides() + 1); num += num3; } return num; }

So ya, no difficulty modifiers or anything effecting randomness unless its buried deeper in that specific event (all this shows is there's no "difficulty" modifer that effects every roll). Do note however; there are some "predetermined" dicerolls in the code that seem to trigger for specific events and there is also code to override a diceroll. They also have a die for 2, 3, 4, 6, 8, 10, 12 and 20 that could be used in various triggers (hence the dice.Sides() call)

Edit: for thsoe who live to dig like I do, this is located in the kingmaker.rulesystem namespace and is part of the rulebookEvent class


explains much of what I see on dice rolls in game, thanks.
Originally posted by Mijj:
Originally posted by msalgado:
Ok, I'm beginning to believe that dice rolls are not fully random.

I probably have disarmed like 20 or 30 traps in my game.

When they blow up on my face the mouse over claim I got a 1 on the dice.

Buuuuuut I have traps triggering like...4 ... 6 times in one hour of playing the game.
IF i dismantled 10 traps I MAYBE should have seen 1 critical failure (1 dice roll).... not 4 or 5.

Questions..

DO traps trigger with other dice rolls than 1?

Why am I being so strict with this?

I think in a d20 game, the "d20" roll should be the one thing that is fixed.

If the algorithm is in someway changed we should be warned by the Devs.

just my thoughts here, few free to add and disagree, but please, be polite.

I came to see the posts on the forum, mainly for the dice rolls on the traps. I too play as a rogue and often trigger the trap because of a "1" dice roll. I even got two "1" in a row for two traps... I'm sure there's a problem with the rolls, I even wondered if it was really a D20 and not D10 because I rarely get a roll above 10.
Two ones in a row is entirely plausible - it's happened a few times in Critical Role where they're using actual dice. Like one time when Vax was sneaking back to his room so that he and Keyleth didn't tip off the rest of the party that they were together - Liam and Marisha both agreed during a break in the stream that Vax should sneak back because his stealth modifier was so stupidly high that he had a very slim chance of failure and, even if he did fail, he had a feat that would let him re-roll it.

Cue a natural 1 on the stealth check and on the subsequent re-roll.

Every action that has a crit failure chance (which isn't much in Pathfinder but traps certainly count) there's always that 1-in-20 chance of a natural 1. Your consistent success on other traps could be a combination of their low DC and the disarming character having a high Trickery modifier. Natural 1s for trap disarming will still trigger the trap even if the 1 plus the modifier would've been enough to disarm the trap.
< >
Showing 1-15 of 26 comments
Per page: 1530 50

Date Posted: Sep 30, 2018 @ 4:45pm
Posts: 26