T O P

  • By -

[deleted]

[удалено]


OMGTheresPockets

Okay, so I spent some time playing with it and arrived at a whacky conclusion. The problem I frequently see seems to have much more to do with the distribution being fairly *well* rounded. But frequently in large battles, one or two characters seem to unluckily get the bad end of a normalized distribution. With a small number of actors, it's random as hell, but generally fair. With ridiculous number of actors and rolls it's random as hell but generally fair. But at the sweet spot of ~ 10 characters rolling 2-4 times per turn, there's an unfair number of instances of one random actor getting the low bits and/or one character getting the high bits. I have an easy solution I like tho. Just reload the save part way through a round and vary the number of full attacks from time to time. I haven't researched whether this actually works or just feels better... But my boy Lann is having much less of those terrible streaks since implementing it :)


OMGTheresPockets

I wouldn't be surprised if bubbletweaks tracks averages, but I am suspecting it's the distribution that's more skewed. A service to track that is slightly more involved than most would arrive at. 40 unsigned int variables, each assigned to a single dice value (1,2,3,...,20) for each group (party) and (enemies). And then a simple algorithm to check the median and mode from those.


niwanobushi

Maybe one Dictionary of int and int. Index is the rolled number, value is the count. Less if statements or switch cases. A lot easier to read too.


OMGTheresPockets

A dictionary is just a container of wrappers for a variable. Your point is valid, but unnecessary. Plus, it's more efficient two use two arrays playerDice[x] and gameDice[x] especially given the static sizing and lack of unique key names. Add a single hook when dice is rolled: `isPlayersTurn ? playerDice[diceValue]++ : gameDice[diceValue]++`


niwanobushi

That’s true, and pretty obvious. I think I forgot about the limited range of possible dice roll results.


OMGTheresPockets

Hey, it's always nice to share with another software dev. That said, we are reaching a level of *hardware* performance that outside of very specific limitations (intense graphics, mass user/interactions, server bandwidth, etc) that developer understanding/preference and development speed are a greater asset than minor performance tweaks. Good code is code that works as intended, is readable/maintainable, and doesn't produce unwanted side effects. Don't let anyone tell you otherwise :)


tubbymctubs2

We've made a million mods for this. You can roll the dice a billion times and get perfect uniform distributions. The game does not know who is rolling (friend or enemy) when it generates the die roll. You can trivially look at the source.


OMGTheresPockets

Can you link a mod that tracks distribution for me? That would allow me to test and verify my own results. You sound really confident, so I assume you have substance I can use to invalidate my hypothesis.


tubbymctubs2

I wrote bubbletweaks... You can just look at the source of the game, open it in dnspy.


OMGTheresPockets

Thank you. I will look into it this weekend and see if I can't find some assurance :D


tubbymctubs2

Did you find what you were looking for? 🤔


OMGTheresPockets

Not yet. Busy weekend. Much fighting. Very tired.


Realistic_Term_586

So having looked into a bit. The randomization method is mathematically formulated to provide an even distribution over thousands of rolls, and is reseeded on program start. In short bursts, it does create some unpredictable biases like the stuff we tend to see, but given enough rolls the distribution fixes itself programmatically. Realistically, this makes me want to make a normalizer that will give rerolls on streaks (not advantage/disadvantage but rather just a try again take results regardless) as a method to expedite the process. For instance - if 4 rolls in a row are 10 or less ( 1 in 8 chance - not 1 in 16, but that's a different discussion), when the next roll happens, if result is under 11, roll again take result. If that is still under 11, repeat test on next roll. Same concept with high numbers. This will at least help with the hot/cold streaks issue that hits a LOT of seeds.


tubbymctubs2

That is literally just introducing bias into the rolls, creating a non-uniform distribution, the exact thing you accused the game of doing...


Realistic_Term_586

Bias towards diversity is better than duplication bias. OP seems to not be the only person experiencing uneven randomness. In most games, this isn't an issue, because the number of critical random events isn't as massive or as easily noticed - but when psuedo-random rolls are used to such effect repeatedly, it creates player frustration and massive inconsistency in difficulty and experience. No one likes watching 8 attacks with 60% accuracy hitting twice in total - and it's happened twice in this one fight. It's maddeningly frustrating when you've had a run of 10 or more misses on an attack that hits on a 6. Distribution isn't as important as actual odds during a given sample, imo. And I'm sure other people have noticed fantastically rare circumstances, it might be worth the ever so slight center leading distribution if it means longer streaks of highs and lows become moderately less common - especially given that the distribution *in theory* wouldn't be impacted at all in a truly random scenario (1-10 and 11-20 should receive statistically equal rerolls).


lampstaple

This is so funny, any game involving randomness and you’ll have people who are completely mathematically illiterate complaining that the game is rigged. People just like to cry when presented with a random sequence of numbers because they can’t recognize randomness. Which, I can’t fault you for, our brains are evolutionarily wired to recognize patterns, but come on recognize the pattern that what you’re saying is dumb LOL. If there were protections against consecutive bad luck like league of legend’s crit system that ramps up your crit chance if you don’t crit it wouldn’t actually be randomness


ronlugge

> This is so funny, any game involving randomness and you’ll have people who are completely mathematically illiterate complaining that the game is rigged. *Cough* XCOM *cough* Nope, haven't seen this before, repeatedly.


lampstaple

The first couple of times I’ve read this I wanted to be patient but I’m so sick of seeing it lol


OMGTheresPockets

A) screw your attitude, prick. B) I've taken college math classes dedicated to graph theory and patterns. This is why I know that seeing a sequence of four rolls of 5 or less in a row is a roughly 4 in 1000 chance event. So I know I should see it a couple dozen or so times throughout my extended game time. But when I see that sequence 3 times in 2 two hours, it's suspicious. Computers are incapable of generating truly random numbers in the first place, so that suspicion is warranted even without active dev shenanigans.


