State of model swapping in PSOBB [Updated 05/01/2020]

egg yolk

Member
State of model swapping in PSOBB

12309-230f1c3afce64b40a0958be643ed37f8.jpg

Model swapped quest/bank clerk.

Updates to thread:

Before reading, this is not a tutorial, I may consider making a video one at some point though.

Tools used and info

Swapping models requires that you have some obsolete software installed. The software is 3DS MAX r2.5, which is installed on a Windows 98 virtual machine. This is because I'm actually using SEGA's development tools from the Dreamcast software development kit (version R9). Inside the dev kit, there are plug-ins for 3DS MAX r2.5 that can export to the exact file formats used in PSOBB. Those being .nj and .njm.

The below spoiler contains some info on .nj and .njm as well as an image of SEGA's tool.

  • .nj : Model file. This file format can come in different varieties, meaning that the header of the file can either be NJCM (Ninja Chunk Model) or NJTL (Ninja Texture List). The 3DS MAX plug-in will always produce NJCM unless your model has a texture mapped to it, then it will produce NJTL. PSOBB also uses an updated version of this file called .xj. These aren't interchangeable at all.
  • .njm : Animation files. PSOBB uses .njm for all static animations in the game. The header is NMDM (Ninja Motion). The 3DS MAX plug-in has a combobox on the exporter that basically produces a blank NMDM.
12311-ab2ce60c866334a6c08bcd5b6ae21979.jpg

SEGA's in house Ninja (.nj) Exporter running in Windows 98 VM.

The very first step after downloading and installing software is to make/acquire a 3D model (.obj), you can transfer .obj files between Windows 10 and a virtual machine though, you can simply make and UV map (texture coordinate) the .obj in Blender 3D and transfer it over, import the .obj into 3DS MAX and then, export it as an .nj file. Which will retain the UV mapping within the .nj, but you must also apply the texture as a white diffuse material within 3DS MAX before exporting.

The last task is using some tools like bmltool.exe, vmt.exe, AFSManager.exe, ModelViewer.exe and GSLUpdater.exe to load the new .nj/.njm files from 3DS MAX back into the PSOBB file structure.

What can be done and limitations

12310-3ddda063d3b4449eaa5d2dbc619472c8.jpg

Model swapped Poison Lily and enemy animations (no actual animation, but the file is replaced).

Various models that you can definitely swap and re-texture


There are some definite models that can be swapped and re-textured (anything that has a texture, can be re-textured), including most city NPC's, the GO! ball, player hair models, the lock on cursor, photon chair, some enemies and many scenery objects. I plan to make a table in the future.

The maybe pile

Full animation, maybe, old versions of 3DS MAX are not comfortable for animating and I haven't tried exporting animation from Blender yet, but can export compatible animation files from 3DS MAX.

Many boss models seem to use .nj and .njm, but I have not tried it yet due to how many files I would need to convert. Will try and confirm this soon. Leaning on not possible but I have been every time.

Character models are a stretch, but due to recently just changing an enemy model, it leads me to believe there's a chance for character models. To test this would require finding all animations and models associated to a particular player class within the PSOBB file structure, and then replacing them with custom .nj/.njm files. It doesn't seem like the character models use the updated file format .xj. So it could be possible.

Extremely unlikely but maybe a weapon file can be replaced... The only one I can find that seems plausible is Phonon Maser... However I do not have one in game, so I haven't tested it.

B> Phonon Maser.

Similar situation as above with shields and mags. Could be possible to replace From the Depths, Three Seals and maybe Sato if I could find the corresponding animation file locations.

Things you cannot do

So, Phonon Maser is maybe the only replaceable weapon. All other weapons are .xj, making them probably impossible to swap, same with most shields and mags.

Item drop boxes, crates, doors, maps, collisions, warps amongst many other .xj files are also not possible to swap and likely won't be in the future.

Potential of swapping models

Not sure how many 3D artists there are around here. However, I myself, am going to make at least one decent mod with this. I had a funny idea to make EGGMOD, which would involve looking for eggs within the scenery, with some screenshot competition on the side. You would only have to replace one file to install a mod like this.

12312-2efc0c236a5db243aa30a0f547b1f9c9.jpg

There's an egg around here somewhere...
Other potentials could include adding extra weapon slots like SCHTHACK did a while ago, but instead pointing them to additional .bml archives. I'm not sure if you can add .bml archives into the game however. Could be interesting to explore.

I will try to update this thread with new findings, or generally when I manage to complete tasks in the "maybe pile". Might be a while until I do.

I don't have much time to work on this anymore (college/work) so if anyone would like to learn how to swap models, send me a message on Discord, I can give you directions on where to download things and how to setup for sure.

thank
 

