Feldarian / Glacier1AudioTool

Tool able to read, write, import and export selected Glacier 1 sound-related formats.
European Union Public License 1.2
13 stars 0 forks source link

Hitman Contracts: Cannot replace audio successfully #3

Open Deji69 opened 4 months ago

Deji69 commented 4 months ago

I'd really like to replace two licensed music tracks in the game: Put Your Head On My Shoulders and Puressence.

So far I'm only trying to replace the Paul Anka track (Music_PutYourHead.wav). I've tried exporting everything to a folder, replacing just that file, and reimporting the folder. Sometimes the streams.wav ends up being 2MB so I know it's failed, other times the streams.wav is a relatively normal size (but always smaller than the original, even though my replacement file sizes are larger), but most of the music and SFX in the game end up completely broken and inaudible.

Next I've tried removing all the files I don't want to modify from the folder and re-importing just the one file, unaltered, into the original streams.wav. Instead of showing only the modified file as yellow in the diff, all files within 'Streams' show as yellow ('Scenes' stays white). I save this, and in the best case scenario, all of the sound in the game is fine other than the track that was reimported. It's just silence in place of it.

Any insights onto how to successfully do this process? It's unclear even how things are supposed to work.

Deji69 commented 4 months ago

Okay, I think managed to figure out a working process:

So I have two songs in the game, each with different formats, replaced in the game now without breaking anything else.

Would be nice if this didn't require so many hacky manual steps, but just glad to be able to pull this off now. Thanks for the tool btw @WSSDude.

WSSDude commented 4 months ago

Yeah... Its not the best to say the least in terms of the UI/UX. Not mentioning that, if you don't have enough RAM, it may do quite a few weird things, as the tool works with the files in-memory atm. I never really focused on those as this was made for dubbing project and it was good enough for purpose of that.

I observed issues with some settings when I started refactoring it into some more reusable pieces if someone wanted to use decoder/encoder in something else (maybe for some more proper mod tool for example that is not just a simple replacer in the end) and left it sort of mid dev... The defaults should always work but I think I saw the same issue with Contracts specifically, unsure now.

Older builds without Blood Money may work better with these, as Blood Money, Kane & Lynch and Mini Ninjas were 3 last games I was doing edits for (which may have broke those previous ones).

I'll try to amend some of these eventually, just need to find time and make it build on Linux first or setup some CI, as I completely got rid of the Windows by now and I use few platform-dependent things in the tool requiring porting. Will need to think of how to approach that one.