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

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

  1. And then they go and make the level design a step down from even Colors, another step back from how open ended and layered Generations' levels were. This game doesn't know what it wants to be.
     
  2. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,258
    1
    18
    Castlevania prettyness
    [​IMG]

    so turns out there's some plaintext scripts in the .exe itself.

    I wanted to see how many references to "wars" was in the executable so I loaded the EXE in notepad++ for a kind of "find all references" thing, and to my surprise, parts of the program have a kind of embedded... lua script? I don't know what ot call this, but it seems like this is a bunch of properties to affect development workflow of some sort.

    Also, funny enough, the game's got references to the development E-Mail. Use this info wisely :specialed:/>

    gonna see if I can translate any of the descriptions commented out. Might not work but let's hope.


    EDIT: the text doesnt seem to friendly with google translate so a human'll have to decipher it, but this is interesting.

    Apparently the entire OpenSSL license agreement is in Forces' game code starting at 043C32D8. Like the ENTIRE THING in what looks like it was supposed to be commented out C++ code.
     
  3. Windii

    Windii

    stan sakazaki mikoko ya coward Member
    If you are using Notepad++ you can encode the weird text into Japanese from the "Encoding" option at the top. Like this:
    [​IMG]

    These descriptions are not very exciting, though.
     
  4. Dark Sonic

    Dark Sonic

    Member
    12,639
    224
    43
    Working on my art!
    Question. Is it possible to have a tag team mode of Classic Sonic and Modern Sonic or of Classic Sonic and the Avatar? Obviously the game just came out but I just wonder what this game might be capable of. That and I feel like every level should just be tag team to unlock the full potential of the moveset.

    Also I just thought the other day this game might actually be a good base for porting Colors levels thanks to the Wispons. At least it's a better base in that regard than Generations or Lost World.
     
  5. TiMan

    TiMan

    OH NO Member
    5
    0
    0
    Israel
    I can assume that's not possible, as these gameplay modes are probably hardocded into the .exe. That's a game mode of itself, just like a werehog or a classics sonic game mode. That would be intersting if it is possible, though.

    Side note: you can swap levels for tag team and other levels.
     
  6. RikohZX

    RikohZX

    Member
    384
    5
    18
    Well, Sonic has the unused Wall Jump fully functional, and the Avatar gains a double jump regardless of race in Tag Team stages while Sonic inherits the Avatar's mobility upgrades from their Wispon; the two basically share traits of sorts depending on gameplay circumstances. Now I wonder if it's possible to enable the Boost for the Avatar, or figure out some way to get Sonic able to use Wisps beyond just the Boost capsules (which could be used to bypass grapple hook limits in Avatar stage design or so forth with some tweaks).

    As it stands, I guess the big thing is figuring out what's hard coded and what isn't right now.
     
  7. Dark Sonic

    Dark Sonic

    Member
    12,639
    224
    43
    Working on my art!
    Well the avatar is likely built off of Modern Sonic, just like Classic Sonic was in Generations (and probably still is). I wonder if the homing attack could be enabled for Classic Sonic in this game.
     
  8. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    While I haven't looked at much of the files yet, TwilightZoney has been reporting some of his findings to me over the days, so I'd like to provide a summary of what we believe on the game's inner workings yet. We should be able to verify more of these theories when the new PAC format is figured out some more and completely custom file imports are possible. (Thank you very much to the people who are working on that by the way!)

    Please don't take any of these as the final facts just yet, as it's mostly speculation and research on what I've been told so far:

    • Both .terrain-model and .model have been reported to work with the current model parser for Generations (modelfbx which uses LibGens), making it possible to rip the game's models already, although with a few important holes in the components yet. The missing elements should be figured out first before making proper rips if that's what you're interested in.
    • The trend continues from Lost World with Sonic Team adding a bunch of metadata to the existing model format that is formatted completely different from the way the Unleashed/Generations formats worked. I'll touch on said metadata later, but it really sounds like whoever's responsible for maintaining their tools on the asset pipeline are different authors or just pressed for time instead of evaluating an actual update to the format. I could understand this for Lost World, but surely a big update like "Hedgehog Engine 2" over 4 years should've implied a quick re-evaluation of this. :v:
    • While some of the game's formats like PAC have been updated to 64 bit offsets (which is the logical thing to do), these old Generations formats still retain the 32-bit offsets... meaning they have a slower parser on top to load the model in memory while the older games could just load the entire file in memory, fix the offsets with the offset table and be done with it. You can actually see them using this technique if you try to rip a model directly from memory in various Sonic games, although I can't remember right now if this was actually the case with Generations (and especially with the PC version considering how it supported big-endian files somehow).
    • The level structure being the same as Lost World still means the terrain streamer is gone, but there has been some new interesting additions. Say hi to static and dynamic sectors.

      [​IMG]

      It seems like these filenames actually match whatever numbers are on the terrain folder itself, so just throwing the entire stage in there like Lost World no longer seems to be the default solution. However, this is still nowhere near the level of detailed streaming like Generations/Unleashed, where said terrain groups were actually auto-generated and could turn out to be several hundreds of them.
    • As I mentioned before, there's new metadata for the terrain-model files. While Lost World still used the same GI implementation that Generations/Unleashed did (while getting rid of the A part, that being the Atlas textures), it seems Forces has opted for a mix of toggle-able Shadow Casting, Shadow Receiving and no GI textures to be seen (yet). However, it seems it's still possible to bake shadows into textures, although it's not as widely used as it was for Generations & Unleashed from the looks of it. It seems there was a lot of manual optimization work involved here using these two toggles.
    • It seems Sonic Team was not very inaccurate when it said the GI was now real time, although their PR explanations for it were far more confusing than what the actual implementation ended up being. And it's actually pretty cool!

      As you're already aware, the switch to Physically Based shading has meant that the lighting for both dynamic models and static models is affected by far more components than just the light color now. "Lightfield" appears to be gone and has been replaced by "Lightfield Probes", which are much smaller in size (Around 1-2 MB down to a few KB). Although neither of us have looked at what's inside there just yet, it's a good guess that they've switched to Probe lighting, which actually requires not-as-dense grids for approximating the lighting compared to Lightfield. That means that what has been made real time is the actual lighting on the terrain models themselves instead of using GI textures, but not the process of calculating those lighting sources and bounces.

      The above is actually a very important change when it comes to custom levels, because it means a huge part of what made Unleashed/Generations stages actually look good has been replaced by a much simpler file to generate. Hundreds of textures that could total up 200-600 MB are now approximated by something like a 7 KB file. Of course this requires significantly more powerful hardware to run properly, but the benefits for level makers are very tangible when it comes to fast iteration. Now if that change has paid off for the actual game... that is another discussion. :v:
     
  9. DustArma

    DustArma

    Member
    1,302
    0
    16
    Santiago, Chile
    Learning Python.
    Hm, so level mods would be easier to implement now that we don't have to worry about prebaking the lighting and GI?
     
  10. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,315
    3
    18
    HoleNet!
    Sonic Edge
    It seems the "boost effect" version of Modern Sonic's stage music is unnamed in the audio file table, so the filenames become "off by one" for each one. Hmmm.
    EDIT: To add to this, the final boss music is actually split into 8 different files. What. [​IMG]
    EDIT 2: Okay, after hand-sorting and organizing the music myself, I ended up with some unused filenames:
    Code (Text):
    1. 00701_bgm_stg_ex01
    2. 00702_bgm_stg_ex02
    3. 00703_bgm_stg_ex03
    4. 00704_bgm_stg_ex04
    5. 00705_bgm_stg_ex05
    6. 00706_bgm_stg_ex06
    7. 00707_bgm_stg_ex07
    8. 00901_bgm_stg_sp01
    9. 00902_bgm_stg_sp02
    10. 00903_bgm_stg_sp03
    11. 00904_bgm_stg_sp04
    12. 00905_bgm_stg_sp05
    13. 00906_bgm_stg_sp06
     
  11. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Not quite.

    It seems PAC files have progressed further (filenames can be extracted now) and there's some new info as a result.

    • IBL Textures are there for each light probe, which makes perfect sense since PBR needs that to work properly.
    • Ambient Occlusion is now baked into a texture (just like in Unleashed/Gens), but it's its own texture now instead of being part of the GI. Again, makes sense considering PBR needs AO to be a separate input.
    • There's some other new texture for lighting that is almost completely white most of the time, and I haven't been able to deduce what it is yet.

    Most of these still require the use of a renderer and pre-baking information, but it could be far less expensive to compute all things considered. And there's some actual good open-source alternatives for stuff like this! It could turn out to be significantly easier to develop a pipeline and generating some great quality lighting with that. There's honestly some pretty intensive work to do here once the formats are cracked.
     
  12. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,842
    0
    16
    Glendale, AZ
    Doing Stuff.
    so can the research here on Forces be applied to lost world as well? always hated that lost world turned into such a dead paperweight modding wise.
     
  13. is it possible to rip music yet?

    I need that full infinite theme in my life
     
  14. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,842
    0
    16
    Glendale, AZ
    Doing Stuff.
    Yes that's always possible. but you're not going to like the next part:

     
  15. ah well, i guess i'll wait for an official release of the song then
     
  16. Herm the Germ

    Herm the Germ

    Hmm, not bad. Well done, doctor! Member
    1,482
    0
    0
    Dresden, Saxony, Germany
    MIDI-to-SMPS-conversions, mostly. Takin' requests, too.
    Wait, that's what's going on? Having avoided any kinds of spoilers, the theme didn't even feel too out of place. Wow.

    The secrets of HE2's GI being unvealed in here look mighty impressive. One always wonders if SEGA could make some serious cash having other developers actually, y'know, get licenses for the use of HE for their games. <.<
     
  17. TiMan

    TiMan

    OH NO Member
    5
    0
    0
    Israel
    Is it known how the physics are handled (coded to the exe or coded in some sort of a file)?
     
  18. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,315
    3
    18
    HoleNet!
    Sonic Edge
    Yes, but there's some caveats, as I posted on the previous page of the thread:
    And yeah, cutscene music has the voice acting baked in, so Infinite's theme is not available in a pure form.
     
  19. Windii

    Windii

    stan sakazaki mikoko ya coward Member
    Oh my god. I was so confused when unaltered music straight from Shadow the Hedgehog began playing. I really hope this'll be modded one day.

    Obviously there's always the official soundtrack option, but wow, this is Gens's console-only Sonic 1 bonus all over again. I feel robbed.
     
  20. It's actually just a simple memory edit, add "Sonic Forces.exe"+20B3688 as 4 Byte in Cheat Engine and set it to 0 and make sure to make it active. However, it does sometimes appear, so I recommend pressing F6, right clicking the value that appears in the box when doing certain actions, and NOP the address. This should permanently disable the HUD for that current launch. HedgeModManager does have a code loader for Sonic Forces and it does come with a No HUD code, so you can just easily do that as well. Be aware that this also disables the HUD for the menus, basically making you blind for those portions only.