Sonic Mania: Hacking Discussion

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

  1. Stupid question regarding Blue Sphere. Does the level accelerate according to progress, or just over time? If it's over time, is there a speed cap? I mean, if you were to edit a stage to have a straight line that loops in on itself, how fast can the stage get by just letting it run?
     
  2. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    I agree that we shouldn't be doing custom objects yet, but I do recommend we save all the unused content we can while we still have access to them. You never know when an Update will kill it and it would be nice to have some way to revive it.
     
  3. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    4,986
    154
    43
    Lincs, UK
    TurBoa, S1RL
    Over time, and there is a speed cap, just like the original Blue Sphere. You can see how fast it gets by holding right for a couple of minutes.
     
  4. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,259
    1
    18
    Castlevania prettyness
    Personally, if it moves modding forward, I'm all for locking us in to a previous version, unless something MAJOR happens that we absolutely *should* update, like aay Denuvo getting stripped out.

    As for making sure everyone has access to the latest version, something like an IPS Patch might not be out of the question, assuming patches like that work the way I think. It wouldn't be propper to redistribute the .exe but if we just share a patch file with instructions on how to use it, we can just patch the new .exe to be like the old one and distribute that.

    That said, I don't know how these patch things work and if the patch files only replace bytes of data I.E. cant do shit about patching a file of a different size, we might have a problem :specialed:

    idk though there's probably something we can do about forcing a new EXE to morph into an older version, assuming we supply it.

    I personally just really want to see Mania modding take off, and part of that would be, of course, digging into the code and finding out how we can add/replace things with our own stuff. Updates can break whatever we do to the game, but waiting for a "gold version" kinda holds us back. If the updates aren't major, I don't see an issue with finding some way to stick with an EXE despite updates.


    EyeKey, as far off as that idea is to actually working just yet, that'd be an AMAZING feature for modding in general. Being able to edit/create object behavior via lua script would open doors for so many people to create insane things with this engine. Again though until more is understood with this game thats but a pipe dream. With the speed of progress so far, though, that doesnt sound too far off from just being within a few months' reach.. Its been what, 2 weeks since launch?
     
  5. Azu

    Azu

    I must be stupid. Member
    Yeah, I think we should stick to a solid version unless there's something major.
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    134
    43
    SonLVL
    We'd probably use something like xdelta3, IPS is a terrible format.
     
  7. codenamegamma

    codenamegamma

    Member
    73
    1
    8

    I'm glad people like it. I really didn't expect to be the first person to get it in game. highjacking the debug object to place objects that aren't on the debug list has worked well, but still, has a lot of issues. for example, it seems like stages have less than 100 objects from 45 and up are where most of the enemy and dodad objects are stored. the one problem I've been having that I just can't solve is that I've gone through every object on the list and it seems like stuff is missing. for example in Chemical Plant act 2, the only tube object is the new one for the zone. my guess is that there's probably some kind of sub object list I haven't been able to find, like in debug mode where you have to press another button for the boxes to change because they're all on the same ID. once i figure out how to change that it might be possible to find related objects like the paint canisters or even unused bingo balls. there's some stuff that just crashes as soon as it loads in. not sure why or what they are, but its also possible that there are some parameters for some objects that can be spawned with but still its a mystery what they are or how i can force them. it might also be possible to inject some kind of loader once we know how the game finds and loads objects into that main object list to load objects from diffrent levels, but that all is dependant on if we can get sub items working correctly.
     
  8. Mr. Fox

    Mr. Fox

    Member
    557
    9
    18
    You can actually download older versions of any Steam game through Steam itself. See the guide here.

    As you can see on SteamDB, Sonic Mania currently has three different versions published on Steam. You can download any one of them through Steam console as long as you own the game.
     
  9. Dark Sonic

    Dark Sonic

    Member
    13,257
    578
    93
    Working on my art!
    I feel like it'd be best to wait a while longer and pick a patched version. Besides, the tools need to be developed more before the game is more accessible for modding and that'll take time.

    And since the Lovetester was brought up again, I love the pairings that it has

    Sonic <3 Amy; Sonic </3 Eggman
    Tails <3 Sonic; Tails </3 Eggman
    Knuckles <3 Eggman; Knuckles </3 Sonic
     
  10. Azu

    Azu

    I must be stupid. Member
    So, are you just searching for values in the debug or some else entirely?
     
  11. codenamegamma

    codenamegamma

    Member
    73
    1
    8
    you make it sound like searching for values is just a cakewalk. yes I'm searching for them there has to be a set of params that go into an object since no one has any idea what they are its forced me to try and be more and more creative.
     
  12. EyeKey

    EyeKey

    Member
    29
    0
    0

    So maybe this can help:
    https://github.com/koolkdev/rsdkv5_extract/blob/master/objects_attributes.ini

    If you want I can also easily extract where each var is stored in the entity instance memory.
     
  13. codenamegamma

    codenamegamma

    Member
    73
    1
    8
    [LottoBall]
    type=UINT8
    lottoNum=UINT8

    well this explains why the lotto balls are all blue and 0 when i try and spawn them. i can mess with the ring box type and its creating some weird effects like just blue ones with no number or blue ones with double zero's or even tripple zero's running off the ball itself. the problem is this.

    [ItemBox]
    type=VAR
    isFalling=BOOL
    hidden=BOOL
    direction=UINT8
    planeFilter=VAR
    lrzConvPhys=BOOL

    when im using the itembox i can control A type var. but i have no idea what those var's are somewhere along the way 1-14 is getting changed into something else and i have no idea what since if spawn a player
    [Player]
    characterID=VAR


    it uses the same var so if its an array it should change if it's just a 0, 1, 2, 4 but it's not it only ever spawns sonic so somewhere its either the item box type is getting lost or the code somewhere else is checking "oh you wanna spawn this...it's not an item box so lets not use those params and use the ones for that object. hrm....none set? ok lets use defaults" sometimes those defaults are fine, other times they crash the game. so idk i guess maybe if i could find the actual type values for ItemBox i can go from there to see when it takes it and if its actually using it for other items. but i have no clue what they could be so its not like i can run a basic search for them.

    if your on discord and you think you can help or at least point me in the right direction, then please let me know. codenamegamma#3910 its a uphill battle and I'm not winning.
     
  14. Frostav

    Frostav

    Member
    439
    118
    43
    Hats off to the you hackers digging through this game right now. The stuff we've already done is cool as hell. My dream is for a level editing utility to be available one day, but I understand how incredibly difficult that would be and how long it'll be before we ever see anything even close to something like that.
     
  15. Chainspike

    Chainspike

    Stealing rings since 1994 Member
    167
    70
    28
    Death Egg Zone
    S3C Delta
    How exactly is Mania programmed? Is it like Sonic CD where every level is basically it's own game? If that's the case, I imagine the hacking will not be fun or easy at all.
     
  16. Covarr

    Covarr

    Sentient Cash Register Member
    4,233
    3
    18
    Trapped in my own thoughts.
    Two stageplays, a screenplay, and an album
    Sonic CD was like that due to the hardware it was developed on. Mania has no such concerns.
     
  17. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    134
    43
    SonLVL
    The closest you'd get on a modern system is, well, a lot like Sonic CD PC, each level as a separate DLL file with the EXE just acting as an interface between each of the DLLs and the system. Mania has no DLL files, so clearly they didn't do that, and since all the code is consolidated into one EXE file, it makes sense for everything to use one central set of functions, otherwise you're just unnecessarily bloating the codebase.
     
  18. Frostav

    Frostav

    Member
    439
    118
    43
    Where are the levels even stored? I know Mania uses a different level format than the classics (apparently everything is 16x16tiles and not 128x128 chunks like in the classic games, though I'm still not sure how the classic format works in the first place :v:), at least. I wonder how feasible messing around with level layouts would be if we knew how to access and modify the level files.
     
  19. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    134
    43
    SonLVL
    The level data is stored in the Data\Stages\*\Scene*.bin files, the format of which is partially described in this post.
     
  20. Dr. Mecha

    Dr. Mecha

    Member
    1,083
    0
    16
    Dallas, TX
    3d Models
    I have no Idea where the textures are stored, but I assumed that there's none seeing how the Models themselves lacked a UV map.

    Anyway's I'm kind of disappointed in the Poly count of the Special Stage Models. I know it sounds nit picking, but I don't see a reason to model every detail when a texture map could do the trick in a low resolution that this game presents itself in (especially both the buckles and the pupils). However, I've stumble across this model in Data/Meshes/Global/Sonic.bin:
    [​IMG]
    That's right, it's the same damn model from Sonic Jam (not to be confused with Sonic R or Sonic 3D Saturn Port).