Sonic Mania: Hacking Discussion

Discussion in 'Engineering & Reverse Engineering' started by Chimera, Aug 29, 2017.

  1. Pengi

    Pengi

    Member
    1,027
    100
    43
    I only caught some of the stream, but these are the ones I heard Stealth mention:

    Mirage Saloon 1: Uber Caterkiller
    Hydrocity 1: Dive Eggman
    Oil Ocean 1: Meter Droid
    Metallic Madness 2: Gashapondora (or GashaPandora?)
    Titanic Monarch 1: Crimson Eye
    Titanic Monarch 2: Phantom Egg (with Phantom Shinobi, Phantom Gunner, Phantom Rider and Phantom Magician)
    Egg Reverie: Phantom King
     
  2. Dr. Mecha

    Dr. Mecha

    Member
    1,083
    0
    16
    Dallas, TX
    3d Models
    I think I knew the problem:

    Heres your color Index:
    https://imgur.com/a/izTnE

    And here's Mania's:
    https://imgur.com/a/XePFr

    See how Mania's colors are arranged.

    It's that way so that it can be read by the game itself in case sonic got into water or become super. This applies to all sprites sheets and tile sets; especially when the games find the color within the pallet location and displays it on screen.

    So my suggestion is to change the color within the pallet itself; it save you the time of recoloring the whole damn thing and it assure that it won't look like a garbled mess you just got. Sadly, the only software that I'm aware that have this short of pallet manipulation is Graphic Gale; but, it's cheap enough to do the trick.
     
  3. Mr. Potatobadger

    Mr. Potatobadger

    Member
    5
    0
    0
    Florida
    Saturn Sonic
    Currently attempting to figure out the Blue Sphere format:

    [media]https://i.gyazo.com/449909ccff32159a76ad2fc32fe7f28a.mp4[/media]

    And having lots of fun doing it!

    EDIT:

    Have a Youtube video as well, why not?
    [media]https://youtu.be/bBOwKq7m2rI[/media]
     
  4. Gammatron

    Gammatron

    Member
    70
    0
    0
    I individually replaced each color in the colormap in gimp and Sonic still has his default palette ingame. Maybe the game is just assigning that .gif a palette from somewhere else, I dunno.

    https://imgur.com/a/Sg0Nc
    [​IMG]

    Are you using cheat engine or did you edit the actual .exe with a hex editor?
     
  5. ICEknight

    ICEknight

    Researcher Researcher
    The palettes shown in-game are most likely stored elsewhere, so that it can modify them as needed and make stuff like Super Sonic work with those same graphics.
     
  6. Tiranno

    Tiranno

    Steveosaurus Rex Member
    I assume that at this point the palettes aren't found yet? Here's hoping soon.
     
  7. Actually, I was poking around the .exe and I figured out that you can enable this in the settings.ini file. Just add "dataFile=" under "[Game]." I tried setting it to unique folders, but it will just load from the decompressed Data folder no matter what you set it equal to. It will, however, load from uniquely named compressed data folders if you use "dataFile=name_of_file.rsdk". I suppose that could be one way of managing multiple sets of assets.

    I also found a full set of Saturn controller UI icons while poking around. Looking forward to that Saturn port down the line. :v:
     
  8. BSonirachi

    BSonirachi

    Opa-Opa takes flight! Wiki Sysop
    We should probably have some of the pre-existing articles for the bosses and minibosses renamed to these names on the wiki.
     
  9. soneek

    soneek

    Member
    6
    0
    0
    I've made some progress on loop point replacement for music. Each stage has a scene file that references the song(s) it'll use. Here's GHZ as an example. Act 1 uses Data/Stages/GHZ/Scene1.bin. Look for GreenHill1.ogg as a UTF-16 LE string, and the loop start value is shortly after. [​IMG]
    Make sure to replace this with the loop start of whatever song you're inserting, and make sure your replaced song is sampled at 44.1 kHz. I use vgmstream to dump my looped songs with 1 loop, 0 seconds fade and delay, and then convert them oggenc2. Sonic Mania will play the entire OGG file, and then jump back to the hardcoded loop start value. You could change the stage scene file to reference GreenHillA.ogg instead, if you wanna add a brand new OGG.

    I streamed some examples for GHZ and CPZ the other night. https://www.youtube.com/watch?v=4BCErxvX3Dk&t=3m17s

    I dumped all of the loop starts from Data/Stages/Menu/Scene1.bin. BlueSpheresSPD was tested manually since I didn't find a reference for it in the game data.

    Code (Text):
    1.  
    2. BlueSpheres             407077
    3. BlueSpheresSPD          5309957 <- Thanks Neo!
    4. BossEggman1             282240
    5. BossEggman2             264600
    6. BossFinal               302400
    7. BossHBH                 70560
    8. BossMini                276105
    9. BossPuyo                846720
    10. ChemicalPlant1          680400
    11. ChemicalPlant2          680400
    12. Competition             94500
    13. EggReverie              176400
    14. EggReveriePinch         226800
    15. FlyingBattery1          158760
    16. FlyingBattery2          70560
    17. GreenHill1              776160
    18. GreenHill2              775552
    19. HBHMischief             381405
    20. Hydrocity1              1
    21. Hydrocity2              329797
    22. Invincible              139623
    23. LavaReef1               497329
    24. LavaReef2               769745
    25. MainMenu                202752
    26. MetallicMadness1        470400
    27. MetallicMadness2        296056
    28. MetalSonic              151200
    29. MirageSaloon1           48510
    30. MirageSaloon1K          1007820
    31. MirageSaloon2           179390
    32. OilOcean1               358389
    33. OilOcean2               176400
    34. PulpSolstice1           318316
    35. PulpSolstice2           226625
    36. Results                 88991
    37. SaveSelect              131290
    38. Sneakers                120960
    39. StardustSpeedway1       432894
    40. StardustSpeedway2       1
    41. Studiopolis1            1146600
    42. Studiopolis2            311142
    43. Super                   165375
    44. TitanicMonarch1         184069
    45. TitanicMonarch2         384873
    46. UFOSpecial              288655
    47.  
     
  10. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
    If you do figure it out, I would definitely want to make a fork of S3SSEdit for it.
     
  11. Tanks

    Tanks

    Member
    1,030
    0
    16
    Awesome, thank you for sniffing this out. Was looking into it, but the long weekend's got me traveling all over the place. This'll make creating an logg set very simple now :) .
     
  12. Mr. Potatobadger

    Mr. Potatobadger

    Member
    5
    0
    0
    Florida
    Saturn Sonic
    I was hoping you would say that!

    Let's do it.

    --------------------------------

    If you have ever wanted to know what it would look like if you started on a red sphere, now is your time:
    https://i.gyazo.com/3895ba68ebdf013d74dc901d71cd61bb.mp4
     
  13. Fred

    Fred

    Formerly known as 'Neo' Oldbie
    1,542
    68
    28
    Portugal
    Sonic 3 Unlocked
    The loop point for BlueSpheresSPD.ogg is 5309957.

    [​IMG]


    Also dammit, that's why I couldn't find any of the level music loop points. They're all encrypted!


    EDIT: The loop point for RubyPresence.ogg ( :ruby: ) is 198457.
     
  14. Sappharad

    Sappharad

    Oldbie
    1,363
    31
    28
    That's not encrypted, they just aren't stored as part of the track file. The bytecode has a SetMusicTrack command where one of the arguments is the loop point. The previous games worked the same way.
     
  15. Fred

    Fred

    Formerly known as 'Neo' Oldbie
    1,542
    68
    28
    Portugal
    Sonic 3 Unlocked
    Yes, but the bytecode files are encrypted within the Data.rsdk file.
     
  16. soneek

    soneek

    Member
    6
    0
    0
    Damn, I was off by 50 samples! I manually looped some stuff when I was searching for the data in the files, and that's how I found things in the Stage folder. I left RubyPresence off my list since I made a music only LOGG set posted elsewhere. Not sure about the rules here about sharing files, so I'll refrain from it. Just make sure to set the LOOPSTART comment to whatever those loop start samples are and you'll be good.

    The fun thing would be if someone forced the game to read LOOPSTART, and potentially LOOPLENGTH comments rather than the hardcoded loop start samples in each stage file.
     
  17. codenamegamma

    codenamegamma

    Member
    73
    1
    8
    so glad I can post again. I made a breakthrough and couldn't update anyone.

    Finally got the Insta-Shield and Dropdash working at the same time.
    http://www.youtube.com/watch?v=5DoJfexmJ_c
     
  18. Drex

    Drex

    Lazy perfectionist Member
    800
    39
    28
    Awesome! If you get around to making a version with the Super Peel-out animation, that'd be even better.
     
  19. Hydr0city

    Hydr0city

    > Kamikazee Member
    40
    0
    6
    Can you just grab the medal and end the stage right there, or does nothing happen if you pass by it?
     
  20. GHNeko

    GHNeko

    sega stockholm syndrome Member
    660
    1
    18
    テキサス、アメリカ
    Hybrid Souls Card Game
    okay so when are we gonna see the hack/mod that lets you keep a spindash in air when you start it on a falling platform. :v: