PDA

View Full Version : Editing Items Using KotOR Tool - Tutorial


Achilles
07-22-2004, 02:05 AM
Editing Items Using KotOR Tool

Forward: Thanks to the efforts of Fred Tetra, it is now easier than ever to create custom items. Projects that used to require a working knowledge of GFF editing can now be accomplished using drop down menus. Truly an amazing feat! However, just like the teacher that wouldn’t let you use a calculator in math class for fear that you wouldn’t actually learn how to do math, having this tool will not automatically make modding easy for you. You will still need to have a working knowledge of how the files interact with each other and with the game. If you have not done so before, I recommend making at least one item “the hard way” to help strengthen your knowledge of item editing. Detailed walkthroughs on how do this can be found here:

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

You should feel free to forego this, however it may require a little bit more experimentation with the drop-down menus to figure out what everything means.


Step 1: Locate the file that you want to edit.

Almost every item that is used in the game can be found in the Template file. To get to the game Templates, open KT, and then expand BIFs>templates.bif>Blueprint, Item.

I would highly recommend using a file reference to help decipher item labels. The resource that I use can be found at http://www.goldensun-syndicate.net/kotor/codeFAQ.txt


Step 2: Open the file

Double click on the file that you would like to edit. For example, to open the file for the blue Lightsaber, double click on g_w_lghtsbr01. The native UTI Editor should open.


Step 3: Edit the properties


3.a - The UTI Editor window has four tabs. The first tab contains general information about the item. A short description of each field follows:


TemplateResRef – the template reference for the item that you are modding. The game uses this field, along with Tag to determine what your item is. Creating a unique item (i.e. a custom armor with skin, enhancements, etc) will require that changes are made to both TemplateResRef and Tag. Such a project requires model file editing and is outside the scope of this tutorial. A brief description of how to do this can be found in the X link in the Foreword.

Tag – see TemplateResRef.

Baseitem – The item type that the item is based on. Pretty self-explanatory.

Cost – how many credits your item will cost in-game

Additional Cost - ? (I rarely modify item cost as part of a mod)

Palette ID - ?

Plot Item – Some items in the game are considered Plot Items. In other words, your interactions with the item are critical to the story. For instance, recovering the Sith Lightsaber from Sith Statue in the tomb of Naga Sadow causes Uthar and Yuthura to spawn when you return to the acid pool. Failure to recover this plot item keeps the story from moving on.

Stolen - ?

Charges – Refers to multiple use items such as forearm shields.

Stack Size - ?

Model Variation – This tells the game what your item looks like. In the case of this example Model Variation 1 represents the blue Lightsaber. 2 represents red, 3 is green and so on. Hence, why the code for the blue Lightsaber is g_w_lghtsbr01 and the code for the red Lightsaber is g_w_lghtsbr02, et cetera.

*Note: Items such as armor, robes, and clothing will utilize Body Variation and Texture Variation to achieve the same effect. You will have to experiment (and use the aforementioned file reference) to become familiar with this type of item modding.



3.b - The next tab (Properties), contains the actual properties assigned to the item. When clicking on this tab for a Lightsaber, you’ll see all of the existing upgrade properties that are already coded into the item. Again, the fields that you see here will be difficult to comprehend unless you are familiar with GFF editing. You can either use the second link above to get a crash course in item editing or you can experiment with this tool until it starts to make sense.

To create a new property, scroll to the bottom of the property list and double click on the row with the asterisk (*) in it. The Item Property Window should now appear with the following areas:

Property Name – hopefully this is pretty self explanatory. Please note that many of the items in this drop-down are not used in this game (example: Light, Mighty, Special Walk, etc.). Unfortunately, there is no easy way to explain what each of these properties do. Experiment and learn =)

Subtype – some properties require the use of a subtype. For instance, the Property “Damage Bonus” will require that you specify what type of damage is being enhanced. Examples include Energy, Fire, Acid, Ion, etc.

Value – Some property edits will require that you specify the magnitude of the enhancement/penalty. Using the previous example, you will need to specify how much of a damage bonus to apply (+1, 1d3, etc).

% Chance of Appearance – Basically, how likely is your mod to appear. I can’t imagine why anyone would change this to something other than 100.

Param1 – You are only going to need this sometimes. Odd are that if the drop down becomes available, you will be able to figure out what you need to do with it by expanding it =)

Param2 - ? (I imagine this will be the same case as Param1).

Upgrade (required to activate) – Select this only if you want your mod to appear when an upgrade is added to your item. I would not recommend trying to add an armor upgrade type to a weapon or vice versa. I haven’t tried it myself, but I imagine that it wouldn’t work anyways.

When you are finished with a property edit, click the Add button. Repeat the process to your heart’s content.


3.c – The Description tab will be used to help edit the item name, add a unique history to the item, or what have you.

Name – self-explanatory

Unidentified Description – an area for you to add your own description to the item. This will appear in the inventory screen when your item is selected.

*Note: Do not try to format this area, as carriage returns (aka “using the Enter key”) will appear as little white boxes in-game. This will not harm your mod, but can be quite an annoyance =)

Identified - ? (I think this causes the games default description to override your own)

Identified Description – the game’s default description for that item.


3.d– The Comments tab is self-explanatory. Use this area for notes to yourself or others who might be modding this file. (p.s. I’ve never used this).



Step 4: Save the file

Save the file with a unique name. Saving this file with its original name (g_w_lghtsbr01) will cause the game to over write ever other instance of that file within the game (assuming that your file is in the Override folder). This means that if you save your mod as g_w_lghtsbr01 and place it in your Override folder, then every blue Lightsaber in the game will have additional properties that you created.

Please note that the name you assign to your file will also be the cheat code that you will use to get the item in-game. For instance, if you name the file “my_saber.uti”, then you will use “giveitem my_saber” to get the Lightsaber in-game.


Step 5: Place the file in your Override folder

The Override folder can be found in C:\Program Files\LucasArts\SWKotOR or whichever directory you originally installed the game in.


Step 6: Use the mod

Start up a game, enter the console, and use the giveitem command to get your mod. Enjoy!

Mav
07-22-2004, 04:30 AM
you must really like making these tutorials achillies, but nice work I'll give it a full read-through later on and check things;), hopefully this will cut back requests a little bit.

Achilles
07-22-2004, 04:42 AM
Originally posted by maverick187
you must really like making these tutorials achillies, but nice work I'll give it a full read-through later on and check things;), hopefully this will cut back requests a little bit.

I like helping people. I know how intimidated I was when I started and I'd like to make things easier for the newer members of the board if I can.

Rogue9dlb
08-08-2004, 01:53 AM
Stupid qestion:
How do I edit an item file already in my Overrides file?

Darth333
08-08-2004, 01:57 AM
Originally posted by Rogue9dlb
Stupid qestion:
How do I edit an item file already in my Overrides file?
Use a GFFeditor - look at the Guide for the Newbie in the stickies to get the link for download - it will look different but the fields will have the same name.

Jackel
08-08-2004, 02:32 AM
Originally posted by Achillies
Stolen - ?
Left over from NWN i believe
Originally posted by Achillies
Stack Size - ?
Hot many in the stack. Again left over from NWN. Ie how many are put in to your inventory when you take it off a bad guy. In NWN (and other Bio games) you could buy stacks of arrows and you recieved 20 arrows in a stack. Also meant when you have a stack of 20 any more you pick up will be put in a new stack.

Pretty much ignorable. Items already have a 1 in the stack size anyway so leave it as it is.

Darth333 :You can edit items in your override with KOTOR tool if they havent got any things different to the baseitems , ie they are not baseitems 96 seeing that causes a crash. ;)

Darth333
08-08-2004, 02:39 AM
Originally posted by Jackel

Darth333 :You can edit items in your override with KOTOR tool if they havent got any things different to the baseitems , ie they are not baseitems 96 seeing that causes a crash. ;)

Thanks! good to know: i never used that feature, i do almost everything with gff.

And about the leftovers from nwn, they are all over the place. Here is a sample of what i found i nwscript.nss:

int POLYMORPH_TYPE_TROLL
int POLYMORPH_TYPE_UMBER_HULK
int POLYMORPH_TYPE_PIXIE
int POLYMORPH_TYPE_ZOMBIE

:D :D :D

RedHawke
08-08-2004, 02:46 AM
^^^^
It's not just new baseitem.2da lines but new appearance.2da lines as well... Any custom discuise property and KOTOR Tool's Item Editor also has issues with them. Just an F.Y.I.

I also do most of my stuff with a GFF Editor! :D

Achilles
08-08-2004, 04:42 AM
Originally posted by RedHawke
I also do most of my stuff with a GFF Editor! :D

I'm a huge fan of GFF editor also, however I'm finding that using KT for something and GFF editior for others is really beneficial.

Hey Moderator Darth333, what are the chances of getting this thread added to the modding sticky? I didn't want to ask, but I hate seeing my attempt to help get buried :)

nacho35
08-08-2004, 05:18 AM
Nice tutorial Achillies. I have been using any/all tutorials I can find lately.

Jackel
08-08-2004, 05:58 AM
Originally posted by RedHawke
^^^^
It's not just new baseitem.2da lines but new appearance.2da lines as well... Any custom discuise property and KOTOR Tool's Item Editor also has issues with them. Just an F.Y.I.

I also do most of my stuff with a GFF Editor! :D
I have done most of my stuff up till my last item (Xanetia Armour) in GFF editor , though it must admit having 5 2da files open and havig to look each one up to find out what i wanted was a pain in the butt! Freds KT is far easier , and can make new items in a few mins, if you know what you want the bonuses to be of course.

x8c4
08-08-2004, 06:14 AM
Hello to you, Achillies

You've made a nice tutorial

I will follow your advise 'not to reinvent the wheel'

Achilles
08-08-2004, 07:00 AM
Originally posted by x8c4
Hello to you, Achillies

You've made a nice tutorial

I will follow your advise 'not to reinvent the wheel'

Glad I was able to help you avoid some work. Your message reminded me that I had been working on a website a while ago. I spent some time working on it tonight and got some of my stuff on it. Check it out for some of my tutorials and other stuff.

http://www.freewebs.com/achilles01/

Darth Dex
08-08-2004, 07:05 AM
YOU ROCK!

Jackel
08-08-2004, 08:04 AM
Originally posted by Darth333
Thanks! good to know: i never used that feature, i do almost everything with gff.

And about the leftovers from nwn, they are all over the place. Here is a sample of what i found i nwscript.nss:

int POLYMORPH_TYPE_TROLL
int POLYMORPH_TYPE_UMBER_HULK
int POLYMORPH_TYPE_PIXIE
int POLYMORPH_TYPE_ZOMBIE

:D :D :D

There is tonnes of NWN stuff left over , im amazed they didnt just load up the 2da files and delete everything then start putting in the KOTOR ones fresh to make sure there wasnt a pile of crap all over the place.

Darth333
08-08-2004, 10:24 AM
Originally posted by Achillies
Hey Moderator Darth333, what are the chances of getting this thread added to the modding sticky? I didn't want to ask, but I hate seeing my attempt to help get buried :)
I've PMd T7 to give him the link to this thread and to your website so he can add them to his sticky " Do you want to mod sw-kotor" :)

Achilles
08-08-2004, 12:41 PM
Originally posted by Darth333
I've PMd T7 to give him the link to this thread and to your website so he can add them to his sticky " Do you want to mod sw-kotor" :)

You're the best. Thanks!

Rogue9dlb
08-08-2004, 05:21 PM
Thanks for the help. I found the editor in KT (looks a bit easier to use), but I couldn't edit items (gave me an error when I tried to save it), but GFFeditor worked.

Achilles
08-08-2004, 05:36 PM
Originally posted by Rogue9dlb
Thanks for the help. I found the editor in KT (looks a bit easier to use), but I couldn't edit items (gave me an error when I tried to save it), but GFFeditor worked.

Wonder what caused the error. Glad to hear that you were able to get there using GFF Editor. Let me know if there's anything else I can do to help.

Nobody999
08-11-2004, 04:21 PM
Okay, I have everything needed to use kotor tool *except* microsoftnet framework. Lets just say my downloading abilities are crippled and it's a bit bigger than I have any chance of getting, but I thought of something...
Is there a zipped version of the microsoft net framework anywhere, or can someone who has it zip it and e-mail it to me? Perhaps I could download it if it were smaller, due to zipping.

Achilles
08-11-2004, 08:13 PM
Originally posted by Nobody999
Okay, I have everything needed to use kotor tool *except* microsoftnet framework. Lets just say my downloading abilities are crippled and it's a bit bigger than I have any chance of getting, but I thought of something...
Is there a zipped version of the microsoft net framework anywhere, or can someone who has it zip it and e-mail it to me? Perhaps I could download it if it were smaller, due to zipping.

I can give it a try tonight when I get home, but if the exe is already compressed, you might not get a whole lot out of zipping it.

Shermed'Out
08-15-2004, 11:14 PM
Originally posted by Achillies
Editing Items Using KotOR Tool
Stack Size - ?

Stack size means how many you have of the item, like if you have 1 or 5 of the same item (since all identical items stack in Kotor)
;)

Darth333
08-16-2004, 12:18 AM
Originally posted by Shermed'Out
Stack size means how many you have of the item, like if you have 1 or 5 of the same item (since all identical items stack in Kotor)
;)
In any event, refer to this document :) http://nwn.bioware.com/developers/Bioware_Aurora_Item_Format.doc

whitguy
10-27-2004, 11:38 AM
Hi i like your hole walkthough thing but i want to be able to put one of the items i saved in a footlocker on korraban or something i mean i know how to place stuff in the game but i cant put my costum stuff in the game because when i go to inventory to put it in a footlocker or something and go to costum items nothing there please help me.

whitguy
10-27-2004, 11:41 AM
i dont know how to cheat can you help

Lorden Darkblade
10-27-2004, 11:46 AM
Very nice tutorial Achilles.
:cool: :cool:

Darth333
10-27-2004, 12:03 PM
Originally posted by whitguy
i dont know how to cheat can you help
It's all explained in this thread: http://www.lucasforums.com/showthread.php?s=&threadid=119128

but i cant put my costum stuff in the game because when i go to inventory to put it in a footlocker or something and go to costum items nothing there please help me
As for your items not appearing in the game, it is very likely a problem with the .utc file: make sure the TemplateResRef field is the same as your file name (without the .uti extension). Per example, if your file name is my_item.uti, then tye my_item in the TemplateResRef field.

