Skip to content

Commit

Permalink
Merge Beta into Main for September Release (#4)
Browse files Browse the repository at this point in the history
* Add stack trace and hotfix to blank audio

* Removed superfluous check on ska files

* Update compile-folder.bat

* WTDE solo markers, FOVPulse Camera parsing

* WoR Drum Animations

* Add "Band" label for WTDE

* Enable WoR radio button

* Autogen cameras/lightshow/drums if not present

* Add length to AnimNoteWT

* Add support for WoR MIDI camera notes

* Move some functions

* Compress SKA files generated in Blender

* Update GH Toolkit.py

* Update ska_classes.py

* Parsing SysEx taps/opens

* WoR Compiler started

* WoR Checksum Generator

* Get audio length info added

* WoR QB/QS generation in GUI

* WoR items added to GUI

* Ghost Note/2x Kick parsing

* WoR compilation functional

* Genre and Checksum split into WT/WoR values

* Easier custom performance and song scripts files

* GHWoR Loop Anims

* Update compile-folder.bat

* Update blank audio

* More GUI enhancements

* Easy song scripts

* Lightgen bug fix

* Initial checksum swap code

* Fix loops

* Fix compiler crash if checksum > 30 chars

* Remove redundant statements

* Fix performance array deletion

Fix deletion in circumstances where there are multiple events placed at the same time

* Update .gitignore

* More debug checksum keys

* Update compile logic

* More WoR loop_anim logic

* Better GH3 Parsing from MIDI

* GH3 Audio Compilation

* More GH3 Audio Work

* GH3 Audio Compile Works

* Update install_requirements.bat

* CRC file can be run for quick QBKey

* Added option to compile fsb without converting

* Guitar Hero 3 for 360 file generation

* GUI background edits

* Added legal camera notes and talky note on vocals

* GH3 Forced note logic update

* Perf override can now be out of order

The compiler will sort them for you

* Update camera/band moment logic

* Print statement to determine last file processed

* Audio gen updates

Combine files without converting
Strip padding from WoR songs

* Add new WTDE features

low/high 8/16 bars

* Update chart generation

Only moment cameras are used
Early xplus code

* Add WoR PAB extraction

* Fix SKA files with partial anims and custom keys

* More events added when converting to MIDI

* Code cleanup

* Initial GH5/WoR to WT Converter code

* More WoR to WT conversion code

* Add tuning cents to GUI

* X+ generation for WTDE (futureproofing)

* Function splitting

* Create ghtoolkit.py

* Added option for custom preview audio

* Remove commas in qb2text output

* Fix LH anims not parsing note_off events correctly

* Add sustain threshold value

* Add basic GH3 to WT camera conversion

* Force CBR when input is VBR

* Fix conversion bug

* No more crash with mono audio

* Whoops

* Relative paths are better than absolute

* convert_5_to_wt added to beginner mode

* GH5 songs convert to WT properly

* Look for new converted WT Camera track

* Audio bugs quashed

* HOPO chords enabled when compiling to WTDE

* Anim notes and GH3 compile mode bug fixes

* Convert to GH3/GHA crash fix

* Comment out exception
  • Loading branch information
AddyMills authored Sep 8, 2023
1 parent 958cf53 commit e566625
Show file tree
Hide file tree
Showing 26 changed files with 4,059 additions and 2,193 deletions.
6 changes: 4 additions & 2 deletions CRC.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,7 @@ def qbkey_hex(text, endian = "big"):


if __name__ == "__main__":
test = "Solo 1"
print(QBKey_qs(test))
x = 0
while x != -1:
x = input("Enter string: ")
print(QBKey(x))
37 changes: 36 additions & 1 deletion GH Toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
menu_options = [
"compile_wt_song - Compile a Guitar Hero: World Tour song pak file from audio and a MIDI file",
"convert_ska_file - Convert a SKA file from one game to another (for conversions)",
# "convert_5_to_wt - Convert a song from Guitar Hero 5 or Warriors of Rock to the World Tour format",
"convert_to_5 - Convert a WT song to Guitar Hero 5 format",
"convert_to_gh3 - Convert a GH:A song to GH3 (removing rhythm anims/special mocap calls, porting lights and cameras)",
"convert_to_gha - Convert a GH3 song to GH:A (adding rhythm anims, porting lights and cameras)",
Expand Down Expand Up @@ -96,19 +97,22 @@ def manual_input():
print("Choose your singer: ")
print("1.) Default\n2.) Steven Tyler\n3.) Run DMC\n4.) Joe Perry")
singer = singer_dict[input("Type in the number corresponding to your singer: ")]
song_name, song_pak = convert_to_gha(midqb_file, output, lipsync_dict[singer])
song_name, song_pak = convert_to_gha(midqb_file, output, singer)
if midqb_file.lower().endswith(".mid"):
pak_name = f'\\{song_name}_song.pak.xen'
else:
pak_name = f'\\{song_name}_song_GHA.pak.xen'
with open(output + pak_name, 'wb') as f:
f.write(song_pak)
input("Convert complete! Press Enter to continue. ")
elif main_menu == "convert_to_gh3":
midqb_file = input("Drag in your song PAK file: ").replace("\"", "")
output = f'{os.path.dirname(midqb_file)}'
song_name, song_pak = convert_to_gh3(midqb_file, output)
with open(output + f'\\{song_name}_song_GH3.pak.xen', 'wb') as f:
f.write(song_pak)
input("Convert complete! Press Enter to continue. ")

elif main_menu == "convert_to_5" or main_menu == "convert_to_ghwor":
compile_args = []
if main_menu == "convert_to_ghwor":
Expand Down Expand Up @@ -240,6 +244,25 @@ def manual_input():
input("\nPress any key to exit.")

input("Complete! Press any key to exit.")
elif main_menu == "convert_5_to_wt":
midqb_file = input("Drag in your song PAK file: ").replace("\"", "")
output = f'{os.path.dirname(midqb_file)}'
midname = os.path.basename(midqb_file)[:os.path.basename(midqb_file).find(".")]
if re.search(r'^[a-c]dlc', midname, flags=re.IGNORECASE):
midname = midname[1:]
print("""\nYou can add a performance override file to be added to the song.\nFor example, you can add tapping animation events or for WoR songs, add PlayIdle events.""".replace("\t",""))
perf_override = input("Drag in your perf override file (or leave this blank) and press Enter to continue: ").replace("\"", "")
music_override = input("Drag in the folder containing your audio files from the PS3 version.\nLeave blank to skip: ").replace("\"", "")
if music_override:
try:
audio_functions.strip_mp3(music_override)
except Exception as E:
raise E
print("Could not convert audio.")
print(midname)
wt_pak = convert_5_to_wt(midqb_file, perf_override)
with open(f"{output}\\a{midname}.pak.xen".lower(), "wb") as f:
f.write(wt_pak)

elif main_menu == 1337:
input("Ha! Got ourselves a leet hacker over here ")
Expand Down Expand Up @@ -438,6 +461,18 @@ def launch_gui(ghproj = ""):
anim_string = f"qb_file = songs/{midname}_scripts.qb".lower() + "\n" + anim_string
with open(f"{output}\\{midname}_scripts.txt", "w") as f:
f.write(anim_string)
elif sys.argv[1] == "convert_5_to_wt":
if "output" not in locals():
output = f'{os.path.dirname(input_file)}'
midname = os.path.basename(input_file)[:os.path.basename(input_file).find(".")]
if re.search(r'^[a-c]dlc', midname, flags=re.IGNORECASE):
midname = midname[1:]
compile_args = []
if len(sys.argv) > 3:
compile_args.extend(sys.argv[3:])
wt_pak = convert_5_to_wt(input_file, *compile_args)
with open(f"{output}\\a{midname}.pak.xen".lower(), "wb") as f:
f.write(wt_pak)
elif sys.argv[1] == "make_wt_mid":
qb_file = mid_qb.make_wt_qb(sys.argv[2])
elif sys.argv[1] == "extract_fsb":
Expand Down
13 changes: 7 additions & 6 deletions compile-folder.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
pyinstaller -p "D:\GitHub\Guitar-Hero-III-Tools\create_audio" ^
-p D:\GitHub\Guitar-Hero-III-Tools\midqb_gen ^
-p D:\GitHub\Guitar-Hero-III-Tools\pak_extract ^
-p D:\GitHub\Guitar-Hero-III-Tools\ska_converter ^
-p D:\GitHub\Guitar-Hero-III-Tools ^
-p "D:\GitHub\Guitar-Hero-III-Tools\gui" ^
pyinstaller -p ".\create_audio" ^
-p .\midqb_gen ^
-p .\pak_extract ^
-p .\ska_converter ^
-p . ^
-p ".\gui" ^
--add-data "anim_loops.txt;." ^
--add-data "debug.txt;." ^
--add-data "conversion_files_prod;conversion_files" ^
--add-data "create_audio\default_audio\blank.mp3;create_audio\default_audio" ^
Expand Down
112 changes: 112 additions & 0 deletions conversion_files/basic_loops.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
car_female_anim_struct = {
guitar = {
pak = L_GUIT_Ginger_Bulls_anims
anim_set = L_GUIT_Ginger_Bulls_anims_set
finger_anims = guitarist_finger_anims_car_female
fret_anims = fret_anims_rocker
strum_anims = CAR_Female_Normal
facial_anims = facial_anims_female_rocker
}
Bass = {
pak = L_GUIT_Judita_Bulls_anims
anim_set = L_GUIT_Judita_Bulls_anims_set
finger_anims = guitarist_finger_anims_car_female
fret_anims = fret_anims_rocker
strum_anims = CAR_Female_Normal
facial_anims = facial_anims_female_rocker
}
drum = {
pak = L_DRUM_Loops_Standard_anims
anim_set = l_drum_loops_standard_anims_set
facial_anims = facial_anims_female_rocker
}
vocals = {
pak = L_SING_Amanda_Bulls_anims
anim_set = L_SING_Amanda_Bulls_anims_set
facial_anims = facial_anims_female_rocker
}
}
car_male_anim_struct = {
guitar = {
pak = L_GUIT_Matt_Bulls_anims
anim_set = L_GUIT_Matt_Bulls_anims_set
finger_anims = guitarist_finger_anims_CAR_Male
fret_anims = fret_anims_rocker
strum_anims = CAR_Male_Normal
facial_anims = facial_anims_male_rocker
}
Bass = {
pak = L_GUIT_Davidicus_Bulls_anims
anim_set = L_GUIT_Davidicus_Bulls_anims_set
finger_anims = guitarist_finger_anims_CAR_Male
fret_anims = fret_anims_rocker
strum_anims = CAR_Male_Normal
facial_anims = facial_anims_male_rocker
}
drum = {
pak = L_DRUM_Loops_Standard_anims
anim_set = l_drum_loops_standard_anims_set
facial_anims = facial_anims_male_rocker
}
vocals = {
pak = L_SING_Patrick_Bulls_anims
anim_set = L_SING_Patrick_Bulls_anims_set
facial_anims = facial_anims_male_rocker
}
}
car_female_alt_anim_struct = {
guitar = {
pak = L_GUIT_Ginger_Bulls_anims
anim_set = L_GUIT_Ginger_Bulls_anims_set
finger_anims = guitarist_finger_anims_car_female
fret_anims = fret_anims_rocker
strum_anims = CAR_Female_Normal
facial_anims = facial_anims_female_rocker
}
Bass = {
pak = L_GUIT_Judita_Bulls_anims
anim_set = L_GUIT_Judita_Bulls_anims_set
finger_anims = guitarist_finger_anims_car_female
fret_anims = fret_anims_rocker
strum_anims = CAR_Female_Normal
facial_anims = facial_anims_female_rocker
}
drum = {
pak = L_DRUM_Loops_Standard_anims
anim_set = l_drum_loops_standard_anims_set
facial_anims = facial_anims_female_rocker
}
vocals = {
pak = L_SING_Amanda_Bulls_anims
anim_set = L_SING_Amanda_Bulls_anims_set
facial_anims = facial_anims_female_rocker
}
}
car_male_alt_anim_struct = {
guitar = {
pak = L_GUIT_Matt_Bulls_anims
anim_set = L_GUIT_Matt_Bulls_anims_set
finger_anims = guitarist_finger_anims_CAR_Male
fret_anims = fret_anims_rocker
strum_anims = CAR_Male_Normal
facial_anims = facial_anims_male_rocker
}
Bass = {
pak = L_GUIT_Davidicus_Bulls_anims
anim_set = L_GUIT_Davidicus_Bulls_anims_set
finger_anims = guitarist_finger_anims_CAR_Male
fret_anims = fret_anims_rocker
strum_anims = CAR_Male_Normal
facial_anims = facial_anims_male_rocker
}
drum = {
pak = L_DRUM_Loops_Standard_anims
anim_set = l_drum_loops_standard_anims_set
facial_anims = facial_anims_male_rocker
}
vocals = {
pak = L_SING_Patrick_Bulls_anims
anim_set = L_SING_Patrick_Bulls_anims_set
facial_anims = facial_anims_male_rocker
}
}
10 changes: 10 additions & 0 deletions convert_5_to_wt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import subprocess
import os
import shutil

pak_name = os.path.basename(input("Drag in your pak file: ")).replace("\"","")
root_folder = os.path.realpath(os.path.dirname(__file__))
perf = "_performance.txt" if os.path.isfile("_performance.txt") else ""
scripts = "_song_scripts_anim_loops.txt" if os.path.isfile("_song_scripts_anim_loops.txt") else ""
ska_files = "SKA Files" if os.path.isdir("SKA Files") else ""
subprocess.run(["python",f"{root_folder}\\GHToolkit.py", "convert_5_to_wt", pak_name, perf])
Loading

0 comments on commit e566625

Please sign in to comment.