don't click here

Sonic Generations Hacking (and More!)

Discussion in 'Engineering & Reverse Engineering' started by Andrew75, Jun 23, 2011.

  1. Jason

    Jason

    *Results not lab tested. Member
    I think the Sonic GLvl topic may have become outdated. How are people importing stage geometry in the current SonicGLvl editor? I'd like to give it a try.
     
  2. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
     
  3. Jason

    Jason

    *Results not lab tested. Member
    Curse having my final projects around the time neat things happen :argh: .
     
  4. mitaknight

    mitaknight

    Pending Member
    0
    0
    0
    Gangnam
    Mashup the Hedgehog
    So once sonicglvl and all the format cracking and whatnot is complete and stable enough to a point where you can make decent-looking levels, can anyone make a step by step tutorial to creating your own levels?

    Maybe I'm just dumb, but right now reading ten different threads on how to do things is sort of counter-intuitive.
     
  5. Turbohog

    Turbohog

    Member
    929
    118
    43
    There's already a useful tutorial for using 3DS Max included with Sonic Glvl actually. Oh, and thanks for answering my stupid question Lobotomy.
     
  6. Azu

    Azu

    I must be stupid. Member
    Has the import script for max been worked to import the terrain model files yet?
     
  7. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Darkspines has an experimental one but I'm not sure if he plans to release it or not. Alternatively I might just write the exporter to COLLADA, but I haven't looked at the format yet. Is it just xml? Or xml with a parser program to convert it to binary?
     
  8. Azu

    Azu

    I must be stupid. Member
    Why not FBX?
     
  9. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    FBX is a propietary format by Autodesk(so you gotta use their already compiled SDK to use it). COLLADA is simply XML.
     
  10. Falk

    Falk

    Member
    1,570
    15
    18
    I'm going to exercise some discretion and move the music discussion over here so that the other thread (which really is for hardware/performance feedback) doesn't derail.

    Digging in the existing files, there are more conclusions I can make:

    1) Totally forgot that there are loops that are completely unrelated to zones (I.e. skill shop, trophy room, etc) so even in a complete replacement we'd still have to maintain the same format/length/bpm/etc :V. Oh well.
    2) Each set has 13 files, labelled A to M, each exactly a bar long at 138bpm
    3) It's a little ridiculous in implementation. In-game they play this way:
    <A B C> [D E F G H I J K L M] [D E F G H I J K L M] [D E F G H I J K L M]

    <> intro, played once
    [] loop, played indefinitely

    It would seem that that'd mean it's a 3 bar 'intro' followed by a 10 bar 'loop' in implementation, but actually it's a 1 bar intro followed by a 10 bar loop, followed by a 2-bar buffer wraparound. In most cases B is essentially identical to L and C is identical to M. The reason they're seperate files is so that if the intro bar is some spastic sound effect that has a long tail, it has two bars to 'fade out' so that the loop can appear to be seamless. YES, THIS IS AN EXTREMELY RETARDED WAY TO IMPLEMENT IT (as opposed to e.g. Wwise middleware's post-exit/pre-entry features)

    4) For some reason (at least the PC version) the wrong 1-bar intro seems to get played. I'm assuming it's always supposed to be the zone you exited the game in front of, but often it appears to be completely random.
    5) The engineering on the purely audio side is extremely shoddy. The files themselves end slightly after the next kick drum/whatever and this makes it very prone to pops and clicks on transitions, but hey, maybe I'm just too much of a perfectionist. :V

    Gonna mess around with replacing stuff and see how things go.

    edit1: Man Dario you're an assbeef hahaha I went on a wildgeesechase for like an hour trying to figure out why replacement wasn't working; turns out the folder is SNG18... I literally tried everything, from initially realizing the folder had a subdirectory called Synth in it, to attempting to rename/delete a whole bunch of stuff to get things to break.

    At the moment I have no idea what purpose SNG23 serves... it seems identical to SNG18, except it doesn't do anything.
     
  11. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Sorry for that haha, I was just checking up the filenames and that was the last one that caught my eye. Not exactly a good plan for them to name them the same file, but just change number.
     
  12. Falk

    Falk

    Member
    1,570
    15
    18
    Welp, I got it to work and broke it at the same time. I'm headed out to get dinner; YT is still uploading as of posting time.

    http://www.youtube.com/watch?v=sSxn-xtdChw

    On CPZ/SSZ/onwards, it gets to the end, then refuses to loop. It loops fine on GHZ though. Very, very bizarre. I'll try to figure out what's going on when I get back.
     
  13. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    ^ That is so fucking awesome. Just had to say that.
     
  14. Jason

    Jason

    *Results not lab tested. Member
    I had the game crash after choosing to go back to the hub world. I can't get the game to recreate it frequently, but this is the second time this has happen today. Visual Studio 2010 says "An unhandled win32 exception occurred in SonicGenerations.exe [252]." Upon choosing to debug, The error "Unhandled exception at 0x776615de in SonicGenerations.exe: 0x00000000: The operation completed successfully." When I hit Continue in Visual Studio, a small bit of the music plays from the end scene, and then immediately get the same error. Upon choosing Break, a nice quarter-second of the music plays, and then Windows say the program stopped working, with the option to debug or close program. Repeat.

    Specs:
    Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.120330-1504)
    Language: English (Regional Setting: English)
    System Manufacturer: Gigabyte Technology Co., Ltd.
    System Model: Z68AP-D3
    BIOS: Award Modular BIOS v6.00PG
    Processor: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (8 CPUs), ~3.7GHz
    Memory: 4096MB RAM
    Available OS Memory: 4014MB RAM
    Page File: 3031MB used, 4992MB available
    Windows Dir: C:\Windows
    DirectX Version: DirectX 11
    DX Setup Parameters: Not found
    User DPI Setting: Using System DPI
    System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
    DxDiag Version: 6.01.7601.17514 32bit Unicode

    Hope this helps.

    Whoops, wrong topic, I'll repost this in the test topic.
     
  15. Falk

    Falk

    Member
    1,570
    15
    18
    Uploaded Mazuri Hub World music thingoo, URL is the same

    This one definitely needs some extra work, but the basic idea is there.

    edit: p.s. thanks for all the comments/feedback. I'm reluctant to reply to each one individually and clutter up the board, but really, I just do my best. D:
     
  16. Korama

    Korama

    Tech Member
    272
    2
    0
    I was just looking at the ARL/AR format because I found the loading routine in SonicGenerations.exe and I remembered this post of yours.
    Are you aware that the AR volume count is stored in the second dword of the corresponding ARL file? That is, if the dword is 3, for example, then there are expected to be ar.00, ar.01 and ar.02 files. If you read and write this info properly, Generations Archive Editor shouldn't have any problems distinguishing between single volume and split ARs.
     
  17. Jason

    Jason

    *Results not lab tested. Member
    Mazuri Ska Mix. I fucking love you.
     
  18. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,744
    338
    63
    SonLVL
    Yeah, I guess that could work. When loading, if an ARL file exists, use it to determine the number of volumes, otherwise add all files that match. Saving and ARL generation will continue to be single-file only.

    I'll have that done in a bit.
     
  19. Korama

    Korama

    Tech Member
    272
    2
    0
    I forgot to add that the ARL files contain a an array of dwords immediately following the VolumeCount dword. The array has VolumeCount entries, each one storing the file size of the respective AR volume. Just in case you didn't know already.
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,744
    338
    63
    SonLVL
    You know that GenArcEd has ARL generation right? And that such a feature requires knowledge of the ARL format? Just because I didn't think to use the ARL files in that way doesn't mean I don't know what information they have.