Sonic and Sega Retro Message Board: CPKREDIR - loading and combining mods for Sonic Generations - Sonic and Sega Retro Message Board

Jump to content

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

CPKREDIR - loading and combining mods for Sonic Generations New version 0.41, now with save file redirection

#61 User is offline DinnerSonic 

Posted 10 July 2012 - 10:14 AM

  • Never Posting Since 2004!
  • Posts: 127
  • Joined: 11-April 04
  • Gender:Male
  • Location:West Virginia, United States of America

View PostKharen, on 09 July 2012 - 09:14 PM, said:

Wait a moment, the Mega Drive data is in the PC version? Does this mean you could make a mod to reinsert it and play the original Sonic the Hedgehog?

No idea about the emulator/rom, I'm somewhat doubtful, but the HUB music, the models, the icons, store entries and even the objects on the HUB for it are still in the PC version. I'm betting they just took out the ability for it to appear, and I assume didn't port the code for the emulator.

#62 User is offline Korama 

Posted 12 July 2012 - 06:11 AM

  • Posts: 232
  • Joined: 18-May 04
A few people still seem to prefer releasing mods as CPKs instead of just the modified files. Plus there are a few older mods that only exist as CPKs.
To get those mods working with CPKREDIR, you have to extract the files from the mod CPKs and if possible delete all files that haven't been modified.
That can be tedious work, so I made a little program to automate the process.
You'll still have to manually create a mod.ini for any mods you extract, but that shouldn't be too difficult.
You can download the program here.
Posted Image
This post has been edited by Korama: 12 July 2012 - 06:55 AM

#63 User is offline Korama 

Posted 13 July 2012 - 06:19 AM

  • Posts: 232
  • Joined: 18-May 04
Update:
CPKREDIR v0.41

Now save file redirection works with older versions of SonicGenerations.exe (no more error 0xc000142).
And there's a new SaveFileOverride setting, for forcing your own save file on mods without having to disable save file redirection.
This post has been edited by Korama: 13 July 2012 - 06:19 AM

#64 User is offline TheUltimaXtreme 

Posted 13 July 2012 - 11:47 AM

  • Breaking logic since whenever
  • Posts: 61
  • Joined: 10-August 10
  • Gender:Male
  • Location:Nowhere near you
  • Project:LPs
Now there's a new issue.

Upon entering a state where the game must save, the game immediately crashes.

Quote

Problem Event Name: APPCRASH
Application Name: SonicGenerations.exe
Application Version: 1.0.0.1
Application Timestamp: 4eaed925
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.17651
Fault Module Timestamp: 4e211319
Exception Code: 0eedfade
Exception Offset: 0000b9bc
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


There's the program signature provided.

#65 User is offline Korama 

Posted 13 July 2012 - 02:26 PM

  • Posts: 232
  • Joined: 18-May 04
Thanks for the notice.
First, it looks like you're running v1.0.0.1 of SonicGenerations.exe. The current version is 1.0.0.5, so update the game if possible.

Second, my guess is the game crashes because the redirected save file is attempted to be written to a folder for which you don't have write permissions.
One solution is to run the game with admin privileges (right-click -> run as admin).
A better solution is to check save file settings in cpkredir.ini (namely SafeFileFallback and SafeFileOverride) and in the mod.ini you're using, and to make sure they point to places where you're allowed to create files.
Since mods probably want to save files in their own subfolder, you should take ownership of the parent folder in which you keep all mods (check the "Replace owner on subcontainers and objects" option). You also should have write access to Sonic Generation's folder (usually C:\Program Files\Steam\steamapps\common\sonic generations), so take ownership of that as well, if necessary.
This post has been edited by Korama: 13 July 2012 - 02:57 PM

#66 User is offline TheUltimaXtreme 

Posted 14 July 2012 - 01:26 AM

  • Breaking logic since whenever
  • Posts: 61
  • Joined: 10-August 10
  • Gender:Male
  • Location:Nowhere near you
  • Project:LPs
The v1.0.0.1 thing has to do with it being pirated. I'll see if it's possible to patch it.

As for write permissions, that's a fairly common thing, but obviously, as I'm the only user, I do mostly have ownership over all of my content, disregarding programs locked by TrustedInstaller. Since the Steam path, where the save data for SonicGenerations.exe usually writes to, is also owned by TrustedInstaller, I don't see why it's passing through and saving there on default, when the folder, where the EXE is stored itself, seems to have such issues for its own content. Guess that's best left to discuss in a Windows thread.

#67 User is offline Dude 

Posted 14 July 2012 - 01:32 AM

  • 3ds MAX Help Desk
  • Posts: 2607
  • Joined: 11-September 04
  • Gender:Male
  • Location:Southbridge, MA
  • Project:Sonic Adventure Generations
  • Wiki edits:43
I don't think it's a good idea to add support for pirated versions. That might get people in hot water.
This post has been edited by Dude: 14 July 2012 - 01:32 AM

#68 User is offline Azu 

Posted 14 July 2012 - 02:07 AM

  • I must be stupid.
  • Posts: 1316
  • Joined: 23-February 08
  • Gender:Male
  • Location:Home
I noticed the console doesn't come up anymore, anyway to change that so that it does?

#69 User is offline Overlord 

Posted 14 July 2012 - 07:13 AM

  • "I am Death, not Taxes. I turn up only once."
  • Posts: 12397
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204

View PostDude, on 14 July 2012 - 01:32 AM, said:

I don't think it's a good idea to add support for pirated versions. That might get people in hot water.

