I posted this in the tutorial forums yesterday, but I thought i'd put a copy here too, so that there's somewhere to discuss it if someone has any questions/problems.
Well hello there, dears!
I've seen a few discussions recently about converting lightsaber hilts between the two games and there seems to be a bit of confusion as to what actually needs to be done.
So, I decided i'd post a little tutorial here just so that the correct method is easily accessible for all those who want to attempt this.
For this example, i'll be using a saber hilt from Oldflash's Final Touch mod to show you.
Right, here we go!
First, you need to get the model for the lightsaber you want to convert. I'd recomment making a new folder somewhere and putting the model and the texture files inside. Then using KotOR Tool, extract any of the lightsaber binary .mdl and .mdx files from the game you want to convert to. So, if you're taking a KotOR hilt to TSL, you extract w_lghtsbr_003.mdl and w_lghtsbr_003.mdx from the TSL game files. On the flip side, if you're converting a TSL hilt to KotOR, extract w_lghtsbr_001.mdl and w_lghtsbr_001.mdx from the KotOR game files.
(Note, you can use any of the lightsaber files from the game, I just chose w_lghtsbr_003 because i'd like the saber to have a green blade in my game. If you choose the wrong model, you can always hex edit the blade colour later on)
Right, so this is what we have so far:
Now, we need to start MDLOps. (MAKE SURE YOU USE MDLOPS 0.5 NOT 0.6!!!)
When it's open, press the button for whichever game you're converting FROM. Now, i'm converting a TSL hilt to KotOR, so I set the mode to KotOR 2. Then, hit select file and navigate to the hilt which you're converting:
Then hit read and write model. Then, if you go to the folder where the hilt is, you should see that in addition to the binary model files, your custom hilt should now have ascii files as well. These files are what we need to be able to actually compile the hilt into a format the games can read:
Now back to MDLOps. You now need to change the mode to the format you want the hilt to be in. Again, i'm converting a hilt from TSL to KotOR, so I select the first game this time. Then, hit replacer. In the window that comes up, set the binary model the the .mdl file you extracted using KotOR Tool and set the ascii model to the one you just made using MDLOps:
Now hit read models and wait for MDLOps to work its magic. This may take a few seconds/minutes depending on how large the poly count on the model is. Once it's done, you will get this window:
Click where it says lshandle07 (there may be a different number there for you) and then hit set replace target.
You will then get another window appear. Click lshandle01 (again the number may be different) and then click select target:
The window will then disappear. Now, all you need to do is change the number at the end of the Base model name to whatever you want (or leave it if you want to replace something) and then hit Do it!
After MDLOps has worked its magic, you'll have a new .mdl and .mdx file in the same folder as the hilt you got from KotOR Tool earler. All you need to do is delete k1-r-bin/k2-r-bin from the end of the file names and they're ready to use!
All you need to do is create a .uti file for your saber (unless you're replacing a saber obviously) and dump the model files, the textures and the icon into your Override folder.
Here's our end result: