LiQuiD911 Posted September 11, 2014 Share Posted September 11, 2014 (edited) I made a simple experiment transplanting the ogg data from an upk to another using an hexeditor by copy pasting the track where the ogg header marker starts. Well it freezes the game :\ changing the duration and size in the music class inside the upk doesn't help either. The "donor" audiostream is bigger than the target one.So my question is : Does the upk header store the package size and does the upk have a trailer? It seems the ogg data is "appended" after the upk classes. It seems simple but it's not working... any ideas why? Edit: precise replacement of bytes of a smaller stream inside a bigger works fine, there is just an instant of static when the smaller ends and the other "continues" but I want to do the opposite.Actualybegin object name=MissionControlSoundtrack_short class=SoundNodeWave Duration=0.0 NumChannels=2 SampleRate=44100 RawPCMDataSize=0object end is just decorative, changing Duration and RawPCMDataSize to zero has no effects. If I delete a single byte of ogg data from the original, it no longer plays and the game freezes on quit. Edited September 11, 2014 by LiQuiD911 Link to comment Share on other sites More sharing options...
wghost81 Posted September 12, 2014 Share Posted September 12, 2014 UPK Format document: http://www.nexusmods.com/xcom/download/1000003820 To properly resize an object, you have to edit its export table entry. Patcher will work with any packages, not just scripts and maps, as the structure is the same. Use BEFORE_HEX/AFTER_HEX to automatically resize an object. Link to comment Share on other sites More sharing options...
LiQuiD911 Posted September 20, 2014 Author Share Posted September 20, 2014 Am I getting something wrong? I extract the binary data of MissionControlSoundtrack_short using UE Exporer into the binary file SoundMissionControlMusic.MissionControlSoundtrack_short.SoundNodeWave.Then I patch the music file with the same binary data I just extracted. Well this crashes the game o_O UPK_FILE=HQSound_MCMusic_SF.upkMODDED_FILE=SoundMissionControlMusic.MissionControlSoundtrack_short.SoundNodeWave:AUTO Link to comment Share on other sites More sharing options...
tracktwo Posted September 20, 2014 Share Posted September 20, 2014 Did you set the OBJECT setting to the entity you're replacing (SoundMissionControlMusic.MissionControlSoundtrack_short)? I posted some instructions for replacing sound effects in the "Sound Replacement Possible?" thread. I'm a little surprised you managed to get it to work by replacing the longer music file with a shorter one with no other changes. I did a test replacing the memorial music with a random song I found on my hard drive and it works, but only if I clean up the leftover data and fix up the 0x30 bytes at the end of the object. Later tonight I'm going to try working on replacing with a larger file and making the process simpler. Link to comment Share on other sites More sharing options...
LiQuiD911 Posted September 21, 2014 Author Share Posted September 21, 2014 (edited) Well my replacement test wasn't exactly a success, it indeed plays the shorter track but when it ends the remainging of the original continues. Shouldn't the Object setting be automatic using MODDED_FILE?Edit: oh, you already figured it out in the other thread,congrats :) Edited September 21, 2014 by LiQuiD911 Link to comment Share on other sites More sharing options...
Recommended Posts