Seconded. If anything, support for mods like this only in actual official versions might encourage people to buy the damn game and support Sega - it's not a huge amount and lord knows they need it right now.

#70 User is offline Korama 

Posted 14 July 2012 - 08:03 AM

  • Posts: 232
  • Joined: 18-May 04
I'm not intentionally adding support for pirated versions. If I could, I'd make CPKREDIR work only with legitimate copies of the game.
The problem is, how do you detect that a copy is pirated?
I could remove support for all but the current version of SonicGenerations.exe (v1.0.0.5), as legitimate users should always have the latest update.
I could check if there's a suspicious DLL in Sonic Generation's folder, as many pirated versions use a cracked steam_api.dll called storm_api.dll or burst_api.dll.
Tell me if you think I should really be doing this. And if you have any good ideas for detecting pirated copies, I'm all ears.

View PostAzu, on 14 July 2012 - 02:07 AM, said:

I noticed the console doesn't come up anymore, anyway to change that so that it does?

The console was disabled by default, as it seemed to cause performance problems for some people.
Just open cpkredir.ini and make sure it contains the line "LogType=console". If you're using the default cpkredir.ini from the latest zip file, this line is already there, but commented out. So just remove the ";" in front of it.
This post has been edited by Korama: 14 July 2012 - 08:05 AM

#71 User is offline Dario FF 

Posted 14 July 2012 - 08:30 AM

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

View PostKorama, on 14 July 2012 - 08:03 AM, said:

I could check if there's a suspicious DLL in Sonic Generation's folder, as many pirated versions use a cracked steam_api.dll called storm_api.dll or burst_api.dll.
Tell me if you think I should really be doing this. And if you have any good ideas for detecting pirated copies, I'm all ears.

Taking support out for cracking is against preservation of software, which is the main reason why I hate stuff like Steam, since it's not much of a digital store, but more of a digital subscription. GoG does it right.

At this point your job is done. You don't need to play morality hunter and go around implementing DRM for CPKREDIR. It's useless, and if needed, people will crack it. It's Sega's job, not yours.

Besides, we all know how we want to tamper with the exe and stuff for seeing what we can unlock(*cough* Unleashed Renderer *cough*). If one of the things we modified happened to shoot some warning to Steam(like some weird memory corruption of some sort), you could be risking a ban.

TL;DR; Don't bother adding protection, and don't bother supporting older versions either if it's not necessary.
This post has been edited by Dario FF: 14 July 2012 - 08:33 AM

#72 User is offline Overlord 

Posted 14 July 2012 - 10:36 AM

  • "I am Death, not Taxes. I turn up only once."
  • Posts: 12397
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Yeah, basically what Dario said, honestly. Don't specifically bother adding support for pirated versions, but actively adding checks to prevent it is going too far in the other direction.

#73 User is offline TheUltimaXtreme 

Posted 14 July 2012 - 12:32 PM

  • Breaking logic since whenever
  • Posts: 61
  • Joined: 10-August 10
  • Gender:Male
  • Location:Nowhere near you
  • Project:LPs
Well, most of the time, people, whether pirating it or not, if it doesn't fault the gameplay, there's nothing to bother about. That sense of "If it ain't broke, don't fix it" rolls in for these kinds of games. It works with modding as well. I've not seen issues with the older CPKREDIR, so it'd make sense to stay on that revision. Other people obviously want their game to be "perfect" and that every patch brings it closer to that. That's how it works.

Applying a DRM to your modifying program, for a game that, in itself, is supposed to be DRM for the sense that you need Steam running to make the game itself run, would be incredibly crass if I say so myself.
This post has been edited by TheUltimaXtreme: 14 July 2012 - 12:33 PM

#74 User is offline Korama 

Posted 14 July 2012 - 04:36 PM

  • Posts: 232
  • Joined: 18-May 04

View PostDario FF, on 14 July 2012 - 08:30 AM, said:

TL;DR; Don't bother adding protection, and don't bother supporting older versions either if it's not necessary.

I built a flexible patching system to be forward compatible, so that CPKREDIR would be likely to work with Sonic Generations v1.0.0.6 and beyond, should there ever be any more updates released (yeah, seems unlikely).
The fact that this also makes it backward compatible to Sonic Generations v1.0.0.4 and older was just a welcome side effect.
I could implement a simple version check to test if SonicGenerations.exe is older than v1.0.0.5, display an error message and refuse to run. But given how easily this could be circumvented, it's probably not worth the effort. Still, it might deter some pirates who don't know how to use a hex editor. ;)

View PostOverlord, on 14 July 2012 - 10:36 AM, said:

Yeah, basically what Dario said, honestly. Don't specifically bother adding support for pirated versions, but actively adding checks to prevent it is going too far in the other direction.

That's how I see it as well. While it might be fun to annoy people who try to run CPKREDIR with a pirated copy of Sonic Generations, every measure that I take could be circumvented. And unless CPKREDIR v0.5 introduces a killer feature that most mods would end up relying on, people could just continue using v0.4.

#75 User is offline Dario FF 

Posted 17 July 2012 - 02:45 PM

  • Tech Support Hotline
  • Posts: 816
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar Del Plata
  • Project:SonicGLvl
So after all this discussion I kinda got lost. Is cpkredir v0.4.1 stable enough to be rebundled again with SonicGMI?

  • 6 Pages +
  • ◄ First
  • 3
  • 4
  • 5
  • 6
    Locked
    Locked Forum

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