Jump to content

Home

Achilles' Lightsaber walkthrough


Achilles

Recommended Posts

Everyone,

 

This is walkthrough that I put together for a friend of mine. I thought it might be useful for some of the newer folks who are completely unfamiliar with modding. Thanks to T7nowhere for creating the walkthrough that got me started. Hopefully the moderators see fit to add this to the modding stuck thread. I will also be posting a couple other modding related walkthroughs that I've made.

 

Resources that you will need to build your mod:

 

• KotOR Tool (KT) – Used to locate and extract templates, models, and skins

• GFF Editor – Program used to modify extracted .uti, .utc, etc files

• Hex editor - Used to modify .mdl (model) files.

• Tpc2Tga.exe – Simple executable that will allow KT to automatically convert game images to convertible format

• A file reference – used for identifying files in KT. I like to use http://www.goldensun-syndicate.net/kotor/codeFAQ.txt

• Photoshop (optional) – used to modify game images such as saber color, robes, armor, etc.

 

You will be able to find links to almost all of these resources in the Sticky threads at the top of the first page of this forum.

 

Files that you will need to extract using KT:

*Note: xxx represents the model #

 

Templates – Assign properties to the item(s). Use the file reference to determine what files you need. For instance g_w_sbrcrstl14 is the code for Blue Lightsaber Crystal. Knowing this information will help ensure that you extract the correct files.

 

• g_w_sbrcrstlxx.uti <BIFs/templates.bif/g_w_sbrcrstxx.uti>

• g_w_lghtsbrxx.uti <BIFs/templates.bif/g_w_lghtsbrxx.uti>

 

Models – Used to render the image of your item in-game

 

• w_lghtsbr_xxx.mdl <Bifs/items.bif/w_lght_xxx.mdl>

• w_lghtsbr_xxx.mdx <Bifs/items.bif/w_lght_xxx.mdx>

 

Images (or “skins”) – used to skin the model in-game (ie they’re what make the blue lightsaber file appear as a blue lightsaber in your game)

 

**Note: Rather than use the Extract button to save these files, you will double click them to open the Image Viewer window. Use the Write File button to extract the file to your save folder.

 

***Note: In KT open Tools<Options and set the program to automatically convert .tpc files to .tga format. Make sure that Tpc2tga.exe is in the same directory as KT for this to work.

 

****Note: If there are any “special instructions” in the Image Viewer window, you will need to copy them into a .txt file in your save folder. You will modify the format of this file later.

 

iw_sbrcrstl_xxx.tga <ERFs/texturepacks/swpc_tex_gui.erf/iw_sbrcrstl_xxx.tpc>

iw_lghtsbr_xxx.tga <ERFs/texturepacks/swpc_tex_gui.erf/iw_lghtsbr_xxx.tpc>-w_lsabre<color>01.tga <ERFs/swpc_tex_tpa.erf/w_lsabreturq01.tpc>

 

Other Files

 

*Required* w_lsabre<color>01.txt – You should create this file in your save folder and copy the special instructions from w_lsabre<color>01.tpc into the body of the file. You will change this file later.

 

*Optional* upcrsystals.2da <bifs/2da.bif/upcrystals> - This property table is used to make lightsabers upgradeable in-game. Although optional it is highly recommended that select this option. More details will be available later in this tutorial.

 

How to build your lightsaber:

 

Open GFF Editor and use File<Open to open g_w_sbrcrstlxx.uti. KT has it’s owned GFF Editor, but I’m used to using this one.

 

Please note the following properties:

 

• LocalizedName – this is the display name that the game uses when rendering your item in the gui (ie inventory screen). The # in STRREF box refers to the dialog.tlk file, but not to worry. Change this number to -1 and change Language to 0 and hit Enter. The box below should now be editable. Go ahead and enter a custom name for your crystal if you would like =)

 

 

• ModelVariation - this number of the saber model. Referring back to our code resource, we see that the game already uses 01-19. You will need to pick a unique number between 20-99.

 

*****Note: be sure that you do not use a number already taken by another mod that you plan on using.

 

• Tag: change the number at the end of this name to the same number that you selected for ModelVariation

 

 

• TemplateResRef: same steps as Tag

 

• Save your file

 

 

Open GFF Editor and use File<Open to open g_w_lghtsbrxx.uti

 

