diff --git a/README.md b/README.md index 1cbc6b0..0fc3021 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Normality is a first-person 3D point-and-click adventure game released in 1996 a It was published in North America by Interplay. In an unusual decision, for the US release, a complete recasting and re-recording of all in-game dialogue was undertaken, with a much larger cast of 16 credited voice actors. Most notably, former teen hearthrob [Corey Feldman](https://www.imdb.com/name/nm0000397/) was recast in the role of the player-character, Kent Knutson. I have long admired his over-the-top surfer-stoner vocal performance in this game; each one of his line reading is, quite frankly, a work of art. -The version that is generally available for purchase online, on [GOG](https://www.gog.com/en/game/normality) and [Steam](https://store.steampowered.com/app/400370/Normality/), is the original UK release only. Presumably the rights to the US version are more complicated and expensive to handle, and I doubt that the folks at Gremlin were thrilled at having the Britishness forcibly removed from their game anyway (a position I can respect even if Corey Feldman's performance is objectively flawless). So the North American release is harder to come by. +The version that is generally available for purchase online, on [GOG](https://www.gog.com/en/game/normality) and [Steam](https://store.steampowered.com/app/400370/Normality/), is the original UK release only. Presumably the rights to the US version are more complicated and expensive to handle, and I doubt that the folks at Gremlin were thrilled at having awkward dated surfer lingo forcibly inserted their game anyway - a position I can respect, even if Corey Feldman's performance is objectively flawless. So the North American release is harder to come by. I've known most of this for a long time. What I was not aware of, until recently, was that in addition to the voices being redone, the script was also modified for its American audience. This was brought to my attention by a GOG forum thread with [detailed instructions for patching the game to use the US voices](https://www.gog.com/forum/general/voices_selector_for_the_game_normality). GOG user "KeyperOS" mentions that a subtitle file should also be included in the patch, providing instructions for how to fix it. He provides the following instructions for quickly testing to ensure that the proper subtitle file is in place: @@ -17,7 +17,7 @@ As soon as I read this, I had to know more. ## The Files -`lang.dat.uk` and `lang.dat.us` are the original subtitle files for the UK and US releases, respectively. These are copyright Gremlin Interactive and included here for research purposes. They are encoded in a fairly simple format - a sequence of about 6000 4-byte little-endian integers, which correspond to offsets of strings within the file, followed by a series of null-terminated ASCII strings which are pointed at by the index. Sometimes those offsets are 0; this corresponds to a missing string at that index. +`lang.dat.uk` and `lang.dat.us` are the original subtitle files for the UK and US releases, respectively. These are copyright Gremlin Interactive and included here for research purposes. `diffscript.py` is a simple Python script that examines the `lang.dat` files and produces two text files: `all-subtitles-uk-us.txt` and `diff-subtitles-uk-us.txt`. diff --git a/diffscript.py b/diffscript.py index 60b36b0..7b6d35a 100644 --- a/diffscript.py +++ b/diffscript.py @@ -12,9 +12,14 @@ def readstring(f): bytes += byte return bytes.decode('latin-1') +# lang.dat is encoded in a fairly simple format - a sequence of about 6000 4-byte little-endian integers, +# which correspond to offsets of strings within the file. This is followed by a series of null-terminated +# ASCII strings, which are pointed at by the offsets. Sometimes those offsets are 0; this corresponds to +# a missing string at that index. def parsedat(filename): with open(filename, "rb") as f: offsets = [] + # we assume the first offset in the file corresponds to the place where the index ends and strings begin while f.tell() == 0 or f.tell() < offsets[0]: offsets.append(int.from_bytes(f.read(4), 'little')) lines = []