Jump to content


Photo

Jedi Academy's KotOR Lightsabers to be put into KotOR


  • Please log in to reply
9 replies to this topic

#1 Rooxon

Rooxon

    Jedi Initiate

  • Registered
  • Pip
  • 7 posts

Posted 27 August 2016 - 05:03 PM

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!



#2 JCarter426

JCarter426

    Jedi Master

  • M478_Staff
  • 430 posts

Posted 27 August 2016 - 07:10 PM

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.



#3 Sith Holocron

Sith Holocron

    M4-78

  • Administrators
  • 4,416 posts
  • LocationKodiak, AK (Hoth)

Posted 27 August 2016 - 07:25 PM

Might I suggest making a tutorial for it and placing it in our Tutorial section - with those pictures?

My Mods . . . the complete list Please leave reviews as I like to know when I've done something right, for a change.

Have always have been interested in Coruscant. Except in SWTOR.


#4 Rooxon

Rooxon

    Jedi Initiate

  • Registered
  • Pip
  • 7 posts

Posted 27 August 2016 - 07:29 PM

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!



#5 Rooxon

Rooxon

    Jedi Initiate

  • Registered
  • Pip
  • 7 posts

Posted 29 August 2016 - 09:36 AM

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



#6 Circa

Circa

    Jedi Apprentice

  • Members
  • PipPip
  • 53 posts
  • LocationIndianapolis

Posted 31 August 2016 - 12:55 AM

I'm surprised people aren't drooling over wanting these in-game. :P



#7 JCarter426

JCarter426

    Jedi Master

  • M478_Staff
  • 430 posts

Posted 31 August 2016 - 06:30 AM

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.



#8 Rooxon

Rooxon

    Jedi Initiate

  • Registered
  • Pip
  • 7 posts

Posted 31 August 2016 - 03:11 PM

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.



#9 FF97

FF97

    Jedi Apprentice

  • Members
  • PipPip
  • 26 posts

Posted 19 April 2018 - 03:28 PM

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



#10 Rooxon

Rooxon

    Jedi Initiate

  • Registered
  • Pip
  • 7 posts

Posted 21 April 2018 - 03:24 AM

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users