diff --git a/scripts/count_json_values.py b/scripts/count_json_values.py index dc402d50..016a2990 100644 --- a/scripts/count_json_values.py +++ b/scripts/count_json_values.py @@ -23,6 +23,10 @@ from functools import partial extract_dir = r"D:\OpenKotOR\Extract\KotOR" +if not os.path.exists(extract_dir): + raise RuntimeError("Extraction directory does not exist") + + def get_unique_json_values(extract_dir, path_pattern, extract_values): def count_value(value, values): diff --git a/scripts/extract.py b/scripts/extract.py index d79d923d..1d1a1d1e 100644 --- a/scripts/extract.py +++ b/scripts/extract.py @@ -42,7 +42,6 @@ steps = [ ["convert_to_ascii_pth", "Convert binary PTH to ASCII PTH (y/n)?", None], ["disassemble_scripts", "Disassemble NCS scripts (y/n)?", None] ] - if not os.path.exists(game_dir): raise RuntimeError("Game directory does not exist") diff --git a/scripts/filelists.py b/scripts/filelists.py index 83ae711a..85cc16cc 100644 --- a/scripts/filelists.py +++ b/scripts/filelists.py @@ -23,7 +23,6 @@ import sys extract_dir = r"D:\OpenKotOR\Extract\KotOR" - if not os.path.exists(extract_dir): raise RuntimeError("Extraction directory does not exist") @@ -139,4 +138,4 @@ if len(sys.argv) > 1: voresref = sys.argv[2] if len(sys.argv) > 2 else None generate_filelist(speaker, voresref) else: - print('Usage: python ttsfilelist.py speaker [voresref]') + print("Usage: python filelist.py SPEAKER [VORESREF]") diff --git a/scripts/unwrap.py b/scripts/unwrap.py index 320db46b..30cf1d27 100644 --- a/scripts/unwrap.py +++ b/scripts/unwrap.py @@ -24,7 +24,6 @@ import sys wav_dir = r"D:\OpenKotOR\Extract\TSL\voices" tools_dir = r"D:\Source\reone\build\bin\RelWithDebInfo" - if not os.path.exists(wav_dir): raise RuntimeError("WAV directory does not exist") @@ -72,4 +71,4 @@ if len(sys.argv) > 1: filelist = sys.argv[1] unwrap_from_filelist(filelist) else: - print('Usage: python ttsfilelist.py filelist') + print("Usage: python unwrap.py FILELIST_PATH")