PDA

View Full Version : New crystal = Disappearing lightsabre


ModderEarthHAHA
10-05-2005, 07:50 PM
Made a black color-crystal, which seems to work (or it's invisible, can't tell since the background's black) until I assemble the crystal into a sabre.
The sabre disappears from my inventory!

This is what I've changed:
*tga-image with blade-color
*uti-file for the color crystal
*associated the uti-file with the tga in upcrystals.2da as a new crystal, then added it as creatable in the workbench.

What do I need to change more? Since the crystal works, just not in a sabre... :(

Also, where would the thumbnail-images of the crystal and the lightsabre be located?

Please help!

LSaberDuelist
10-05-2005, 08:34 PM
You need more than bladecolor.tga and bladecolor.uti, for a precise walkthrough take a look at Achilles custom lightsaber tutorial, because that is what you are trying to do. If remember correctly it works like this: if you have a crystal.uti like u_l_colo_024.uti the game needs a g_w_lghtsbr24.uti and w_lghtsbr_024.mdl, w_lghtsbr_024.mdx in which your custom crystal will be used, if these are not present there is no lightsaber to put the crystal into. Moreover, in w_lghtsbr_024.mdl you have to refer to the bladecolor.tga for the custom blade color to show. For a more detailed description see Achilles walkthrough.

ModderEarthHAHA
10-05-2005, 09:12 PM
You need more than bladecolor.tga and bladecolor.uti, for a precise walkthrough take a look at Achilles custom lightsaber tutorial, because that is what you are trying to do. If remember correctly it works like this: if you have a crystal.uti like u_l_colo_024.uti the game needs a g_w_lghtsbr24.uti and w_lghtsbr_024.mdl, w_lghtsbr_024.mdx in which your custom crystal will be used, if these are not present there is no lightsaber to put the crystal into. Moreover, in w_lghtsbr_024.mdl you have to refer to the bladecolor.tga for the custom blade color to show. For a more detailed description see Achilles walkthrough.

I tried. Now it doesn't disappear. Now it's blue instead. Aw...

EDIT:
Now I know why it got blue, I changed the 2da which I had done god I don't know in. Let's just say I referred to non-existing .uti's. Now that's fixed, but from what I can tell I need to change the lightsabre .uti's to use the black-blade tga. Am I on the right track?

The Doctor
10-05-2005, 09:22 PM
You need to edit the mdl filea s well. That's why it's switching to a blue colour because it's looking for a file that's not in your override folder. You need to change 4 lines of the mdl (though I'm not sure which ones) to the name of your bladecolour.uti file. That should get it to work. From what mod did you take the mdl flie to use as a template? Or did you take it from the game using KOTOR Tool? and LSaberDuelist is right, you need to have all the uti names and their respective tga and txi files have the same number at the end of the name. Then you need to make sure the model variation is set to the same number. I hope this helps, I know it's a little hard to follow. If you still dont get it, PM me or email me. My email can be found at my website: www.freewebs.com/doctor99.

ModderEarthHAHA
10-05-2005, 09:48 PM
You need to edit the mdl filea s well. That's why it's switching to a blue colour because it's looking for a file that's not in your override folder. You need to change 4 lines of the mdl (though I'm not sure which ones) to the name of your bladecolour.uti file. That should get it to work. From what mod did you take the mdl flie to use as a template? Or did you take it from the game using KOTOR Tool? and LSaberDuelist is right, you need to have all the uti names and their respective tga and txi files have the same number at the end of the name. Then you need to make sure the model variation is set to the same number. I hope this helps, I know it's a little hard to follow. If you still dont get it, PM me or email me. My email can be found at my website: www.freewebs.com/doctor99.

I use the stuff from the game by using KotOR Tool.

Now the damn thing disappears again, here's what I've got. (I'm starting by doing this mod only for the double-bladed lightsabre to see if I can get it to work.)

*g_w_dblsbr066.uti - tags changed to new name
*u_l_colo_66.uti - Tags changed to new name
*upcrystals.2da - Row 66, Label = "Black" Templates for crystal and dbl-sabre changed to uti's names accordingly.
*w_dblsbrb_066.mdl - With the new .tga's name put into all for spots.
w_lsabreblack66.tga - Which is my re-textured version of the blue one that came with the model for the dbl-sabre.

What am I missing?

RedHawke
10-06-2005, 12:07 AM
w_dblsbrb_066.mdx

Models are comprised of 2 files a mdl file and an .mdx file. ;)

MdKnightR
10-06-2005, 12:19 AM
Guys, please stop with the Black Sabers already. Light isn't black. If you want an Blacklight saber, click on the link in my signature for Heart of the Force Sabers.

RedHawke
10-06-2005, 02:17 AM
Guys, please stop with the Black Sabers already. Light isn't black.
Now, now, now MdK... :tsk: No need to squash others creative impulses, to each their own. ;)

Kind of like saying to Picaso... "What's with all your rediculous noses?" :xp:

But the shameless plug for your mod was a nice touch! :D

CrudeMatter
10-06-2005, 02:33 AM
Now, now, now MdK... :tsk: No need to squash others creative impulses, to each their own. ;)

Kind of like saying to Picaso... "What's with all your rediculous noses?" :xp:

But the shameless plug for your mod was a nice touch! :D

ROFLMAO!!! :rofl: :rofl: :rofl:

@Md -You should know better, dude. I'd be willing to debate the scientific potential of the "black" blade.

And I agree about the shameless plug.
speaking of which... :smirk2: No matter what color your sabre is, Outer Rim Imports can make it shine! ORI Upgrade Pack 2 (http://www.pcgamemods.com/mod/16326.html)

Darth333
10-06-2005, 10:55 AM
What's with this "shameless advertisement"? :tsk: If ModderEarthHAHA wants to make his own black saber, he is more than welcome to ask his questions and to publicly release his mod.

MdKnightR
10-06-2005, 12:53 PM
Sorry, guys. My pet peeve got the best of me. You are correct....he has the right to do as he wishes.

Darkkender
10-06-2005, 02:15 PM
I use the stuff from the game by using KotOR Tool.

Now the damn thing disappears again, here's what I've got. (I'm starting by doing this mod only for the double-bladed lightsabre to see if I can get it to work.)

*g_w_dblsbr066.uti - tags changed to new name
*u_l_colo_66.uti - Tags changed to new name
*upcrystals.2da - Row 66, Label = "Black" Templates for crystal and dbl-sabre changed to uti's names accordingly.
*w_dblsbrb_066.mdl - With the new .tga's name put into all for spots.
w_lsabreblack66.tga - Which is my re-textured version of the blue one that came with the model for the dbl-sabre.

What am I missing?

In the double saber mdl there should 8 entries that you list the new sabercolor file as w_lsabreblack66. Also what do your 2da entries read as?

ModderEarthHAHA
10-07-2005, 01:41 PM
w_dblsbrb_066.mdx

Models are comprised of 2 files a mdl file and an .mdx file. ;)

Huh? How do I find the mdx then? It wasn't exported with the model. There was only the mdl, and 2 tga's (hilt and blade). Do I need to check the "export animations"-box when exporting from KotOR Tool?

In the double saber mdl there should 8 entries that you list the new sabercolor file as w_lsabreblack66. Also what do your 2da entries read as?

I only found four entries while searching the file in notepad.
Also the 2da contains what I mentioned. I added a row 66 (or do I have to change this to the next value in line??) then I added my black lightsabre along with my modified dblsabre.

ChAiNz.2da
10-07-2005, 03:28 PM
Huh? How do I find the mdx then? It wasn't exported with the model. There was only the mdl, and 2 tga's (hilt and blade). Do I need to check the "export animations"-box when exporting from KotOR Tool?
You can extract .mdx files from here:

Kotor II > BIFs > models.bif > Aurora Model Extension

I only found four entries while searching the file in notepad.
You should be using a HEX Editor in order to find the proper values. Normal & Short Sabers will have 4 references to the blade color, while double-sabers will have 8 references.

1 blade = 4 planes. Each "reference" is denoting one plane of the entire saber blade.

Also the 2da contains what I mentioned. I added a row 66 (or do I have to change this to the next value in line??) then I added my black lightsabre along with my modified dblsabre.
It's always advised to use the next available line # whenever possible. I'm not sure if it's required for the upcrystals.2da.. but I know from experience that baseitems.2da will give you a headache if you decide to skip entry numbers ;)

ModderEarthHAHA
10-07-2005, 05:48 PM
Ok, now I remade everything (cept the tga) with a single lightsabre.

I changed the row to 14 and made all new referrences point to no. 14.
I added the mdx file.

I still can't get it to work. It's blue now.

Something weird:
In the single-bladed lightsabre I found like 20-30 places to change from 001 to 014. (w_ligthsabre_001 or whatever it says, didn't change any other values).

Maybe someone could take a look at it for me?

I really appriciate you guys helping me out, I feel like such a noob.

ChAiNz.2da
10-07-2005, 06:07 PM
Just noticed something. It looks like you were equating the upcrystals.2da line number with the model number of your saber & crystal.

Did you perchance change the "Model Variation" entry in your saber's .uti file to 66 (you'll need to)?

Also, you'll need to change the saber's model itself (via Hex editor) to use 66. Since you say your blade is turning blue, I'm assuming you extracted the blue saber as your "base" to work off of.

---------------------

Achilles' Handy Tutorials contains a much more intensive explanation on how to construct sabers here:
http://www.lucasforums.com/showthread.php?t=143456

The tut is for KotOR, but it works for TSL as well (with some minor filename changes)

Also, T7nowhere has a handy tut on how to make the saber upgradeable here:
http://www.lucasforums.com/showthread.php?t=143991


However, feel free to ask questions, I just want to make sure you knew of the tutorials already available :)

Jackel
10-07-2005, 06:09 PM
Ok, now I remade everything (cept the tga) with a single lightsabre.

I changed the row to 14 and made all new referrences point to no. 14.
I added the mdx file.

I still can't get it to work. It's blue now.

Something weird:
In the single-bladed lightsabre I found like 20-30 places to change from 001 to 014. (w_ligthsabre_001 or whatever it says, didn't change any other values).

Maybe someone could take a look at it for me?

I really appriciate you guys helping me out, I feel like such a noob.

w_ligthsabre_001 would refer to the skin of the model, you should be changing the lines that reference to the blue saber tga file (cant thin of it off hand sorry). Try that on a re-extracted mdl file and change those lines and see what happens.

ModderEarthHAHA
10-07-2005, 06:29 PM
Just noticed something. It looks like you were equating the upcrystals.2da line number with the model number of your saber & crystal.

Did you perchance change the "Model Variation" entry in your saber's .uti file to 66 (you'll need to)?

Also, you'll need to change the saber's model itself (via Hex editor) to use 66. Since you say your blade is turning blue, I'm assuming you extracted the blue saber as your "base" to work off of.

---------------------

Achilles' Handy Tutorials contains a much more intensive explanation on how to construct sabers here:
http://www.lucasforums.com/showthread.php?t=143456

The tut is for KotOR, but it works for TSL as well (with some minor filename changes)

Also, T7nowhere has a handy tut on how to make the saber upgradeable here:
http://www.lucasforums.com/showthread.php?t=143991


However, feel free to ask questions, I just want to make sure you knew of the tutorials already available :)

Fixed the model variation, thanks. But should I change all the 01-references (or names of functions or whatever they are) or should I ONLY change the .tga-file references?
If that's the case then I can only find 2 for single and 4 for double.

Also, now the icon of the assembled sabre turned into a picture which looks like a four-way road-turn which is positioned in the lower-right corner of the slot. Kind of like the texture for the equipment-screen-background. But this is in black and white.

Then when I equip the sabre, my box crashes.

EDIT:
Tried it again, this time with only the .tga-file references edited in the .mdl-file. But the exact same thing as last time occured.

ChAiNz.2da
10-07-2005, 07:11 PM
Here's what you want to change (using the blue double-saber as your base)

In the .mdl file using a HEX editor, change ONLY the 1st entry. Should be on the 1st or 2nd line in the HEX:

w_Dblsbr_001.01 ---> w_Dblsbr_066.01

**- note that there is a ".01" attached to the 1st entry. KEEP IT ;) hehehe...