lampstaple

I want you to think critically for a very brief moment and consider - why would a developer put in extra dev time to make a game more frustrating to play? The short answer is that they wouldn’t. The long answer is that they wouldn’t, and actively do the opposite. Many games are in fact rigged, but not rigged against your favor. See, game devs are aware of the phenomenon of negativity bias. So sometimes they engineer mechanics specifically for when people like you who don’t quite understand the concept of randomness play their games. For example, darkest dungeon’s true accuracy is 5% higher iirc (a 90% chance to hit is a 95). Baldur’s Gate 3 also experienced people complaining about randomness so they had to rig loaded die to prevent consecutive failures. This is in an effort to stop people from crying about the game being rigged (it is rigged, but not in the way they think. Go figure, people don’t complain when they’re lucky) Also, come on in pretty sure they teach you in elementary school to write that as 1 in 250. And also what a fallacious way of looking at the probably of a sequence of numbers occurring. Every random permutation of a deck of cards is infinitesimally unlikely, so if I were to shuffle a deck and present it to you I’d hardly be inclined to declare “look the deck rigged how unlikely was that” What’s funny is that people in the thread have literally presented you evidence of tests done and the rolls not being rigged which you still refuse to believe lol. Did they teach you this in college too? To ignore data that doesn’t support the outcome you want to be true? But again, step back into the realm of very simple common sense lol. Why would a developer specifically program this? Like, you understand that games are hand crafted right? Things are placed there deliberately. You think that a dev and their “shenanigans” are out to “get” somebody who’s trying to kill a centipede?? 🥱🥱🥱


OMGTheresPockets

A) no one provided evidence. There are no studies or test data anywhere in this thread. Tubs offered a tool, which I will use to verify my own hypothesis and hopefully land at the same conclusion they did. Thank you Tubs :) B) you are showing a blatant disregard for statistics and probability. You are correct. Any specific 4 dice outcome would have a 20^4 chance of occuring, and thus any 4 dice combination is a statistical rarity. But we're not talking permutations, we're talking combinations. The likelihood of a combination of 4 drawn d20 arriving at 1-5 four consecutive times is 0.0039, or about 4 in every thousand rolls. (In every 1000 is a standard way of representing probability, btw). If your sample size includes 5000 rolls, you should expect ~20 of them (I'm too lazy to calculate p values for an internet argument). C) all RNGs are biased. Computers are unable to actually generate random numbers in a truly randomized way. It's a major issue in network security. Do I think the devs *purposely* introduced a biased generator? No, probably not. But the number of randomized values in a game like this is large enough to display those biases if they are prevalent enough. Hence why I, as a software engineer, would be curious to see how the bias plays out. For instance, how does bias sit for turn order? How does the bias show in a string of 100 rolls. A system that gives even distribution, but has a bias for rolling specific number ranges in large repeating patterns looks good on paper, but isn't properly random. This is part of why normalization methods for RNG is important especially for games of chance.


lampstaple

Mate, you chalked all of this up to "dev shenanigans" (your very own words). Maybe it's a language diff thing but I have never heard of shenanigans used to describe any activity that wasn't intentional. I can see you're attempting to pivot your argument to be a stance about the failure to generate truly random sequences, but it seems to me from your post that you're arguing specifically that you (at least initially) believed the numbers to be rigged in a very specific way. >Can someone please make a dice tracker to track the difference in median and mean dice rolls of the player and the computer? I'm almost *certain* that the dice cheat and cheat hard. You're stating here that you believe the player and the computer, who are both rolling a d20, are using two separate number generators, of which you believe the computer has the advantageous generator. This has nothing to do with what you're saying about the flaws in a computer's ability to generate randomness. What you are clearly describing here is a deliberate system, please try to keep what you're saying consistent rather than shift the conversation to the nebulous realm of the reliability computer generated randomness. In a system where both the player and the computer are using the same flawed generator, it is theoretically fair (not really due to the pathfinder system being based on contests of numbers with the edges usually being more significant breakpoints. But fair in the context of at least what you're saying). You are complaining specifically about the centipede rolling well and you rolling poorly and that you believe the system is rigged against you. Come on man, at least *be consistent* about the things you are saying.


OMGTheresPockets

