[ Legacy of Kain: The Lost Worlds ]

Soul Reaver Variables and Memory Locations

article by Ben Lincoln


This article was part of the content on the original (pre-2007) version of The Lost Worlds. I found it while looking around for things to post on the 10th anniversary of the site in 2012. It is presented here for historical interest, and has not been audited for 100% accuracy.

This particular article was last updated on 26 April, 2003.

Soul Reaver (unlike its sequel) is an incredibly straightforward game in terms of discerning which memory locations can be edited to produce desired results. In fact, one of the files in the installation directory (kain2.map) provides a list of most of them, although some of the descriptions are too broad to be used as-is without further experimentation. This discussion will pertain mainly to version 1.2 of Soul Reaver for the PC, although there will also be mention of the Playstation edition.

There are four regions I have used in my explorations of the PC version of Soul Reaver. The first is at 00AF8AC4, and is a DWORD which represents the current height of Raziel. This is very useful, for example, in that if the player jumps, pauses the game, alt-tabs to Windows, and uses an active memory editor to increase this value, then returns to the game, it is now possible to reach heights that cannot otherwise be achieved. I am not entirely sure what the maximum value for this variable is.

There is a second chunk of memory located at 00B088xx which contains several useful values. 00B08810 is a the number of health upgrades Raziel has acquired (from 1 - the starting value, to 4 - which means he has found all 15 health upgrade icons).

Location Type Range Represents
00B08810 Byte 1-4 Number of Health upgrades
00B08814 DWORD 0-500000 Current Health level
00B08828 Byte 0-255 Current Glyph Energy
00B0882A Byte 0-255 Maximum Glyph Energy

The third chunk of memory contains another set of variables related to Raziel himself.

This section corresponds to the debugRazielFlags section of kain2.map.

The abilities and glyphs bit-arrays are non-exclusive (e.g. it is okay to have the Sunlight Glyph and the Fire Glyph at the same time).

If multiple bits are turned on in the reaver type arrays, however, the engine will first choose a value in the primary array over one in the secondary, and then either pick the next lower valid value or switch to the 1 value, which corresponds to the Material Reaver but with an ineffective projectile.

Generally the "Unused" values will leave the previous Reaver on, but alter the projectile so it is useless.

To set the current abilities, pick the binary value that corresponds to the ones you want on (e.g. 00000001 for only Phase Through), convert to hex (e.g. 01), and set that value for the Abilities Acquired memory location. Note that to enable Shift-at-Will, all of the bits in this array need to be turned on (IE the value at location 00C644F4 needs to be set to FF (255)). Actually, I can't imagine wanting to set this value to anything other than 255, except for testing purposes or if you are a dork like me.

To activate a given Reaver, pick the binary sequence which corresponds to it (e.g. 10000000 for the Fire Reaver) convert it to hex (e.g. 80), and set that as the value for the appropriate memory location. As noted, in order to enable the second set of Reavers, all bits in the primary array must be set to zero.

These values appear to be identical to those used for the Playstation version of the game. For example, when using a Gameshark to modify the reaver type variables, 80 produces the Fire Reaver, just like it does on the PC when using an active memory editor.

Location Represents
00C644F4 Abilties Acquired
Bit # Represents
1 Phase Through
2 Climb
3 Force Projectile
4 The Soul Reaver
5 Swim
6 Unused (Possess/Amplified FP?)
7 Unused (Possess/Amplified FP?)
8 Shift-at-Will
00C644F6 Glyphs Acquired
Bit # Represents
1 Unused
2 Unused
3 Force
4 Stone
5 Sound
6 Water
7 Fire
8 Sunlight
00C644F9 Reaver Type (Primary) - if all bits are zero, use secondary value
Bit # Represents
1 Unused
2 Unused
3 Spectral
4 Material
5 Ariel
6 Unused
7 Sunlight
8 Fire
00C644F9 Reaver Type (Secondary) - if all primary bits are zero, use this value
Bit # Represents
1 Amplified
2 Sound
3 Unused
4 Unused
5 Unused
6 Unused
7 Unused
8 Unused

The fourth and final memory location I will discuss here is the one at 00C651E0, and I am terrified to discover that I now know that location by heart. This location contains a string 39 bytes long that contains the command-line parameters that the kain2.exe application is to be run using.

In the Nixxes Software development lab, these options would presumably have been accessible from an actual command line (e.g. Jurjen Katsman would open up a DOS prompt and actually type "kain2 city 1 -inspectral -nomonsters" and press enter). In the retail version this capability has been removed, but it is still possible to achieve the same effect. Interesting note: in the version 1.0 release, it was possible to edit these parameters by using a hex editor on the actual kain2.exe file. This is not possible in versions 1.1 and later.

The syntax of the string is "[location name/#] -switch1 -switch2 [et cetera]". It is through this method that arbitrary rooms can be loaded, although at least in the PC version this sometimes results in a crash for (currently) unknown reasons. The default of course is "under 1 -mainmenu -voice -inspectral".

Another note: in my example above I use Nixxes Software rather than Crystal Dynamics, since they ported Soul Reaver to the PC. The PSX version uses the exact same manner of determining load parameters, but they are stored in the bigfile.dat file, and cannot be altered using active memory when using a PC Playstation emulator for example.

For a full listing of valid room names/numbers to use, see the SR1 Area List.

Many of the command-line switches have been disabled in the retail version of Soul Reaver (or were only implemented in the Playstation version and not the PC), but here is the full list:

-allwarp Enables all Warp Gates
-loadgame Presumably loads a saved game
-debug_cd Occassionally displays a small amount of technical information, probably did more in the dev version
-voice Unknown - its presence or absence has no noticeable effect on the PC version
-inspectral Starts the game in the Spectral Realm instead of Material
-mainmenu Starts the game at the main menu instead of going right to the selected room
-timeout Unknown
-nomusic Should disable music (it does in The Fire Glyph Demos), but doesn't
-nosound Disables sound FX and music, but not voiceovers
-nopuppetshows Should disable cutscenes, but doesn't
-ghost_cam Disables collision detection for the camera
-allglyphs Should probably start the game with all Glyphs enabled, but doesn't
-no_cheats Disables cheat codes
-noshift Prevents Raziel from shifting planes, even when submerged in water without the swim ability
-levelid Should probably display the room name/number, but doesn't
-morevram Should probably take advantage of additional video RAM, but doesn't
-nomonsters Disables all monsters in the game, including bosses (this breaks the boss cut-scenes)
-fastload Should probably bypass the Eidos/CrystalD logos, but doesn't
-notextureswap No apparent effect
-monster_dumbass Should probably make the monsters dumber, but doesn't
-monster_messages Should probably display technical information from monsters onscreen, but doesn't
-monster_stats Should probably display monster statistics onscreen, but doesn't
-draw_monster_ai Should probably display monster AI information onscreen, causes the game to crash instead
-planning_messages Should probably display technical information onscreen, but doesn't
-draw_planning Displays technical information regarding nodes onscreen
-use_c Enables drawing of a very small amount of terrain data that is otherwise hidden
-nomonsterai Should probably disable monster AI, but doesn't
-noscripts Disables movement scripts for all characters... including Raziel - Makes the game unplayable
[ Page Icon ]