Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
2,857
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #Simple shuffling script for sounds/voicelines (be careful with this & always make backups!)
  2. #Jam2go
  3.  
  4. import os, subprocess
  5. from os import rename
  6. import subprocess
  7. import random
  8. import glob
  9. from shutil import copyfile
  10.  
  11. #Enter the folder where all the sounds/voicelines are on these lines, to shuffle other filetypes change .wav to whatever
  12. files = glob.glob("E:\Program Files (x86)\Steam\steamapps\common\Fallout New Vegas\Data\sound\\" + "fx" + '/**/*.wav', recursive=True)
  13. temp = "E:\Program Files (x86)\Steam\steamapps\common\Fallout New Vegas\Data\sound\\temp.wav"
  14.  
  15. random.shuffle(files)
  16.  
  17. x = 0
  18. y = (len(files)-1)
  19.  
  20. while(x < y):
  21. print (files[x][67:] + " <-> " + files[y][67:])
  22. copyfile(files[x], temp)
  23. copyfile(files[y], files[x])
  24. copyfile(temp, files[y])
  25. x += 1
  26. y -= 1
  27.  
  28. os.remove(temp)
  29.  
  30. print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement