Permalink
Browse files

DEVTOOLS: Quotes Excel creator exports extra audio

quoteSpreadsheetCreator exports dev commentary and some optional speech audio from SFX.MIX
  • Loading branch information...
antoniou79 authored and sev- committed Jan 5, 2019
1 parent 49497bf commit 9dfe8281fc5f490b6776ee2b3a85f73eac1765be
@@ -33,10 +33,12 @@ Syntax Notes:
4. The "-ld" optional switch is followed by a language description for the language of the game you are exporting Text Resources from. This switch is meaningful when you also use the "-xtre" switch to export Text Resource files.
* Valid language values are: EN_ANY, DE_DEU, FR_FRA, IT_ITA, ES_ESP, RU_RUS
* Default language value is: EN_ANY (English)
5. Using the "-xwav" optional switch, this tool will export __ALL__ game's audio files (AUD) (that are either speech or speech-related) in a WAV format. This is expected to run for a few minutes and take up quite a lot of your HDD space (about 650MB).
6. Using the "-xtre" optional switch, the tool will add a sheet to the output Excel with the contents of each of the game's Text Resource files (TRx).
7. You may use both, either or neither of the "-xwav" and "-xtre" switches, depending on what you need to do.
8. The "--trace" optional switch enables extra debug messages to be printed.
5. The "-xwav" optional switch will export __ALL__ game's audio files (AUD) (that are either speech or speech-related) in a WAV format. This is expected to run for a few minutes and take up quite a lot of your HDD space (about 650MB).
6. The "-xtre" optional switch will add extra sheets to the output Excel with the contents of each of the game's Text Resource files (TRx) (on sheet per TRx file).
7. The "-xdevs" optional switch will add a sheet for Developer Commentary text and some additional voice-overs from SFX.MIX.
8. The "-xpogo" optional switch will add a sheet for the POGO text.
9. You may use all, a subset or none of the "-xwav", "-xtre", "-xpogo", "-xdevs" switches, depending on what you need to do.
10. The "--trace" optional switch enables extra debug messages to be printed.

