-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace OOB guards with safe RNG calls when initialising quests #7013
Conversation
Any tests you would like me to try and run on a PowerPC Mac? |
Could you please try creating a save game with the system date set to 2039 or later? If it has the same behaviour as windows I expect the level table to look like the following no matter what date/time you start a new game at:
|
Several crashes and freezes later: |
Doesn't look like it accepted the system time change:
|
Reworded and added comments explaining what would've happened and calling out the case that is still technically possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice investigation and comments :)
In order to hit the case that the QuestGroup2 and QuestGroup3 checks were guarding against a player would need to edit their save or modify the game to allow storing a raw seed value instead of the output of
AdvanceRndSeed()
. Since this can't happen in normal gameplay I don't think it's necessary to keep compatibility here. The other mitigating factor is quest availability is saved as part of the game state so there's no issues loading these saves on vanilla diablo or in devX.It's possible that someone playing on an NT-based windows could set their system time to the 1977 date and start a new game at a time that lands on the seed 988045466 for dlvl 15. To ensure we leave all quests in this group active (as vanilla does) I've checked for that seed explicitly.
Massive props to staphen for doing the legwork to point out what quests impact level generation (and the overall discussion in discord), that gave me the idea to see if these checks actually impact normal gameplay.