Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TS2 gun sfx mod + clean-up #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
Binary file added Install/Patches/xbs_extract.patch
Binary file not shown.
Binary file added Install/Setup-Files/7za.exe
Binary file not shown.
9 changes: 6 additions & 3 deletions Install/Setup-Files/install-thanks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Special Thanks:
- TanFlo1997: Creating the Dambuster Studios Easter-Egg Hunt Discord server
- XeNTaX Game Research Forum: technical information about Homefront

The setup wizard makes use of these external programs:
- Jojos Binary Diff ("Jdiff"): https://sourceforge.net/projects/jojodiff/
- DepotDownloader: https://github.com/SteamRE/DepotDownloader
The setup wizard makes use of these external open-source programs:
- JPATCH, Jojos Binary Diff ("Jdiff"): https://sourceforge.net/projects/jojodiff/
- Xbox ADPCM decoder and player 0.2.3a by Luigi Auriemma: http://aluigi.altervista.org/papers.htm#xbox
- 7-Zip: https://www.7-zip.org/
- DepotDownloader: https://github.com/SteamRE/DepotDownloader
The binaries for these programs are bundled in with this installer. The source code for each program can be acquired by using the links provided above.
88 changes: 88 additions & 0 deletions Install/Setup-Files/ts2_gun_sfx.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
@echo off

if "%~1"=="" exit \b 1
set "gamepath=%~1"

if not exist "%gamepath%\gamehf2\lsao_cached.pak" exit \b 1

:: get XBS sound files from lsao_cached.pak (and put them into an archive)
jptch "%gamepath%\gamehf2\lsao_cached.pak" xbs_extract.patch xbs_extracted.tar

if not exist xbs_extracted.tar exit \b 1

:: extract the archive we just made
7za x -aoa xbs_extracted.tar

if not exist xbs\electrogun2_loop22_01.xbs exit \b 1

mkdir ts2\sfx

:: convert Xbox xbs files to PC-compatible wav audio files
xbadpdec -o 0x20 -f 22050 -c 1 xbs\electrogun2_loop22_01.xbs ts2\sfx\electrogun2_loop22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun14_me_22.xbs ts2\sfx\gun14_me_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun71b_withbullet22_01.xbs ts2\sfx\gun71b_withbullet22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun71c_22.xbs ts2\sfx\gun71c_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_assault_rifle_withbullet22_01.xbs ts2\sfx\gun_assault_rifle_withbullet22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_cock03b_22.xbs ts2\sfx\gun_cock03b_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_console_on22_05.xbs ts2\sfx\gun_console_on22_05.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_dr08c_22.xbs ts2\sfx\gun_dr08c_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_dryfire01_22.xbs ts2\sfx\gun_dryfire01_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_electro_charge22_01.xbs ts2\sfx\gun_electro_charge22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_electrogun22_01.xbs ts2\sfx\gun_electrogun22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_fire_extin22_04.xbs ts2\sfx\gun_fire_extin22_04.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_fire_extin_loop22_03.xbs ts2\sfx\gun_fire_extin_loop22_03.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_fire_extin_loop22_03b.xbs ts2\sfx\gun_fire_extin_loop22_03b.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_fixedgun22_07e.xbs ts2\sfx\gun_fixedgun22_07e.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_flamethrower22_02.xbs ts2\sfx\gun_flamethrower22_02.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_flamethrower_loop22_02b.xbs ts2\sfx\gun_flamethrower_loop22_02b.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_grenade_launcher01c_22.xbs ts2\sfx\gun_grenade_launcher01c_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_grenade_new22_01b.xbs ts2\sfx\gun_grenade_new22_01b.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_grenade_new22_02.xbs ts2\sfx\gun_grenade_new22_02.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_handgun_scifi_22.xbs ts2\sfx\gun_handgun_scifi_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_hybrid06_me_22.xbs ts2\sfx\gun_hybrid06_me_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_hybrid_rocket01b_22.xbs ts2\sfx\gun_hybrid_rocket01b_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_laser01b_me_22.xbs ts2\sfx\gun_laser01b_me_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_laser02_me_22.xbs ts2\sfx\gun_laser02_me_22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_laser3way22_06b.xbs ts2\sfx\gun_laser3way22_06b.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_m16_04_withbullet22.xbs ts2\sfx\gun_m16_04_withbullet22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_mauser_withbullet22_01.xbs ts2\sfx\gun_mauser_withbullet22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_mini_withbullet22_02.xbs ts2\sfx\gun_mini_withbullet22_02.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_plasma_overheat22_01.xbs ts2\sfx\gun_plasma_overheat22_01.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_policecar22_03.xbs ts2\sfx\gun_policecar22_03.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_railbot_laser22_03.xbs ts2\sfx\gun_railbot_laser22_03.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_redlaser22_03.xbs ts2\sfx\gun_redlaser22_03.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_rocketlauncher22.xbs ts2\sfx\gun_rocketlauncher22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_silenced22.xbs ts2\sfx\gun_silenced22.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_sniper_rifle22_01d.xbs ts2\sfx\gun_sniper_rifle22_01d.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_tommygun_withbullet22_02.xbs ts2\sfx\gun_tommygun_withbullet22_02.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_uzi_withbullet22_01d.xbs ts2\sfx\gun_uzi_withbullet22_01d.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_walther_and_bullet22_01e.xbs ts2\sfx\gun_walther_and_bullet22_01e.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_walther_colt22_02.xbs ts2\sfx\gun_walther_colt22_02.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gun_walther_colt22_03.xbs ts2\sfx\gun_walther_colt22_03.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gunpowder_pour22_02a.xbs ts2\sfx\gunpowder_pour22_02a.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gunpowder_pour22_02b.xbs ts2\sfx\gunpowder_pour22_02b.wav
xbadpdec -o 0x20 -f 22050 -c 1 xbs\gunrespawn22_02.xbs ts2\sfx\gunrespawn22_02.wav
xbadpdec -o 0x20 -f 44100 -c 1 xbs\gun_scifi_sniper44_01.xbs ts2\sfx\gun_scifi_sniper44_01.wav
xbadpdec -o 0x20 -f 44100 -c 1 xbs\gun_sniperrifle_nu44_03b.xbs ts2\sfx\gun_sniperrifle_nu44_03b.wav

