Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Simple shuffling script for sounds/voicelines (be careful with this & always make backups!)
- #Jam2go
- import os, subprocess
- from os import rename
- import subprocess
- import random
- import glob
- from shutil import copyfile
- #Enter the folder where all the sounds/voicelines are on these lines, to shuffle other filetypes change .wav to whatever
- files = glob.glob("E:\Program Files (x86)\Steam\steamapps\common\Fallout New Vegas\Data\sound\\" + "fx" + '/**/*.wav', recursive=True)
- temp = "E:\Program Files (x86)\Steam\steamapps\common\Fallout New Vegas\Data\sound\\temp.wav"
- random.shuffle(files)
- x = 0
- y = (len(files)-1)
- while(x < y):
- print (files[x][67:] + " <-> " + files[y][67:])
- copyfile(files[x], temp)
- copyfile(files[y], files[x])
- copyfile(temp, files[y])
- x += 1
- y -= 1
- os.remove(temp)
- print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement