SADX/SA1 Hacking/Modding

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Aug 15, 2009.

  1. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    <!--quoteo(post=367479:date=Oct 29 2009, 05:26 PM:name=RGamer2009)--><div class='quotetop'>QUOTE (RGamer2009 @ Oct 29 2009, 05:26 PM) <a href="index.php?act=findpost&pid=367479">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=367469:date=Oct 29 2009, 06:09 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Oct 29 2009, 06:09 PM) <a href="index.php?act=findpost&pid=367469">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=367467:date=Oct 29 2009, 05:06 PM:name=RGamer2009)--><div class='quotetop'>QUOTE (RGamer2009 @ Oct 29 2009, 05:06 PM) <a href="index.php?act=findpost&pid=367467">[​IMG]</a></div><div class='quotemain'><!--quotec-->I wanna see Big the Cat fight!!<!--QuoteEnd--></div><!--QuoteEEnd-->
    Would Big be P1 or P2, or both? Keep in mind that the second character will use Knuckles' attack patterns, making Amy, Gamma and Big practically useless, especially on the third attack, which results in them trying to jump on you.
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    In respect to the third jump...

    You could try and make Amy do her hammer air-spin jump.

    Big...make him cast his line at you, lol.

    Gamma...he has his own fight.
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    I can't rewrite the AI.
     
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    18,524
    511
    93
    Berkshire, England
    Learning Cymraeg
    Finally, Youtube finished processing the video.


    Tails kicking Sonic's ass on the first part amuses me =P
     
  3. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    Trainer update!
    No way? No way!
    <a href="http://www.megaupload.com/?d=22O20GIG" target="_blank">[​IMG]</a>
    Also includes sadxtest.exe, which you should use if you encounter any problems with the trainer. Run it from an open console window, select all the text that appears in the window, copy it and put it here. You should have sonic.exe running when you do this.

    Oh, EU/no-cd is the default, because I'm the only one with the US version. :P
     
  4. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    New video, giving <a href="http://www.youtube.com/watch?v=Eq-nz-IPWg4" target="_blank">a better view of the Dragon</a> (video quality aside).
     
  5. Dark Sonic

    Dark Sonic

    Member
    13,731
    930
    93
    Working on my art!
    <!--quoteo(post=367576:date=Oct 29 2009, 06:14 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Oct 29 2009, 06:14 PM) <a href="index.php?act=findpost&pid=367576">[​IMG]</a></div><div class='quotemain'><!--quotec-->Trainer update!
    No way? No way!
    <a href="http://www.megaupload.com/?d=22O20GIG" target="_blank">[​IMG]</a>
    Also includes sadxtest.exe, which you should use if you encounter any problems with the trainer. Run it from an open console window, select all the text that appears in the window, copy it and put it here. You should have sonic.exe running when you do this.

    Oh, EU/no-cd is the default, because I'm the only one with the US version. :P<!--QuoteEnd--></div><!--QuoteEEnd-->
    Nope, I got the US version too =P
     
  6. Selbi

    Selbi

    The Euphonic Mess Member
    1,485
    10
    18
    Northern Germany
    Sonic ERaZor
    <!--quoteo(post=367576:date=Oct 30 2009, 03:14 AM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Oct 30 2009, 03:14 AM) <a href="index.php?act=findpost&pid=367576">[​IMG]</a></div><div class='quotemain'><!--quotec--><a href="http://www.megaupload.com/?d=22O20GIG" target="_blank">[​IMG]</a><!--QuoteEnd--></div><!--QuoteEEnd-->
    I suck with SADX at all, so please tell me: Is this thing making a no-cd patch or what?
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    <!--quoteo(post=367673:date=Oct 30 2009, 08:58 AM:name=Dark Sonic)--><div class='quotetop'>QUOTE (Dark Sonic @ Oct 30 2009, 08:58 AM) <a href="index.php?act=findpost&pid=367673">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=367576:date=Oct 29 2009, 06:14 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Oct 29 2009, 06:14 PM) <a href="index.php?act=findpost&pid=367576">[​IMG]</a></div><div class='quotemain'><!--quotec-->Trainer update!
    No way? No way!
    <a href="http://www.megaupload.com/?d=22O20GIG" target="_blank">[​IMG]</a>
    Also includes sadxtest.exe, which you should use if you encounter any problems with the trainer. Run it from an open console window, select all the text that appears in the window, copy it and put it here. You should have sonic.exe running when you do this.

    Oh, EU/no-cd is the default, because I'm the only one with the US version. :P<!--QuoteEnd--></div><!--QuoteEEnd-->
    Nope, I got the US version too =P
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    Congratulations, do you want a prize?

    Free Movement Speed is a Float at 007DCCFC (3DCCFC in sonic.exe) with a default value of 5.

    Edit: @Selbi: No, but the European and no-cd versions use different addresses than the US version. What it's doing is allowing you to switch characters.
     
  8. <!--quoteo(post=367576:date=Oct 29 2009, 10:14 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Oct 29 2009, 10:14 PM) <a href="index.php?act=findpost&pid=367576">[​IMG]</a></div><div class='quotemain'><!--quotec-->Trainer update!
    No way? No way!
    <a href="http://www.megaupload.com/?d=22O20GIG" target="_blank">[​IMG]</a>
    Also includes sadxtest.exe, which you should use if you encounter any problems with the trainer. Run it from an open console window, select all the text that appears in the window, copy it and put it here. You should have sonic.exe running when you do this.

    Oh, EU/no-cd is the default, because I'm the only one with the US version. :P<!--QuoteEnd--></div><!--QuoteEEnd-->
    WAIT. Are you saying that now we can put ANYONE anywhere?!

    Then you deserve this:
    [​IMG]

    This is a monumental occasion.

    Also could there be a Super Sonic option for the final Boss?

    And is Metal Sonic playable with these options?!
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    <!--quoteo(post=367696:date=Oct 30 2009, 10:16 AM:name=RGamer2009)--><div class='quotetop'>QUOTE (RGamer2009 @ Oct 30 2009, 10:16 AM) <a href="index.php?act=findpost&pid=367696">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=367576:date=Oct 29 2009, 10:14 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Oct 29 2009, 10:14 PM) <a href="index.php?act=findpost&pid=367576">[​IMG]</a></div><div class='quotemain'><!--quotec-->Trainer update!
    No way? No way!
    <a href="http://www.megaupload.com/?d=22O20GIG" target="_blank">[​IMG]</a><!--QuoteEnd--></div><!--QuoteEEnd-->
    WAIT. Are you saying that now we can put ANYONE anywhere?!

    Then you deserve this:


    This is a monumental occasion.

    Also could there be a Super Sonic option for the final Boss?

    And is Metal Sonic playable with these options?!
    <!--QuoteEnd--></div><!--QuoteEEnd-->

    Yes, you can replace any of the listed characters with any character. So you can have Amy racing Big in Tails' levels.
    However, if you switch acts, the character will start at their start point, which is 0,0,0 a lot of times. Luckily, this can be fixed most times by opening the Position Editor window and checking "Teleport to first location in list". This would require that you have saved the correct starting point for that level.
    The Adventure Fields are also somewhat broken, because they load the objects for the original character, but whether they are active or not depends on the character you actually are, so Tails can't access Sonic's Emerald Coast through the Field. I know how to fix this, and I will do it in the next update.

    Super Sonic is a special mode for Sonic, so if you replace Sonic with someone else, they will also replace Super, however, they will die almost immediately once the fight with Perfect Chaos starts. I can fix this too, and probably will eventually. You can fix it yourself by freezing the Super Sonic flag at 1 in the cheat table.

    Metal will replace Sonic if the Metal Sonic flag is set, which I will definitely add to the trainer in the next update.
     
  10. SF94

    SF94

    Tech Member
    Suggestion: Add the "Lightdash is charged" thing in there, so then we can set hot keys and insta-lightdash =3
    Edit: Also, you probably know this, but if the name inside the sonic.exe is changed (from say SonicAdventureDXPC that shows on the titlebar to something else), the trainer doesn't pick it up... nor do any other trainers, but still =<
    Edit again:... unless I rename the exe to sonic.exe. Never mind, carry on >_>
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    <!--quoteo(post=367720:date=Oct 30 2009, 12:06 PM:name=Morph)--><div class='quotetop'>QUOTE (Morph @ Oct 30 2009, 12:06 PM) <a href="index.php?act=findpost&pid=367720">[​IMG]</a></div><div class='quotemain'><!--quotec-->Suggestion: Add the "Lightdash is charged" thing in there, so then we can set hot keys and insta-lightdash =3<!--QuoteEnd--></div><!--QuoteEEnd-->
    I should add all of the status bits, and the powerup bits (which would fix the Perfect Chaos thing also).

    <!--quoteo(post=367720:date=Oct 30 2009, 12:06 PM:name=Morph)--><div class='quotetop'>QUOTE (Morph @ Oct 30 2009, 12:06 PM) <a href="index.php?act=findpost&pid=367720">[​IMG]</a></div><div class='quotemain'><!--quotec-->Edit again:... unless I rename the exe to sonic.exe. Never mind, carry on >_><!--QuoteEnd--></div><!--QuoteEEnd-->
    XD but I should add an exe name box, because I have a few modified exes that I would like to use this with.

    I'm also probably going to add debug mode checkboxes and a physics editor, and I may release that and the character switcher as separate programs as well to edit the exe directly.
     
  12. Selbi

    Selbi

    The Euphonic Mess Member
    1,485
    10
    18
    Northern Germany
    Sonic ERaZor
    Dunno if this is fitting at all, but please find something out: When I press the windows button the game's closing rather than shutting into the task bar like EVERY OTHER FUCKING GAME. Is there a way to edit that?
     
  13. Blue Blood

    Blue Blood

    Member
    5,320
    320
    63
    Oh bloody hell. That has been annoying people since the game was first released- it's not just pressing the windows key. The game can't be minimised at all. I think somebody found a reason for it once, but said it wasn't fixable (or beyond their capabilities). First thing I did with Heroes PC was hit the windows button.
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    Run it in windowed mode.

    Either use autorun.exe, or open sonicDX.ini in notepad, find the line
    Code (Text):
    1. screen=1
    and change it to
    Code (Text):
    1. screen=0
    You can't minimize it in full screen mode I think because of how DirectX works.
     
  15. TwinTailedFox

    TwinTailedFox

    I'm not Miles Prower. Just a TwinTailedFox. Member
    16
    0
    0
    Batavia, Illinois
    no. I'm a total n00b at that stuff but i want to learn
    This looks frickin' awesome. I've always wanted to be Tails in the Sonic levels. Aaaand downloaded!
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    The first release of <a href="http://www.megaupload.com/?d=7SR0XUJ8" target="_blank">SADXTweaker</a> is now available!
    Current features:
    Switch Characters (copied from Trainer)
    Change some of Sonic's Actions
    Change some of Sonic's Animations
    Support for both exe versions (EU default, under Settings)

    Planned Features:
    More characters for Actions/Animations
    More of Sonic's Actions/Animations
    Physics Editor
    Code Switch (Don't lose Rings etc.)

    I would recommend running this maximized.
    If you open a new exe with editor windows open, they won't read values from the new file until you close and reopen them.

    Edit: ...I was too busy with writing about this that I didn't even notice 50 PAGES!
     
  17. Dark Sonic

    Dark Sonic

    Member
    13,731
    930
    93
    Working on my art!
    Question, will you ever make it so that you can edit the character animations so that you can, for example, fully replace Sonic in the cutscenes with Knuckles without the game switching back and forth all the time?
     
  18. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,590
    192
    43
    SonLVL
    I don't know.
     
  19. I'm confused. Why is the only boss option Knuckles, and not Sonic or Gamma?

    Absolutely phenomenal work otherwise!
     
  20. SANiK

    SANiK

    Tech Member
    412
    0
    16
    Took me like three hours to read the whole topic, from page 1 to page 50.

    Some suggestions:
    1) To speed up disassembly, get IDA Pro with HexRays plugin. HexRays is a badass decompiler that does a damn fine job of generating C code for a given piece of assembly code. I've worked with teams that've sometimes almost rewritten entire disassembles in C with this tool.

    2) To crack the animation format, I suggest looking into the Half Life SMD model format to get a grasp of how animation data looks like in the first place.

    3) I assume at the moment you have a game trainer process X that calls sonic.exe, and applies the patches routinely at a certain frame rate to sonic.exe's RAM. This is a backwards way of doing things, and works like a cheat app. The better thing to do would be to create a DLL and edit sonic.exe's DLL import table to include the said DLL. Thus putting the DLL in the same process instance as sonic.exe, allowing sonic.exe to JMP to functions in the DLL. DLLs also have a "on start" function which can be used to install the preliminary hooks/JMPs.

    Endri mentioned that he had to write the C code, disassemble the C code, then append the disassembled code to sonic.exe... with the DLL method one would just compile the C code as a DLL and be done with it.

    4) The model structure is stored in matrices. To redraw the models correctly one has to multiply the matrices from the root node down. Animations work by altering the matrices per object, depending on the current frame. OBJ file format doesn't support such a feature. One can do it in the exporter beforehand by applying the transformations to each vertex but the model verteces get misaligned meaning that editing them and trying to put them back is impossible since one would have to undo the rotations/transformations by multiplying the inverse matrix. 3DS format supports storing of such data, but 3DS file format is a bitch to understand. I'd go with HL1 SMD format.

    5) Cream is a model in the game. She's a static model. As in, her animations are done like how Quake II did animations. Each frame has actual vertex data per animation.

    6) You don't realize it but by showing your work as videos, it keeps interest up. Before people would see the work, but be too lazy to try it themselves - so they'd lose interest quickly. So documenting your work via videos is vital to keeping interest going. Remember this.

    7) A massive put off in the SADX community is keeping track of which files a hack edits and what not. I suggest someone spends the time to write some kind of mod-manager that can quickly apply a mod and undo a mod, as well as generate a mod-patch file. In other words, an IPS patcher but specially suited for the SADX community.