S4LResReplacer – a lightweight tool to read and write raw resource files in-place for S4 League.
- Write & Save any changed or new file into
resource.s4hd - Auto-Cleanup: restores original resources after S4Client exits
- CLI Flags:
--enable-customto write,--clean-onlyto revert
- Download
S4LResReplacer.zipfrom Releases - Extract into your S4 League root folder
- Create two .bat scripts (e.g.,
res_write.bat&res_clean.bat):- Write:
S4LResReplacer.exe --enable-custom - Clean:
S4LResReplacer.exe --clean-only
- Write:
- Create a
Customfolder in the S4 League root - Place your resource files in
Custommirroring their in-game paths - Run
res_write.batto apply overrides - When exiting S4, run
res_clean.bat(or rely on--clean-onlyauto-check) to restore originals
Tip: Bind these scripts to your launcher to auto-enable custom resources before launch and auto-clean on exit.
private async void bt_StartGame_Click(object sender, RoutedEventArgs e)
{
bt_StartGame.IsEnabled = false;
if (chbk_CustomResources.IsChecked == true)
{
var psi = new ProcessStartInfo
{
FileName = Path.Combine(AppContext.BaseDirectory, "S4LResReplacer.exe"),
Arguments = "--enable-custom",
UseShellExecute = false,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden
};
using var proc = Process.Start(psi);
if (proc != null) await proc.WaitForExitAsync();
}
await Task.Run(() => LoginClient.Connect(Constants.ConnectEndPoint));
Properties.Settings.Default.Save();
try
{
Process.Start(new ProcessStartInfo
{
FileName = Path.Combine(AppContext.BaseDirectory, "S4LResReplacer.exe"),
Arguments = "--clean-only",
UseShellExecute = false,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden
});
}
catch {}
}Distributed under the MIT License. See LICENSE for more information.
