Yeah it doesn't do that, not the 2004 version at least (never tried to use keyboard on the 2011 version at all, though it might?)
Really awesome work, Dude! It honestly feels like a stage that could have been made by the original designers. I also appreciate how the stage's open-ended layout avoids putting you in situations where you're likely to glitch out due to physics quirks. If anything, I think my only complaint is that the start locations and object layouts only apply to Sonic and Tails. This is most noticeable with Gamma as he's the only other character who goes through this stage normally. If you were to fix it for Gamma at the very least, and even find a way to put his boss fight at the very end, then I think it'd be perfect.
I found an easy way to apply the new camera and object layouts of Mushroom Zone to the other characters. You just gotta go into the mods/mushroomZone folder and make duplicates of several files with different names: CAM0200S.BIN -> Make copies named CAM0200E.BIN, CAM0200K.BIN and CAM0200A.BIN for Gamma, Knuckles and Amy respectively. SET0200S.BIN -> Make copies named SET0200E.BIN, SET0200K.BIN and SET0200A.BIN for Gamma, Knuckles and Amy respectively. SETSS04S.BIN -> Make copies named SETSS04E.BIN, SETSS04K.BIN and SETSS04A.BIN for Gamma, Knuckles and Amy respectively. Gamma's start location is still borked, but setting his coordinates to 0,0,0 right when the stage begins fixes that. He also requires the Jet Booster in order to pass the stage. He has plenty of time to beat it as long as you combo-kill at least one Boa-Boa. It's also beatable with Amy; Her trickiest part is with the giant treestump platforms leading up to the first jump panel. You have to make skilled use of her hammer jumps in order to clear it, especially the jump from the last stump to the top of the cliff at the end of the segment, as she cannot use jump panels without freezing up. It's a piece of cake with Knuckles. Forget about Big, though.
Boo, the version of SADX I have apparently isn't one The Mod Loader wants and it would appear that just copying the raw files isn't enough.
BlazeHedgehog: did you try using this EXE? -------- At Dude's request, I have backported an object from SA2 to SADX: You can download a mod that replaces all Capsules with Goal Rings here, or you can find the source code for the object in the SADX Mod Loader's programming folder, if you want to make a level mod that always ends with a Goal Ring instead of a Capsule, or if you just want to see what a custom object looks like.
When creating the Goal Ring object, I had to create a brand new PVM, which led me to realize that the "global index" assigned to each texture is actually very important. If two textures that share a global index are loaded, only the first will be loaded, and the second will be a duplicate of the first. In order to ensure that the textures I added wouldn't conflict with anything else, I wrote a program to create a list of every global index value used, and the textures that used them: http://mm.reimuhakurei.net/misc/sadx_gbix.txt For reference, the Goal Ring uses four textures starting at 4078, just after the majority of the OBJ_REGULAR.PVM textures.
I was wondering if you could post the source code for the Speed Highway Act 3 port from the AutoDemo that you did a few months ago? I have some time now and I wanna get back to porting some of the other stages to SADX, but I couldn't get the jumps to the new land tables to work (just resulted in a crash if I remember correctly)... Also I guess that the Windy Valley port is still a no-go?
You can use SALVL to do stage porting at the moment and structconverter to convert the sa1lvl files to C files. I haven't made a tutorial for this yet but if you want to head on over the #x-hax in irc.badnik.net I can help you get it working. I'm in the process of porting a sa2 stage to sadx like this. As for the windy valley port, I could probably do it now but the guys working on it haven't been online in awhile. I'd be happy to take over for them if they want me to and can send me the files they have.
We tried exporting the level from the AutoDemo through the struct converter into a mod, but the level was totally non-solid and only visible at a specific camera angle. As for your crashes, it's likely because you didn't fix the texture list pointer in the LandTable struct. You'll have to copy the pointer from the stage you're replacing or edit the code to use a custom one like I did because the PVM had a different texture count, and then replace the PVM list for that level.
Did you try exporting the geometry to an .obj and then convert it back? I assume you guys must've tried everything, though. But it's strange how it's just that level. Ugh. @MainMemory: That's what I figured. Near the end of the last time I tried to port over a level I noticed the pointer to the texture list needed to be changed. I think that's where I got stuck. I didn't know how to use a new PVM (that contains newer entries), so I was trying to find a way to load the level without textures and still have it load up. At first I thought changing it to (NJS_TEXLIST *)0 would mean that the level wouldn't use any textures, but obviously that doesn't work either. I was thinking that maybe it was the conversion of the level itself that was causing the problems, since most of the AutoDemo levels don't load properly in SALVL but you can still generate obj files and struct data. I recently tried to pick up where I left off by creating a new project in Visual Studio 2013 with the latest ninja and SADXModLoader header files. I decided to try and regenerate a .c file from Twinkle Park Act 1 and noticed that the output has an ENUM for the PRS/PVM texture names. VS seems to have some issues with all the references to this, not sure what's wrong... @Dude: Thanks! I might take you up on that offer. Although a write up/tutorial would be great.
Making the pointer null by itself won't work, you have to unset bit 1 in the LandTable's flags field and possibly remove NJD_FLAG_USE_TEXTURE from every material. You also have to make sure you're exporting it in SADX format. I don't know why the enum isn't working, but you can export without it if you don't load any textures. If you wanted to use a new PVM, you can add this somewhere above the LandTable struct: Code (Text): NJS_TEXNAME newPVMEntries[numTexs]; // numTexs = number of textures in PVM NJS_TEXLIST newPVM = { arrayptrandlength(newPVMEntries) }; Then you set the texlist pointer in the LandTable to &newPVM. You'll also have to edit the level texture list for the level so that its texlist pointer also points to &newPVM.
Might want to move this discussion to the SADX Mod topic, but a few things. I made the changes and it still crashes when I try to load the level. I'm not sure if there's something else that needs to be changed too. The mod's directory has the PVM for the level (from the original prs), a modified SET file to coincide with object numbers in the final, and the camera data. Here's my source code: https://gist.github.com/ehw/0474ba3899a5d68a5ba9 I still don't understand why the ENUM stuff isn't working. I changed it so that it'll compile, but I probably broke something intended in the process. Here's what the output looked like initially: Code (Text): enum TWINKLE01.pvmTexName { TWINKLE01.pvmTexName_m64_tp2_014, TWINKLE01.pvmTexName_m64_tp2_025, TWINKLE01.pvmTexName_m128_tp3_021, TWINKLE01.pvmTexName_m128_tp2_014, TWINKLE01.pvmTexName_m32_tp3_004, TWINKLE01.pvmTexName_m64_tp2_015, TWINKLE01.pvmTexName_tp2_11, TWINKLE01.pvmTexName_tp2_4, TWINKLE01.pvmTexName_tp1_1, TWINKLE01.pvmTexName_tp1_11, TWINKLE01.pvmTexName_tp1_12, TWINKLE01.pvmTexName_tp1_13, TWINKLE01.pvmTexName_tp1_14, TWINKLE01.pvmTexName_tp1_15, TWINKLE01.pvmTexName_tp1_16, TWINKLE01.pvmTexName_tp1_17, TWINKLE01.pvmTexName_tp1_18, TWINKLE01.pvmTexName_tp1_19, TWINKLE01.pvmTexName_tp1_2, TWINKLE01.pvmTexName_tp1_20, TWINKLE01.pvmTexName_tp1_21, TWINKLE01.pvmTexName_tp1_22, TWINKLE01.pvmTexName_tp1_23, TWINKLE01.pvmTexName_tp1_24, TWINKLE01.pvmTexName_tp1_3, TWINKLE01.pvmTexName_tp1_4, TWINKLE01.pvmTexName_tp1_5, TWINKLE01.pvmTexName_tp1_6, TWINKLE01.pvmTexName_tp1_7, TWINKLE01.pvmTexName_tp1_8, TWINKLE01.pvmTexName_tp1_9, TWINKLE01.pvmTexName_tp2_21, TWINKLE01.pvmTexName_m128_tp2_009, TWINKLE01.pvmTexName_m32_tp2_002, TWINKLE01.pvmTexName_m64_tp2_024, TWINKLE01.pvmTexName_tp2_10, TWINKLE01.pvmTexName_tp2_18, TWINKLE01.pvmTexName_tp2_25, TWINKLE01.pvmTexName_tp2_28, TWINKLE01.pvmTexName_tp2_29, TWINKLE01.pvmTexName_tp2_30 }; NJS_MATERIAL matlist_00056EF4[] = { { { 0xFFB2B2B2 }, { 0x00000000 }, 0, TWINKLE01pvmTexName_tp1_1, NJD_D_100 | NJD_FLAG_CLAMP_V | NJD_FLAG_USE_TEXTURE | NJD_DA_INV_SRC | NJD_SA_SRC }, { { 0xFFB2B2B2 }, { 0x00000000 }, 0, TWINKLE01pvmTexName_tp1_22, NJD_D_100 | NJD_FLAG_FLIP_V | NJD_FLAG_FLIP_U | NJD_FLAG_USE_TEXTURE | NJD_DA_INV_SRC | NJD_SA_SRC }, { { 0xFFB2B2B2 }, { 0x00000000 }, 0, TWINKLE01pvmTexName_tp1_5, NJD_D_100 | NJD_FLAG_CLAMP_V | NJD_FLAG_FLIP_U | NJD_FLAG_USE_TEXTURE | NJD_FLAG_DOUBLE_SIDE | NJD_FLAG_IGNORE_LIGHT | NJD_DA_INV_SRC | NJD_SA_SRC } }; EDIT: Noticed I made a slight error in the spelling of one of the entries in the TWINKLE01Entries array. I fixed it and still no change.
Oh yeah, I've been meaning to say this for a couple days now, but that alternate EXE worked! Mushroom Hill's pretty cool! Definitely feels like it could've been a lost level.
It definitely isn't supposed to be including the file extension in the enum definition. I've fixed that now. Your other problem is that you seem to be confused about which section of the ModInfo struct to put things in. A jump is a place in the game's code where you want the execution to be diverted to a function you provide. When you want to divert a data reference from SADX's data to your data, that is a pointer.
Ack, I just realized that too. I used your CharacterRandomizer project as a base for the new project to see if maybe my set up was causing errors with the enums, so I forgot to change it. The level still crashes upon load for me though. I'm wondering if maybe it was an error in the struct conversion or something. It makes me wonder since the first act had problems in SALVL. I know the other two acts render under SALVL, so maybe I'll give those a shot.
For anyone who is using SADXLVL2 or SALVL, I've changed the camera controls to behave like SonicGLVL. This means that all camera movement is bound to the middle mouse wheel + modifier keys + mouse movement Normal camera mode: middle mouse button: pan camera middle mouse button + ctrl: zoom camera middle mouse button + alt: rotate camera (the same way you'd rotate your head) Orbit camera mode: middle mouse button: pan camera (kind of broken - lets you pan it once, successive pans start at previous focal point) middle mouse button + ctrl: zoom camera middle mouse button + alt: rotate camera (orbiting around the focal point) In orbit camera mode, the focal point will automatically move to the center of the selected items when the selection changes. It does not auto-zoom yet. I might add that feature. This new configuration makes it harder to get the editor 'stuck' trying to process all of your camera movements, as It reduces the incidence of multiple drawcalls per-frame. I have yet to add a 'jump to selection' button, but you can emulate that effect in normal mode by selecting something, switching to orbit mode and then immediately switching back.
Trying a different level. Windy Valley Act 3 from the AutoDemo. What I did was just import DaGuAr's obj rip of Windy Valley Act 3 into 3ds Max 2015, selected all the individual objects and set "Affect Pivot Only" and "Center to Object" under the Hierarchy tab and pressed "Transform" under "Reset:" to calculate the pivots for each object. I then used Dude's sadxNodetable1_6 and sadxCompiledMeshExporter script to get the nodetable.txt, and loaded it up under SADXLVL2 while Emerald Coast 1 was open (I tried to use Windy Valley 3 but it doesn't want to load under the latest version afaik). Saved it, took the land table sa1lvl file from the Levels folder, opened that up in SA1LVL, converted the struct to C, included the file in my project, replaced the address that loaded the landtable for Emerald Coast 1, ran the mod and that's what you get. Of course, this just ported over the mesh and doesn't have the objects set, the camera, path, textures, adjusted death zone, starting position coords, etc. But at least something loaded up that relates to the level, and I can walk all over the place too. So I know the code itself can work, but it looks like the struct conversion for Twinkle Park 1 might've been bad all along?