don't click here

Sonic Adventure 2 Hacking

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

  1. flarn2006

    flarn2006

    Member
    280
    3
    18
    I don't think there's any problems with Lua here, unless you count KingLightning not knowing as much as he'd like to at the moment.
     
  2. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,743
    338
    63
    SonLVL
    The character switch is meant to perform an entirely different function than changing the "current character" value. Really what you would use it for would be to force one of the alternate characters to load instead of the normal one, or to change who loads in a boss fight.

    tbh when I suggested the feature I was envisioning separate selections for each instance a character is loaded (like SADXTweaker), so you could like replace 1P Sonic with Metal Sonic and leave everyone else alone, but I have no knowledge of Lua so.
     
  3. KingLightning

    KingLightning

    Member
    17
    0
    0
    Atlanta, Georgia
    SA2 Cheat Engine Guide
    Meh you probably are right. I'll just stick to just writing the guide. However, add the spin dash (if you want).

    I'm sorry if you took it that way, though. I just found some problems to be particularly annoying, especially ones that cause the game to crash. I'll go back into my hole and work on guide writing.

    I took this as sort of an opportunity to learn, but maybe this is probably not the right place to do so.

    I think that can be accomplished more effectively by freezing the character value, unless there's something I'm not understanding. I don't quite see the pros of a character having incorrect SFX unless it's for amusement, and how choosing Mechless Tails causes the game to crash instantly (which BTW flarn is a problem with your Lua). I can easily force any 1P/2P character into any level without problems with the addresses, but using the scripted select is causing problems.

    Also as for your idea, I do that by manually changing the address of Metal Sonic to 90 90 only and leave the others alone. I don't know much Lua, so I'll be sticking to the annoying way of doing it manually. It's easier, but tedious.
     
  4. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,845
    3
    18
    Glendale, AZ
    Living life.
    Well it wouldn't hurt to have an LUA specialist to consult to. that is, if he is even still around and isn't busy with his own projects.
     
  5. KingLightning

    KingLightning

    Member
    17
    0
    0
    Atlanta, Georgia
    SA2 Cheat Engine Guide
    The way I envision this cheat table guide to be is as follows:

    1. How to install and get cheat engine up and running, and how to attach SA2 and open .CT files.

    2. Cheat engine 101 concepts, like how to modify values of addresses, freezing values, adding descriptions, adding addresses, etc. Just for the record, I don't know how to use pointers, so more advanced members can help in writing that part.

    3. Explaining what each individual address in the main entry box does. So for the ring addresses, I'd say something like "This address changes the number of rings in your possession". I also will include any glitches and problems associated with changing the values to ridiculous numbers, such as changing your ring count to 10,000 will cause your rings to go to 0 if you collect 1 ring. Or raising your Chao's stats to over 4000 can cause glitches in the Chao Race.

    For the entries that change the color of Chao, I'd make a table that lists which value corresponds to which color. For character selection addresses, I'd also make a table for character selection as well (so 0 is Sonic, 1 is Shadow, etc etc) so people would know which value corresponds to which character. Other addresses that behave similarly would also receive such treatment. So I won't just write in the guide "This entry changes the color of your Chao" without offering additional information, since what values to change them to aren't obvious.

    4. Adding miscellaneous addresses for players' own references, like the 4+ addresses on how to force Metal Sonic into a level with all the corrections (unless the current character selection gets an overhaul), or how to avoid the cutscenes in bosses so that 2P characters don't crash on them. Just to name a few.

    5. Listing a bunch of tricks, like how to get wrong characters into wrong levels, how to fix problems that come across with them (like getting Knuckles in Hidden Base is impossible without changing the x-y-z coordinates), etc. I'll also try to include how to cause certain glitches, like how to get the radar in the Chao Garden when going as Knuckles or Rouge.

    6. Explaining, if I can manage to get them to work myself, the various tools that other members here have implemented. This part I won't work on as much. I'll let the creators do this part, as they know it a lot better than I do.

    This will be written in a level such that 10 year olds should be able to follow, as sometimes I do need instructions as if I am 5. So following them shouldn't be trouble for readers/newbies.

    To start with, I will write this as a .DOC or .PDF file, and if you guys like what's in it, I'll post it on the Wiki.

    So before I begin (and possibly waste time), is there anything else that I can add to this guide? Is there anything that seems redundant/useless? Suggestions?
     
  6. flarn2006

    flarn2006

    Member
    280
    3
    18
    Maybe put examples of some of the parameters of different objects? (In case it's not glaringly obvious already, that's my favorite part of the cheat table.)

    Speaking of which:

    Code (Text):
    1. [DOCUMENT ID 'E KUMI']
    2. -= GUN CONFIDENTIAL =-
    3. ROBOTIC DRONE CLASS 01 "BEETLE"
    4. ARMAMENT REQUISITION OPTIONS (FILE UNDER X-SCALE)
    5.  
    6. 0.0 - STANDARD UNIT "MONO"
    7. 1.0 - "MONO" UNIT WITH LOCOMOTIVE CAPABILITY
    8. 2.0 - ELECTRIC SUPPRESSION UNIT "SHOCK"
    9. 4.0 - PULSE WEAPON ATTACHMENT "GUN"
    10. 5.0 - CLOAKING UNIT "MONO"
    11. 6.0 - VERTICAL ASSISTANT UNIT "SPRING"
    12. 7.0 - EXPLOSIVE DEPLOYMENT UNIT "BOMB"
     
  7. Jase

    Jase

    ~~(_ _C^> Member
    MainMemory and Flarn, your object placer is amazing. I never realised how powerful it is til I tried it out for the first time just now :specialed: Well done!
     
  8. flarn2006

    flarn2006

    Member
    280
    3
    18
    Thanks a lot!

    Also:
    Code (Text):
    1. [DOCUMENT ID 'E AI']
    2. -= GUN CONFIDENTIAL =-
    3. GUARD ROBOT CLASS 02 "HUNTER"
    4. ARMAMENT REQUISITION OPTIONS (FILE UNDER X-SCALE)
    5.  
    6. 0.0 - STANDARD UNIT "HUNTER"
    7. 1.0 - PATROL UNIT "HOVER"
    8. 2.0 - ENHANCED WEAPONS UNIT "LASER"
    9. 3.0 - "LASER" PATROL UNIT
    10. 4.0 - STUN WEAPON ATTACHMENT "GUM"
    11. 5.0 - PROTECTIVE UPGRADE "SHIELD"
    EDIT: By the way, try spawning an "E KUMI" with its scale set to 7, 0, 0. For best results spawn a movable cylinder, toss it into the air, and "Replace Selection" while it's in the air. It's awesome, but make sure you have rings!
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,743
    338
    63
    SonLVL
    You know there's a section in SA2's object editing page for exactly this purpose right?

    Also, in case anyone didn't know, the Chao data structure actually has the Chao's name as offset 0x12, not offset 0 (size 0x800).
     
  10. flarn2006

    flarn2006

    Member
    280
    3
    18
    Really? I don't see it...
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,743
    338
    63
    SonLVL
    http://info.sonicretro.org/SCHG:Sonic_Adventure_2/Object_Editing#Special_Objects
     
  12. KingLightning

    KingLightning

    Member
    17
    0
    0
    Atlanta, Georgia
    SA2 Cheat Engine Guide
    For your information Flarn, I managed to compile a Lua script that implements all of MainMemory's fixes after clicking a single button, saving me the hassle of implementing the fixes myself. This is what I wanted all this time, and I managed to get it to work perfectly.

    So you're wrong; I know as much as I'd like to about Lua scripting at the moment. I intend to expand on this into getting Mechless Tails/Eggman into levels, and then go further beyond that.

    It's basic and amateur, and the layout is inefficient, but it will get somewhere eventually. I consider myself even producing this as exceptional progress given my little skill.

    I still will work on the guide, however. But I messed around with Lua and got some stuff to work. Now I'll continue to work on this.
     
  13. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    1:Speaking of said page, I was thinking about putting your description of the Character physics somewhere in the SA2 Hacking section for easy reference, but I don't know exactly where it should go, or, more importantly, if you would rather add it yourself since you're the founder of this information.

    2:Not all of the physics parameters seem to behave as they did in SADX. In fact, byte 0x68 (Something related to acceleration on ground? Increase it to accelerate faster. 4 Bytes) doesn't seem to do anything at all that I can tell. I'll experiment more, and see if I can discover anything. Also, I've been looking at the ? physics sets, and all of them seem to just be unused.

    3: Has anyone been able to figure out why mechless Tails/Eggman can't grab handles in levels, and just fall off?

    4: Glad to see hacking SA2 is making good progress!

    5: Finally, stupid/pointless question time: Is the end goal here to make SA2 as available to hackers as SADX is? Or are we just doing stuff for the heck of it?
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,743
    338
    63
    SonLVL
    1. I've been meaning to make an EXE Editing page like SADXPC's.

    2. I'm reasonably certain that some settings are used for different things for different characters, or used for multiple things.

    3. They lack the proper action for hanging on a handle.

    5. Yes.
     
  15. flarn2006

    flarn2006

    Member
    280
    3
    18
    @KingLightning: Glad to hear that! :)
    @MainMemory: I think it's understandable I didn't notice that section, as it's completely empty. It's also not very obvious what "Special Objects" means; no offense!
    @(Nobody): I updated the cheat table again. This new feature unfortunately won't be useful for everyone; it's mainly to help with reverse-engineering the game/experimenting with stuff for which I haven't built a specific interface (yet.) If you don't understand what all of this means, don't worry. If you do, good for you! :thumbsup:

    [​IMG]

    One thing it unfortunately doesn't do yet is show return values; but I plan on fixing that soon.
    Also there's currently a bug where not using any stack parameters will cause a crash even if the function doesn't require any. I fixed this already, but until I upload the next version here's a workaround: just add something to the stack list before you call the function. That part's fixed now.

    EDIT: This version tends to cause a lot of crashes, and I'm not yet sure why. Until this is fixed, you may want to use this version, which doesn't have the problem.
     
  16. flarn2006

    flarn2006

    Member
    280
    3
    18
    Ever wanted to use noclip on the Gamecube version of SA2B? Well I found a new Action Replay code that lets you do just that!

    Code (Text):
    1. 19B3-825Q-2DXHQ
    2. RDP2-Z7Z6-ZPDXB
    3. WQYC-E3M9-1QVDR

    Hold down Z and press X to enter noclip mode. Then use the analog stick to move horizontally, and hold down X and move the analog stick to move vertically. Press A to exit noclip. Have fun!
     
  17. minichapman

    minichapman

    I'd like to think I'll be imparting words of wisdo Member
    681
    38
    28
    United Kingdom
    Staying sane.
    Is this applying to NTSC or PAL?
     
  18. Sappharad

    Sappharad

    Oldbie
    1,415
    70
    28
    If you decrypt the code, the Game ID is that of the NTSC US version.
     
  19. Rainbow Dash

    Rainbow Dash

    20
    0
    0
    New Lenox, IL
    Generations Level (Experimenting)
    Now this is pretty awesome, generally being able to noclip in any game that's not an FPS. However, I found Dolphin's (the Gamecube/Wii emulator) feature of free look to be pretty fantastic too. Still awesome to see something like this, especially with a game like Sonic.
     
  20. Cinossu

    Cinossu

    Administrator
    2,832
    44
    28
    London, UK
    Sonic the Hedgehog Extended Edition
    I know those Action Replay codes apply to the GCN version, and they aren't exactly hacking, but let's try to keep things like that relating to SA2 hacking/editing/findings all in this one thread, please.