Sonic and Sega Retro Message Board: Sonic Generations Hacking (and More!) - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Sonic Generations Hacking (and More!) Generations Cracked wide open (Custom Levels are an ongoing event!

#1561 User is offline GeneHF 

Posted 15 April 2012 - 07:06 AM

  • Classier than you'll ever be.
  • Posts: 7171
  • Joined: 16-May 04
  • Gender:Male
  • Location:The Windy and Ripply City
  • Project:オノマトペ大臣
  • Wiki edits:381

View PostBlazeHedgehog, on 15 April 2012 - 01:52 AM, said:

Is it wrong that my biggest gripe in that Shadow model swap video is what he did to the HUD? I'm reminded of the 40,000,000 different variations on BlitzSonic with ugly HUDs from people abusing gradients and huge font styles.

That's what happens when you have people with Photoshop and Illustrator who suddenly think they're professional designers. There are several more effective (and cleaner) hud choices to make, and I can think of a few that utilize that tribal logo motif from Shadow's game.

But this isn't the topic for that (nor can I be arsed to actually put something together like that.)

I'm not too hopeful on Colors stages on Generations' engine aside from maybe a handful. For instance, Asteroid Coaster? Not happening because of the rollercoasters and that one midboss with gravity alteration. Aquarium Planet? Doable, but with how expansive the underwater sections are to facilitate Underwater Drill, things could get problematic (and painfully slow) if bubble positions can't be changed among other things.

If anything, more basic stages like Sweet Mountain, Tropical Park or Planet Wisp are going to happen. Or the team can pull a grand troll and only import Straight Line Z—Terminal Velocity. :v:

#1562 User is offline KuroBit 

Posted 15 April 2012 - 11:27 AM

  • Posts: 38
  • Joined: 01-December 11
  • Gender:Not Telling

View PostGeneHF, on 15 April 2012 - 07:06 AM, said:

I'm not too hopeful on Colors stages on Generations' engine aside from maybe a handful. For instance, Asteroid Coaster? Not happening because of the rollercoasters and that one midboss with gravity alteration. Aquarium Planet? Doable, but with how expansive the underwater sections are to facilitate Underwater Drill, things could get problematic (and painfully slow) if bubble positions can't be changed among other things.

For levels like Asteroid Coaster, could we not simply skip areas of the level with use of springs and/or teliporters? Sure it would severely cut down on the length of the level, but eh, I don't know. Someone could also completely rework an area of a stage if they where really feeling creative.
This post has been edited by KuroBit: 15 April 2012 - 11:28 AM

#1563 User is offline Korama 

Posted 15 April 2012 - 12:08 PM

  • Posts: 232
  • Joined: 18-May 04
Even if you've heard it before a hundred times already: fantastic work, Dario!

View PostDario FF, on 14 April 2012 - 09:29 AM, said:

I rarely dabbled in ASM and never touched an EXE, so don't really expect me to even attempt to code in anything like that. I've just been sticking to cracking the file formats and writing tools for them. It's kinda amazing though how much this game can do without any code tampering though, but it could be a bit better regarding object definitions.

Only EXE hacks I would like to see are:
- Load files directly instead of using the CPKs. I'm not sure if this is even built in already! There's a work folder that was used in Unleashed for overriding files with the DLC, and I've seen reports of people sometimes crashing when there's some weird shit in the disk folder apart from the 3 Main cpks. This would likely be the best modification because it would reduce testing time to 0 instead of 2-3 minutes each time you modify something. Would also be bitchin' for mod distribution.


I actually looked into that, but I didn't get anywhere and feel like I just wasted my time. The CRI filesystem stuff is quite complex, and multithreaded, which makes reversing it a terrible chore. There's an old version of the CRI "FileMajik" SDK for PC around, but it's of little help as so much has changed in the version used by Sonic Generations. The game uses an awful lot of CRI libs, here's a list of build strings I extracted from the exe, if someone's interested:
Spoiler


Anyway, on startup, the game looks in these subfolders of "work" (if your language is set to English):
work\Sonic
work\Languages\English\Sonic\
work\SonicVoice
work\voices\English\SonicVoice\
work\SonicClassic
work\GameHint
work\Languages\English\GameHint\
work\SonicActionCommon
work\SonicActionCommonHud
work\Languages\English\SonicActionCommonHud\
work\ActionCommon
work\Languages\English\ActionCommon\
work\DecorationText
work\SystemCommon
work\Languages\English\SystemCommon\
work\ConverseCommon

I extracted most of the respective .ar files from the bb?.cpks and placed the contents in these work folders. The game looks what files are present there, but as far as I can tell, they get never loaded. I could be wrong though, didn't check too thorougly. Maybe I shouldn't have unpacked the .ar archives, but I think it does expect extracted files...

Given that the CRI filesystem calls in the exe are so complex and confusing, my first thought for an "easy" solution was to trap all ReadFile WinApi calls by Sonic Generations and redirect them to a specific folder, if some bb?.cpk content is being read. However, I don't know if that would be very useful, as most files in the CPKs are packed (.ar/.pfd). So, implementing something like this would save you from rebuilding the entire CPKs, but you'd still have to build the other archive files.
If somebody wants to try and implement this idea, go ahead. I don't have as much time for hacking business these days as I used to, unfortunately.

#1564 User is online Dario FF 

Posted 15 April 2012 - 12:39 PM

  • Tech Support Hotline
  • Posts: 923
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar Del Plata
  • Project:SonicGLvl

View PostKorama, on 15 April 2012 - 12:08 PM, said:

Given that the CRI filesystem calls in the exe are so complex and confusing, my first thought for an "easy" solution was to trap all ReadFile WinApi calls by Sonic Generations and redirect them to a specific folder, if some bb?.cpk content is being read. However, I don't know if that would be very useful, as most files in the CPKs are packed (.ar/.pfd). So, implementing something like this would save you from rebuilding the entire CPKs, but you'd still have to build the other archive files.
If somebody wants to try and implement this idea, go ahead. I don't have as much time for hacking business these days as I used to, unfortunately.


That would be incredibly useful. The way I build my tools so far already repacks all of that(except cpks obviously), the time isn't even relevant seriously! The CPK repacking is the most annoying thing by far and it completely cripples mod distribution of any kind. If you manage to bypass the CPK checks and just redirect it to a file directory it'd be all we need. Massive kudos would be in order as well. :thumbsup:

Don't sweat it for bypassing AR files and PFDs. The game needs them for defining archive trees and doing fast searching of geometry inside the PFDs.

EDIT: You as in general to whoever wants to try.
This post has been edited by Dario FF: 15 April 2012 - 12:43 PM

#1565 User is offline DustArma 

Posted 15 April 2012 - 03:19 PM

  • Posts: 1138
  • Joined: 27-February 08
  • Gender:Male
  • Location:Santiago, Chile
  • Project:Learning Python.

View PostFalk, on 14 April 2012 - 07:13 PM, said:

Like I hypothesized earlier in the thread. 60fps vs 30fps calculations.

edit: even wilder shot into the dark to expand on that: Say if it's rigged so that Sonic can stick to a walljump surface if his vertical velocity is < X, and that X was adjusted for Generations so that from completely stationary in one frame to falling on the next, the momentum accumulated in 0.03333s is greater than X. When calculating with time increments of 0.01667s instead, frames exist where Sonic is < X and can still stick to the wall (I.e. 30fps vs 60fps)

edit2: I realize that in practical cases the walljump algorithm is more of a function of angle of approach than anything but yeah, my point is rounding (de-)errors due to higher physics framerate. (A lot of games tie physics to draw FPS)


If that was the case then having a framerate cap of 60FPS rather than 30FPS would affect not just the walljump but Sonic's entire physics, nevermind that there's still the fact that the main version of Unleashed, the 360 version, was also created with 30FPS in mind yet the PS3 version which is capped at 60FPS doesn't suffer issues with the physics, nor specifically with its walljump.

#1566 User is offline Falk 

Posted 15 April 2012 - 03:33 PM

  • Posts: 1097
  • Joined: 03-October 11
I'm admittedly awful at explaining things, so let me take another shot at this.

This is the theory:
1) There is a physics parameter file that essentially defines how Sonic interacts with the world. Unleashed is developed to be compatible with 60fps, and all the parameters are set with that in mind. The X360 version gets capped to 30fps, but 'if it's broke, don't fix it', hence the parameter file is unchanged and remains compatible with 60fps. (Actual physics calculations obviously take into account dropped frames, or in 360's case, halved framerate)

2) For Generations, both console versions are capped to 30fps. The physics parameter file was likely overhauled as part of tightening up Modern Sonic's controls, and since this new game only runs at 30fps, among other things the walljump parameters (e.g. how much vertical momentum is allowed before disabling sticking to a wall) were set with the assumption that you'd never have a check 1/60th of a second from (stationary Sonic + gravitational force) since this only happens at 60fps and is impossible at 30fps.