:: create a copy of each sound effect for the first-person view
copy ts2\sfx\electrogun2_loop22_01.wav ts2\sfx\electrogun2_loop22_01_fp.wav
copy ts2\sfx\gun71c_22.wav ts2\sfx\gun71c_22_fp.wav
copy ts2\sfx\gun_console_on22_05.wav ts2\sfx\gun_console_on22_05_fp.wav
copy ts2\sfx\gun_dr08c_22.wav ts2\sfx\gun_dr08c_22_fp.wav
copy ts2\sfx\gun_grenade_new22_01b.wav ts2\sfx\gun_grenade_new22_01b_fp.wav
copy ts2\sfx\gun_hybrid_rocket01b_22.wav ts2\sfx\gun_hybrid_rocket01b_22_fp.wav
copy ts2\sfx\gun_m16_04_withbullet22.wav ts2\sfx\gun_m16_04_withbullet22_fp.wav
copy ts2\sfx\gun_redlaser22_03.wav ts2\sfx\gun_redlaser22_03_fp.wav
copy ts2\sfx\gun_rocketlauncher22.wav ts2\sfx\gun_rocketlauncher22_fp.wav
copy ts2\sfx\gun_sniper_rifle22_01d.wav ts2\sfx\gun_sniper_rifle22_01d_fp.wav
copy ts2\sfx\gun_sniperrifle_nu44_03b.wav ts2\sfx\gun_sniperrifle_nu44_03b_fp.wav
copy ts2\sfx\gun_tommygun_withbullet22_02.wav ts2\sfx\gun_tommygun_withbullet22_02_fp.wav
copy ts2\sfx\gun_uzi_withbullet22_01d.wav ts2\sfx\gun_uzi_withbullet22_01d_fp.wav
copy ts2\sfx\gun_walther_and_bullet22_01e.wav ts2\sfx\gun_walther_and_bullet22_01e_fp.wav
copy ts2\sfx\gun_walther_colt22_02.wav ts2\sfx\gun_walther_colt22_02_fp.wav
copy ts2\sfx\gun_walther_colt22_03.wav ts2\sfx\gun_walther_colt22_03_fp.wav

7za a -tzip -r -mx0 "%gamepath%\gamehf2\ts2_guns_sfx.pak" "ts2"

exit \b 0
Binary file added Install/Setup-Files/xbadpdec.exe
Binary file not shown.
23 changes: 15 additions & 8 deletions Install/TS2-Redux-Installer.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "TS2 Redux"
#define MyAppVersion "0.2.7"
#define MyAppVersion "0.2.8"
#define MyAppPublisher "Redux Tech Team"
#define GitHubURL "https://github.com/HFTSRedux/TS2Redux"
#define DiscordURL "https://discord.gg/fBnFZBYht5"
Expand Down Expand Up @@ -86,7 +86,8 @@ Name: "mod\minigames"; Description: "Minigames Unlock - Unlocks 3 arcade games i
Name: "mod\haunted"; Description: "Yossarian's Haunted Mod (DONT USE WITH REMIX)"; Flags:; Types: extended
Name: "mod\ts1guns"; Description: "Yossarian's TS1 Guns Mod"; Flags:checkablealone; Types: extended
Name: "mod\vattic"; Description: "Yossarian's John Vattic Playable Mod"; Flags:checkablealone; Types: extended
Name: "mod\breathe"; Description: "Disable Character Breathing Effect"; Flags: checkablealone; Types: main extended
Name: "mod\breathe"; Description: "Disable Character Breathing Effect"; Flags: checkablealone; Types: extended
Name: "mod\ts2sounds"; Description: "Restore original TS2 weapon sound effects (based on Xbox port)"; Flags: checkablealone; Types: extended