Also make sure that the name is not too long ( somepeople have reported having problems with long file names but I haven't verified this - I know there is a problem in .2da files with this however)

Other thing, avoid using capital letters in those fields: they can only be a source of mistakes and it doesn't change anything since what you type in those fields does not appear in the game...

Fred Tetra
10-27-2004, 09:04 PM
Originally posted by Darth333

.
.
.

Other thing, avoid using capital letters in those fields: they can only be a source of mistakes and it doesn't change anything since what you type in those fields does not appear in the game... [/B]

If you think it'd be useful, I can set any text entry field to automatically have lower case characters regardless of what the user types. If you have a list of fields and the editors they appear on, let me know.

Darth333
10-27-2004, 09:34 PM
Originally posted by Fred Tetra
If you think it'd be useful, I can set any text entry field to automatically have lower case characters regardless of what the user types. If you have a list of fields and the editors they appear on, let me know.
If you could do that for the TemplateResRef field it could prevent some beginners mistakes but I don't think it's a good idea for the tag field since a lot of original files use capital letters in this field. In some particular cases it can be useful to be able to place caps in the tag field and unless the person uses scripts, it doesn't really matter what's in this field.

Fred Tetra
10-28-2004, 05:57 AM
I'll look into putting that feature in the next release of Kotor Tool. It'll be an easy change.

CTOAN
02-06-2005, 10:37 AM
Ummm...

N00b question. Don't jump on me, please!

I can get into KOTOR tool, extract the files I need, but when I go to edit the properties tab and double click on the line I want, I can't change anything; all I end up doing is selecting one of the words in the box or putting in a cursor. I've tried the drop down menus and typing, but it won't accept anything. Any help would be greatly appreciated!

:x-wing:

Achilles
02-06-2005, 11:02 AM
Originally posted by CTOAN
Ummm...

N00b question. Don't jump on me, please!

I can get into KOTOR tool, extract the files I need, but when I go to edit the properties tab and double click on the line I want, I can't change anything; all I end up doing is selecting one of the words in the box or putting in a cursor. I've tried the drop down menus and typing, but it won't accept anything. Any help would be greatly appreciated!

:x-wing: What are you trying to do?

CTOAN
02-06-2005, 11:56 AM
Edit an item's properties.

I opened KOTOR Tool, extracted the file, opened the extracted file with it, clicked on the 'properties' tab, and double clicked on a property line, like the 'Armor Requirement: Heavy' Line. That's where I'm stuck.

:x-wing:

Achilles
02-06-2005, 12:03 PM
Originally posted by CTOAN
Edit an item's properties.

I opened KOTOR Tool, extracted the file, opened the extracted file with it, clicked on the 'properties' tab, and double clicked on a property line, like the 'Armor Requirement: Heavy' Line. That's where I'm stuck.

:x-wing: Yeah, I think I got that. :rolleyes: What I was trying to find out is whether you were trying to add a new property or modify an existing one. When you double click on the line, make sure that you do so in the far left column (the one with the arrow or the asterik).

CTOAN
02-06-2005, 06:48 PM
Modify an existing one.

Thanks for the help; will try that soon.

:x-wing:

CTOAN
02-07-2005, 08:07 AM
:headbump:

:wstupid:

Thanks for all the help guys; I can't believe I missed something that incredibly obvious.

:newbie:

Achilles
02-07-2005, 08:17 AM
Originally posted by CTOAN
Thanks for all the help guys; I can't believe I missed something that incredibly obvious. I'm glad you were able to get there. So...when can we expect the onslaught of mods to begin? :D

CTOAN
02-07-2005, 08:20 AM
Well, doing a recruitable NPC is beyond me right now, but as soon as I'm satisfied with my first few baby steps, I'll put them up on PCGameMods.

Thanks Again!!!!!

:x-wing:

Fred Tetra
02-07-2005, 11:11 AM
Originally posted by Achilles
Yeah, I think I got that. :rolleyes: What I was trying to find out is whether you were trying to add a new property or modify an existing one. When you double click on the line, make sure that you do so in the far left column (the one with the arrow or the asterik).

Note to self: Add tooltip to grid reminding users to double-click on row header.

This behavior is the same as implemented in some commercial software that I developed, and it is documented, but I forgot to mention it in the Kotor Tool doco.

Edit: Added feature; watch for it in the next version.

Achilles
02-22-2005, 04:19 PM
I guess the obvious questions are, "why are you doing that?" and "why are you posting this here?".

Module editing is very different from item creation. Which are you trying to do?

SReedy85
05-20-2006, 07:33 PM
I can't seem to use my edited item in the game i followed all the steps on the above tutorial ?? the code seems like it works when i type the giveitem but it doesn't show up

EnderWiggin
05-20-2006, 09:08 PM
Check in your inventory. Do you get a grenade with no description? This is refered to as a null nade and usually for me means there is a problem with filenames.
1. Is the item's file in your override folder?
2. Did you change both the Tag and the item's Resref?
3. Did you try to make a new item, or change an existing one?
4. Did you save the file like the Resref and Tag?

_EW_

SReedy85
05-31-2006, 01:04 PM
problem solved

Iluwen
08-30-2009, 06:46 PM
I am trying to overwrite original game items, rather than add custom items, but having no success.

I used KT, added the properties I wanted (I added Damage Reduction, Damage Resistance, or both, to all the armor and robes in the game) and saved each .uti file with the original tag, so that it would overwrite the standard version.

I placed all of the files in the override folder. However, in-game, all items have only their unedited properties. Any idea what I might be doing wrong?

ForeverNight
08-30-2009, 07:07 PM
Start a new game and see what happens. If the item is in your inventory at the save and you simply load the save then there's going to be no changes. I can't remember why, but that's the way it is.

So, start a new game and try out whatever you were trying and report back.

Achilles
08-31-2009, 12:25 AM
Or use KSE to remove the old items/ add the new ones.

Per ForeverNight's post, the game won't override .utis you already have. So you'll have to either do it "manually" or start a new game.

RedHawke
08-31-2009, 08:01 AM
I can't remember why, but that's the way it is.
When you load pick up an item it loads into your save game... like when you enter an area for the first time it sets everything in your save game.

So any item changes you have to spawn/get a new copy of the item, you can even keep the old one if you wish, or just dump it in a convenient placeable somewhere or sell it. ;)

ForeverNight
08-31-2009, 08:07 AM
Ah, thank you RedHawke, knew it was something like that but couldn't remember.

Kayal
10-07-2009, 06:37 AM
Hi there,

I have one maybe simple question:

I tried to modify some items. Works perfectly but name and description of the items are not displayed in game. Can someone tell me why?

Is it because I play the german version?

Canderis
10-07-2009, 07:34 AM
That could be one reason, what field did you put it in?

JawaOverlord
10-12-2010, 12:09 PM
I need help I use to play this and use kotor tool on my xp but I have windows 7 and I can save the edited mod fine but it doesn't show in game like I type in giveitem g_w_blstrcrbn229 and it doesn't give me my weapon...

Leandro36
02-08-2011, 07:22 PM
Okay this is ticking me off, I just started this today though okay hears what I do, Double click on a property I want to edit, (It`s on the left side), This one is Blaster Bolt deflection it`s on +5 and I try to add it to +30 (why? Because im using shems enhace mod and this saber is beyond weak) And nothing happens! Help me please

Leandro36
02-08-2011, 07:30 PM
Nevermind new problem IT WONT SAVE

Qui-Gon Glenn
02-09-2011, 09:15 PM
^^ What OS?

KotOR Tool does not work well, if at all, in Windows 7 IIUC.

If you are on an XP machine, try this - uninstall KotOR Tool and then re-install it. Takes about 5 minutes if you properly restart your machine after uninstalling, then take the time to run cCleaner or at least Disk Cleanup, restart again, install KTool.

If that fails, you will need to take some screenshots to better "describe" your issues. KotOR Tool is quite reliable despite its age - but it likes to play best in old OS.

Darth Orailius
08-04-2011, 10:48 PM
I've been having a tidbit of trouble getting my item once its been edited and saved to the override folder. when i try to use the cheat "giveitem blablabla" it just doesent show up. i've checked spelling and what not. i still cant seem to bring it in. help would be wonderful. Btw fantastic tutorial, im just a half wit.

Darth Orailius
08-04-2011, 10:49 PM
Nevermind new problem IT WONT SAVE

move your override folder to your desktop, save it there then move it back to the SwKotOR folder where it originally was.:thmbup1:

Darth Orailius
08-04-2011, 10:54 PM
how did you fix it?