Next, All blade color entries (8 total) Do a search for "blue01" to find them all:

w_lsabreblue01 ---> w_lsabreblak66

**- notice I changed the name of your black color .tga to "blak". This is so the color name contains the same amount of characters as the original.
Be sure to rename your saber blade color .tga to "w_lsabreblak66.tga" AND include the .txi file. Name it "w_lsabreblak66.txi"



For your icons (assuming you've created custom ones):

Saber:
iw_Dblsbr_001.tga ---> iw_Dblsbr_066.tga

**- Be sure to change the "Model Variation" to 66.

Crystal:
u_l_colo_01.tga ---> u_l_colo_66.tga
^^^
Completely forget this is here.. hehehe DOH!

Once you are done HEXing the saber .mdl... name it "w_dblsbr_066.mdl" and re-name the "w_dblsbr_001.mdx" to "w_dblsbr_066.mdx". Thankfully, there's nothing to do with the .mdx file other than renaming it ;)

NOW, in your upcrystals.2da.. enter these values:

Row Label | label | template | shortmdlvar | longmdlvar | doublemdlvar
--------------------------------------------------------------------------
14 | Black | u_l_colo_66 | **** | **** | g_w_dblsbr066

Lastly, double-check your saber .uti and make sure it and it's tags/template are named "g_w_dblsbr066.uti" and that the model variation is set to "66"...

Hope that helps :)

