don't click here

Sonic Forces (PC/PS4/XB1/Switch) Hacking & Resources

Discussion in 'Engineering & Reverse Engineering' started by Dario FF, Nov 7, 2017.

  1. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    I had that issue when using a tabbed Explorer alternative (though not on vanilla Explorer for some reason) - try this:

    1. Make a shortcut to the SFPac.py file
    2. Go to its Properties and add "C:\Python27\python.exe" (assuming Python 2.7.14 installed to the default directory) to the start of the Target line, so the whole Target line looks like this:
      "C:\Python27\Python.exe <Drive Letter>\<Full path to script>\SFPac.py"
    3. This should make the shortcut droppable as you're starting the Python executable, then loading the script using that.
    Not sure if there's any .exe PAC extractors out there but this is what worked for me getting drag-and-drop working with the script!
     
  2. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    Managed to get some custom sounds into the game! Sorry in advance if this is common/old knowledge but posting it here just in case!

    http://youtu.be/31FOcQ7AdP8

    SonicAudioTools extracts and recompiles .acb files, but the actual sound files are in .hca format. To convert these to WAV and back again I found the tools in OpenCGSS/DereTools were the most up to date solution - they were made for one of the iDOLM@STER games but they work fine here. The three command-line only programs you need are:

    1. hca2wav - Converts .hca to .wav

      Run from command line like this: "hca2wav <directory>\<name>.hca"
    2. hcaenc - Re-encodes your edited .wav back into .hca

      Run from command line like this: "hca2enc <directory>\<name>.wav <directory>\<name>.hca"
    3. hcacc - For some reason the .hca format has some really annoying encryption thing associated with it that you need to assign properly or everything (even half a second of dead silence) will come out as horrible digital garbage.

      Luckily SF supports the "no cipher keys" setting on this program, so make sure to run your new .hca file through this program like so:

      "hca2cc <directory>\<input .hca name>.hca <directory>\<output .hca name>.hca" -ot 0
    4. After all that your sound should be good to go!

    I think your sound file needs to be stereo too in order to work, but I'm basing this on the fact that a single mono sound I converted still came out as garbage despite running it though hcacc so I could be wrong.

    I made a pretty terrible .bat file to simplify the re-encoding process - I'm sure you guys could do 1000x better than this but here it is - copy this into a text editor and save it as a .bat in the same folder as the OpenCGSS tools:

    Code (Text):
    1. SET /P directory=Put the original HCA and your WAV in the same folder and enter the full directory here without the last slash
    2. SET /P thewav=Name of the WAV file without its extension:
    3. SET /P thehca=Name of the HCA file without its extension:
    4.  
    5. CALL hcaenc "%directory%\%thewav%.wav" "%directory%\%thehca%.hca"
    6. CALL hcacc "%directory%\%thehca%.hca" "%directory%\%thehca%_cc.hca" -ot 0
    I put "_cc" at the end of the output .hca just to make sure that everything's been completed successfully - once that's done rename the "<name>_cc.hca" file to whatever it needs to be (usually a five-digit number like "00001.hca", overwrite the original .hca file, repack the .acb and test it in-game!


    Edit: Fixed YouTube embed and updated instructions.

    Edit 2: Skyth's suggestion of VGAudio is MUCH easier than what I've listed here!

    Here's a quick rundown of how to convert a SF .hca to a .wav and back again:

    1. Go to the linked GitHub page and download VGAudioCli.exe (I also grabbed VGAudioTools.exe just in case) and extract them to a folder of your choice
    2. Drag and drop a .hca file onto VGAudioCli.exe to convert it to .wav
    3. Edit and re-export the .wav
    4. Run VGAudioCli.exe again from the command line with the following arguments:
      VGAudioCli -i <directory>/<name>.wav <directory>/<name>.hca
    5. Repack your edited audio with SonicAudioTools' AcbEditor and give it a test!
     
  3. Skyth

    Skyth

    Member
    27
    34
    13
    You can use the vgmstream component for foobar2000 to decode and play lots of audio formats used in games, including HCA. It's honestly easier this way, and you can decode them to WAV from the interface as well.

    As for encoding HCA, VGAudio is a pretty good choice in my opinion. It doesn't make use of the official CRIWARE tools and implements a custom algorithm, which is a first for HCA.
     
  4. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    Sweet! I'll have to give those a try, if there's an easier method out there that's music to my ears! :D
     
  5. Windii

    Windii

    Robot Stonks Riser Member
    Yeah, the shortcut method seems to work, thank god for that. Although I'm not sure if I still understand some of the game's .dds files. They seem to use this new format that is not compatible with InfranView or Photoshop with the Nvidia plugins. Maybe some of you guys know if there are any modern methods for viewing and converting them than whatever I use? For example, this guy seems to have been able to figure them out and made a script that converts all .dds files in a folder to .tga. This is how I could grab those backgrounds on the main menu (they're big!):
    [​IMG]
    [​IMG]
     
  6. Skyth

    Skyth

    Member
    27
    34
    13
    I got two plugins you can use.

    Plugin for Paint.NET
    Plugin for Photoshop

    For the Paint.NET one, you need to rename the extensions to DDS2 so it can load them.
     
  7. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    I'm having some trouble getting the animated skeletons out using modelfbx. They only spit out 5kb fbx files with no animation.
     
  8. Skyth

    Skyth

    Member
    27
    34
    13
    Are you trying to rip the .anm.hkx files? If so, that's not possible yet, since Forces uses Havok 2016 which has no publicly released tools or SDK we can use to rip the files.
     
  9. Windii

    Windii

    Robot Stonks Riser Member
    Wow, this works like a charm. Completely beats the Nvidia tools in every way. It even keeps the transparency.
     
  10. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    Makes sense =/
     
  11. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    Skyth you amazing man, that Paint.net plugin just made everything texture related so much easier (better compressed, too!)
     
  12. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    Hi all! Has anyone had any luck replacing the game's music?

    My attempts at replacing the 0000x_streaming.hca files in bgm_wars.acb have resulted in no music playing at all anywhere so far, even if I only replace one song I know doesn't have a "boost" equivalent (e.g. Infinite Battle 1) - I remember it being mentioned somewhere in the thread that if you replace a Modern Sonic stage's music you need to have a mid-boosted "boost" version of the exact same length but I haven't touched those!
     
  13. Skyth

    Skyth

    Member
    27
    34
    13
    I've just updated the PAC unpacker/packer, grab it from the gist if you haven't already.
    Problem where terrain PAC files didn't extract with correct names has been solved, and the PAC creation is also more accurate. Hopefully it fixes all of the problems people had.
    Here's an EXE Version if you don't want to mess with Python.
     
  14. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    Thanks to the help of Radfordhound, Beatz and PTKickass, I present the first release of my Modern Sonic Tweaks mod - featuring PTKickass' amazing Fixed Classic Sonic mod (included with permission).

    [​IMG]

    (YouTube trailer incoming, until then have the GameBanana banner pic!)
     
  15. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,845
    3
    18
    Glendale, AZ
    Living life.
    Yeah now this is what I'm talking about, quality of life improvements! now lets get some level editing going to make the levels not complete boost-2-win garbage (and whatever was wrong with classic's levels as well). maybe even make the bosses more challenging too.
     
  16. Deep Dive Devin

    Deep Dive Devin

    Goblin Sex Researcher Member
    2,566
    1,394
    93
    OR
    Pretty sure it's not exactly that simple.

    On a related note though, does the tweaks mod affect Sonic's acceleration at all? That's really the biggest issue with his control.
     
  17. RikohZX

    RikohZX

    Member
    1,025
    287
    63
    Nope, Sonic's still got an unnatural 'jump' between speeding up and his speed cap. Probably a really awkward leftover from when Sonic adjusted between walking and running in Lost World which wasn't re-appropriated for the new gameplay, though I'm curious if it can also be tweaked.
     
  18. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    I set everything to 10,000 during testing and Sonic seemed to reach (a ludicrous) max speed instantly so maybe there's a value for his acceleration hidden around somewhere! I've also tracked down a value that controls how far you move backwards after a homing attack - setting that to a negative number shoots you forward instead, everything flows so much better that way in my opinion.

    Edit: Just updated the mod to include a few extra tweaks - as I said above the 3D homing attack now launches you slightly forward, I've increased the 3D slide speed a little and there's no 2D homing attack cooldown anymore. Next up is the acceleration and hopefully making 2D homing attacks launch you forward too!
     
  19. CornflakeRush

    CornflakeRush

    Member
    24
    0
    0
    http://www.youtube.com/watch?v=FESlXkKQx9g

    Edit: Oop! My bad, meant to edit the original post.
     
  20. RikohZX

    RikohZX

    Member
    1,025
    287
    63
    I've noticed that while the Avatar inherits Modern Sonic's physics for obvious reasons in Tag Team stages, Bird Avatars inherit his Double Jump changes in solo play. I think the Wire Attack might be faster too, since I played a Red SOS mission that forced me to use a barebones Burst-wielding Bird, but not sure. Wonder how much crosses over between the two?