don't click here

Sonic Lost World (PC / Wii U) Hacking & Resources

Discussion in 'Engineering & Reverse Engineering' started by Dario FF, Jan 1, 2015.

  1. Thanks for the information regarding the patching. I'm not fond of the current Mod Loader because it still only just rebuilds the CPK, which is the exact same thing that I do with other tools. I don't have much a reason to use it when I can just rebuild the CPK in about the same amount of time.

    Also, thanks for the information about the textures. That helped me out immensely.
     
  2. Paraxade

    Paraxade

    Member
    186
    0
    0
    Oh nice! Is there any chance of making it open source or at least sharing the source with some other people in the community? cpkredir is quite important to the Generations modding community (and probably will be to the Lost World modding community) and the fact that we can't get a hold of you most of the time makes it impossible to get new features implemented, fix bugs, add support for other games, etc. If you hadn't shown up here just now, we probably would've needed to completely redo all the research involved and rewrite cpkredir from scratch, and that just seems like a waste of time when someone else has already done it. I don't mean any offense to you, it just kinda sucks to be so dependent on a utility that we can't update or even request updates for.

    I'm very glad to hear it'll be compatible with Lost World either way though, thank you!
     
  3. Twilightzoney

    Twilightzoney

    Tech Member
    353
    0
    16
    Elgin, IL And Hampshire
    Unleashed and Generations Stuff and Custom Works
    Korama if you could look into Lost Worlds Cri audio formats AWB ACB for redirecting those types of files as well since we'll need that for modding music since there are no tools for repacking them. I could gift you a copy of Lost World for pc for testing if you need it.
     
  4. Korama

    Korama

    Tech Member
    272
    2
    0
    New CPKREDIR in the original topic.

    I plan to share the source eventually. I started a major rewrite earlier this year, with the goal to make it compatible with all PC games that use CPKs, but that's complicated and I just don't have as much spare time anymore as I wish I had...
     
  5. Joe T.E.

    Joe T.E.

    All life form data, successfully copied! Member
    142
    0
    0
    At my home in Florida
    Big the Cat in Sonic Generations, High-Res HUD for Sonic Lost World, Metal Sonic Lost World (Version 1.0,) Sonic Generations: Episode Metal (Version 3.0.)
    It works!

    I patched the exe with cpkredirInst, made a new ModsDB.ini in the mods folder, made a new mod.ini within the folder for my actual mod, and re-did my mod's folder structure to match what cpkredir expects. My mod loaded perfectly, with no cpkredir-exclusive problems found thus far.

    Edit: After making this post, I realized that I forgot to restore my original un-modded sonic2013_patch_0.cpk into the game's disk folder before testing cpkredir, meaning that the modded files showing up may have just been due to using a pre-modded .cpk.
    After restoring my original sonic2013_patch_0.cpk and trying cpkredir again, I can now properly confirm that it works. The modded files once again loaded properly, and then no longer appeared when I removed the mod from the "active mods" section of ModsDS.ini.

    Edit 2: After more testing, it seems I was still a bit too hasty to say that it fully works. Right now, only files in each .cpk's root folder are being loaded. Any files that are in folders within the .cpk seem to be getting ignored by cpkredir...
     
  6. Twilightzoney

    Twilightzoney

    Tech Member
    353
    0
    16
    Elgin, IL And Hampshire
    Unleashed and Generations Stuff and Custom Works
    Yep, same here I set up SonicGMI to work with Lost World and it seems to work just perfectly bar the reminder that we can't seem to launch it without launching through steam though.

    Okay well I hex-editing SonicGMI to load up properly I believe and have mod support for it. And it will also launch it through using the url instead of the exe since this game requires us to launch only through steam now.

    https://www.dropbox.com/s/p865tf54sacnmz8/SonicGMIHack.7z?dl=0

    It should all work just fine. Besides the whole save redirection stuff. You will need to manually patch the exe yourself which is quite easy to do.
     
  7. Paraxade

    Paraxade

    Member
    186
    0
    0
    I imagine now that we have a new version of cpkredir, Dario will probably update SonicGMI properly to work with Lost World pretty quick. Can't imagine it would be very complicated to update it, especially if you've already got it working.
     
  8. Korama

    Korama

    Tech Member
    272
    2
    0
    The savegame file is called <uniquenumber>.sdat - it's a XML file, but scrambled with a simple bytewise XOR (value 0x6D).
    I quickly wrote a little encoder/decoder, download here.

    Very easy to edit stuff there. Also contains another reference to the cut minigames ("seesawPlayNum" etc.).
     
  9. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    Oh awesome find. Because of this I figured out how to edit your item inventory. If you use this and go down to the items section (It'll be towards the bottom and will have 5 numbers in a list), you can edit your items. Here are the values:

    speed shoes - 39-42
    shield - 43-46
    red ring finder - 47-50
    lives - 51-54
    bomb - 55-58
    Magnet shield - 59-62
    Invincibility - 63-66
    Super guide wing - 67-70

    The higher number of the set is the 4 star variant. So Speed shoe 39 is 1 star, 40 is 2, 41 is 3, and 42 is 4. Now if only we could figure out how to edit what the speed shoes do, as I'm still convinced they don't do anything.

    EDIT: For those who would like a Sonic GMI/cpkredir compatible version of the most current Nonexistent Six Edition release, I made this: https://mega.nz/#!OolzRKBQ!hIn9fmeuAaI2sebMzjNO5pBJTOZu0uJUiPiHpGn32d8

    No changes have been made since the original release though, not yet anyway.
     
  10. Atendega

    Atendega

    Lesser Sea Sponge Member
    577
    0
    0
    Comfy couch
    Collecting insults
    Good to see you working on this stuff again, Korama. So I wonder if GMI is going to be updated to be compatible with both games, or if a separate version will be made? And in any case, is there any specific advantage to redirecting the files in the CPK over generating one on the fly like the existing mod loader? Isn't using an actual CPK probably more stable?
     
  11. Amnimator

    Amnimator

    Member
    224
    0
    16
    Thanks, Korama. Without your help, larger mods could have been pretty troublesome.
    Also, I know this is kind of a noob question, but I'll ask anyway. What happens if someone would complete a modded stage on the score board? Obviously the numbers would be off on the score board and would put people at risk of bans. I worry because some people who don't mod might try this out.
    Thanks, it's been a while since I touched Generations actually. What you shouldn't do is export the dds using the Max Ogre plugin. A good 95% of the time it messes up your textures and gives you circus lights instead. To be safe, export as DXT1 or DXT5.
     
  12. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    I've never seen Sega ban anyone from anything regarding mods. Basically once modding happens in a Sonic game, the rankings just go to shit and the leaderboards are absolutely useless. Why they try is beyond me.
     
  13. Shade Vortex

    Shade Vortex

    The Black Vortex Member
    595
    54
    28
    USA, WA.
    YouTube Memes
    So I don't wanna have 3 mod loaders for 1 game. Which is going to be the generally-accepted one by modders, I wonder? Sonic GMI was the main one for Generations, it seems (at least most of the mods are compatible with it). Should I just wait for GMI to support Lost World?
     
  14. Atendega

    Atendega

    Lesser Sea Sponge Member
    577
    0
    0
    Comfy couch
    Collecting insults
    Maybe we should just wait for our lord and saviour, Dario FF, to lay down judgement? I'm sure whatever he ends up using will be the most popular one.
     
  15. Korama

    Korama

    Tech Member
    272
    2
    0
    Thanks for documenting those values. And for the Nonexistent Six Edition. Though I haven't had the time yet to check it out.


    In theory, building actual CPK files might be more stable, and slightly reduce loading times. In practice, there's probably no noticeable difference (unless you're running CPKREDIR with logging enabled, particularly console logging - it's slow).
    Rebuilding CPK files takes time and causes more writes to your disk (something you might want to minimize if you have an SSD). Using virtual CPKs is more flexible and convenient, I'd say.
    Anyway, rebuilding is only an option for Lost World because it has that relatively small sonic2013_patch_0.cpk file which can override the much larger main CPK. If you had to rebuild the latter all the time, which was the case for Sonic Generations, then you'd soon loathe it.


    Three? There are only two that I know of. SonicGMI is basically "only" a GUI for CPKREDIR. But a very nice one.



    I was just looking at some of the lua script files. There are quite a few comments in them, but all garbled like "ƒ~ƒjƒQ[ƒ€‚̐ݒèƒtƒ@ƒCƒ‹". It's Japanese text with SHIFT-JIS encoding. I think I'll write a little program that converts them to UTF-8, to render the Japanese characters properly. Shouldn't impact the script functionality.
     
  16. Atendega

    Atendega

    Lesser Sea Sponge Member
    577
    0
    0
    Comfy couch
    Collecting insults
    I know that it wouldn't work at all for Generations, but considering the patch functionality exists in Lost World, I figured it made sense. I suppose the amount of disk writes does make it a less attractive option, though. I still wonder if we'll be able to actually ADD things to the game via the DLC functionality. It would be cool if we could add levels to the game instead of replacing the game's existing levels. That way, we could have them installed all the time. Is there any chance this will be possible?
     
  17. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,972
    85
    28
    USA
    rom-properties
    Notepad++, Kate, and a bunch of editors support Shift-JIS, so there's really no need to reinvent the wheel. (If you just want to convert stuff, there's iconv.)
     
  18. Shade Vortex

    Shade Vortex

    The Black Vortex Member
    595
    54
    28
    USA, WA.
    YouTube Memes
    My bad, I thought CPKREDIR was entirely its own thing. I didn't look into it very well before I said that, so my bad for assuming. Still, I guess it'd be nice to wait for the GUI frontend to be made by someone for the Lost World compatible CPKREDIR, I don't like faffing about with command prompt programs.

    EDIT:
    Also, I've been using the Classic Sonic Mod and turns out that I've noticed that he has two mouths in 3D, both as normal and super classic Sonic.
     
  19. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    Question. What's the best recommendation for editing/converting files to adx format?

    EDIT: Here's a hint I found in the game's common text that I don't believe is a feature...

    They were definitely planning on something underwater but it must have been cut. Sonic never goes underwater. And Christ there is a lotttt of Wii U related text still in here...
     
  20. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    SonicGMI just edits CPKREDIR's .ini file and gives you a front-end to configure that. Anyone could probably make a new and better program in a few hours. :v: Thanks for updating CPKREDIR Korama!

    I'd suggest going for whatever front-end uses CPKREDIR. Patching CPKs is safer and more stable, but ultimately leads to a lot of repacking and HDD Read/Writing. It might be easy for simple mods, but big overhaul mods need something faster than constantly packing files if you want quick switching.

    That and it's convenient to iterate while working directly on the files without even having to repack the CPK.

    EDIT: As I see it there's two things we could do now:
    1) Just change some of SonicGMI's lines (and probably name) to support Lost World.
    2) Make a nicer SonicGMI.

    EDIT2: Or go with Melpontro's suggestion, change the 'G' to stand for 'Game'.