SADX/SA1 Hacking/Modding

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

  1. Atendega

    Atendega

    Lesser Sea Sponge Member
    577
    0
    0
    Comfy couch
    Collecting insults
    Looks like ambient occlusion. He's probably forcing it with Nvidia Inspector, as described here.
     
  2. BlazeHedgehog

    BlazeHedgehog

    A "Community Enigma"? Oldbie
    1,460
    5
    18
    I think ReShade also has a way to apply ambient occlusion to supported games

    I personally don't like it. Drawing fuzzy outlines around every surface looks super gross. I know it's supposed to improve readability by making objects "pop" more, but I think it looks super unnatural, and applying it to games that weren't originally designed to have it is even worse. (In that SADX footage that was linked, you can see the AO drawing fuzzy black outlines across the bottom of the pool, which looks omega-level gross)
     
  3. Rlan

    Rlan

    Oldbie
    203
    26
    28
    Yo!

    I recently started a blog looking at a lot of sprites and textures and art from old Sonic games. One thing I'd love to do is make GIFs of parts around Sonic Adventure 1 & 2, be it weird bits of landscape, etc.

    One thing I'd like to be able to do is to take complete control of the camera, go around the world during a cutscene etc. The Dolphin emulator has something a bit like this where you can screw around with the position of it in SA1 & SA2, but it's still based on where the Camera is set up in the code, so moving characters will also move the camera, and cutscenes will kind of follow the cutscenes.

    Are there any hacks out there for the PC versions of SA1 or SA2 that allow complete free control of the Camera, and being able to unhinge it from the playable character?
     
  4. Dark Sonic

    Dark Sonic

    Member
    12,711
    240
    43
    Working on my art!
    There has to be some way to do it, this guy did it with SA1 and SA2, although I think he used the GC versions of both:

    http://www.youtube.com/watch?v=Qw6Vpv_xiRQ&t=726s
    http://www.youtube.com/watch?v=nq46bCivjhw
     
  5. Rlan

    Rlan

    Oldbie
    203
    26
    28
    Yeah, that's basically what I'd love to mess around with, and yeah - Dolphin allows you to do this, but it's still based on the coordinates of the current character or camera position. It's reasonably easy enough to do in levels with a moon fly code as you can keep characters still, but the camera will fly everywhere with each camera change in a cutscene. I'd love to be able to watch a whole cutscene from one angle, for example.

    Also messed with Sonic R on the Gems Collection but unfortunately that game really doesn't render anything that the character's not looking at, including it's face. Ah well.
     
  6. Strife

    Strife

    Member
    1,931
    24
    18
    United States
    Freedom Planet 2
    Funny you mention that, because I experimented with Cheat Engine a couple years back and found some values of interest that allow me to manually change the camera position:

    [​IMG]

    The first step is to set the pointer value at 3B2CBB0 from 2 to 3. This freezes the camera in place so that it doesn't follow the character. From there, I found three float values that adjust the X, Y and Z position of the camera itself. This lets you move it around like so:

    [​IMG]

    I haven't been able to find the float values for adjusting the angle of the camera, so if I wanted to look at the course from the top down, I first have to set the pointer value back to 2, then go into the character's look mode and stare at the ground.
     
  7. Speeps

    Speeps

    Member
    117
    28
    28
    AFAIK that's what the game uses to tell between the normal camera and the one used for first-person (Directional buttons camera).
    Freezing it to 3 in the Dreamcast version doesn't freeze the camera but just makes it awkwardly try to do the first person cam when it's not supposed to. Setting it to 1 seems to make it go to an entirely different camera that can't be rotated and any other value usually freezes it, but some camera types can override it somewhat so it can't freeze things 100% of the time.

    You can change it to a different (and fixed) view in a cutscene by changing the value to 1 but that's about it I think.
     
  8. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,423
    72
    28
    SonLVL
    I could probably put something together, not really sure how it would be activated/controlled though...
     
  9. Strife

    Strife

    Member
    1,931
    24
    18
    United States
    Freedom Planet 2
    Maybe something like the character swap mod where the function is hardcoded to a keyboard key? Then when toggled on, you'd have four keys for panning and four keys for rotating.
     
  10. E-122-Psi

    E-122-Psi

    Member
    1,985
    111
    43
    One thing I forgot to discuss, we know whole new levels are a convoluted matter, but what about the current levels being modified to have more objectives, or even just altering the current ones?

    Say you wanted to add a fourth and fifth goal for each stage like in SA2 (e.g. Find the Chao or Expert Mode).

    I know levels can be modified, but don't know how far they can be taken in terms alternating with different layouts or objectives for them.
     
  11. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,423
    72
    28
    SonLVL
    That would require, at the very least, expanding the emblem array, which would invalidate any existing save files. If you can accomplish that, I guess it's possible, but difficult, as you'd have to modify every object/function that accesses the emblem array.
     
  12. Fred

    Fred

    Formerly known as 'Neo' Oldbie
    1,529
    62
    28
    Portugal
    Sonic 3 Unlocked
    I fail to see why you jumped straight to the emblem and save file tangent when those are really only an afterthought to actually implementing the gameplay associated with them.

    Adding separate goals would be tricky with SA1's cumulative mission design, how would you go back to the original objective? But programming-wise, it'd just be a matter of changing the logic of some objects in chao mode, and loading a different SET file in hard mode.
     
  13. E-122-Psi

    E-122-Psi

    Member
    1,985
    111
    43
    Well emblems may not be necessary, unless getting them is needed for the game to recognise the mission as accomplished and to pass to the next one or the '100%' normal level. If it just programs when you finish the mission once to load the next one then the emblem is just a separate extra, like the Metal Sonic trials.
     
  14. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,423
    72
    28
    SonLVL
    The emblems are the only way the game has of tracking which mission you're on. Making it work like SA2 would require implementing an entirely new system for selecting a mission, tracking objectives, and tracking which missions are completed.

    Adding an object that spawns a 1up in normal play but spawns a goal object in a specific mission is easy, loading an alternate SET file in a specific mission is also easy.
     
  15. E-122-Psi

    E-122-Psi

    Member
    1,985
    111
    43
    Ah well that complicates things then. If there is difficulty to the emblem data programming wise like you say, I can see the issue (constant checks for 130 is bad enough).

    Mind you if corrupting save files are the biggest problem, players could just, you know, start a new one and backup their existing one, given PC save data is pretty easily manageable. I expect loads of mods risk screwing up save files anyway.

    How does Metal Sonic's data work though?
     
  16. Dark Sonic

    Dark Sonic

    Member
    12,711
    240
    43
    Working on my art!
    Could SADX's mission mode be used to create some of these additional level missions?
     
  17. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,423
    72
    28
    SonLVL
    Dark Sonic: Mission mode is something that we don't fully understand the workings of yet, and in order to fully create custom missions, we'd need to implement editing support in SADXLVL2. It could potentially do some things like add additional obstacles to levels, but it can't remove things that exist in the base layout like SA2 Hard Mode does.

    It's tacked on after the original SA1 data, along with the black market ring count.
     
  18. Fred

    Fred

    Formerly known as 'Neo' Oldbie
    1,529
    62
    28
    Portugal
    Sonic 3 Unlocked
    Granted, but the fact that the Chao mission changes the location of the level's goal, you'd presumably want to allow players to play one without permanently locking them out of the other on a given save file, so in that respect the SA1 mission system is already a non-starter.

    (As an aside, it used to annoy me how you couldn't go back and explore the Mystic Ruins past area without making a new save file, but with the cutscene skipping in DX it's quick enough not to be a total drag.)

    Then, since you're already defining these missions separately, you might as well just have your own flag (standard/chao/hard) for everything, and track completion entirely separate from the emblem flags. Really, the hard bit is actually designing the UI; the proper thing would probably be an extra option on the Trial menu or something but yeah good luck figuring that out.
     
  19. E-122-Psi

    E-122-Psi

    Member
    1,985
    111
    43
    Well that depends if you want to follow SA1's conventions. In each of the games missions, unlike SA2, the mission only ended when you completed the level normally (eg. collect 50 rings AND complete the level). Thus it would likely be 'Collect the Chao then reach the goal'.

    I admit SA2's setup was more dynamic though. Hell, even if adding the later two missions is out of the question I wouldn't mind seeing a mod that altered those stipulations to make them feel more varied, eg. B being just collect 100 rings to win, and A being a proper countdown akin to Gamma's stages (I suppose Gamma's would start with a shorter time).
     
  20. Fred

    Fred

    Formerly known as 'Neo' Oldbie
    1,529
    62
    28
    Portugal
    Sonic 3 Unlocked
    Hah, that would be amusing. Just start the level and he immediately goes 'NO TIME LEFT'. Too bad making the time limits actually interesting would alienate 95% of the player base.