🔒 ✅ SS1 EE Reactor code randomization fix

1 Guest is here.
Page: 1/7▶▶
663357cdd8330
voodoo47Quote
Apparently, the reactor code in SS1 EE is not randomized anymore;

https://www.gog.com/forum/system_shock_series/currently_known_problems_and_solutions/post108
https://steamcommunity.com/app/410710/discussions/0/496880203079253325/
https://steamcommunity.com/app/410710/discussions/0/412448158150855864/

To fix this, download the attached file, place it into your SS1 EE\res\data folder and overwrite (starting a new game is required). you can also patch a savegame with the reactor-rng tool available here.
Acknowledged by: dertseha
663357cdd86bd
dertsehaQuote
Oi, that's something interesting.
The archive does indeed have a static code in the keypad by default. It is overridden by the random number as soon as you enter the reactor level the first time.
The static code is "725 336", and the random number comes from two game variables that are initialized when you start a new game.

Since the people with the same code also read it from the screens it means the part that loads the code into the keypad is the same, and the two game variables actually hold the code. It's now unclear where this fixed code comes from:
* The engine was modified to set a fixed value
** It may also be due to an involuntary change - i.e. a bug that was introduced
* A set of triggers in the archive overwrite the random number to this fixed value.

My personal guess is that the engine was modified.
I'll fire up my tools to have a look at the archive as well as a savegame from this version. I should be able to find some time for that the upcoming days.
Acknowledged by: voodoo47
663357cdd896c
dertsehaQuote
Update: I've had a look at the archive and two test savegames.
For my installation I can confirm that the code is the same as for the other people.
I did a search in the archive and a quick glancing look at the first level, and I couldn't find an action that would set the two variables. Finally, I did a binary compare between the EE archive.dat and the one from the original CD and found no differences.

This then concludes that the fixed code comes from the engine. Whether by accident or intentional is up to the maintainers.

Thinking about it, there is a chance to "fudge" a semi-random number. It is possible to set game variables, yet for the reactor code we'd need some random seed. I was thinking about taking the security value into account, yet this one has low entropy, especially since the reactor code should be fixed before the first CPU nodes are destroyed. Then I remembered that you can start timer with a randomness in them!
My thinking goes: Start 6 timer on level entry with various randomness. They increment each digit at each tick. Then, set a tile-entry-trigger at some tile hacker has to go through, like the passage before the mutant cyborg guarding the CPU room. This tile-entry-trigger stops the 6 timer.
This whole chain needs some extra logic to keep the numbers sane. While the variables are handled as binary values, the actual code is stored as BCD (Binary Coded Decimal - i.e. the code "123" is stored as 0x0123).
To make things even more interesting, level 1 has only 20 slots free for such marker objects to implement this chain.

Challenge accpted  :sly:

[edit]
Though, thinking some more - what is more likely:
* People stumble over EE, read about the problem before starting a new game, and download the patched archive to use
* People are at some arbitrary point in the game and would like to have their savegame retro-fitted (would require a small executable patcher, which is easier to do)
* People don't care. Judging by the comments, those new to the game hardly see a difference and are even given a chance to avoid backtracking if they don't like to - and veterans note down the digits right away anyway, since they're spoiled already.

663357cdd8a5f
voodoo47Quote
so basically, the engine loads the resources in a way that doesn't trigger the randomization. interesting indeed.

also, this is unintended - afaik, NDS are aware, but as they are busy with other things, they may not fix it as it's not critical.
Acknowledged by: dertseha
663357cdd8c67
JDoranQuote
I agree that this should be fixed, though if you Dertseha make it as some sort of patch for the .exe (or whatever files) then people can make their own mind up whether to use it to fix the bug, or if they'd prefer it to always be the same to make the game easier for them (I don't see why, but I believe anyone should be allowed to play a game how they like*, except for cheating in multiplayer, of course).

BTW, you've no doubt thought of this of course, but if you do make a patch then please ensure that it checks that the file(s) it's patching are the right version (such as the latest version of the .exe), as otherwise some people will get confused when it doesn't work, resulting in some confused posts here and at it's GOG forum.

Did NDS have the source code when they modded SS to become SS EE? It seems unlikely, but if they did, then it's very strange that they didn't notice this bug.



* One of the reasons why I dislike Trophies/Achievement Points in modern console games is that they've killed off in-game cheats, whereas in my favourite first person shooters, I love playing them with my favourite weapon from that game and infinite ammunition. Plus if you could cheat in (the otherwise brilliant) Bioshock 2, then you could use the Drill Specialist gene tonic much earlier, and so give a whole new challenge to the game (provided you don't upgrade the drill, as it can become *very* powerful).
Page: 1/7▶▶

Legal stuff

Privacy Policy & Terms of Service Contact