Attachments

  • pso132224981809169298.png
    pso132224981809169298.png
    2.7 MB · Views: 14
  • pso132225487592379234.png
    pso132225487592379234.png
    2.9 MB · Views: 22
  • prnt2.png
    prnt2.png
    77 KB · Views: 20
  • pso132225643068091936.png
    pso132225643068091936.png
    2.4 MB · Views: 21
Last edited:
Model swapping Mags, Weapons and Shields

12340-150e86cc6560d04e1db4b16c88727f27.jpg

Sato replaced with Chansey model.

I really thought this was going to be impossible before today, as I have tried to swap these kinds of objects so many times in the past. However, since replacing enemies recently I've realized something about .nj files.

.nj files and their corresponding .njm files rely on each other and can almost be seen as the same files, a group file or something. So if you replace an .nj and leave it's .njm, it would crash the game. This means you have to replace all .njm files in relation to an .nj for PSOBB to read things properly.

How swapping equipment works

Equipment (weapons, shields, mags) work differently to other model files in the game, the majority of them are .xj files which are useless for modding. Fortunately there are some equipment files that use .nj format; any item in the game that has it's own animation (lk38 barrel rotation, sato spinning) is an .nj.

What makes these files unique to other .nj, is that the .nj format used has an .njm appended to the end of it, as opposed to the .nj and .njm being separate files as they usually are. All I had to do to make this work was export an .nj and append it's .njm to the end of the file with a hex editor. Surprisingly simple.

EDIT: It seems that doing the above allows us to swap any equipment model, regardless of whether it is .nj or .xj.

12344-3ad2f4e74ffa7aea0e41ec586b04fc3b.jpg

.xj weapon (Rage De Feu) switched with a custom .nj file


Below inside the spoiler is a list of equipment that can be swapped. (I haven't tried them all but I'm fairly sure) As stated above, seems any equipment model can be switched now, at least this is a list of .nj files in ItemModelEp4.afs.

Weapons:
- Rabbit Wand
- Dark Merge
- LK38 Combat
- Phonon Maser
- Phoenix Claw
- Rambling May

Shields:
- From the Depths
- Three Seals

Mags:
- Panzer's Tail
- Devil's Tail
- Sato
- Gael-Giel

Oddities
So of course, when adding new things into a 20 year old game, some things are expected to break. Unfortunately this seems to be the case when swapping weapons. At least with ranged weapons. The bullets don't always shoot from where they usually would.

Another oddity is that when replacing Sato, the texture you choose won't appear with the correct colouring. This is probably just due to how Sato inherits colours. Not necessarily a bad thing, could possibly be used to create a custom mag that also inherits colours.

Attached files

Please back up your .afs files before copying these over!!

-AFS replacements:
This is some patched .afs files, you can copy them into your PSOBB install (data folder) if you want to see what the Chansey mag (replaces Sato, functions like normal) looks like. Phonon Maser is broken in this file also, it's pretty funny to see.

-nj and texture files:
This is not so useful to most, it's a folder including my test files.

+++

I start school in two days so I'm going to give this a break until summer. This is a big find for me though and has a lot of potential for modders/skinners. So again, if anyone is interested in learning, just send me a pm or find me on discord. 8)
 

Attachments

  • pso132227168220277261.png
    pso132227168220277261.png
    4.2 MB · Views: 7
  • nj and texture files.zip
    31.5 KB · Views: 18
  • AFS replacements.zip
    3.2 MB · Views: 15
  • pso132227432586758159.png
    pso132227432586758159.png
    2.8 MB · Views: 6
Last edited:
I made a commentary video if anyone wants to see how the models really are in game.


I am actually done with this for now.
 
Hi sir!
I've been trying your released feature and so far I'm good with the "list of .nj files in ItemModelEp4.afs" you've released. Everything is working great !

If I'm right, you mastered the method to make it with items that has no animation (e.g : db'saber) by "export an .nj and append it's .njm to the end of the file with a hex editor".
But so far, I've failed trying this method..

Is that possible to have a very short example of that method ?
Again : awesome work sir !
 
Hi sir!
I've been trying your released feature and so far I'm good with the "list of .nj files in ItemModelEp4.afs" you've released. Everything is working great !

If I'm right, you mastered the method to make it with items that has no animation (e.g : db'saber) by "export an .nj and append it's .njm to the end of the file with a hex editor".
But so far, I've failed trying this method..

Is that possible to have a very short example of that method ?
Again : awesome work sir !

Hello! First off, sorry that I missed this reply, I simply didn't see it in notifications.

To answer your question, I don't really recommend using the solutions for model swapping in this thread. I am currently developing a tool to make NJ files with a much easier process, if you wish to learn more about that, I have made a new thread -> https://www.pioneer2.net/community/threads/ninja-ascii-nja-format-conversion-from-obj-theory.20755/

The tool is not officially released by any means, so there are bugs here and there, but it can make basic NJ files with appended NJM if you follow the instructions. Please note that the majority of weapon models are bugged when using NJ files, but Mag replacements seem to work just fine.
 
Back
Top