don't click here

SADX/SA1 Hacking/Modding

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Aug 15, 2009.

  1. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Yeah, ever since I added the nodetable 1.6 import/export to SADXLVL2, I've known you could do it this way. I just haven't done it yet.

    I don't know why you ran into those issues using structconverter with twinkle park. I guess I'll add that to the list.
     
  2. evilhamwizard

    evilhamwizard

    Researcher
    1,403
    493
    63
    The method I mentioned seems to work pretty well for getting the level mesh in the game. Here's the first act of Windy Valley from the AutoDemo in Emerald Coast (I also tested it with Twinkle Park Act 1, and that works as well):

    [​IMG]

    I threw in the SET/CAM files to see what the game does with them. Obviously the objects are all wrong (even the common ones), but they're at least being placed in the right spot. I'd imagine a lot of the stuff being loaded on the side of the ledges are static objects, so porting those over could be simple. I could also double check to see if the starting position coordinates for Sonic that I found a few months a go in the AutoDemo were really for the prototype Windy Valley, and it turns out that they are for sure. This means the PATH data for Act 1/3 probably still exist in the prototype somewhere (1ST_READ?). Maybe we can easily port that over too.

    I tried to move the ocean/bluish bottom skybox down, but I can't seem to figure out where the pointer that points to the object struct for it. Without pushing it down half the level is cut in half, but everything can be explored. I was able to at least move the death zone so you can roam about without dying.

    The only thing about the method though is it doesn't seem to carry the texture id's over. You'd have to go back and change the texture IDs for each material, but in the case for Windy Valley we needed to make brand new textures anyway.

    Also, can anyone else load the retail Windy Valley in SADXLVL2? Loading any of the acts keep crashing.

    EDIT: Here's another snapshot of an area in Act 1. I cleaned up the set file to only have common objects. Basically, just rings and two springs.

    [​IMG]

    The prototype version seems to have a lot of these little crevices that exist in case you fall from a higher level. The ring placement is pretty odd too. Beside the usual circle/arc of rings, there are some spots where there are only two rings in an entire area. I also want to mention that with Act 1 and 3, the texturing for a lot of the terrain is really shoddy (see the above screenshot). The terrain is also pretty rough in some spots. The people who were modeling the level were probably trying to figure things out as they crafted the mesh and left things like that behind. Just wanted to mention that, heh.
     
  3. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Oh also, another one of the reasons I haven't used your obj export method yet for porting the stage is because it will lose any of the vertex colors, since obj doesn't support them. It also loses strip data, but that isn't very important considering the low polycount of the levels. The vertex colors contribute greatly to the apparent lighting of the level. Oh question, you said you ported over the cam files. How well do they work?

    Could you send me the CAM/SET files? I'm working on getting this done myself.

    Also:
    [​IMG]

    New material editor for SA models.
     
  4. evilhamwizard

    evilhamwizard

    Researcher
    1,403
    493
    63
    Yeah, you'd definitely be losing some detail if you try it with the method. It'll also treat everything as a solid, afaik. You'd have to manually edit surface flags where necessary, all kinds of stuff. The vertex colors are probably the biggest bummer. But I guess if you were ever concerned with getting any kind of land table mesh to load in game, it's a relatively decent method. It's just strange how direct struct conversion doesn't work for a lot of these though...

    The cam file for the first act seems to work as far as being properly aligned with the land mesh (the other two acts seem blank), and they do seem to do things. But unfortunately, the camera is still a big pain in the ass, especially when trying to navigate the beginning part of the first act (the camera likes to sink into the floor a lot). I'm not familiar with how CAM files are structured and how to interpret them, but I took a look at the file for the first act in CAMSet, and this is what the beginning area looks like:

    [​IMG]

    The SET file for the first act is gigantic. SADXLVL2 seems to have a problem loading my work on Emerald Coast when using the set file from the prototype. When the game loads with the original set file from the prototype, I noticed that it seems that it doesn't load all the objects. Upon loading Emerald Coast with the set file, a ton of Kiki's and those rhino badniks spawn all over the place, but I didn't see any rings and such for some reason. It was only until I modified the SET file to have only rings and springs that those common objects actually loaded up (maybe the game has a max limit on the number of entries you can have in a SET file?). They must've used a ton of foliage and environmental objects, because that's pretty much all the file consists of (the stage itself has a ton of objects too). Surprisingly, within the first 20 objects (the common ones), it only uses the rings and springs. No rockets, speed boosters, goal posts and the like.

    I'll give you all I have on Windy Valley. The text file I included should tell you where most of the things are in the stage binary. I included my old disassembly of 1ST_READ, in case you want to go hunting for things (like the path data, etc). The original set file as well as my modified set file are in there along with the CAM files.

    EDIT: Quick question. How does the game pick it's initial camera position upon loading a level? I want to get the camera to face the right way upon loading the stage.
     
  5. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    I've personally run into the game's SET limits before. I have no idea if it's a hard limit or not, but it does like to stop working if you go crazy with the object layout. That was probably one of the major reasons they re-designed the level. After looking at part 1 from an overhead view I can safely say that the final version is spiritually the same layout, just with massive reductions in size and detail. Part 2 looks like it got an upgrade in the final, being kind of empty in the autodemo.

    I'm not surprised the camera is a pain seeing as how very different the camera behavior is between the autodemo and the final, but I am glad that the volumes are the same. That should make it easy to get something similar to what the original designers had in mind.
     
  6. MainMemory

    MainMemory

    Has-Been Modder Tech Member
    4,819
    408
    63
    Myself
    The SET items are loaded into a statically allocated array, so there is a hard maximum, it might be 512 objects?

    Edit: The limit is 1023 in SADX, 1535 in SA2.
     
  7. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    More neat features for you guys:
    [​IMG]

    I added this preferences dialog. If the editors are running slowly now (happens the most with sadxlvl2 while SET editing), you can turn the draw distance down. It updates immediately, so you can play with the slider and get instant feedback. You can also enable backface culling, so you can see collision problems with your meshes (this is assuming you're writing an import/export tool, say a stripifier or scene tool), or switch to wireframe mode (although you could do that before with the N key and still can). I also added a standard 3-point light system for the default lighting because I was getting tired of staring at that ugly flat-white. You can still re-enable the flat-white if you need to using the preferences dialog.
     
  8. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
  9. So how many objects are there in the list that aren't in SADX? I'm assuming most of the objects were just flowers or scenery..
     
  10. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    There's 114 objects in the beta list, and 79 in the final. I am probably going to make some custom objects to fill in many of the decoration slots, especially since there are clear screenshots of some of these objects that have no final equivalent.

    If someone here can read Japanese and can translate these names, you'll help out immensely: http://pastebin.com/18V8223n
     
  11. PkR

    PkR

    Member
    191
    25
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Here are some words I was able to understand/look up in the dictionary:

    TOGE is thorn, or thistle
    KUSA is grass
    SIRUSI not sure what exactly that is, but could be either a signpost, or some kind of mark, or seal
    TANPOPO is dandellion
    IWA - probably rock
    BANEIWA - if it's BANE (spring) + IWA, then it could possibly mean a rock bounces you off like a spring?
    TAKO - kite I guess

    Unfortunately there's not much you can translate from romaji readings, it would have been much easier if those names were actually written in Japanese somewhere.
     
  12. British Gaijin

    British Gaijin

    Go play Nier. Member
    154
    0
    16
    Great Britain, UK
    The EscapeRoute Show
  13. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Yes, they're facing the wrong way. It was an exporter problem that has been fixed.
     
  14. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Also, if you don't want to or can't use 3ds max, and are capable of creating plugins/scripts or any other kind of exporter for your 3d software of choice, the nodetable 1.6 format documentation is available here:

    http://x-hax.cultnet.net/Docs/nodetableFormat_1_6.txt

    If you do add nodetable export support to a 3d program, let me know! I'd be happy to help test it.
     
  15. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Manipulating objects just got easier with this new set of movement and rotation handles.


    It is far from what I wanted, since I am not a 3d math wizard. But it is way better than before.
     
  16. MainMemory

    MainMemory

    Has-Been Modder Tech Member
    4,819
    408
    63
    Myself
    I have added a new tool to the SA Tools package: PVMEditSharp.
    [​IMG]
    Hopefully this will be easier to use and less buggy than other PVM editors.
    It also supports opening and saving PRS compressed files, so it can be used with Dreamcast games as well as SADXPC.
    It allows you to export textures as PNG, and import from PVR, PNG, JPG, GIF or BMP.
    It does not support GVM or PAK files. Both would likely require separate tools, and GVM is a very low priority.
     
  17. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    [​IMG]

    SADXLVL2 now supports camera editing. If the game starts crashing, you set the pan speed on a camera too high. If you want to play it safe, don't go higher than the default value a new camera zone comes with. Updates will come as I figure out more of the camera system.

    This also means that if you want to learn the game's camera system, you can just go in and see how things were done.
     
  18. MainMemory

    MainMemory

    Has-Been Modder Tech Member
    4,819
    408
    63
    Myself
    Since I discovered the location of a line drawing function in SADX, I made a mod to make use of it:
    [​IMG]
    The Path Visualizer mod displays lines along all of the paths in a level.
     
  19. Aerosol

    Aerosol

    Not here. Moderator
    11,221
    649
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Oh that's sweet. I've been wonder about a few paths, especially in Windy Valley.
     
  20. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    I don't think the old paths are getting cleared on act/scene changes