Neverwinter nights EE true RNG implementation (RDSEED/RDRAND)
In neverwinter nights, it uses a very basic rand() function from the standard C library, which works basically by taking a seed, not exactly sure where, but it is generated upon game boot and at different other points I believe. It takes this seed and multiplies it by a really big number 21420 or something like that, and then it does some minor bit shifting. That's it, that's the general operation. Everytime a dice roll happens it performs this multiplier and bit shift, and sometimes refereshes the seed.
The issue is that this isn't a very good true random number generator, to be specific, it's basically deterministic from a computer perspective. Which can create some weird funky stuff happening, or it just feels more 'fake'.
And so, I ended up making a little mod/hack that hooks into the random number generator, and changes it to use the really good stuff, hardware random number generator, specifically the RDRAND and RDSEED. The RDRAND and RDSEED are functions built into the CPUs since 2012 (intel) and 2015 (amd), (so it won't work if you have an older CPU), it essentially measures 'noise' within a quantum phenomenon that is isolated within the CPU, specifically it's called the DRNG chip inside the CPU.
This stuff is normally used for cryptographic stuff, like verifying account login and such, but we'll be hijacking it for neverwinter nights! And if you're wondering, no, sadly I'm not aware of any game using this type of random generation, most if not all use the simple rand() implementation, or something similar. There is one that was recently made as a mod for BG:EE couple years back though.
Anyway, in my case I'll be using the function RDSEED as it's a bit closer to the quantum 'noise' aspect, RDRAND goes through another system in that the quantum result is essentially 'whitened' via cryptographic algorithms.
So, here it is, it's just a cheat engine cheat table injection:
https://drive.google.com/file/d/1ml4bHt69j0EnK-eWs__6h2d68fqG5Ypa/view?usp=sharing
So no fear of viruses or such, and you can open up the code as well to modify it if you wanted to. Although I'm not sure if it will work with all NWN EE versions.
Anyway, for the results I experienced so far playing with it for several hours, it feels better. Kinda hard to describe in what way, but I think the word I would use is the RNG feels less 'retarded' and more aware, but maybe that's just me.
More technical explanation: The way I implemented it, is I simply replaced the full rand() call with the RDSEED cpu instruction instead. It works well, and it seems to affect everything, from both the player and enemies. It affects the attack chance, damage rolls, potion rolls, spell rolls, pretty much everything. I don't know if it's only all roll types, or whether that function call was also used for other things because I did notice that on level load it triggered too.
Give it a go and see how it goes!
The issue is that this isn't a very good true random number generator, to be specific, it's basically deterministic from a computer perspective. Which can create some weird funky stuff happening, or it just feels more 'fake'.
And so, I ended up making a little mod/hack that hooks into the random number generator, and changes it to use the really good stuff, hardware random number generator, specifically the RDRAND and RDSEED. The RDRAND and RDSEED are functions built into the CPUs since 2012 (intel) and 2015 (amd), (so it won't work if you have an older CPU), it essentially measures 'noise' within a quantum phenomenon that is isolated within the CPU, specifically it's called the DRNG chip inside the CPU.
This stuff is normally used for cryptographic stuff, like verifying account login and such, but we'll be hijacking it for neverwinter nights! And if you're wondering, no, sadly I'm not aware of any game using this type of random generation, most if not all use the simple rand() implementation, or something similar. There is one that was recently made as a mod for BG:EE couple years back though.
Anyway, in my case I'll be using the function RDSEED as it's a bit closer to the quantum 'noise' aspect, RDRAND goes through another system in that the quantum result is essentially 'whitened' via cryptographic algorithms.
So, here it is, it's just a cheat engine cheat table injection:
https://drive.google.com/file/d/1ml4bHt69j0EnK-eWs__6h2d68fqG5Ypa/view?usp=sharing
So no fear of viruses or such, and you can open up the code as well to modify it if you wanted to. Although I'm not sure if it will work with all NWN EE versions.
Anyway, for the results I experienced so far playing with it for several hours, it feels better. Kinda hard to describe in what way, but I think the word I would use is the RNG feels less 'retarded' and more aware, but maybe that's just me.
More technical explanation: The way I implemented it, is I simply replaced the full rand() call with the RDSEED cpu instruction instead. It works well, and it seems to affect everything, from both the player and enemies. It affects the attack chance, damage rolls, potion rolls, spell rolls, pretty much everything. I don't know if it's only all roll types, or whether that function call was also used for other things because I did notice that on level load it triggered too.
Give it a go and see how it goes!
0