• Follow the same process for LocalizedName, ModelVariation, Tag, and TemplateResRef as outlined above. It is HIGHLY RECOMMENDED that you create a custom name for your lightsaber. Not only does it help you identify it in your inventory, its fun!

 

##Note: It is very important that the unique number used for your crystal and the saber is the same (example 99)

####Note: This is also where you would modify the properties of your weapon, but that’s another tutorial.

 

• Save your file

 

Open your Hex editor and use File<Open to open w_lghtsbr_0XX.mdl.

 

• BREATHE!

 

• Use the Text Find function to locate the references to your w_lsabre<color>01 file. I usually look for “01” or the color (“blue, red, turq, etc) to ensure that I find it right away.

• Very carefully change the 01 to 02

 

• There are 4 of these references. Find the other three and change them as well.

 

##Note: Double Bladed lightsabers will have 8 of these references.

###Note: changing only some of these references will result in a multi colored saber blade

 

• Save your file

 

Rename all of the files in your save folder, except w_lsaber<color>01.tga and w_lsaber<color>01.txt to reflect that model number that you selected. For example:

 

• g_w_lghtsbrXX.uti => g_w_lghtsbr99.uti

• g_w_sbrcrstlXX.uti => g_w_sbrcrstl99.uti

• w_lghtsbr_0XX.mdl => w_lghtsbr_099.mdl

• w_lghtsbr_0XX.mdx => w_lghtsbr_099.mdx

• iw_sbrcrstl_XXX.tga => iw_sbrcrstl_099.tga

• iw_lghtsbr_XXX.tga => iw_lghtsbr_099.tga

 

Lastly,

 

• Rename w_lsaber<color>01.tga to w_lsaber<color>02.tga (remember we changed the reference in the model using Hex editor)

• Rename w_lsaber<color>01.txt to w_lsaber<color>02.txi (note that we changed the file extention here. You will receive an pop-up. Just click through it)

 

All finished! Copy and paste all of these files into C:\Program Files\Lucas Arts\SWKotOR\Override, open your game, and enjoy =)

 

Edit: fixed errors on mdl/mdx filenames.

Link to comment
Share on other sites

  • Replies 158
  • Created
  • Last Reply

Great Tutorial. I have everything you mention, as far as tools required, except a Hex Editor. I've looked for but I have not been able to locate one. COuld you please tell me where one is, so that I could make use of your guide.

Link to comment
Share on other sites

Originally posted by True_None

Great Tutorial. I have everything you mention, as far as tools required, except a Hex Editor. I've looked for but I have not been able to locate one. COuld you please tell me where one is, so that I could make use of your guide.

 

This is the one I use. I found it via a Google search. There might be better one's out there.

 

http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

Link to comment
Share on other sites

If you have trouble with Achillies walkthrough there is also a great Adobe Acrobat reader file with screens and everything, but it is not my own doing so I can't exactly post it up, I believe it is a translation from Jules Windu's saber guide which was in Spanish... so I can't post a link for it or upload it so if anyone is having real trouble with Achillies walkthrough PM me and I guess I could send you the walkthrough I used to use

Link to comment
Share on other sites

Originally posted by True_None

I've downloaded the editor. Thanks to you, I'll be able to make my own lightsabers, YAY !!!!!

 

Let me know how this works out for you. I tried to make it as easy to use as possible, but I'm more than willing to make changes if it will make the walkthrough even easier to follow.

 

Good luck!

Link to comment
Share on other sites

  • 2 weeks later...
Originally posted by ReLoaD2K

I didnt understand the Hex Editor part.

What I have to find exactly?

I found several 01 in the w_lght_xxx.mdl

 

and what I have to do with the txi file?

 

Another thing, where I set the inicial damage of the saber?

I didnt find that.

 

You have to change the 01 to a unique number. Most people change it to 02, however if you have other mods that use 02, you may want to change it to 03, etc.

 

Again, there will be 4 01's in a regular saber and 8 in a double-bladed saber.

 

You don't have to do anything with the .txi file except create the file itself and make sure that it's in the Override folder. Create a text file, copy the information in the lower left hand corner of Image Viewer window and paste it into the file, and save it. Then rename it to match the w_lsabre<color>xx.tga file except you want to change the file extension to .txi

 

As for changing the attributes, I've yet to write a tutorial for it. I highly recommend using T7nowhere's which you can find at the link below:

 

