[Stages] Wall / Collision Data Edits

usagiZ

Well-Known Member
Main Character
Kasumi α
#1
I've been trying to figure out how to edit the collision data for doa2u stages, and was partially successful in my most recent tests.

Collision Test 1:

So for collision test 1, I copy-pasted a section of data from one stage_dat.bin onto this highlighted section of the island's stage_dat.bin and this was the result.
This was before I noticed the patterns for the specific data sections, so this was just a lucky shot in the dark.

Copy-pasting that bit of data somehow created a half-wall in the middle of the first island. Notable things include, the fact that you can walk through the new wall, and that it doesn't cause wall throws at all.

Collision Test 2:

For this test, I zeroed out this chunk of data at the start of the stage_dat.bin, and the result was that you could walk through walls, as long as you didn't hit the opponent with a wall splat move.

Zeroing out that data also removed the slope and altitude information for the stage, which is why the characters stay on the same level on the Y axis regardless of the stage's geometry.

One of the results of that change is that the camera starts acting strange when you walk outside the previous bounds of the stage. If you go too far out of bounds you start to rubber band back within the expected bounds.

If you zero out the entire file, or delete all the data in the file altogether, the collisions are all nullified and you can walk out of bounds without the camera problem iirc.

======================================================================================================

After noticing some of the patterns in the data, I was finally able to change wall types:
I started with one of DOA2U's beta/test stages "sWAL_dat.bin"
The data in the second red circle is the pointer to the wall type data for this stage, but I had to add the data in the first red circle to get to the intended destination.

0x3BB4 + 0x0004 = 0x3BB8.

After going to 0x3BB8, we get to a bit of data that looks like this:


The large area outlined in red is a small part of the wall type data for this stage.
Each wall type seems to be defined in 8 byte sections.
The 8 byte section of data highlighted in multiple colors is one example of a wall definition - not sure what each part means, but I think it reads something like this:

[18 00] = wall start
[19 00] = wall end
[00 C0] = unkown currently
[10 00] = wall type

My current idea of how walls work in DOA2U is that the wall start and wall end values act like fence posts, between which the wall is actually spawned.
I've tried changing the values before, and the wall did end up spawning slightly differently, like at a diagonal between two other walls - which is why I now think that fence post idea makes sense.

Changing wall types is as easy as changing the two byte wall type value.
It can be a little tedious figuring out which 8 byte chunk is the wall you want to change, however.

There's quite a few wall types in DOA2U, each for specific circumstances. Here's a list of all the ones I've tested:
10 = invisible / hits when rolling
12 = full wall + wall throw
13 = full wall + wall throw
14 = half-wall
15 = half-wall - no wall throw
16 = fall off / slip
17 = half-wall - no wall throw + hits when rolling
18 = half-wall - no wall throw
19 = invisible / hits when rolling
1A = half-wall + wall throw
1B = half-wall + wall throw
1C = invisible wall
1D = invisible wall
1E = invis / hits wall when rolling
1F = full wall
20 = half-wall
21 = fall off / slip
22 = fall off / flip over fence
FE = pass through? weird rubber banding effect

Using the info from my findings with wall type editing, I tested a few more things.
Here's some more examples of the results I've had after changing the wall type values on certain stages:

In this one, I was trying to see if I could make the characters go back into the Koku An, after already being in the outdoor portion of the stage.
The stage obviously isn't coded to work that way, so the transition to outdoors just repeats instead of going back inside :(



This one was just for fun. I wanted to see what would happen if I launched Hitomi into the abyss, and for some reason we return to the starting area.
I think this stage might have originally been planned to transition to the start if you get knocked off the bottom platform - or it's just doing that because I'm changing the wall to something it shouldn't be and it's glitching lol.

--------------------------------------------------------------------------------------------
I'm hoping to eventually know enough about the way stages are coded so I can give Bass' Truck stage some invisible walls and include it as a playable stage.

Currently, you can just walk out of bounds in this stage forever lol.

If stage coding is somehow eventually figured out, it might even be possible to create entirely new stages - since there's a blender tool that lets you create .xprs from new geometry.

Anyway, I'll post my findings here if I figure anything else out.
 
Last edited:
#2
This is an amazing find thank you! I was trying to figure out DOA2 stage collision values back on Dreamcast (I wonder if the .bin collision formats are the interchangable DOA2/DOA3/DOA2U/DOA4 with eachother?)

I'd love to try this with the original Dead Or Alive 2 (Sega Naomi/Dreamcast build) to see if there are any hidden areas anywhere on the maps. Can't wait to try this in the 'Spiral' stage and disable the glowing barriers to see if I can be knocked down to a hidden lower level that was cut or unused.
I'm hoping some of the 1999 SEGA NAOMI tech demo stages are still somewhere on these maps in the final release but are unused/inaccessable to the player.

bg32-114708.jpg

bg12-114690.jpg

The textures in this beta version of the stage were reused in the final, the actual 3D meshes and collisions are VERY different though. It seems like there is a stair mechanic still possibly in the code of the original DOA2 (image above with tina) though I'm not sure if that is just cosmetic or was actually used ingame and was cut from the release until DOA2U?

I actually remade this area in Blender (Though I'm going off 2 source images from the 90s which is very difficult to remake fully) with the DOA2 textures and converted it to .XPR and imported into DOA2U and ran with CXBX-R. My stage loaded great! but no collisions

Finally Im wondering how to convert the .XPR exporter to the latest version for use in blender (2.80)? my DOA blender 3D tools will not work now:(
 
Likes: usagiZ

usagiZ

Well-Known Member
Main Character
Kasumi α
#3
This is an amazing find thank you! I was trying to figure out DOA2 stage collision values back on Dreamcast (I wonder if the .bin collision formats are the interchangable DOA2/DOA3/DOA2U/DOA4 with eachother?)

I'd love to try this with the original Dead Or Alive 2 (Sega Naomi/Dreamcast build) to see if there are any hidden areas anywhere on the maps. Can't wait to try this in the 'Spiral' stage and disable the glowing barriers to see if I can be knocked down to a hidden lower level that was cut or unused.

-snip-

I actually remade this area in Blender (Though I'm going off 2 source images from the 90s which is very difficult to remake fully) with the DOA2 textures and converted it to .XPR and imported into DOA2U and ran with CXBX-R. My stage loaded great! but no collisions

Finally Im wondering how to convert the .XPR exporter to the latest version for use in blender (2.80)? my DOA blender 3D tools will not work now:(
Nice! It's good to know that using the blender export tool to make stages actually works. I hadn't tried it myself, but assumed it would be possible since making parts for costumes works.

Yeah, I do think DOA2U and DOA3 have the same stage_dat.bin format. They both have the same wall test stage in the data, so I would assume it didn't change between the two games.

It would be really interesting to see if this works on the dreamcast version. If you try it, please post the screenshots here and share with the thread if you can.

I had a few issues trying to get the export tool to work in the past, and the problem in my case was that I forgot to include some essential files when I copied over the tool into the new version's folder. I kept getting an error while clicking export to xpr, and it was resolved once I copied over all the essential files. If missing files isn't the problem, you might have to use the older version of blender that did work instead of the newer version. Just in case, here's my backup of the export tool.

Also, welcome back o/
 
Last edited:
#4
Here's an example of my DOA2 Sega Naomi demo stage (W.I.P) as you can tell it's untextured because blender gives me errors when converting/importing my textures into the .XPR file do my textures have to be in DXT format?

blender does let me export the 3D mesh untextured though (which is a good sign)

All that's left is the textures, the collisions and then I'll go ahead and remake the rest of the pre-alpha NAOMI build stages from 1999 or ones of my own creation!
1551910797097.png
1551910889500.png
 
Likes: usagiZ

usagiZ

Well-Known Member
Main Character
Kasumi α
#5
Oh nice! Thanks for the screenshots - Yeah this collision stuff needs to be figured out asap - Having stair interaction would be amazing for this stage.

Hmm... I wonder what's causing the texture export issue? As far as I know, it doesn't matter what format the textures are in, the exporter always makes them dxt1 or dxt5 depending on what settings you choose in the material / texture windows in blender.



Ticking the "Alpha:" box makes the texture DXT5.

There's other things too, like ticking the "Mirror:" box makes it have a reflection overlay texture.
To do that you'd need two texture slots - my example image only has one, but you'd apply the mirror texture to the second texture slot.

You can also set the quality of the textures after you hit export and are in the window to name the file:
 
Last edited:
Forgot your password?