PDA

View Full Version : Item placement using Kotor Tool?


Luke Jivewalker
07-09-2004, 11:44 PM
Well I've finished my lightsaber pack, the only thing left to do is place them in the game. I was wondering if this could be done using KT. I couldn't really find anything in-depth on these forums regarding how to do this. I assume it is simple .utp editing, nothing more.

I need to place the following items in these locations.

1. Two Lightsabers in Naga Sadow's tomb.
2. 1 Lightsaber in Marka Ragos tomb.
3. Inside one of the shops on Korriban/Dreshdae have 1 lightsaber for sale.
4. Inside the shop on Yavin 4 space station have 3 lightsabers for sale.
5. Inside shop on Dantooine have 1 lightsaber for sale.
6. Inside Krayt Dragon Cave on Tattoine have 1 lightsaber to pick up.

Any help w/ this is much appreciated!

Achilles
07-10-2004, 12:55 AM
Originally posted by Luke Jivewalker
Well I've finished my lightsaber pack, the only thing left to do is place them in the game. I was wondering if this could be done using KT. I couldn't really find anything in-depth on these forums regarding how to do this. I assume it is simple .utp editing, nothing more.

I need to place the following items in these locations.

1. Two Lightsabers in Naga Sadow's tomb.
2. 1 Lightsaber in Marka Ragos tomb.
3. Inside the Korriban shop, make 1 lightsaber for sale at a price of 4000 credits.
4. At the shop in the station above Yavin 4, place 3 lightsabers for sale.
5. Inside the Krayt Dragon cave on Tattoine place 1 lightsaber.
6. On Terras right outside the players main hideout at the twilek's shop place 1 lightsaber for sale in his inventory.

Any help w/ this is much appreciated!

Do you only want to use KT or are you willing to use GFF Editor or scripts? I can show you how to do it using GFF Editor, but I'm not good with using the other two for placing items.

Luke Jivewalker
07-10-2004, 01:27 AM
GFF is fine

Luke Jivewalker
07-11-2004, 05:06 PM
I've changed up a few locations I'd like to place these in. This should be a little easier. So here's what I need some help on.

1. Placing 2 Lightsabers in Naga Sadow's tomb.
2. Placing 1 Lightsaber in Marka Ragnos' tomb.
3. Placing Sith Robe on Uthar's Remains.
4. Replacing default Qel-Droma robe with updated one, same place.
5. Placing 2 Lightsabers somewhere in Krayt Dragon cave on Tattoine.
6. Placing 2 Robes on the space station above Yavin in the inventory list.
7. Placing 5 Lightsabers on space station above Yavin in the inventory list.

Other info. These are all uti files that have been modified/renamed. For example the Qel-Droma robe has been renamed to ulicrobe.uti. Marka Ragnos lightsaber is named marka.uti. No other files to worry about, so it should make placing them a little easier.

Achilles
07-11-2004, 05:57 PM
I meant to get back to you sooner. My apologies for the delay.

Ok, I'm going to assume that you know how to edit uti, utc, utp, and utm files (items, characters, placables, and merchants respectively). If I'm assuming incorrectly, please let me know and I'll go back a few steps.

First thing that you need to know is that when you add items to existing files by this means, the .ut-whatever files must be unique. I've never tested this myself, but it's believed that if you edit a common placeable such as footlocker001.utp, then your item will appear in every instance of footlocker001.utp. You can usually tell if an .ut-whatever file is unique because it will reference the planet at the beginning of the file. For instance, the aforementioned footlocker001.utp can be found in many places throughout the game, however k35_uthar_ftlckr only appears in Master Uthar's room on Korriban.

Using KT, open RIMs>Modules. This is a listing of all the modules used in the game. "danm...." is Dantooine, "ebo...." is the Ebon Hawk, "end..." is the Endar Spire, and so on. If you would like help figuring what each of the modules represents, I would recommend finding a good PC game codes reference. This is the one that I use, however I know that there are others.

http://www.goldensun-syndicate.net/kotor/codeFAQ.txt

If you look toward the bottom of the page, you'll find a list of warp codes. These identify each of the modules, so you can easily determine that korr_m39aa is the module for Tomb of Naga Sadow.

Going back to KT, in the Modules section, find and expand korr_m39aa_s.rim. There are two files that start with korr_m39aa; the first has a bunch of data regarding the layout of the module, but the second has the files for everything that's in the module. This is the one that you want.

You should now see the blueprint files for that module. The files you're going to be interested in are the Character (if you want to place your item on a corpse), Placeable (if you want to put it in a locker, backpack, rubble pile, etc), and Merchant (self explanatory, however keep in mind that this will only appear in modules that have a merchant, like Yavin IV).

Still looking at korr_m39aa_s.rim, under Characters you can see that you have the opportunity to place your item on the corpses of Master Uthar and Yuthura Ban. Yuthura only dies if you play Dark Side, so if the mod is going to be available to everyone and you want to have to fight someone to get it, your only choice is going to be Uthar.

Extract Uthar's file (kor39_utharwynn.utc) to your save folder (or wherever you're working on your mod). Open the file using GFF Editor and add your item to Uthar's ItemList.

If you want to put your item on a placeable, you'll see that you have a few options there as well. k39_plc_monument is Naga Sadow's Monument, k39_sabersarc is the Sith Statue where you find the Sith Lightsaber, and kor39_large1, kor39_medium1, and kor39_sithcorpse are all other placeables that you can use in Naga Sadow's Tomb. You can extract any of these, add your item to their inventory, and save to your Override folder. If everything works, then next time you enter that area for the first time, you item should be there.

I hope that helps!

PS: As I stated earlier, you can also use scripts to place your items, however the method that I've outline requires no programming skills =)

Luke Jivewalker
07-11-2004, 07:21 PM
Thanks for the help. For some reason I still can't get any of my items in the game...I have no idea what I'm doing wrong. None of my items will show up in merchants inventory or on a corpse...I know I'm editing the X & Y positions correctly too. Any chance I could send you my uti files and you could take a look at them?

Achilles
07-11-2004, 07:46 PM
Originally posted by Luke Jivewalker
Thanks for the help. For some reason I still can't get any of my items in the game...I have no idea what I'm doing wrong. None of my items will show up in merchants inventory or on a corpse...I know I'm editing the X & Y positions correctly too. Any chance I could send you my uti files and you could take a look at them?

Sure. I'll PM you with my email address.

RedHawke
07-12-2004, 12:53 AM
Originally posted by Luke Jivewalker
Thanks for the help. For some reason I still can't get any of my items in the game...I have no idea what I'm doing wrong. None of my items will show up in merchants inventory or on a corpse...I know I'm editing the X & Y positions correctly too. Any chance I could send you my uti files and you could take a look at them?

Luke, be sure when testing things to have a save BEFORE you have been to that area of the game as your changes only take effect the FIRST TIME an area loads.

Example: The first time you enter the Shyrak Caves on Korriban is when all the files for the cave load to your save game, so when changing things there you need to have a save for testing that has NOT been in the cave yet.

I hope this helps! :D

Luke Jivewalker
07-12-2004, 01:39 AM
Yeah I've been doing that actually.

Well here's what I'm trying to and tell me if this is wrong.

I have a lightsaber file called exar.uti. its taken from the g_w_dblsbr001.uti file originally. I made all the mods to the saber using KT.

So if a person was the open the uti file w/ kt, on under the 'general' Tab, there is a line that reads "template resref" and then you type in the name of file, in this case exar. It originally read g_w_dblsbr001". under template resref there is another line that reads "tag", again you type the filename there, exar.

I want to add this to the merchant on Yavin 4. There are 3 utm files for this characters shop. I've edited all 3 of them to have my item "exar" listed.

I've got a save game before you even speak to the Merchant, so when you do talk to him its for the 1st time. Everytime my item never appears in his shop.

The first utm file I edited "suvam01a.utm" has 6 iventory items already listed. If I add my lightsaber to it, it would be the 7th item. So what I do is create a new node (using GFF). I usually copy an existing node and then edit out the current item and type "exar". I also change the x, y stuff. The 6th node would contain a 6 in either the x or y portion. So my lightsaber being the 7th, I would put in a 7. I save the file. Load up kotor. But everytime, nothing.

Achilles
07-12-2004, 01:46 AM
Originally posted by Luke Jivewalker
I want to add this to the merchant on Yavin 4. There are 3 utm files for this characters shop. I've edited all 3 of them to have my item "exar" listed.

I've got a save game before you even speak to the Merchant, so when you do talk to him its for the 1st time. Everytime my item never appears in his shop.

The first utm file I edited "suvam01a.utm" has 6 iventory items already listed. If I add my lightsaber to it, it would be the 7th item. So what I do is create a new node (using GFF). I usually copy an existing node and then edit out the current item and type "exar". I also change the x, y stuff. The 6th node would contain a 6 in either the x or y portion. So my lightsaber being the 7th, I would put in a 7. I save the file. Load up kotor. But everytime, nothing.

I just replied to your email regarding this. Make sure you're entering exar.uti.

Achilles
07-12-2004, 01:47 AM
Originally posted by Achillies
I just replied to your email regarding this. Make sure you're entering exar.uti.

On second thought that might not be it at all. As I said in the email, having the whole mod may help matters.

Thanks.

RedHawke
07-12-2004, 01:54 AM
Originally posted by Luke Jivewalker
Yeah I've been doing that actually.

I've got a save game before you even speak to the Merchant, so when you do talk to him its for the 1st time. Everytime my item never appears in his shop.

You have to have the save BEFORE you even go to the station, with Suvam his stuff all loads upon landing on the station, and exiting the Ebon Hawk that first time, not speaking to him. This is most likely your problem.

And with items the tag, template resref, and the .uti name should all exactly match.
If you can get your item by giveitem cheats then it is working, and should show up when you get Suvam's inventory to load.

Luke Jivewalker
07-12-2004, 02:20 AM
I've even tried starting a new game and warping to the yavin 4 station, but the saber still doesn't appear...I've given the files to Achilles to see if he can figure it out.

valakii
07-14-2004, 02:46 PM
I started modding kotor a few days ago, made some custom items, and I habe the same problem when I trie to place any new item in a chest or a merchant. PLEASE HELP ME! Achillies as I read you tried to solve the problem. Oculd you please tell me if you've got a solution? That would be great.

Achilles
07-14-2004, 02:54 PM
Originally posted by valakii
I started modding kotor a few days ago, made some custom items, and I habe the same problem when I trie to place any new item in a chest or a merchant. PLEASE HELP ME! Achillies as I read you tried to solve the problem. Oculd you please tell me if you've got a solution? That would be great.

It appears as though you have to replace items when modding a merchant inventory rather than simply add them (at least that's been the case for me). As far as the other issues that Mr. Jivewalker has described, I am unable to replicate them, so I am not sure how much more I can offer this topic. Perhaps someone with a better understanding can jump in here.

Good luck!

Darth333
07-14-2004, 03:01 PM
Are you able to get your items in the game using the 'giveitem' cheat?

Document concerning the item format: http://nwn.bioware.com/developers/Bioware_Aurora_Item_Format.pdf

Document concerning the merchant (store) format: http://nwn.bioware.com/developers/Bioware_Aurora_Store_Format.pdf

Mono_Giganto
07-14-2004, 03:24 PM
I edited a .utp for the Hrakert station, the original file was footlker002.utp (2156), do I put the (2156 on there after the .utp when I save?

StormTrooper789
07-14-2004, 04:02 PM
No, Mono, the (2156) is its size measured in bytes just put the name. (e.g: footlker002.utp )

Mono_Giganto
07-14-2004, 04:09 PM
LoL I justr came back to say I figured it out, but thanks all the same. Heh, my item is ingame oh yeah!

RedHawke
07-14-2004, 09:08 PM
^^^^^
Hey Mono be careful adding items to the Footlocker, Metal Box, Large Locker, and Backpack .utp Placeable Files Directly.

You should use module specific placeables, like corpses, sarcophagi, etc., to place your items in the game, something the game will not call up again in other modules during play.

Your footlocker002.utp in override will be called any time there is a footlocker002.utp called by any module in the game, possibly messing with quest items, etc. Or more likely, it happened to me, all the other footlocker002.utp placeables in the game won't show up.

The only way I found to correct that problem is to make a script attached to a nearby dialogue to add items to the containers directly.

I hope this helps! :D

valakii
07-15-2004, 06:47 AM
@ Darth333:
Are you able to get your items in the game using the 'giveitem' cheat?

I AM. Everything works fine when I cheat the items, but the utp/utm files don't work! Is there anybody out there who knows how to handle this? I just want to place some of my selfmade jedi robes in a store, but it just doesn't work. I downloaded some mods with utp/utm files, and they didn't work, too! I go crazy about that!

RedHawke
07-15-2004, 06:56 AM
Originally posted by valakii
@ Darth333:

I AM. Everything works fine when I cheat the items, but the utp/utm files don't work! Is there anybody out there who knows how to handle this? I just want to place some of my selfmade jedi robes in a store, but it just doesn't work. I downloaded some mods with utp/utm files, and they didn't work, too! I go crazy about that!

Are you sure valakii that the area you are adding the items to hasn't loaded in the save game you are using? I.E. you haven't been to that area in the game yet.

All files load for that area the first time you enter the area, so if you alter a merchants invantory you will not see changes unless you arrive at the area for the first time.

I hope this helps! :D

Jackel
07-15-2004, 07:37 AM
Originally posted by Achillies
It appears as though you have to replace items when modding a merchant inventory rather than simply add them (at least that's been the case for me).

Ive been able to add items to the sellers list easy enough and not replace anything. I just add it to the bottom of the list renaming the node to one after the last one there (mostly around 50ish) then changing the X and Y positions to correspond to that number change.

valakii
07-15-2004, 11:48 AM
I MADE IT! IT WORKS! Unbelievable! It just didn't work with the merchant I tried. But now I tried it with suvam on yavin, et voila! But I've got another question: Can anybody tell me how to set a custom texture for my selfmade lightsaber? I already changed the model to the one of Malaks lightsaber, but there's still the Malak texture on it.

Darth333
07-15-2004, 11:53 AM
Originally posted by Mono_Giganto
I edited a .utp for the Hrakert station, the original file was footlker002.utp (2156), do I put the (2156 on there after the .utp when I save?

footlker002.utp is far from being a unique file Mono! When you drop ths file in the override folder, it will overwrite every footlker002.utp in the game and you'll have the same content everywhere. You should try using a script again ;) or find another place with a unique name to drop your items.

Mono_Giganto
07-15-2004, 12:19 PM
LoL, even with your help I can't figure out scripting, although reading another post, you helped someone else out okay... :mad: :D But yeah, I put it onto a module unique space. I wanted to put it on an equipment pack in the module, I'm assuming that would overwrite others in the game too?

Darth333
07-15-2004, 12:36 PM
Originally posted by Mono_Giganto
LoL, even with your help I can't figure out scripting, although reading another post, you helped someone else out okay... :mad: :D
What is it that you can't figure out in the script i sent you?


I wanted to put it on an equipment pack in the module, I'm assuming that would overwrite others in the game too? If the name of the .utp is not unique, then yes, it will overwrite all the files with the same name in the game.

Mono_Giganto
07-15-2004, 01:19 PM
All of the stuff with attaching it to a dialog confuses me beyond belief, I have almost no idea what you mean; it's just too complex for my little mind. Another post you made recently told someone to just copy it into worpad, save as an nss, then compile it. (Different script I guess?) And now I'm really confused... I'm trying not to bug you with so many questions without at least looking for a way to get them ingame that I can do, and because of that I looked around, and found utp files!

Now to actually ANSWER your question... I don't understand what to do with it. :D Your PM kinda left me in the dust, sorry.:toilet1:

Achilles
07-15-2004, 01:48 PM
Originally posted by Mono_Giganto
All of the stuff with attaching it to a dialog confuses me beyond belief, I have almost no idea what you mean; it's just too complex for my little mind. Another post you made recently told someone to just copy it into worpad, save as an nss, then compile it. (Different script I guess?) And now I'm really confused... I'm trying not to bug you with so many questions without at least looking for a way to get them ingame that I can do, and because of that I looked around, and found utp files!

Now to actually ANSWER your question... I don't understand what to do with it. :D Your PM kinda left me in the dust, sorry.:toilet1:

I was pretty intimidated too, until I saw how it actually worked. When all's said and done it's pretty simple (relative to the complexity of what you're trying to do, of course).

It's essentially a two step process:

1) a script does something (spawns a character, item, etc)
2) something triggers the script to run (area transition, dialog, etc).

First you need the script (add there are tons of scripts available on this board which you can find using the Search function). Most of the time you just need to read the post to figure out which word or two needs to be changed to make your script work.

Then you need to go into a dialog file (assuming that you use a dialog to trigger your script), find an entry or reply that you think will be suitable for your trigger, and then add the script to that line of dialog.

I use tk102's dlgedit program and GFF editor. For instance, I recently created a pretty simple mod (that I thought was going to be really hard when I started it), where you can recruit a new player.

I had to create two new dialogs, which was pretty easy to do thanks to dlgedit and Doom Dealer's walkthrough. Then I created three scripts: one that spawned my character, one that added him to my party, and one that made him disappear so that I didn't have twins =).

I attached the first script to dialog from that area (in this case the conversation with the Sand People Cheiftain). I attached the second script to the dialog that I created for my new NPC, setting it to fire when he agreed to join my party. Finally I attached the last script to the last entry in the dialog that he disappeared after I tell him to go to the ship and wait for me.

Best bet is to read at least part (if not all) of Doom Dealer's walkthrough, going step by step through each of the processes that he outlines. I hope that helps.

Darth333
07-15-2004, 01:55 PM
Originally posted by Mono_Giganto
[B]All of the stuff with attaching it to a dialog confuses me beyond belief
Attaching script to dialog: (1) Entirely read the readme from made by tk102 on how dlg edit works (it's easier when you open dlg edit and follow at the same time). Read Doom Dealer's tutorial for more info, as well as my last post in this thread: http://www.lucasforums.com/showthread.php?s=&threadid=131689 (not about scripting but general info on dlg files(2) Find a dialog file in the module. (3) Fire the dialog with dlg edit. Select an entry in the EntryList or ReplyList (preferably something you can't bypass when you play the game) (4) select the scrit field and attach the script by typing the name of your .nss file in the script field. See screenshot:
screenshot (http://img47.photobucket.com/albums/v144/Darth333/dlgedit.jpg)
In this case, the original script was named 'svoshrobes.nss' but you don' type the extension.
For examples with source code available, download tk102's darkside choker and svösh's Revan Redemtion Robes (item created on the pc instead of a footlocker but it's the same principle). Open the files and look at how it's done.

it's just too complex for my little mind.
That is not true ;) Scripting has nothing to do with black magic.

Another post you made recently told someone to just copy it into worpad, save as an nss, then compile it.
This is exactly what you have to do (you still have to attach the script somewhere - in this case, a dialog) . Just put the tag of your footlocker in the script (i think i indicated to you where to insert the tag). To get the tag, open the .utp file wiht gff and look at the tag field.
For instructions on how to use the compiloer, read the Scripting section in the guide for the Newbie and follow the links. Once compiled, you should have a new my_script_name.ncs file in your override folder. This is the compiled script.

drop everything into the override folder and test.

jedi_5002
07-15-2004, 09:50 PM
Originally posted by valakii
I MADE IT! IT WORKS! Unbelievable! It just didn't work with the merchant I tried. But now I tried it with suvam on yavin, et voila! But I've got another question: Can anybody tell me how to set a custom texture for my selfmade lightsaber? I already changed the model to the one of Malaks lightsaber, but there's still the Malak texture on it.

You need to hex edit the .mdl file. You can get a free hex editor called XVI32 here (http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm). You need to search the file for the texture used (in your case w_lsabrered01), then replace it with the texture you want to show up in the game. There are several instances of the name, and they all need to be replaced.

RedHawke
07-15-2004, 10:37 PM
Originally posted by jedi_5002
You need to hex edit the .mdl file. You can get a free hex editor called XVI32 here (http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm). You need to search the file for the texture used (in your case w_lsabrered01), then replace it with the texture you want to show up in the game. There are several instances of the name, and they all need to be replaced.

Jedi_5002 is right, except Malaks saber model uses the w_ShortSbr_001 texture, for its handle, the w_lsabrered01 is the blade color texture.

I hope this helps! :D