Sonic Adventure 2 Hacking

Discussion in 'Engineering & Reverse Engineering' started by Turbohog, Feb 20, 2012.

  1. Fred

    Fred

    Taking a break Oldbie
    1,563
    114
    43
    Portugal
    Sonic 3 Unlocked
    Okay, I've updated my previous post with a set of alternate object layouts that provide workarounds so Shadow and Metal Sonic can clear all of Sonic's missions. I'll also take the opportunity to plug MainMemory's character select mod, which is the whole point of the alternate layouts, as well as my texture hacks:

    Lives icons - This restores the original set of life icons from the Dreamcast/GameCube versions while being a considerably bit more smarter with the sampling than the guy Sega outsourced this to. Before and after is like night and day:

    Original:
    [​IMG]

    New:
    [​IMG]

    Item box icons - Resamples the barrier, magnetic barrier, invincibility and bomb icons, restores the red cross design to the health kit, and replaces all the individual 1-Up icons with a custom design based on the one from Sonic Heroes. This is mostly so you don't pick up a Shadow 1-Up while playing as Metal Sonic, etc.

    Original:

    [​IMG]

    New:

    [​IMG]

    Unpack them to the PRS directory and enjoy.
     
  2. Elratauru

    Elratauru

    Little Shiny Emurralds Member
    Since we are at it, is there any chance of using these textures for stuff like the main menu logo, character panels and stuff? It would be nice to have a clean SA2B Logo, since that one has just been upscaled.
     
  3. BlazeHedgehog

    BlazeHedgehog

    A "Community Enigma"? Oldbie
    1,464
    6
    18
    On the subject of replacing textures with higher res/better ones, I took the item box icons from Neo's post (plus the speed shoes icon from somewhere else) and made these

    [​IMG]

    Too lazy to figure out the tools and replace them myself, though :specialed:
     
  4. Fred

    Fred

    Taking a break Oldbie
    1,563
    114
    43
    Portugal
    Sonic 3 Unlocked
    Holy shit Blaze, those are awesome. (Even though the invincibility one is a bit off-model.) I'll convert them to DDS and post them in a while. Hope the lossy compression won't completely destroy them.

    EDIT: Here we go:

    [​IMG]

    And here's the download link.
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    So... I reworked SA Tools again, this time eliminating the need for the splitSADX tool entirely, and allowing buildSADX (now buildPE) to work with SA2PC.
    It currently supports a couple things from SA2, namely: stage select screen, start positions, level rank scores/times. You can't add stages to the stage select screen yet because of reasons.
     
  6. SF94

    SF94

    Tech Member
    I just converted it to DDS with Paint.NET with no loss in quality as far as I can tell. I used A8R8G8B8. It bloats it to about 4x the size, but it looks great.

    [​IMG]
     
  7. Fred

    Fred

    Taking a break Oldbie
    1,563
    114
    43
    Portugal
    Sonic 3 Unlocked
    Yeah, but then you have to re-insert the new DDS file back into the PAK archive, which is why I save it with the same settings (in this case, 8bpp as opposed to 32bpp) as the original file. Admittedly I've never actually checked whether or not this particular archive type is okay with you changing the length of its files, but that restriction is so common that I've just learned to always work with it in mind.
     
  8. Caverns 4

    Caverns 4

    Member
    342
    0
    16
    Sanik Quest: Journey To The Right
    Since the Character Physics parameters are relatively known, why not add support for that too? It will also make trying to figure out what each thing does a little easier than mucking around with a hex-float calculator online and typing it in byteswapped.
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    I'm not sure if I should try to include the physics data in the split, since we don't know exactly what everything is (and things vary by character), or just port the Physics Editor from SADXTweaker as part of SA2Tweaker, along with a code editor.
     
  10. Caverns 4

    Caverns 4

    Member
    342
    0
    16
    Sanik Quest: Journey To The Right
    Either way will work.

    All I know is, Hex Workshop has been bugging out with floats something awful, and it's made adjusting/playing with the physics a lot harder.

    Ideally, I guess every factor of the loaded characters physics would be visible in the cheat table as well; only a few are as of now.
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    When trying to get the 2P mode special moves to work in 1P mode, there are two parts to consider:
    The first part prevents you from being awarded a special every 20 rings if you're not in 2P mode. To enable that function in 1P mode, go to 4C2C5 (44CEC5 RAM) and change 0F 84 85 03 00 00 to 90 90 90 90 90 90.

    The second part prevents characters from using special moves unless they're in 2P mode or their final boss fights with their rivals.
    • To enable this function for Sonic, Shadow and Amy, go to 323657 (724257 RAM) and change 75 to EB.
    • To enable this function for Knuckles, Rouge, Tikal and Chaos, go to 335607 (736207 RAM) and change 75 to EB.
    • To enable this function for Mech Eggman, Mech Tails, Chao Walker and Dark Chao Walker, go to 348D17 (749917 RAM) and change 75 to EB.

    In addition, to give yourself one of the special moves immediately, change one of the three bytes at 174AFED (174AFF0 for P2) to 1. This doesn't require the first fix to be applied, but does require the second.

    I have tested all of the moves and here's how they work (or don't) when player 2 is not present:

    Sonic:
    1. Speed Up: Works
    2. Sonic Wind: Effectively does nothing
    3. Time Stop: Crashes

    Knuckles:
    1. Hammer Punch: Crashes
    2. Thunder Arrow: Effectively does nothing
    3. Power Flash: Effectively does nothing

    Mech Eggman:
    1. Laser Missile: Crashes
    2. Rocket Launcher: Effectively does nothing
    3. Power Laser: Works, but doesn't affect enemies

    Bonus: to enable special moves for Metal Sonic, go to 32366A (72426A RAM) and change 74 F7 to 90 90.
     
  12. Caverns 4

    Caverns 4

    Member
    342
    0
    16
    Sanik Quest: Journey To The Right
    This isn't much, but I'll put it here anyway.

    For those of you amused by Tails' propeller punch sound over Sonic's bounce bracelet, I made this.

    http://www.mediafire.com/?913zfptflqhq9ov

    Extract it to: Sonic Adventure 2/resource/gd_PC/MTL/

    It also adds in the missing sound effects from the 2P characters back into the Chao Garden, but that's so easy a child could do it.
     
  13. Jogita

    Jogita

    Hacking Sonic games since 2011. Member
    12
    0
    0
    Somewhere in the USA
    Sonic Adventure 2006.
    Out of curiosity, can Sonic's (Or really anyone's) animations be editted? I've tried using the splitMTN tool, but it crashes whenever I try to do it. (If it's a command-line tool then... >_> My bad.)
     
  14. darkspines35

    darkspines35

    It's Easy Actually. No, seriously. Tech Member
    248
    0
    16
    .V.
    Sanik Adevnt Casters
    See my Super Hedgehogs mod. Animation swapping by way of files is possible though tedious. And as for editing them, it's also possible but very tedious.

    As for splitMTN, I've had nothing but issues with both it and splitMDL. Both crash when I attempt to run them period.
     
  15. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    I did fix them, but since you disappeared from IRC you never got the message.

    As far as animation editing, as there is no buildMTN program available yet, and no animation editing interface in SAMDL, your only option is hex editing the MTN file directly (after decompressing it of course).
     
  16. darkspines35

    darkspines35

    It's Easy Actually. No, seriously. Tech Member
    248
    0
    16
    .V.
    Sanik Adevnt Casters
    Oh that's good to hear! Did you ever get buildMDL working right as well? I remember you mentioning first tests weren't working out too well...

    And yeah, I've been having wonky issues lately, and not running my IRC client seems to have helped them, which is why I'm not around there hardly at all anymore.
     
  17. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    No, I haven't figured out why it makes the game crash.
     
  18. Jogita

    Jogita

    Hacking Sonic games since 2011. Member
    12
    0
    0
    Somewhere in the USA
    Sonic Adventure 2006.
    Hex editing the animations is no problem for me since I already do that for Sonic Adventure DX, but my only concern is the following:

    1. When you say decompress, do you mean decompressing the .prs to a .bin?
    2. I don't know the locations of the animations. Last thing I would want to do is edit the animation's ID.
     
  19. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    That is exactly what I mean.

    The format of MTN files is simple and I really should write it on the wiki:
    You start with a list of AnimationIndex structures 8 bytes each, containing a 2-byte index, a 2-byte number of pieces in the animation data, and a 4-byte pointer to the animation (the second table on this page). The list is terminated by an index of -1 (0xFFFF).
     
  20. Caverns 4

    Caverns 4

    Member
    342
    0
    16
    Sanik Quest: Journey To The Right
    Sorry if this is a dumb question, but how exactly are .pak files made? I'm doing a couple of texture related tests and I'm not sure how to get everything back in-game properly after making the GVM. GVMPAK is making a 1KB file that simply references another file..