3) The PC port is handled by an outsource, and this detail is overlooked, hence the 'cant happen' happens, resulting in Sonic's newfound ability to spaz out on walljump surfaces

Symptoms:
- Bug -only- occurs on the PC version
- Replacing the parameter file with the Unleashed parameters makes the issue go away.

edit: We're not talking about physics radically changing at different FPS. Sonic should travel the same distance regardless of if it's 60fps, 30fps or even 5fps on a dying PC. The engine takes care of the difference because engines -have- to be designed with frame drops in mind, I.e. all physics are based on how much time has elapsed since the previous think. What we're talking about is a parameter that is possible/impossible at those different framerates due to rounding errors and greater precision from higher FPS.

And obviously this is all speculation on my part. I'm just defending my speculation on a base that it's something that -could- be happening rather than hogwash. I wouldn't be surprised if the actual cause was something else, to be honest.
This post has been edited by Falk: 15 April 2012 - 03:38 PM

#1567 User is offline ezodagrom 

Posted 15 April 2012 - 04:31 PM

  • Posts: 77
  • Joined: 28-August 11
  • Gender:Male
Some progress about the PC version wall jump, in the Sonic.prm.xml file, changing the WallJumpReadyGravity parameter from 2.81 to 3 fixes the wall jump.
3 is the minimum value for the wall jump to be fixed, while trying to find the minimum value I first tried to double the default value, 5.62, and then I started using lower values until I found the minimum value. All the values that I tried between 3 and 5.62 worked, while 2.99 didn't work.

