Posted: Wed Apr 08, 2020 8:10 pm Post subject: PRNG number
Hello everyone,
sorry if this is a bad thread to choose, but I thought lua scripting would be the case to solve what I want. I will describe the situation here:
As I was backtracing a game, i was looking on the calls, did some breakpoints and followed the instructions, I found the code where the prng is written and how. states/ nodes/ seed/clockseq everything.
I am far from being a advanced reverse engineer and never truly understood all of lua scripts etc. That is why i thought would be a kick off to ask here as for I am thinking, if I have the code that writes the whole generator or how it works, I believe it could be useful for something.
Question:
- Is it possible, to use the same exact code to make a script which would tell us what is the current number that the generator created? In case of loot its probably not gonna help as the dice is rolled just at the death of an object. But with cards for example i have seen that they are stored just after the previous roll.
Somewhere in thousands of codes i found also a statement of the mersenne twister.
Answer to your question: It is not an online game, but I want to keep the name hidden.
Thank you for all your answers and support. Looking forward hearing your thoughts.
Is it possible, to use the same exact code to make a script which would tell us what is the current number that the generator created?
It would be annoying to keep the state of your PRNG in sync with the game's. Why not use code injection to simply copy the random value generated from the game's PRNG? You'd probably end up using code injection anyway to figure out when to advance the state of your PRNG. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum