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.