From what I tried so far, there's one place where the walljump is still broken, in the Egg Dragoon boss fight. For the Egg Dragon walljumps, I'm guessing the value that has to be changed is either in another parameter or in another file.
This post has been edited by ezodagrom: 15 April 2012 - 04:35 PM

#1568 User is online Dario FF 

Posted 15 April 2012 - 04:53 PM

  • Tech Support Hotline
  • Posts: 923
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar Del Plata
  • Project:SonicGLvl

View Postezodagrom, on 15 April 2012 - 04:31 PM, said:

Some progress about the PC version wall jump, in the Sonic.prm.xml file, changing the WallJumpReadyGravity parameter from 2.81 to 3 fixes the wall jump.
3 is the minimum value for the wall jump to be fixed, while trying to find the minimum value I first tried to double the default value, 5.62, and then I started using lower values until I found the minimum value. All the values that I tried between 3 and 5.62 worked, while 2.99 didn't work.

From what I tried so far, there's one place where the walljump is still broken, in the Egg Dragoon boss fight. For the Egg Dragon walljumps, I'm guessing the value that has to be changed is either in another parameter or in another file.

There's another Sonic.prm.xml in the boss fight. Any files that are afterwards in the loading order (Configuration -> Sonic -> Stage) will override parameters on the previous ones. Not completely but it can override certain parameters of the XMLs.

#1569 User is offline KuroBit 

Posted 15 April 2012 - 05:03 PM

  • Posts: 38
  • Joined: 01-December 11
  • Gender:Not Telling

View Postezodagrom, on 15 April 2012 - 04:31 PM, said:

Some progress about the PC version wall jump, in the Sonic.prm.xml file, changing the WallJumpReadyGravity parameter from 2.81 to 3 fixes the wall jump.
3 is the minimum value for the wall jump to be fixed, while trying to find the minimum value I first tried to double the default value, 5.62, and then I started using lower values until I found the minimum value. All the values that I tried between 3 and 5.62 worked, while 2.99 didn't work.

Ah yes this was it! I could NOT remember the name of that value even though it was so obvious. It's interesting that it starts working EXACTLY on 3 though, I wonder if it's rounding the number somewhere (Like what Falk is saying?).

View Postezodagrom, on 15 April 2012 - 04:31 PM, said:

From what I tried so far, there's one place where the walljump is still broken, in the Egg Dragoon boss fight. For the Egg Dragon walljumps, I'm guessing the value that has to be changed is either in another parameter or in another file.

I would assume that the boss fight overrides that value, setting it back to something close to 2.81, since wall jumping is a major part of that battle.
This post has been edited by KuroBit: 15 April 2012 - 05:03 PM

#1570 User is offline ezodagrom 

Posted 15 April 2012 - 05:39 PM

  • Posts: 77
  • Joined: 28-August 11
  • Gender:Male

View PostDario FF, on 15 April 2012 - 04:53 PM, said:

View Postezodagrom, on 15 April 2012 - 04:31 PM, said:

Some progress about the PC version wall jump, in the Sonic.prm.xml file, changing the WallJumpReadyGravity parameter from 2.81 to 3 fixes the wall jump.
3 is the minimum value for the wall jump to be fixed, while trying to find the minimum value I first tried to double the default value, 5.62, and then I started using lower values until I found the minimum value. All the values that I tried between 3 and 5.62 worked, while 2.99 didn't work.

From what I tried so far, there's one place where the walljump is still broken, in the Egg Dragoon boss fight. For the Egg Dragon walljumps, I'm guessing the value that has to be changed is either in another parameter or in another file.

There's another Sonic.prm.xml in the boss fight. Any files that are afterwards in the loading order (Configuration -> Sonic -> Stage) will override parameters on the previous ones. Not completely but it can override certain parameters of the XMLs.

Managed to make it work in Egg Dragoon by changing the Sonic.prm.xml that is inside bb.cpk -> #bne.ar.00, it used the same 2.81 value in the WallJumpReadyGravity parameter, changed it to 3 like the other.

EDIT: Made a small video comparing the walljump with the gravity value set at 2.81 and at 3:


Also, anyone knows what handles the mid-air somersault that happens at the top of the speed highway building? Just asking if anyone knows if it's a value in the same Sonic.prm.xml parameter file as the walljump, or if there's anything else than handles this. Like the walljump, this is bugged in the PC version, and, as seen in the video, Sonic lands upside down:

This post has been edited by ezodagrom: 15 April 2012 - 10:14 PM

#1571 User is offline KuroBit 

Posted 16 April 2012 - 09:13 AM

  • Posts: 38
  • Joined: 01-December 11
  • Gender:Not Telling

View Postezodagrom, on 15 April 2012 - 05:39 PM, said:

Also, anyone knows what handles the mid-air somersault that happens at the top of the speed highway building? Just asking if anyone knows if it's a value in the same Sonic.prm.xml parameter file as the walljump, or if there's anything else than handles this. Like the walljump, this is bugged in the PC version, and, as seen in the video, Sonic lands upside down:

This also happens when you try to get to Shadow in the HUB world. I'm not sure if this is a PC only issue though. (And actually, now that I think about it, it's a bit of a different situation I think)
This post has been edited by KuroBit: 16 April 2012 - 09:14 AM

#1572 User is offline ezodagrom 

Posted 16 April 2012 - 10:37 AM

  • Posts: 77
  • Joined: 28-August 11
  • Gender:Male

View PostKuroBit, on 16 April 2012 - 09:13 AM, said:

View Postezodagrom, on 15 April 2012 - 05:39 PM, said:

Also, anyone knows what handles the mid-air somersault that happens at the top of the speed highway building? Just asking if anyone knows if it's a value in the same Sonic.prm.xml parameter file as the walljump, or if there's anything else than handles this. Like the walljump, this is bugged in the PC version, and, as seen in the video, Sonic lands upside down:

This also happens when you try to get to Shadow in the HUB world. I'm not sure if this is a PC only issue though. (And actually, now that I think about it, it's a bit of a different situation I think)

The one in the HUB world, I have no idea if it also happens in the consoles or not, but the one in Speed Highway, it only happens on the PC, video from the 360 version, at 00:45:


#1573 User is offline Turbohog 

Posted 16 April 2012 - 12:36 PM

  • Posts: 131
  • Joined: 25-June 08
  • Gender:Male
  • Project:Going to be gone for a long time...
  • Wiki edits:22
Speaking of speed highway, I always get this awful camera glitch:


Sega should really patch these issues; they're easy enough to fix.

#1574 User is offline Lanzer 

Posted 16 April 2012 - 02:50 PM

  • The saber calls for its master...
  • Posts: 5002
  • Joined: 27-February 09
  • Gender:Male
  • Location:California
  • Project:Doing Stuff.
  • Wiki edits:1
If there easy to fix, why don't we patch these issues then? I mean sure SEGA should push the generations team to fix the issues but at this point I don't even think there bothering with Generations anymore. It very well may be up to us now...

#1575 User is offline Twilightzoney 

Posted 16 April 2012 - 03:08 PM

  • Posts: 240
  • Joined: 19-February 10
  • Gender:Male
  • Location:Elgin, IL And Hampshire
  • Project:Unleashed and Generations Stuff and Custom Works
I never get these camera issues that you guys seem to be having when I play the PC. Also the upside down thing that that happens, used to happen in the old demo for Generations for Modern Sonic when in GHZ.

  • 277 Pages +
  • ◄ First
  • 103
  • 104
  • 105
  • 106
  • 107
  • Last ►
    Locked
    Locked Forum

6 User(s) are reading this topic
2 members, 4 guests, 0 anonymous users

  1. Tech Member: Dario FF,
  2. Member: Paraxade