don't click here

Sonic Generations Hacking (and More!)

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

  1. DustArma

    DustArma

    Member
    1,338
    10
    18
    Santiago, Chile
    Learning Python.
    They are indeed, as for the level objects still remaining there, some levels have several setdata_something_somethingelse.set.xml files and each one loads their own objects.

    For example Seaside Hill Modern has setdata_base.set.xml which loads the main level objects, setdata_plan_ly00.set.xml contains the giant rocks at the end of the level, setdata_plan_ly01.set.xml contains all of the objects for the bobsled section (The bobsleight itself, rings, jumppads, etc.), setdata_plan_ly02.set.xml loads the turtles that are directly below the bobsled section and setdata_plan_ly03.set.xml loads the buoys that indicate the safe water-running area.
     
  2. Azu

    Azu

    I must be stupid. Member
    Then that would mean grinding handled with splines, which suspect. In Sonic colors, Game land was the only level that had rails as objects, but only the basic set.
     
  3. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Anything that has a <Position>, <Rotation>, and <SetObjectID> node on the <SetObject> XMLs is readable in my editor as long as you keep adding new templates. I intend to write something soon that should create ALL the templates needed from reading as much of these XMLs as possible... but they will need some manual tweaking to get them right. And they'll use a placeholder model of course... maybe a cube. :v:

    Now if any of this stuff is vector or spline based, we'll have to wait for that a bit more.
     
  4. Azu

    Azu

    I must be stupid. Member
    I have a question. Is the cannon object you should out on Seaside Hill a common objects? I've seen it in other stages liek Crisis City and Planet Wisp.
     
  5. Twilightzoney

    Twilightzoney

    Tech Member
    353
    0
    16
    Elgin, IL And Hampshire
    Unleashed and Generations Stuff and Custom Works
    So I was talking to Link throughout the morning and we were talking about the Stages and trying to figure a way to make easy exporting. He thinks he'll add his own way with just opening the PFD files and opens and decompress the .ar files and import the files and auto find the textures and texsets and materials and import the stage to be importable into Max as a single mesh.

    We'd like to try to find a way to tell what is a background mesh and what is the real parts of the level mesh. Since everything imports perfectly fine but its really cluttered by Background objects because of how the game loads.

    It loads up alpha mapped models and pushes them back past the goal ring to hide them. But when you import it, its in the place where it is when you are looking out far away.

    But everything is working good. Unleashed stages are a bit of a pain since it keeps asking for textures that don't really matter and it errors out but thats been fixed.

    Serious kudos to Link, he said he'd keep working on it to a point where it becomes not a hassle to import the stages and not so time consuming.

    [​IMG]
    [​IMG]
    [​IMG]
    Edit: So this is how you do the fresnel effect thing?

    So at least there is an update on that. And it imports with the textures and everything right, but its does not import other maps other then diffuse at the moment but its planned to be supported later on. So importing into max is coming along fine. But exporting to the format isn't possible yet since we don't even know how everything works with loading the stages up.

    If we can have proof of example of getting Unleashed stage to run, it would show that it be worth it.

    If only we could get the EXE to tell what folders and models it should load so you can add in custom models instead of replacing over model files. If only something like that can happen.
     
  6. Azu

    Azu

    I must be stupid. Member
    So, the level importer script is coming along good, or are you referring to adding/replace Generations levels with Unleashes? I wonder if it's possible to ass Sonic Colors. I want to add Tropical Resort.=P
     
  7. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    @TwilightZoney: That's awesome news. Getting even a bit of the geometry in would be such a giant step... Looking forward to it.

    Anyway, I need some help in testing out the editor. Turns out performance is OH HOLY SHIT so much better when I used the release version of the libraries instead... But I haven't got around to testing every single inch of the map and selecting and deleting to see if it crashes. The editor is likely to crash on deleting on some weird occasions I haven't been able to debug yet... but it's usable enough, as long as you save often.


    And before doing a fail release for initial distribution, I would appreciate if you could download the editor and tell me if it runs. if it asks for any DLLs, if it just crashes as soon as it starts, anything.
    Download an early test here.


    Don't use fullscreen mode, switch to windowed.

    Also, it really isn't optimized yet as it should be, so this thing will lag when there are way too many objects on screen. It's an editor anyway, so there really isn't any harm to not being 60 FPS the whole time, but my GPU seems to be pulling 200 fps without vsync anyway. Also, QuickGUI seems to be a bit laggy for some reason, so you should expect some stutters when scrolling the menus and such.

    So the file size isn't ridiculously big, I just included a couple of templates and models for GHZ Act 1. Loading all other levels should theoretically work, but it needs more templates if you want to edit the stuff around. Do note that saving to the same XML without all the templates will work fine anyway, the editor won't erase any objects that it doesn't support and are present in the XML. Once it goes into release mode, I might work on doing a big database for most of the objects in the game.

    Basically, you should open the XML file that sets the data for the level, "setdata_base.set.xml" is the one which normally has the most objects, and play around with it. Check out the "Quick Overview" option in the Help menu for the controls. Opening other files should work, but be careful with templates you add that aren't actually objects(as in, they don't have a <SetObjectID>).

    Saving the XML and importing it straight to the game works so far. As for adding more templates, there's an option in the "File" menu for dumping templates automatically into a custom folder. They get assigned by default a "white sphere" model, the unknown mesh one. Importing your own meshes into the editor is just a matter of using OgreMax addon for 3DS max(google it), and copying over the .model and .material files. No support for .skeletons yet. Then you just gotta copy the textures over to the "textures" folder, and add the mesh in the template of the object you want.(Like <Mesh>enm_stinger_body.mesh</Mesh>).

    There's also a small window with the "Apply MSP" function. This allows you to use the "MultiSetParam" array that Sonic Generations uses, so you can create straight lines of objects along an axis and an interval. Keep in mind though, that objects created this way depend entirely on the parent object.

    So if you can help with any obscure bug reports, as detailed as possible, I'd be grateful. Once it's polished up a bit more, it's usable enough to make a first release IMO.

    Here's a small edit I did with it at the start of GHZ Act 1.
    [​IMG]

    And the playthrough of that small section.


    Don't quote this whole post or I will gut you. :v:
     
  8. Azu

    Azu

    I must be stupid. Member
    [​IMG]

    Happened when I chose OpenGL.

    DirectX works fine, but how do I go to windowed? I don't see an option for that.

    By the way do I edit like ghz200.ar.00 or ghz200.ar.01 for Green Hill Act 2?
     
  9. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Let's just not use OpenGL then I guess. :v:

    For windowed, here's the option.
    [​IMG]

    And as for loading, you should extract the files from like #ghz200.ar.00, the setdata xmls are there, not in the ones without a #.
     
  10. Azu

    Azu

    I must be stupid. Member
    Suggestion. Have the dialog box open up in the program's directory. :v: . I can't zoom, I'm pressing on hold Middle Mouse + Ctrl .=/ I'm using the mouse wheel too. I'm working with modern' stage by the way.
     
  11. DustArma

    DustArma

    Member
    1,338
    10
    18
    Santiago, Chile
    Learning Python.
    Works well so far here, Fullscreen off and using the D3D9 renderer, I get 100+FPS

    The mouse feels sluggish though.
     
  12. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Yeah, mouse is dependent on QuickGUI, which actually lags hard for some reason. :(

    Windows remembers the last location you opened up on default though, which is actually useful as well. I prefer the 2nd option.


    Does panning the camera and rotating work? It might be just a problem of OIS not detecting the control modifier properly. To which I can provide yet another modifier for zooming I guess. I haven't got the mouse wheel working though yet because... mine doesn't work. :ssh:
     
  13. Azu

    Azu

    I must be stupid. Member
    Panning and rotation work fine, zooming doesn't. The spring I added wasn't there. =/
    http://dl.dropbox.com/u/32409323/setdata_base.set.xml

    #ghz100.ar.00.unpack
     
  14. DustArma

    DustArma

    Member
    1,338
    10
    18
    Santiago, Chile
    Learning Python.
    Panning works for me, but zoom and rotate don't.
     
  15. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    If you mean you don't see it ingame, it's because it's missing a couple of flags needed. Try copying one of the springs around and move it where you want. I definitely see it in the editor though. Here's a comparison screenshot of what I mean:
    [​IMG]
    Not putting the right flags in will make the game go bonkers. (Notice the 4 flags that are on that aren't in the spring you added)

    Seems like a problem with OIS indeed, a bug beyond my control. I'll just add more keys for it then.
     
  16. Azu

    Azu

    I must be stupid. Member
    Do like Hold Ctrl + the +/- keys. Or make it configurable with he mouse wheel.
     
  17. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    I feel so dumb... when writing the instructions I forgot zooming actually takes Control AND Alt, yet my brain seems so hardwired into Max I never noticed I was pressing both. xD DustArma reports that none of the modifiers work though. So I will try something.
     
  18. DustArma

    DustArma

    Member
    1,338
    10
    18
    Santiago, Chile
    Learning Python.

    Well, I just tried using CTRL + ALT (never thought of using both) and the zooming worked, though I still can't rotate.
     
  19. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Ok, you both mind trying out this .exe instead? Clicky. I'm using the keys instead of calling for the modifiers, so make sure you're pressing Left Control and Left Alt for now to test. I also fixed zooming to be dependent on Ctrl only. I'll add other methods for moving the camera later.
     
  20. Damizean

    Damizean

    As classic as rock Member
    118
    0
    0
    Valencia, EspaƱa
    Various projects
    [​IMG]
    Thanks to TwilightZoney, I was able to import the level geometry to Unity :O I'm quite excited to try out the level in the Egg-Engine once I make some collision geometry :3

    Edit: I'll be looking into extracting the hkx files with the Havok SDK :s