ModderEarthHAHA
10-07-2005, 07:37 PM
Here's what you want to change (using the blue double-saber as your base)

In the .mdl file using a HEX editor, change ONLY the 1st entry. Should be on the 1st or 2nd line in the HEX:

w_Dblsbr_001.01 ---> w_Dblsbr_066.01

**- note that there is a ".01" attached to the 1st entry. KEEP IT ;) hehehe...



Next, All blade color entries (8 total) Do a search for "blue01" to find them all:

w_lsabreblue01 ---> w_lsabreblak66

**- notice I changed the name of your black color .tga to "blak". This is so the color name contains the same amount of characters as the original.
Be sure to rename your saber blade color .tga to "w_lsabreblak66.tga" AND include the .txi file. Name it "w_lsabreblak66.txi"



For your icons (assuming you've created custom ones):

Saber:
iw_Dblsbr_001.tga ---> iw_Dblsbr_066.tga

**- Be sure to change the "Model Variation" to 66.

Crystal:
u_l_colo_01.tga ---> u_l_colo_66.tga
^^^
Completely forget this is here.. hehehe DOH!

Once you are done HEXing the saber .mdl... name it "w_dblsbr_066.mdl" and re-name the "w_dblsbr_001.mdx" to "w_dblsbr_066.mdx". Thankfully, there's nothing to do with the .mdx file other than renaming it ;)

NOW, in your upcrystals.2da.. enter these values:

Row Label | label | template | shortmdlvar | longmdlvar | doublemdlvar
--------------------------------------------------------------------------
14 | Black | u_l_colo_66 | **** | **** | g_w_dblsbr066

Lastly, double-check your saber .uti and make sure it and it's tags/template are named "g_w_dblsbr066.uti" and that the model variation is set to "66"...

Hope that helps :)

