Skip to content

"to hit" dice nerf'ed

I have just finished playing BG:EE and I just could not believe the number of times I missed hitting a monster, so I turned on the more info lua/ini setting

'Game Options', 'Extra Combat Info', '1'
'Game Options', 'Extra Feedback', '1',

and the number of times my first hit roll was a 2 would have been 40%. The number of times I completed combat without rolling over 10 was astounding. There is SOMETHING WRONG with the random number generator for to hit rolls in 2.6.6 There just is! How many times should you roll two critical misses in a game IN A ROW ( yes the odds are 1 in 400 - I know ) I would say 10% of my rolls were in the teens, the entire game. Not happy

Comments

  • DaveyLDaveyL Member Posts: 16
    The dice are not fair, they simply are not fair. I having been playing d&d since 1985. please do not explain how to add pluses to your attack. I understand all or if ALL OF IT, OK ALL OF IT. I am not talking about getting bonuses to your attack, forget about a +5 sword, with 25 strength, etc etc ad nauseam . I am talking about the mechanism of the game which generates random numbers between 1 and 20 to which all your pluses are then added.

    IT IS NERFED OK - end of story. Turn on

    'Game Options', 'Extra Combat Info', '1'
    'Game Options', 'Extra Feedback', '1',

    and watch yourself.

    I have just had a battle and my to hit rolls ( forget about all the pluses I get to my to hit roll ) were

    1, 1, 7, 1, 1, 7

    F%$K OFF!!! 4 critical misses in 5 rolls and exactly the same pattern, 117, 117 Bulls$#t

    I know "statistically" it is possible, I know I could roll 100 1's in a row "statistically"

    but this is happening all through the game, the same patterns turning up

    beamdog sort this S^%t out please
  • DinoDinDinoDin Member Posts: 1,597
    edited October 2021
    If there was a bias in the dice roll it would also be present in the game's programming. Considering the long history of mods on this game, someone would have found that by now. No one has.

    Moreover, game designers almost never build in "unfair" dice rolls except as a high-end difficulty setting. Why would anyone who wants to make money selling games do that? If anything, there often tends to be tiny biases inserted into the game that help the player. And those DO exist in BG1, such as the level one, no one-hit kill rule. As well as the best of two HP rolls on level up. Both of those are giving you a tiny edge over what a pure interpretation of tabletop rules are.

    I mean if you really are struggling in the early levels, and I'll admit those can be frustrating in BG1, just kite against the melee monsters. That's another tip that can help soften the game's weird early difficulty.
  • AmmarAmmar Member Posts: 1,297
    I agree that the game does not cheat with the dice.

    I have one question on the feedback options though: does luck modify the roll you see? It is supposed to directly adjust the dice rolls, not act like a normal modifier. If so, negative luck effects - especially exhaustion - could easily lead to a series of dice role that seem incredibly unfair, but aren't.
  • SirBatinceSirBatince Member Posts: 882
    IE has poor simulated rng and it's very obvious some values occur more than others

    just make your own item in NI and create two effects, one that triggers between 0-5% and another with 95-100%. The latter will nearly almost never happen while the other will reasonably come up many times.
  • jmerryjmerry Member Posts: 3,881
    Are you accounting for the off-by-one bug in the percentage chances? While most of them are coded as if the game is rolling 1-100, the game actually rolls 0-99. So weapons break 2% of the time instead of 1%, a mage with 18 int succeeds at scribing 86% of the time instead of 85%, and so on. So that "up to 5" is actually 6% and "above 95" is actually 4%. Not as balanced as you intended.

    The actual RNG is an utterly standard pseudo-random number generator. It's fair, or at least fair enough.
  • SirBatinceSirBatince Member Posts: 882
    yup. "it does the job well enough" is a fair consensus and is servicable for the purpose of the gameplay.

    still pretty blatant and lame how low it gets with the non-stop crits and crit misses
  • suysuy Member Posts: 30
    Hi. FWIW, I did some research on the random number generator some time ago, with fancy charts included. Also, some data for you to analyze if you want.

    TL;DR: it's nearly impossible that you'll notice anything, even though, for today's standards, the PRNG could be better. Sorry @SirBatince and @DaveyL.

    Still, if you want to be really sure and see with your own eyes, I have a script updated that can log each call to CUtil::UtilRandInt, which is the main function in the engine for making dice rolls. It's not trivial to use on Windows, but should not be that hard if you are bit tech savvy.

    Cheers.
  • MaurvirMaurvir Member Posts: 1,093
    As someone who has implemented PRNGs professionally, and understands the math, you have to realize that you need a fairly large sample set to accurately discern whether a given algorithm is "fair" or not. It is quite possible to see what looks like an "unfair" sequence, and some of them can feel fairly long, but given enough rolls, you should see things settle out.

    A good example was a hobby project I did to recreate a common "candle" tealight. I started with a simple LFSR (linear feedback shift-register) based design, but the "flicker" was unsatisfactory because of the long runs.

    Ultimately, if you want truly random numbers, you need a physical source. For computers, that is usually generated from the interrupts or some other built-in hardware source. If you need more entropy than that, you can use noise diodes. My project ended up using sample data from a real candle and a PRNG to select which sample was played back, producing very nice results.

    However, for a decades old game, the built in algorithm is fine.
  • kjeronkjeron Member Posts: 2,368
    Doesn't help that critical hits and critical misses broadcast extra feedback to the player, making the player notice them more.
  • suysuy Member Posts: 30
    Let me add that using the same framework that I used to hook that game function and call it a million times for the sample, it's also very easy to replace the function with a more modern implementation of it that it would make really hard, even if you had a team of scholars working for a week on it, to

    In the end, as Maurvir says, it's a futile attempt. Not only you need to account for the randomness of the rolls, but you have to consider that the PRNG is used in a ton more things. I have still lying around the CSV file with a log of playing the game recording all the invocations, so I'm attaching it.

    The number of rolls used for a swing, a hit, or damage, is small if you compare it to the times it was used for CGameSprite::SetCurrAction, which I don't know what it is, but I assume for AI decisions. That means that the results of the PRNG are spread among things that you can't visually see or perceive. Nobody says "the AI sucks! it is skewed to the first actions on the AI scripts!".
Sign In or Register to comment.