Rooxon

Jedi Academy's KotOR Lightsabers to be put into KotOR

Recommended Posts

Hello everyone, I'm a mod creator over at JKHub. Today I released a mod pack, called KotOR Lightsabers Pack - Higher standard recreations of the blocky hilts in KotOR.

LINK

I'd wish to put them into KotOR as well but don't have the knowledge of the correct porting process, nor can I find any good, clear tutorials. I kindly ask anyone who's proficient in this to help me out. I'd love to learn rigging sabers for KotOR as well. :) I look forward to your responses!

  • Like 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites

Ah, I'm familiar with some of your previous lightsaber hilts. Converting them for KOTOR isn't too difficult, but its modding tools are a bit finicky.

 

Firstly, you need to export an existing lightsaber hilt of the same type. The models are w_lghtsbr_***, w_dblsbr_***, and w_shortsbr_***, in either models.bif or items.bif depending on the game. You need both the MDL and MDX files; put them in a folder somewhere, unedited.

 

Next you need MDLOps to convert the binary models (MDL and MDX) to an ASCII format that NWMax can read. Load the saber MDL and select "read and write model". It'll automatically generate a new model (for example, w_lghtsbr_001-ascii.mdl). This is the file you want to import into your modeling program through NWMax (import geometry & animations, on the left under "MDL Loading").

 

Merge your own saber geometry (just the hilt) into the scene, then move and resize it so it more or less matches the original saber. After you're done with that, delete the old saber and then use ResetXForm in NWMax's Mesh Tools on your saber geometry. That's basically a safety to make it use the correct transformation data, because it can get confused and use the original settings sometimes.

 

Link the saber blade geometry to your hilt, then link your hilt to the saber dummy (not the Aurora Base, the other one).

 

Once you're done editing your model, select the Aurora Base and export it through the Modify panel. Make sure you export this in a new location so you don't mess up any models you've been working with (I usually send it straight to the desktop). Export geometry and animations, and you can ignore the sanity check as that thing is never helpful. This will generate a file with the same name as your Aurora Base, but it's still in ASCII format and has to be converted back to binary to be loaded in the game. Rename the file, adding the extension "-ascii_new" (e.g. w_lghtsbr_001-ascii_new.mdl) and put it in the folder with all your other models. You'll need MDLOps 0.5 for this next step; it doesn't work in version 0.6 and 0.7 doesn't currently support it. Select the Replacer tool and load the binary model (the one you extracted from the game files) and the ASCII model (your own edited one). When you hit "read models" a new window will come up, asking you to replace stuff. Select the original hilt (it will be named "lshandle" or some such) and replace it with your saber hilt geometry. Essentially, you're taking the hilt from your edited model and placing it in the original binary model with the correct blades.

 

The blade color will depend on the model (001 is blue, 002 is red, 003 is green, 004 is yellow, 005 is violet, and the K2 colors aren't consistent so you'll have to look those up). You'll either have to run the replacer several times for each color, or duplicate the compiled models and hex edit the saber names and blade colors, whichever you prefer. You will have to use the replacer for the red saber anyway, because the blade texture has a different number of characters (w_lsabrered01 as opposed to, for example, w_lsabregren01 for green).

 

Anyway, after you have all your models, move them to Override and rename them. Copy all your textures as well. If your textures use an alpha channel for shaders, you'll need to generate another file for that, but it's pretty simple. A simple metallic shader is a text file that says "envmaptexture cm_baremetal". Rename the file to match the hilt texture's name and change the file extension to TXI.

 

One last thing: K1 and K2 models are in a slightly different format, and may cause the game to crash if one is placed in the other. So you'll need to repeat these steps separately with binary files extracted from each game.

 

I think that's everything. I can go over it in more detail later (with pictures and such) if you want.

  • Like 2

Share this post


Link to post
Share on other sites

I'll give this a careful read at first, then try it out. It would help a lot though, if we could talk realtime via the discord community for Jedi Knight. Oh and we've talked over there about tutorials and none can practically be found, it would really help if someone wrote a tutorial or recorded his workflow.

Oh and thanks for the help!

Share this post


Link to post
Share on other sites

FairStride helped me yesterday a lot, but we've had some problems on my part. For some reason, he managed to get the saber himself in-game correctly, but on my part, first I had a resetxform problem, because I didn't reset the transform and scalings. Now, I clearly did something right cause the blue laser appears fine, but instead of the hilt, a very small, barely noticeable "block" of some sorts appears, it might be a super super small hilt, dunno... here are the pictures, if anyone has a clue what I could have done wrong, I'd appreciate it.

problem.jpg

problem2.jpg

Share this post


Link to post
Share on other sites

When something like that happens, I convert the model back to ASCII through MDLOps and then work from there. This usually fixes the discrepancy between what you see in your modeling program and what you see in the game.

 

If you still have problems, I can take a closer look at your hilts in a few days, and see about making that extended tutorial too. Just backed up with a bit of work at the moment.

Share this post


Link to post
Share on other sites

Actually I managed to solve my problem on my own, somewhat. FairStrides helped me a lot but I got the idea that if the saber appears really small, some setting i used before while creating it is messing with the rig. I create my hilts via the baking routine, thus I always create two separate models, a high poly and lowpoly one. I use lots and lots of different modifiers and one was bound to be causing me problems.

FairStrides on his part ported it perfectly tho without any problems, because he got my .obj file and just imported it. So the very simple solution was: export the already-positioned, ready-to-link model as .obj and import it back in. Link, export, replace with mdloops and it works like a charm! BUT it didn't work if I just simply reset the transformations and rotations of the model.

So this would be a shout-out advice for anyone out there using the same workflow routine as me; If you're getting similar scaling problems as me when porting, try to export the model as .obj and import it back in, then try again!

I'm in the process of creating a few video tutorials for JKA and I will do a kotor-lightsaber hilt rig one as well.

Share this post


Link to post
Share on other sites

Sorry for the late reply, but I managed to port the hilts of your mod into Kotor 2. Can I upload?

Share this post


Link to post
Share on other sites

Sorry for the late reply, but I managed to port the hilts of your mod into Kotor 2. Can I upload?

Of course. :D There's other stuff I made inspired from KOTOR as well, tho I believe they should be compatible with both KOTOR 1 and 2 - I'd port them myself if only I would grasp the one proper routine to get them to work as I imagine - although I am being haunted by problems with porting and several depressive moments, where I find out just how limited KOTOR shaders are.

Share this post


Link to post
Share on other sites

Hi, I'm brand new to the conversion of Jedi Academy mods to KOTOR. I found some great models online that the authors have given permission to be edited/redistributed provided they are credited. I read JCarter's tutorial and I think I understand it, but the only part I'm lost with is getting the jedi academy hilt model into nwmax. I have the .glm and .jpeg files that were included in the .pk3 of the original mod, if anyone from this thread knows how I could convert these to a KOTOR model, please let me know. I'd appreciate any help :)

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
54 minutes ago, The Historian said:

Thank you. i've been wanting these hilts for revan and bastila for so long. If you can figure out how to convert the models to kotor files, then see what you can do, i would like you to mod it so that bastila's is the one that you retrieve from Brejik's corpse as well as when you confront her on Lehon and the star forge, and revan's to be the lightsaber you construct on dantooine.

I've familiarized myself with the placement of items on corpses or in merchant inventories so I can definitely do that, the hard part is just figuring out how to convert the sabers... will update you if I can learn how to do it

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.