Discussion in 'Engineering & Reverse Engineering' started by Turbohog, Feb 20, 2012.
Great! Thank you! That'll seriously help with my tendency to misfire the somersault.
I wonder if the spin dash roll could be used to replace the somersault. I have never understood the somersault's purpose. It's a slower roll. What was it's point?
It looks cool.
But he's just rolling in a slower animation...
I think it was to cut down on the exploitability of the spin dash compared to the first Sonic Adventure. Which is a shame because for me like half of the fun of that game was using it to find crazyass shortcuts.
I've been fiddling with the codes built into the Mod Loader for a while now and the growing/shrinking code got me thinking.
Is it completely out of the question to alter the size of the character's collision along with the model? I see that features such as the point vulcan cannon projectiles are fired from changes proportionately to the size of the model, so perhaps this may also be possible? I say this because of how off-putting it is to not be able to walk under somersault gaps and get hit by projectiles when small - the idea of having the characters behave like the Mini Mushroom powerup is truly entertaining.
Well, if I recall correctly, one of the items in the physics data is the size of the collision sphere, but since the grow/shrink codes multiply the scale values, I don't know if it would be possible to get the collision sphere to change at the same rate as the scale by just multiplying it by a static number. It might have to be made into a mod.
But then you jump and he does some flippy shit.
That's why I was wondering before if its really possible to put somersaulting / light dashing on B and spin dash/roll/bouncing on X. You don't lose the flippy spoop or whatever, you fix the 'bouncing to your death' thing and yeah idk.
You know how SA Tools has had a splitMDL tool, but no buildMDL tool? That was because I couldn't quite get it to work 100%, until now. Several of the model pointers in the MDL files refer to specific parts of larger model trees, but splitMDL was simply exporting everything as individual models, so when the game went to get the pointer to Sonic's head to animate his spines, it instead got a copy of Sonic's head, leaving the visible model unchanged.
This has been fixed by having splitMDL check each model in numerical order by its assigned index number to make sure that it isn't part of a previous model. So splitMDL only exports files for the 'root' models now, and it produces an INI file mapping indexes to labels referring to a model part in one of the sa2mdl files. With this, buildMDL can finally produce a fully working MDL file.
Unfortunately, the dependency on labels makes replacing a model in a MDL file with another model slightly more difficult, since the labels in your replacement model likely won't match the original. For this, I have made a replaceMDL program. To use it, simply give it the path to the INI file that requires updating (it's in the folder with the sa2mdl files and named after the MDL file), the path to the sa2mdl file you're replacing, and the path to the sa2mdl you're replacing it with. It will scan the original sa2mdl for all the labels that the INI uses, and replace them with the corresponding labels in the replacement file, then it replaces the actual sa2mdl file.
With this, you can... well, I guess you can make versions of the alternate costumes with all the upgrade models included. You could also swap characters' models around, as long as they have the same skeleton.
I could also enable the SA2 mod loader to load "unpacked" MDL files, but I'm not sure if there's any real use for that.
Interesting how those SADX models work that way... I suppose it does make sense though.
In regards to loading unpacked model files for SA2, that would make testing model edits faster if anything, but as far as I know at the moment, we don't have the model format all figured out anyway. So for the time being, it's usefulness would probably be limited.
I'm wondering about one specific detail of the screener for acceptable layouts of hunting items (such as emerald pieces).
I already know that the pieces (object #15 in every level, except that in Pumpkin Hill a few of them use #79 for some reason, and Aquatic Mine uses the dual IDs of #14 and #85 being a similarly early designed level) are divided into a series of "groups":
Group 0 is the list of item-2 locations that are out in the open, and they allocate 8 spots to such locations.
Group 1 is the same for item-1 locations. They apparently want to create a vague sense of rising difficulty from one piece to the next, so this group gets 24 spots to make it comparatively likely to find item 1 in such a location.
Group 2 is for item-2 spots that are concealed from view, by a box or other stage decoration. 8 spots.
Group 3: concealed item-1, 8 spots.
Group 4: item-3 spots that require digging. In Wild Canyon and Dry Lagoon, the player isn't expected to have dig capability, and Security Hall has no diggable ground whatsoever (only the one-time-use safe locks), so this group simply consists of assorted locations in those stages. For the other six hunting stages, "require" is absolute; even if you have a way to break out of bounds, the game will still refuse to acknowledge a collision with an item in one of the dig groups unless the character is actually in a digging animation. 16 spots.
Group 5: item-2 spots that require digging. In Security Hall, group 5 (unlike group 4) consists entirely of the closest facsimile to diggable emeralds that stage allows: emeralds that are behind closed safes. 16 spots.
Group 6: more item-3 digging spots, which are used only in 2-player mode. 8 spots.
Group 7: item-3 "spots" which actually move around in a loop. 8 spots.
Group 8: item-3 spots that are considered more difficult to reach even if the player knows where it is, such as by being in close proximity to a hazard, or being high up in the open with very little in the way of landmarks to start from as a reference. These exist only for 1-player mode, because it's believed that the 2P audience is likely to be more casual and may not be familiar with the tricks that are sometimes required to reach these items (not to mention fighting off another player's interference). Those players get group 6 instead. 8 spots.
Group 9: hard mode items, which are always static. 3 spots.
In addition, some enemies have a flag set that causes them to be treated as a member of a so-called "enemy group" even though they clearly aren't the same object ID as the hunting items. This is why you can use a code to enter another character's level as Knuckles and sometimes get an emerald piece for bopping an enemy, but can't ever complete the level this way--enemy locations can never account for item 3. The large floating rocks in Wild Canyon also count as members of the enemy group, and this group's size can vary from stage to stage; it goes as high as 13 slots in Security Hall.
So with those divisions set, the game generates a piece layout according to the following routine:
-If the player has already obtained item 1 on a previous life and then died (other than by using pause-Restart), keep storing the place they obtained it as the item-1 location. Otherwise, generate a new one randomly from among groups 1, 3, and the enemy group, and mark that as the active item 1.
-If the player has already obtained item 2 on a previous life and then died (other than by using pause-Restart), keep storing the place they obtained it as the item-2 location. Otherwise, generate a new one randomly from among groups 0, 2, 5, and the enemy group. If that location is "too close" to the previously determined item-1, reject it and select a new one until you get a location that passes the check. Then mark the last location generated this way as the active item-2.
-If the player has already obtained item 3 on a previous life and then died (other than by using pause-Restart), keep storing the place they obtained it as the item-3 location. Otherwise, generate a new one randomly from among groups 4, 7, and either 8 (1-player) or 6 (2-player). EXCEPTION: If the level is Pumpkin Hill or Egg Quarters and the player doesn't have their dig upgrade yet, limit the selection to items in group 4 only, to guarantee that the player has to pick up the upgrade before moving on, and avoid the situation where the player needs to dig for a piece in a later stage but can't because they skipped the upgrade and lack the power to do so. If that location is "too close" to the previously determined item-1 or item-2, reject it and select a new one until you get a location that passes the check. Then mark the last location generated this way as the active item-3.
They set it up that way to prevent any chance of "degenerate" layouts where all the items are right there at the start or otherwise clustered together in one place, though curiously this implementation still allows you to pick up all of the closest locations as long as you get them specifically in the order "3, intentional death, 2, intentional death, 1". What I don't know is the formula for determining exactly what passes or fails a "too close" check. From some old experimentation with pieces on the ground level of Meteor Herd, I've observed locations being locked out at a distance that would encompass the entire size of a small level like Security Hall. Does each stage have its own "minimum acceptable radius" embedded as a parameter somewhere, or is there some other system it uses?
Unfortunately, I have no idea whatsoever how the emerald manager works.
Decided to add something new to the cheat table that makes very heavy use of that line drawing function. Now you don't need to type in numbers or use finicky keyboard controls to position/rotate objects. You can do it all using the gamepad.
(Yes, those cyan boxes are the invisible collision objects; which are made visible when this mode is activated.)
One thing that bothers me about the PC version is that the ambient noises are a lot louder than in the original Dreamcast/Gamecube release. It's most noticeable with the cricket noises in Dry Lagoon. The ambient sounds seem to be stored in .csb files in the resource folder, but I have no idea how to edit them and bring them down to Dreamcast volumes. Deleting/renaming them causes sound glitches, so, that doesn't seem to be a good solution either. Any clues?
The racing and hunting characters share the same skeleton.
This is one of those "I always figured, but it's awesome to know for sure" things that I love. Thanks for finding that out MainMemory.
I've had similar results to you with Sonic & Mechless Tails.
Yeah, I'm having fun with this />
Small suggestion for the mod manager, it would be great if you were able to point it to your installation folder.
Recently I had to uninstall and reinstall Steam so I lost all my games and had to redownload so my new policy has been to install games elsewhere.
I love The New Challengers by the way but where's Cammy? She's my main.
Separate names with a comma.