english.idx | ||
english.txt | ||
extract.py | ||
README.md | ||
rightyho.mp2 |
Discworld Noir audio extraction script
This is a quick hack I threw together to extract the audio for the "Righty ho" easter egg from Discworld Noir. You could extend it to extract other audio, if you like. It has no interface; if you want the script to do something different than it currently does, scroll to the bottom of the file and change it to call different functions.
This code should work for other language files as well, and probably will work for the earlier Discworld games, but I haven't tested any of that. But if you've always wanted a robot that constantly says "That doesn't work" in Eric Idle's voice, you could probably tweak this script to achieve that dream.
There are three important files that it needs:
english.txt
- contains all the text in the script (including notes for translators and voice actors!)english.smp
- contains all of the voice lines and sound effects in compressed .mp2 formatenglish.idx
- maps from lines of text in the.txt
file to offsets in the.smp
file
english.txt
and english.idx
are included in this repo because it's kind of fun to poke around in them,
and they're small. The script in its current form parses all of the text and prints out a list of lines, along
with the offsets into english.smp
that you'd need to extract the sound for those lines. You'll have to
find your own copy of english.smp
and modify the script if you want to try to actually rip the audio.
Fun voice acting directions hidden in english.txt
- in an over-the-top nautical fashion
- Columbo-style acting dumb
- lapsing into rather bad gangster-speak
- confusion melting into insane realisation
- with non-sexual innuendo
- Hard boiled monologue - after being turned into a toad
- Important: to speak Gable's part you must keep your mouth rigidly open - possibly by putting a closed fist in your mouth. Nothing you will say will be intelligible: don't worry about it. That's just the way gargoyles speak. The subtitles will convey meaning.
- dogmatically, if you'll excuse the pun
- last bit as a Shakespearean Bugs Bunny
License
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.