Usage:
```
@@ -78,7 +80,7 @@ The __text configuration file "configureFontsTranslation.txt"__ a __text file th
fontNameAndOutOfOrderGlyphs=TAHOMA#cp437#
fontNameAndOutOfOrderGlyphs=SYSTEM#latin-1#
````
* Note: for font files (FON) that you have created or edited with the fontCreator tool (e.g for the SUBTLS_E file for subtitles, or another in-game font file eg. KIA6PT, TAHOMA) you __should__ copy the 8-bit encoding and the comma separated out of order character tuples from the respective "override encoding" text file that you used with the fontCreator tool for each new/ edited font. Additionally, all the new and edited fonts (FON files that were output by the fontCreator script) should be in your working directory in order to include them in the SUBTITLES.MIX. It's important to keep the naming of those files unchanged. __Supported name values for imported FON files__ are:
* Note: for font files (FON) that you have created or edited with the fontCreator tool (e.g for the SUBTLS_E file for subtitles, or another in-game font file eg. KIA6PT, TAHOMA) you __should copy the 8-bit encoding and the comma separated out of order character tuples from the respective "override encoding" text file that you used with the fontCreator tool for each new/ edited font in the configureFontsTranslation.txt fields__. Additionally, __all the new and edited fonts (FON files that were output by the fontCreator script) should be in your working directory__ in order to include them in the SUBTITLES.MIX. It's important to keep the naming of those files unchanged. __Supported name values for imported FON files__ are:
SUBTLS_E.FON, KIA6PT.FON, TAHOMA18.FON, TAHOMA24.FON and SYSTEM.FON (practically you won't be using the last one).

## fontCreator (fontCreator.py)
@@ -117,7 +119,7 @@ The override encoding file is a __text file that should be saved in a UTF-8 enco
* Don't use space(s) between the tuples!
There is a sample of such file in the source folder for the fontCreator tool.

__For the exporting the game fonts (to PNG) mode__, the valid syntax expects only one (1) argument:
__For the exporting of the game fonts (to PNG) mode__, the valid syntax expects only one (1) argument:
1. folderpathForMIXFiles: is the path where the game's MIX files are located (STARTUP.MIX is required). The exported font files will be: 10PT.FON.PNG, TAHOMA18.FON.PNG, TAHOMA24.FON.PNG and KIA6PT.FON.PNG.

__For the creation of subtitles' font mode__, there are six (6) mandatory launch arguments for the fontCreator tool:
@@ -1,12 +1,26 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
import os, sys

osLibFound = False
sysLibFound = False
shutilLibFound = False
structLibFound = False
imagePilLibFound = False

try:
import os
except ImportError:
print "[Error] os python library is required to be installed!"
else:
osLibFound = True

try:
import sys
except ImportError:
print "[Error] sys python library is required to be installed!"
else:
sysLibFound = True

try:
import shutil
except ImportError:
@@ -28,7 +42,11 @@
else:
imagePilLibFound = True

if (not shutilLibFound) or (not structLibFound) or (not imagePilLibFound):
if (not osLibFound) \
or (not sysLibFound) \
or (not shutilLibFound) \
or (not structLibFound) \
or (not imagePilLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
sys.exit(1)

@@ -1,6 +1,17 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
sysLibFound = False
try:
import sys
except ImportError:
print "[Error] sys python library is required to be installed!"
else:
sysLibFound = True

if (not sysLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
sys.exit(1)

if not (sys.version_info[0] == 2 and sys.version_info[1] == 7):
sys.stdout.write("[Error] Blade Runner Font Creator script requires Python 2.7\n")
sys.exit(1)
@@ -66,14 +66,27 @@
# DONE: ability to manually set extra width (additional columns at the end of glyph, with transparent color) for fonts by letter like a list in parameters or in overrideEncoding.txt } i:1,j:2,l:1 - POSITIVE VALUES ONLY
# DONE: make space pixels (var spaceWidthInPixels) into an external param?
# DONE: INFO NOTE IT IS NOT POSSIBLE TO have partial transparency

import os, sys

osLibFound = False
sysLibFound = False
shutilLibFound = False
structLibFound = False
imagePilLibFound = False
reLibFound = False

try:
import os
except ImportError:
print "[Error] os python library is required to be installed!"
else:
osLibFound = True

try:
import sys
except ImportError:
print "[Error] sys python library is required to be installed!"
else:
sysLibFound = True

try:
import shutil
except ImportError:
@@ -102,7 +115,12 @@
else:
reLibFound = True

if (not shutilLibFound) or (not structLibFound) or (not imagePilLibFound) or (not reLibFound):
if (not osLibFound) \
or (not sysLibFound) \
or (not shutilLibFound) \
or (not structLibFound) \
or (not imagePilLibFound) \
or (not reLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
sys.exit(1)

@@ -1,6 +1,17 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
sysLibFound = False
try:
import sys
except ImportError:
print "[Error] sys python library is required to be installed!"
else:
sysLibFound = True

if (not sysLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
sys.exit(1)

if not (sys.version_info[0] == 2 and sys.version_info[1] == 7):
sys.stdout.write("[Error] Blade Runner MIX Resource Creator script requires Python 2.7\n")
sys.exit(1)
@@ -9,15 +9,29 @@
#
# DONE - Support at least one translation too (ie Greek)
#
import os, sys

osLibFound = False
sysLibFound = False
shutilLibFound = False
ctypesLibFound = False
csvLibFound = False
xlrdLibFound = False
reLibFound = False
structLibFound = False

try:
import os
except ImportError:
print "[Error] os python library is required to be installed!"
else:
osLibFound = True

try:
import sys
except ImportError:
print "[Error] sys python library is required to be installed!"
else:
sysLibFound = True

try:
import shutil
except ImportError:
@@ -60,7 +74,14 @@
else:
structLibFound = True

if (not shutilLibFound) or (not ctypesLibFound) or (not csvLibFound) or (not xlrdLibFound) or (not reLibFound) or (not structLibFound):
if (not osLibFound) \
or (not sysLibFound) \
or (not shutilLibFound) \
or (not ctypesLibFound) \
or (not csvLibFound) \
or (not xlrdLibFound) \
or (not reLibFound) \
or (not structLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
sys.exit(1)

@@ -18,7 +18,8 @@
else:
structLibFound = True

if (not ctypesLibFound) or (not structLibFound):
if (not ctypesLibFound) \
or (not structLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
sys.exit(1)

Oops, something went wrong.

0 comments on commit 9dfe828

Please sign in to comment.