It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
ok it converted them all. yay!!!

I still didnt hear the one song i wanted >:o with a particular melody gwaaa *my own issue. maybe it was kotor 2 but I was sure it was kotor 1.

now for kotor 2. wish me luck
yay it all worked. and playing the songs at 50x speed i found my fav song melody it was so small xD

kotor1: mus_area_townint @ 0:28

*hugs

thank you Smerl.

and now theres a log someone else ignorant as me can read and solve all this too without bothering you hopefully. :3

*waves bye bye
Not sure what was going on there with these pauses, lol, but I'm glad it worked! :)

Good persistence and effort!
Post edited February 01, 2023 by shmerl
I am putting this here for posterity's sake, but if you know how to use Python 3 this may be a better cross platform solution. I haven't done extensive testing with this, and it could possibly use some cleanup, but it was serviceable to get me what I wanted. This should work for both KOTOR 1 and 2:

import os

def load_files(directory):
try:
os.makedirs(directory + '/edited_files')
except FileExistsError:
pass
file_names = os.listdir(directory)
for file_name in file_names:
relative_path = directory + '/' + file_name
if os.path.isfile(relative_path):
with open(relative_path, mode='rb') as file:
file_bytes = None
file_check = file.read(4)
if file_check == b'RIFF':
file.seek(0x3A)
file_bytes = file.read()
else:
file.seek(0x1D6)
file_check = file.read(4)
if file_check == b'RIFF':
file.seek(0x1D6)
file_bytes = file.read()
with open(directory + '/edited_files/' + file_name, mode='wb') as edited_file:
try:
edited_file.write(file_bytes)
except TypeError:
print('Failed to write ' + file_name)

if __name__ == '__main__':
kotor1_directory = 'kotor1/streammusic'
kotor2_directory = 'kotor2/streammusic'
load_files(kotor1_directory)
load_files(kotor2_directory)
Post edited August 17, 2024 by positron01