http://www.lucasforums.com/showthread.php?s=&threadid=122916

Link to comment
Share on other sites

  • 1 month later...
Originally posted by Achillies

• GFF Editor – Program used to modify extracted .uti, .utc, etc files

• Tpc2Tga.exe – Simple executable that will allow KT to automatically convert game images to convertible format

 

i cant find either of these on google, can you tell me where to get them please?

 

 

 

NM got em

Link to comment
Share on other sites

  • 2 weeks later...
Originally posted by insane_pyro28

do you have a link or anything for where to get those programs you suggested.

 

Read the stickies. Start with the "guide for the newbie: how to install mods/what do i need to start modding" and then "do you want to mod Kotor, then start here"

Link to comment
Share on other sites

Originally posted by Darth333

Read the stickies. Start with the "guide for the newbie: how to install mods/what do i need to start modding" and then "do you want to mod Kotor, then start here"

 

I just added a reference to the stickies in the tutorial. Hopefully this will avert future questions of this nature.

 

Thanks for jumping in :D

Link to comment
Share on other sites

Okay .. I thought I'd play with building a lightsaber and used your tutorial Achilles .. to the letter .. except that I used a short saber instead of a regular saber.

 

The short saber I used (w_shortsbr_001) only had 2 w_lsabre<color>01 entries in it.

 

I extracted the gui tga files and renamed them to use 30 as the reference number.

 

I extracted the model and mdx files (using kotor tools) and renamed them as well. I changed 2 instances of the color reference in the mdl file.

 

I extracted the uti files for the blue saber crystal and short blue lightsaber and changed the tags so that they used 30 as their ref number and variation and then renamed them. I haven't added any properties to the lightsaber yet.

 

I created the txi files where neccessary and named them appropriately.

 

I extracted the blade color file and changed the number to 2 as you suggested as well as creating the txi file to go with it

 

I used a save game editor and added the saber to my inventory, started and loaded the game and as soon as I try to equip the lightsaber the game crashes.

 

Any ideas? Something I might have missed that you have done yourself in the past?

Link to comment
Share on other sites

Originally posted by seawolfe

I used a save game editor and added the saber to my inventory, started and loaded the game and as soon as I try to equip the lightsaber the game crashes.

 

Any ideas? Something I might have missed that you have done yourself in the past?

 

What happens when you try adding it to your inventory via the console?

 

I've never heard of this happening and I'm wondering if it's the result of using KSE to add it to your inventory instead of the cheat code.

 

Let me know.

Link to comment
Share on other sites

The short saber I used (w_shortsbr_001) only had 2 w_lsabre<color>01 entries in it.

 

I suggest you check the model again in a hex editor there Will be 4 texture entries. Even if you only edited only 2 of the entries the worst that should happen is you would get a multi colored saber.

 

Also if your game is crashing when you click on the item, the first thing you should check is that all your files match up. But from my experience if the game crashes when the item is clicked it's because the model is Corrupt the only way to fix it would be to start over by extracting another saber model.

Link to comment
Share on other sites

  • 3 weeks later...

I'm trying to make the lightsaber I wanted following Achilles' Tutorial. I think Im a little confused.

 

g_w_sbrcrstlxx.uti <BIFs/templates.bif/g_w_sbrcrstxx.uti>

• g_w_lghtsbrxx.uti <BIFs/templates.bif/g_w_lghtsbrxx.uti>

 

If I trying to edit Malaks Ligtsaber to the Spec I posted earlier, do I need to pay attention to the liines of instruction refering to cystals?

 

Will when I eventually work out how to do this the lightaber be upgradeable?

 

If the code for Malaks Lightsaber is g_w_lghtsbr06 are the corresponding .mdl and .mdx files w_lghtsbr_006? Because I cant see a w_lghtsbr_06

Link to comment
Share on other sites

Originally posted by ClumsyClayson

I have done all the steps up to Hed Editing OK I think. I open the file and search for "blue" Which is changed into "BE" and there are loads of entries. I am using the Same Hes Editor as you gave the link to. I dont know where or what "02s" I am supposed to be changing.

If you are replacing blue, then you need to replace it with something that is also four characters long or else it won't work.

 

You won't find any 02's in the original models; they will all be 01's. You want to change the 01's to 02's (or 03's or 04's, etc). The objective it to change the model to something that the game isn't already using.

 

I hope that helps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...