;[Tasks]
;Name: "task"; Description: "Task";
Expand Down Expand Up @@ -123,13 +124,17 @@ Source: "Setup-Files\homefront_ripper.bat"; DestDir: "{tmp}"; Flags: deleteafter
; textures PAK
Source: "Texture-Mods\ts2_redux.pak"; DestDir: "{app}\gamehf2"; Components: ui\textures
; Jdiff - jojodiff.sourceforge.net
Source: "Setup-Files\jptch.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: theme\launcher fix\neopatch
Source: "Setup-Files\jptch.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: theme\launcher fix\neopatch mod\vattic mod\ts1guns mod\haunted mod\ts2sounds
; patch data
Source: "NeoTokyo-PatchV2\NeoTokyo-PatchV2.data"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: fix\neopatch
Source: "NeoTokyo-PatchV2\TS2Vattic.Patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\vattic
Source: "NeoTokyo-PatchV2\TS1Guns.Patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\ts1guns
Source: "NeoTokyo-PatchV2\Haunted.Patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\haunted
Source: "Patches\NeoTokyo-PatchV2.patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: fix\neopatch
Source: "Patches\TS2Vattic.Patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\vattic
Source: "Patches\TS1Guns.Patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\ts1guns
Source: "Patches\Haunted.Patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\haunted
Source: "EXE-Appearence\TS2-EXE-Appearence-Patch.pat"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: theme\launcher
Source: "Patches\xbs_extract.patch"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\ts2sounds
Source: "Setup-Files\ts2_gun_sfx.bat"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\ts2sounds
Source: "Setup-Files\7za.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\ts2sounds
Source: "Setup-Files\xbadpdec.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: mod\ts2sounds

[UninstallDelete]
Type: files; Name: "{app}\Bin64\TimeSplitters2.exe"; Components: theme\launcher
Expand All @@ -145,10 +150,12 @@ Name: "{commondesktop}\TimeSplitters 2"; Filename: "{app}\Bin64\TimeSplitters2.e
[Run]
Filename: "{#DiscordURL}"; Description: "Join TimeSplitters Online Discord Server"; Flags: postinstall shellexec runasoriginaluser;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\Bin64\Homefront2_Release.exe"" ""{tmp}\TS2-EXE-Appearence-Patch.pat"" ""{app}\Bin64\TimeSplitters2.exe"" "; StatusMsg: "Creating TS2 Launcher..."; Flags: skipifsilent; Components: theme\launcher;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\gamehf2\lsao_cached.pak"" ""{tmp}\NeoTokyo-PatchV2.data"" ""{app}\gamehf2\ts2_neotokyo_fix.pak"" "; StatusMsg: "Fixing NeoTokyo..."; Flags: skipifsilent; Components: fix\neopatch;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\gamehf2\lsao_cached.pak"" ""{tmp}\NeoTokyo-PatchV2.patch"" ""{app}\gamehf2\ts2_neotokyo_fix.pak"" "; StatusMsg: "Fixing NeoTokyo..."; Flags: skipifsilent; Components: fix\neopatch;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\gamehf2\lsao_cached.pak"" ""{tmp}\Haunted.Patch"" ""{app}\gamehf2\TS2HauntedEdition.pak"" "; StatusMsg: "Creating Haunted Edition pak..."; Flags: skipifsilent; Components: mod\haunted;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\gamehf2\lsao_cached.pak"" ""{tmp}\TS1Guns.Patch"" ""{app}\gamehf2\TS2TS1ClassicGuns.pak"" "; StatusMsg: "Creating TS1Guns pak..."; Flags: skipifsilent; Components: mod\ts1guns;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\gamehf2\lsao_cached.pak"" ""{tmp}\TS2Vattic.Patch"" ""{app}\gamehf2\TS2Vattic.pak"" "; StatusMsg: "Creating Vattic pak..."; Flags: skipifsilent; Components: mod\vattic;
Filename: "{tmp}\ts2_gun_sfx.bat"; Parameters:" ""{app}"" "; StatusMsg: "Creating TS2 Gun SFX pak..."; Components: mod\ts2sounds;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\Bin64\Homefront2_Release.exe"" ""{tmp}\TS2-EXE-Appearence-Patch.pat"" ""{app}\Bin64\TimeSplitters2.exe"" "; StatusMsg: "Creating TS2 Launcher..."; Flags: skipifsilent; Components: theme\launcher;
Filename: "{tmp}\homefront_ripper.bat"; Parameters:" ""{app}"" "; StatusMsg: "Running Homefront Ripper..."; Components: theme\ripper;
Filename: "{cmd}"; Parameters:"/c rd /s /q ""{app}\ripped"""; Description: "Delete Ripped Homefront files"; Flags: postinstall; Components: theme\ripper;

Expand Down