Progress report. Tried a couple of different things over the last few days. Now that I can more or less parse XJ models, I took another look at PSOBB maps and wrote and exporter from scratch.
Not perfect. I need to fix the textures as there were a few I couldn't parse out and I have to trace back through Schthack's Map Viewer to try and find those. The difference is I think I managed to fix rotations. The way maps work is they have sections. Each section makes a small "scene" that is rendered at the origin. Each scene is then rotated around the Y-axis (left or right) and then translated by an x,y value to place that scene some where.
To give an example the forest is made of a 4x4 grid, where each scene makes up a section of the grid. For pioneer 2 the shops are scene, so is the hunter's guild, ect. I haven't gotten Y translations yet, so pioneer 2 ends up squished. But other maps like caves looks okay for now.
This is what I messing around with today. I can take a map from PSO version 2 for PC, read the buffers for the models, rearrange them and overwrite the pointers to create a "home grown" nj file. Right now I'm just doing it for one section at a time. Next I need to try adding an NJTL header on the top, so it actually has textures. I can try adding rotations and translations onto the model, but I don't think that will work out very well. I think translations and rotations are applied by scale, which would cause models to explode everywhere, which is why sega might have chosen to package them in a format like this.
I laughed when I saw this. I've been pretty vocal against animations for stage files, but I think I ran into them. 0300200 is the flags used at the top of .njm files and the format looks kind of looks like a ninja animation. The image from the hex above is from the lobby in Pso Version 2 for PC. I was tracing through the file for my map to nj conversion script and I noticed this.
Each map section contains two model definitions the first one seems to be static contents, and the second seems to have an entry for .njm. The steps for applying this to PSOBB maps would be something like: 1) write out the models, look at them, 2) try to write out the njm, 3) apply the njm to the models to see if they work. 4)Document that. 5) find the same model and then 6) figure out how to apply animations for xj.
And for 6, that's a pretty massive investment because for most of the models in PSOBB, they use .nj models with a slightly different format format for animations which is pretty easy to revert. But for xj, it's a different story. The xj models in PSOBB like fences and warps have a different format for animations. Probably not anything too difficult, but it would require a complete and accurate model for xj before than can be looked into any real detail.
Not to mention that from there you'd have to figure out how to find the location where the pointer to the animation is supposed to be, splice the home-grown animation into there, and then go back and fix every pointer in the file because the file size changed and they longer match up. So not exactly a practical undertaking, but I can at least try to document the file format for maps and for njm if anyone wants to try dicking around with them.
Also ShinAsura asked about adding reflections to objects in maps. For PSOBB, I haven't found anything in PSOBB directly for how they work. I can tell you where it's not. Maps are just packaged xj models, so I'd try with xj models to try and make them reflective first. XJ models are a model node definition, a model which contains pointers to a vertex list and two indices lists. The indice lists is where that information might be stored, but I'm not entirely sure. Everything else is pretty much vertex definitions.
For NJ models I have a better idea of where that would be at. NJ models are a node, model, vertexes and triangle list. The first couple of dwords in the NJ triangle define things like diffuse and ambiance. Though I really don't what what does what as far as textures go. My focus is still on just getting the model structure correct.
Anyways, sorry my goals don't match up with those of the community trying to mod the game. But I still want to try and write out what I learn as I learn it, so at least the information is available and out there on the interwebs.