This thread is outdated -> Please see new version here (
http://www.lucasforums.com/showthread.php?s=&threadid=143421)
//////////////////////////////////////////
New threads pop up regularly at Holowan about how to install mods and what tools are required to start modding. This mini guide intends to give newcomers some additional help to get started and includes links to all the tools that are required to mod Kotor (experienced modders can also use it for reference purposes).
* Mac users may want to read this thread first (
http://www.lucasforums.com/showthread.php?s=&threadid=140931)
Sections of this guide:
1. PC version cheat codes
2. HOW TO INSTALL MODS
- installing
- uninstalling
- conflicts
3. WHAT TOOLS DO I NEED TO START MODDING KOTOR (includes basic tips on how to use the tools)
3.1) Getting started
3.2) Retexturing, item making and modeling
- 3.2.1) practical info concerning models and textures
- 3.2.2) retexturing
- 3.3.3) modeling
3.3) sounds
3.4) movies
3.5) Other mods: dialog editing, module (area) editing, scripting
- 3.5.5) dialog editing
- 3.5.6) scripting
- 3.5.7) area editing
3.6) making mods compatible
3.7) other useful tools
4. OTHER
PC version cheat codes:
To get the pc version cheat codes and instructions on how to open the console, please refer to this thread in the Padawan's Lounge. (
http://www.lucasforums.com/showthread.php?s=&threadid=119128). Cheat codes are very useful to test mods and some mods require you to use cheat codes to get some items.
HOW TO INSTALL MODS:
Installation
Modders normally pack their mods with either winzip (.zip) or winrar (.rar ), which is similar - but better - than winzip. You can download Winrar for free here (
http://www.rarlab.com/rar/wrar330.exe)
For the vast majority of the mods, you simply need to extract the files to your Override directory located by default in C:\ Program Files\LucasArts\SWKotOR but there are some exceptions:
- files with a .mod extension go into the modules folder
- .wav files go into a sound folder: follow the authors instructions concerning this as the destination folder may vary.
- .lip files (lipsync files) go in the lips folder.
- If a .tlk file is included in the download, then it goes directly into your SWkotor diectory WARNING! replacing the .tlk file may change the language of the game. Always backup your original .tlk file before replacing it. (I noramlly rename the original dialog.tlk file to dialog_o.tlk - the "o" stands for Original and then I drop the modified dialog.tlk file in my SWKotOR folder).
In any event, modders normally include a readme file with their mods: this is where you should always start (in fact modders should always include a readme - to those who don't... :lightning Remember this when you start modding ;) )
I have one recommendation when you install mods: keep a backup of your saved games in case something happens or save often and keep a good amount of saved games ( I keep savegames of my arrival at each planet, before leaving the Ebon Hawk and at some major points as well - if you start modding, you wont regret having extra savegames at strategic points in the game for testing purposes).
Uninstall: Just delete the files. Some mods come with an automatic installer and maybe removed via the Add/remove programs function in Windows.
Conflicts: Some mods don't like each other but don't worry, those problems are normally due to the fact that two or more mods are using files with the same name. Most often it's a .2da file conflict that occurs when you have two mods using the same .2da file (per example: appearance.2da, heads.2da, spells.2da, portraits.2da). cchargin released a tool called Kotor Mod Manager (KMM) that allows you to check for conflicting mods and exclude one of them. You can download cchargin's Mod Manager here (
http://home.comcast.net/~cchargin/kotor/index.html). Note that KMM won't make mods compatible. It only allows you to detect conflicts and exclude some mods.
There are 2 1/2 solutions to 2da conflicts :
a) If you are lazy: identify the 2 mods using the same name (hehehe nothing can be done without a bit of searching :p ) and remove one of the mods from your override folder. (that's the price to pay for being lazy :D ).
b) My favorite solution :dev11: : you plunge into the world of modding, get Kotor tool (KT) and Microsoft .net (see "What do I need to start modding" below). Don't be afraid, this is a simple operation.
Just for the example, we will use the appearance.2da files but all the .2da files work the same way - if you understand how to do it with this one, you'll be able to do it with other .2da files
-->Open the apperance.2da file with the 2da file editor that you can find in the file menu of KT and load the problematic file. Or you can double click on the original .2da file in BIFs >2da.bif >2D Array.
-->Step 2: check this thread (
http://www.lucasforums.com/showthread.php?s=&threadid=126215)
If you are lost and want a simple and step by step example on how to edit an appearance.2da file, I suggest you download svцsh's Revan redemption robes and follow the readme carefully. It's well explained and very easy to do. Download svцsh's mod here (
http://www.angelfire.com/crazy2/xclone_0101/kotor_mods.htm) All the other .2da files follow a similar pattern.
On how to copy/paste a line in a .2da file, read this thread (
http://www.lucasforums.com/showthread.php?s=&threadid=130290).
Notice concerning spells.2da: If you have a conflict involving force powers and the spells.2da file you cannot simply move the force powers as you wish since the scripts contain a reference to a spells.2da line so you'll need to edit the script or the item in the case of armbands. If source code is not available in the download package, contact the authors.
c) I said there were 2 1/2 solutions right? Then the last one would be get the Holowan plug-in. T7 did a wonderful job regrouping many mods here and solving conflicts problems for all of us. Even if you don't have conflicts, get the HL plug-in: it's a must have. Get the HL plug-in here (
http://www.lucasforums.com/showthread.php?s=&threadid=127038).
WHAT TOOLS DO I NEED TO START MODDING KOTOR
Before everything: remember to always include a readme with your mods. Jackel made a good model where you only need to fill the blanks, right here (
http://www.lucasforums.com/showthread.php?s=&threadid=132089)....and) [Force Persuade] you can include a link to Holowan Labs in your readme [/Force Persuade].
3.1) Getting started
You will need Fred Tetra's KotOR tool (KT), the "unofficial toolset'. You will also need to install Microsoft .NET if you want to be able to run Kotor tool. Go to Fred's website to get KT and .Net (
http://kotortool.home.comcast.net/index.html). (For those who are still on dial-up: Microsoft .NET is a 10MB download. There are two solutions: either you upgrade your internet connection or you read a book while downloading it.)
It's amazing to see all what this utility can do and Fred continues to add new functionalities regularly.
You can extract your files with KT and edit most of them directly with this tool.
Oh and I'll repeat it another time: there is a useful readme that comes with KT ;)
T7nowhere made a very good introduction tutorial for Kotor Tool. Get T7's tutorial right here (
http://www.map-review.com/index.php?page=tutorial_view&id=28) (It's getting a bit old but it's still a good way to get started).
3.2) Retexturing, item making and modeling
3.2.1) practical info concerning models and textures
To access models : make sure that you check the box "build model BIF node in tree" in KT> tools >options . Then go to BIFs, models.bif.
Textures are located in ERFs -> Texture Packs. Texture Packs. The textures located in swpc_tex_gui.erf are best used for icons and portraits (for the party selection table) mostly and some other stuff as well.
The high - res textures are located in swpc_tex A
The med - res textures are located in swpc_tex B
The low - res textures are located in swpc_tex C
3.2.2) Retexturing
a -: You need a graphic editor that supports the .tga format (MS Paint does not support the tga extension).
- You can use Photoshop (
http://www.adobe.com/products/photoshop/main.html) or Paint shop pro (
http://www.jasc.com/products/paintshoppro/). Both have available trial versions. Some modders use other paint programs but these are the most commonly used but they are also $$$, especially Photoshop...
There is also a freeware program for retexturing: GIMP (
http://www.gimp.org/) ) that is pretty good.
How to install Gimp easily:
1.Download and install:
http://karolyrobert.hu/mofli/win-gimp/gtk+-2.4.3-setup.zip)
2. Download and install:
http://karolyrobert.hu/mofli/win-gimp/gimp-2.0.3-i586-setup.zip)
For Photoshop tutorials, see this web site (
http://www.trainingtools.com/)
b -: hex editor: you'll need one if you make new textures that are not simply replacing old ones. Get a good Hex editor here ($) (
http://www.bpsoft.com/) and another one here (
http://www.chmaas.handshake.de/)
You'll find more hex editors suggestions in this thread (
http://www.lucasforums.com/showthread.php?s=&threadid=134390).
c -: Gff editor if you want to edit .uti files (item files) to add your new items in the game (u can edit .uti files with KT but you need a .gff editor installed in the same folder to get it running also, sometimes you may need to edit your files directly with a .gff editor .) You'll find a tutorial on how to edit items with KotOR tool Here (
http://www.lucasforums.com/showthread.php?s=&threadid=132253) (most of it consists in selecting the properties from drop down menus) and with the GFF editor here (
http://www.lucasforums.com/showthread.php?s=&threadid=130491) (it's the "hard - old school way but you'll learn a lot doing it at least once.)
For more advanced users, you can get useful technical info concerning the GFF format here (
http://nwn.bioware.com/developers/).
Proposed GFF editors:
Here are 2 GFF editors you can use. I normally use Roboius or the custom made editor, depending on what i am doing. All three get the job done.
--> Roboius' Modified Bioware GFF Editor (
http://nwvault.ign.com/Files/other/data/1054162676171.shtml) already proposed by the Tools and mods sticky.
--> Bioware's GFF editor (
http://nwn.bioware.com/developers/gff_download.html) (if you register your Kotor game, you can access the NWN stuff as well)
You will find useful documentation concerning the GFF format, here (
http://nwn.bioware.com/developers/)
...and finally, for would be programmers, tk102 made an Activex component to help you make your own utility to manipulate GFF files here (
http://www.lucasforums.com/showthread.php?s=&threadid=138303).
- 3.2.3) Modeling
a - If you want to make new models you'll need cchargins MDLOps available here (
http://home.comcast.net/~cchargin/kotor/) and a 3d modeling program such as gmax (free] (
http://www.discreet.com/products/gmax/) or 3ds max (30-day trial) (
http://www4.discreet.com/3dsmax/3dsmax.php?id=403). Note that at this time there are still limitations on importing models into the game but cchargin is working on it: see this thread (
http://www.lucasforums.com/showthread.php?s=&threadid=140293) .
For modeling tutorials, check this amazing thread made by master svцsh:
http://lucasforums.com/showthread.php?s=&threadid=134510)
btw: don't PM me about modeling - I am a total n00b: best I could do was a set of blue balloons (which wasn't supposed to be a set of blue ballons :rolleyes: - I must admit that I didn't really put any effort)
b - You will also need the tools listed in the Retexturing section just above (Kotor tool, gff editor and hex editor).
3.3) Sounds:
You can play the sound files located in the Streamwaves and streammusic folders with the Miles sound system (
http://www.radgametools.com/default.htm)
If you want to be able to listen to the files with basically any normal application such as window media player, sound recorder, etc. You can decompress the files with Miles sound tools (
http://www.radgametools.com/default.htm) (same url as above) and then save in a new folder.
Screenshot (
http://img47.photobucket.com/albums/v144/Darth333/Miles.jpg)
Once decompressed with Miles sound tools, you can also edit sounds with the sound recorder or another sound file editing application such as Goldwave
http://www.goldwave.com) and implement them in the game.
You can play the sounds contained in the streamsounds folder with GoldWave. However, it opens the files at double speed so you have to go to effect/time warp and slow the speed to 50%.
There are also some sounds located in SWKotor/Data/sounds.bif: you can extract those sounds with Kotor tool.
3.4) Movies
Movie files are in bik format. To view them, get The RAD Video Tools (
http://www.radgametools.com/bnkdown.htm) (You need Bink and Smacker but both are included in the package).
If you wish to edit movies, you can download a free 30 day trial of a great movie program called Camtasia Studio 2 (
www.techsmith.com) This program has a feature to capture screens and convert to avi (Binkit converts avi to bik) start your game and anywhere (even cut-scences) you can capure the sequences you want. If you want to modify the audio get: Dubit also free and also from
www.techsmith.com).
3.5) Other mods: dialog editing, module editing, scripting
You always need Kotor tool and a GFF editor installed in the same folder as Kotor tool.
Proposed GFF editors:
(I know i already posted this above but some recent posts on the forum make me think that sometimes it's too complicated to read back 20 lines above...)
Here are 2 GFF editors you can use. I normally use Roboius or the custom made editor, depending on what i am doing. All three get the job done.
--> Roboius' Modified Bioware GFF Editor (
http://nwvault.ign.com/Files/other/data/1054162676171.shtml) already proposed by the Tools and mods sticky.
--> Bioware's GFF editor (
http://nwn.bioware.com/developers/gff_download.html) (if you register your Kotor game, you can access the NWN stuff as well)
With this tool you can edit .dlg .utc, .tup, .utw, .utt, .git, .are, .ifo files etc. if you want but KT and tk102's bunch of utilities may save you a lot of time...
You can get useful technical info concerning the GFF format here (
http://nwn.bioware.com/developers/).
...and finally, for would be programmers, tk102 made an Activex component to help you make your own utility to manipulate GFF files here (
http://www.lucasforums.com/showthread.php?s=&threadid=138303).
3.5.5) Dialog editing:
difference between the .tlk file and the dlg files
The tlk file contains all the text strings that the game will display in Kotor. You can modifiy existing strings in the tlk file with Nerwen's tlk editor (
http://nwvault.ign.com/Files/other/data/1026158289672.shtml) and with tk102's KotORTLK (
http://www.lucasforums.com/showthread.php?s=&threadid=140915) (my favorite as you can search the 50 K entries or so too). However, when you can avoid it, do not edit the .tlk file because: (1) there is only 1 tlk file and it would easily cause conflicts (2) the size of the file is 5 MB (3) it would change the language of the game for players having non English versions of the game.
If you want to edit dialogues, the .dlg files is where should go when you can (99% of the time). .dlg files contain all the branches of dialogues during the game. The original .dlg files can be used with any language version of the game as they refer to string numbers in the .tlk file. However, the changes you make depend on language but at least it does not change the entire game, the effects are "local", i.e limited to the modified branches of the dlg file. (the user wont see the text of a specific dlg if he has the game in another language - but the rest of the game will be functional - language parameters can be easiluy changed by the person who downloads the mod with a GFF editor).
Tools:
a - DLGEditor (GUI) (
http://www.pcgamemods.com/9499/), tk102’s latest creation and simply the best utility for editing dlg files and creating new dialogues: user friendly, a bunch of functions, etc.
b - Kotor tool now includes an excellent dialogue editor as well as many other functions. KT and DLGEditor are complementary. Both of them have some functions that the other doesn't have.
c - TK102's DLGedit (
http://www.pcgamemods.com/u/3450/) text based application also allows you to edit .dlg files and to test drive your custom dialogs (take time to check the readme: it's almost a complete tutorial in itself) - if you work with DLGEditor, get this tool as well to add a few additional functions.
d - KotorTLK: (
http://www.lucasforums.com/showthread.php?s=&threadid=140915) is a useful tool to search/modify entries in the .tlk file ( Also by TK102).
e - DLGSearch: (
http://www.pcgamemods.com/5277/) As TK102 wrote at pcgamemods, "DLGSearch is a command line utility that allows you to quickly search through all .dlg files in a game for any uses of a given dialog.tlk entry"
f - If you like painful solutions...you can always edit dlg files with a GFFeditor (believe it or not, this was the only available tool not long ago...ouch! - In fact all my mods have been made with this "thing" )
3.5.6) Scripting:
Release your source code please! (
http://lucasforums.com/showthread.php?s=&postid=1594878#post1594878)
Kotor tool now has an integrated script compiler! It is quite useful when you work on an extrensive project.
If you prefer or if you have just a few scripts to compile, I suggest HazardX script compiler. You need a script editor or if you don't have one, notepad will do the job (if you have windows, you have notepad):
a -To make your scripts, simply type your code in notepad and once you're done, save with a .nss extension
b - You'll need to compile your scripts with HazardX's script compiler/decompiler (
http://www.megamods.de/_data/parts/dl.php?file=37) (once compiled you'll get a .ncs file, which is the compiled script. This is what you need for your mod. The .nss file is for reference purpose only but release it with your mod so that other modders can learn how it's done)
On how to use the compiler and troubleshooting with the compiler, see this thread (
http://www.lucasforums.com/showthread.php?s=&threadid=143221).
Decompiling: If you place the script compiler in the same folder as Kotor tool, when you double click on the compiled scripts in the RIMs with Kotor tool, the .ncs files will be decompiled automatically. If you want to learn to understand decompiled scripts, refer to this site (
http://www.torlack.com/index.html?topics=nwndata_ncs).
Other useful tools for scripting:
- FindRefs (
http://www.lucasforums.com/showthread.php?s=&threadid=137588) is another of tk102's genious product: this utility will allow you to search for a script reference, a global variable, or an object Tag within the .rim files, templates.bif, and scripts.bif. It can also seach for tag fields in the .ut* files. Once your search completed, you can also extract the files to another folder to edit them.
- NCSRip: (
http://www.pcgamemods.com/5278/)as) the title indicates, this utility "will rip all .ncs (compiled script files) out of the *_s.rim files". This one is also by TK102 :) After this, you can decompile them all with HazardX script compiler/decompiler.
- Global variable comparison tool (
http://www.pcgamemods.com/5274/) by TK102: This utility allows you to compare the differences in Global Variables between two savegames. Quite useful if you want to add sidequests and stuff like that or simply check if some of your scripts that use global variables.
- Not really a tool but to test you scripts quickly, you can use my Party manager & spawning armband [/B][/url]: this armband has four main functions: Add/remove original party members , Recruit/remove your custom npcs, Spawn npcs/creatures objects and test your custom scripts (Read instructions before using).
For a practical trick to use the command prompt see this thread (
http://www.lucasforums.com/showthread.php?s=&postid=1555481)
3.5.7) Area editing, merchants, new npcs, etc. :
Kotor tool now includes an area editor but unfortunately, only a few maps have been completed. This means that you will need to use a GFFeditor unless you pick up one of the maps that have been completed for the KT editor.
You can edit most of the *.ut* (.uti, .utm. .utc., .utd, .utp, .utt) files directly with Kotor tool. Those that are not handled at this time (.utw and .uts) can be opened and edited with a GFF editor.
Note that Bioware sometimes uses the same tag for two different objects in two different modules. This can sometimes lead to funny and less funny events during gameplay. Use tk102's FindRefs (see above) to search for identical tags. At other times, Bioware used the same file name, per example bandon001.utc on the Endar Spire and bandon001.utc on Manaan but with different tags and contents: this is also problematic so use KT search function to make sure there are no clones.
You can find an area creation tutorial here (
http://www.lucasforums.com/showthread.php?s=&threadid=130451) The tutorial was made when we had very few modding tools and the dialogue section is really outdated now. It won't show you how to use the module editor in KOtor tool either as it did not existed at that time but you'll learn a lot about game mechanics.
- Camera editing (.git files)
CAMedit: (
http://www.pcgamemods.com/5276/) tool to edit cameras in the .git files. ( Also by TK102) In any case, if you edit a .git file you'll need it because the GFFeditor corrupt the cameras. Fixing the cameras takes less than 2 minutes to do.
3.6 ) Making mods compatible
KISS (Kotor Installer Script System) by TheO
KISS v0.9: this tool/mod installer was made for modders to help them make their KotOR mods compatible with other mods. Among other things it can append or edit 2da and GFF files. Download here (
http://forums.forgottenwars.net/index.php?showtopic=10421).
Note: mods installed with the KISS tool may modify the chitin.key and you may end up having to uninstall the game manually if you want to uninstall it and unable to download official patches.
3.7 ) other useful tools:
Here are some additional tools that I find quite useful:
- Modified NWN explorer (
http://nwvault.ign.com/Files/other/data/1055545441750.shtml) Allows you to view some game data, including .sav files.
- TK102's Kotor Savegame Editor (
http://www.lucasforums.com/showthread.php?s=&threadid=123671) ) Simply the Best: Change your party stats, name, feats and powers, appearance, inventory, sounds, global variables, etc. Very useful to test your mods. New! v. 2.1.1
- Easy warping armband (
http://www.pcgamemods.com/6831/) (by the author of this post): this armband will allow you to easily warp to any area while playing the game and without having to use cheats and look for the area cheat codes. Useful for testing your mods (Read instructions before using). I also made a Party manager and test your scripts armband (
http://www.pcgamemods.com/7386/) to allow you to quickly verify if your custom scripts work as expected. Nothing to see with the great tools above but I find it quite practical.
OTHER:
Don't be afraid to experiment with the above utilities and looking at other people's mods. You'll learn a lot doing this (However, if you want to release a mod that uses some of their work, even partially, ask the author for permission to do so).
Remember to check for updates of these utilities from time to time.
Now what to do with these tools is beyond the scope of this mini guide. Please refer to T7's stick Do you Want to mod SW-KotOR? Then Start here (
http://www.lucasforums.com/showthread.php?s=&threadid=124284)
Don't forget: there is also a useful search function on these forums… use it!!!
Any suggestions and comments are welcomed :)
If you find inaccuracies, pls report them and I will bring the proper corrections.