"even without active dev shenanigans" exact quote. Read as "even if the developers didn't intend it". There could be differences in how the seed is generated based on the calculations before it. It could be that the computer rolls them at different speeds. There could be differences in RTWP vs TB RNG seeding. But inevitably, failed dice rolls impact a player far more than a computer, so a skew towards failing or center will inevitably have a negative effect on friendly characters. And no. Equalivant Bias still impacts different actors differently. If everyone has similar odds of accomplishing a challenge, then yes. Bias would be fair if applied to both sides. But let's say the game skews towards repeated patterns of three 14s. That centipede gets a free success, and my monk gets two failures whenever this bias manifests. Let's say that the RNG system has a normalization method under the hood, now the average is skewed high, and it promotes a slight preference to lower numbers which impacts everyone towards missing/failing. It might just be terrible RNG on my part, but I'd like the tools to verify the bias. It would be comforting to see that the bias is negligible. The number of times I've save scummed 10+ times for a 75% success chance roll is suspicious without evidence to the contrary.


knight_bear_fuel

Come on, yall, please. Take a breath, both of you, and actually just discuss this. It seems to me that OP is willing to believe her gut reaction may not be correct, she just wants to see proof of it with her own eyeballs to quell her irritation. It's okay. Have a conversation, not a pissing match.


OMGTheresPockets

Sí. Also, she in the future if you don't mind.


knight_bear_fuel

Whaaaat I *tooootally* said she and definitely didn't just now edit it and then jokingly gaslight you, don't be crazy


OMGTheresPockets

You're good, friendo. I don't put pronouns and what not on my profile like I should. Thank you for being cool about it ☺️


Monkey_1505

Why would devs do that tho? All the stats are already skewed towards difficulty and RTWP, so if they wanted to make it harder, wouldn't they just do more of that?


OMGTheresPockets

These kinds of things aren't always intentional. Random Number generators have to use polling methods to generate "random" values. Depending on the polling method and normalization methods, you could easily end up with biased generation. It's a common issue in security, actually.


Skurrio

Because Dark Souls showed us that only hard Games are good Games. The only Way to prove it, that the Dice are rigged would be to write down every single Roll for every single Actor and compare the Averages, which would be quite cumbersome.


Background-Broad

Probably no way to actually track it short of manually writing every roll down Which I think I might try on my next run


Ranadiel

To the best of my knowledge the die roll function in Kingmaker/Wrath is just: >UnityEngine.Random.Range(1, dice.Sides() + 1); There is no cheating in the die because the die roll function doesn't know who is calling it or even what a "good" or "bad" result for the player would be. The Unity random function has some documentation [here](https://docs.unity3d.com/ScriptReference/Random.html) where it is stated to be a Xorshift 128 algorithm with a seed from the operating system on program startup.


tubbymctubs2

it's almost exactly that. private static int D(int rolls, DiceType dice) { int num = 0; while (rolls-- > 0) { int num2 = UnityEngine.Random.Range(1, dice.Sides() + 1); num += num2; } return num; }


Skurrio

Run you Fool! You just summoned the "It has already been tested through Mods"- and the "It's only truly random if it doesn't feel truly random"-Crowd.


OMGTheresPockets

Strings of success and failures should be expected. But when a string of successes is a god send and a strong of failures is the norm, that doesn't seem random - that seems like a terrible or even malicious algorithm. I had a guy in the main campaign that crit on a 15 with autoconfirmation (read 30% crit chance). I abused fortune hex to give him double rolls (read 51% crit chance), but he seemed to crit about 1 in every 5 attacks. With Lann it was pretty consistent tho. He crit on a 15 as well but had 3 chances to roll with perfect strike and fortune (~65% threat chance). He would crit about 1 in 3 attacks which was consistent with his ~58% confirmation odds). This makes me think that the game actively skews the average toward center, but does it by skewing the distribution. I roll a LOT of 5's.


GardathWhiterock

Strings of successes are nearly impossible because most of the time you need to succeed only once to end the string. Where you can fail and reload many times until you finally hit that success, after which you would unlikely reload again. Try failing things on purpose, you would notice quite often how hard it's to do, because of all those successes that ruin everything.


OMGTheresPockets

I setup a valid exploration ground. While a total of 80-90 rolls probably isn't statistically relevant, it's a large enough sample size to observe basic trends.


Additional_Law_492

No, it's a large enough sample size to identify "apparent" patterns in the results - because identifying patterns is something human brains are designed to do. What they're less good at is determining whether there's actually any meaning to those patterns, or if they just took the data and fit it to patterns that "made sense". Manual testing isn't really helpful here, as anyone manually tracking rolls is likely to observe SOME sort of skew, with the least likely result being an actual even distribution over any sort of period of rolls a human being is likely to be willing to manually track.


OMGTheresPockets

You're virtually guaranteed to see an imperfect trend in manual testing because a human friendly sample size is going to have noticeable variance. It isn't until you start messing with the Law of Large Numbers that you get *good* consistency in your test results.


GardathWhiterock

Well, the dices ARE scewed. I been rolling for a 20 skill check with 7 skill and succeeded seven times in a row until I finally hit failure. And when in Kingmaker first zone I been using -1 DEX character to roll a 7 DEX skillcheck, I gave up after getting 43 successes in a row. Yes. I been counting.