I hadn't created custom icons, cuz I couldn't find them... but thanks to you I found the sabre-icon.

I still can't find these:
*Crystal-icon .tga
*Any .txi at all (assuming I need one for each .tga-file)

And there's only 4 results for "blue01" in double-bladed sabre, and 2 in single-bladed. I opened them in a HEX-editor and searched.

Also, the first line you mentioned that ended with a .01, well, in my .mdl it doesn't... anywhere.

EDIT: changed my quote to mark my goof up ;) - ChAiNz.2da

ChAiNz.2da
10-07-2005, 08:33 PM
I hadn't created custom icons, cuz I couldn't find them... but thanks to you I found the sabre-icon.

I still can't find these:
*Crystal-icon .tga
*Any .txi at all (assuming I need one for each .tga-file)

And there's only 4 results for "blue01" in double-bladed sabre, and 2 in single-bladed. I opened them in a HEX-editor and searched.


Also, the first line you mentioned that ended with a .01, well, in my .mdl it doesn't... anywhere.
ahh..crap.. totally my fault :headbump

The Crystal Icon is "iw_SbrCrstl_001.tga", change it to "iw_SbrCrstl_066.tga"

Crystal Icon .tga:
Kotor II > ERFs > TexturePacks > swpc_tex_gui.erf > I

look for the "iw_SbrCrstl_xx" entries...

------------------

For the .txi file.. you'll need to make one (and only one ;) ).

1) Open Notepad
2) Copy this line and paste it into a blank document:


blending additive
decal 1


3) Now, save the file in ANSI format (use the 'Save As' function) and name it w_lsabreblak66.txi

------------------

Make sure when you're searching, you're using Type: Text String, and that if you have options, check the ASCII String as a parameter. I promise you that there are 8 entries for a double-bladed saber ;)

ModderEarthHAHA
10-08-2005, 10:42 AM
You guys are gonna kill me now... Don't know if I dare to speak of how stupid I've been.

Ahem*coff coff*I kinda realised just now while looking on another lightsabre-mod that I have to compile the model...*just clearing my throat*


Anyways, now it works... well, almost. It's in 2d and looks like a plank. I guess this has to do with those other 2 texture-references in the model's .mdl... Which are NOT in my .mdl-file.
Note that I'm using a single-bladed now, I mentioned earlier that I changed my mind to start simplier, so the single-bladed one is what I'm working with now.

But I only get two matches for blue01 with both the HEX-editor and notepad. Actually notepad is more comfortable since there is no real use of a HEX-editor in this case what I can see.