First off, I would suggest that you create a new folder for your mod to go in...
http://i1010.photobucket.com/albums/af221/ViridianBandit/folderscreenshot.jpg)
Then once you've got everything settled in the exact way you want it, then you open up kotor tool and then go to a merchant, similar to what you are creating (like if you're going to create a droid merchant). If you create a droid merchant, you might choose to go to the Taris droid merchant... Kotor I -> RIMS -> Modules -> tar_m02ab_s.rim -> Blueprint, Merchant -> droidshop.utm then go back to the side and then to Extract file and extract it to your folder.
http://i1010.photobucket.com/albums/af221/ViridianBandit/screenshotformakingamerchant.jpg)
http://i1010.photobucket.com/albums/af221/ViridianBandit/instructions.jpg)
Now that you've gotten the file saved in your folder, it's time to go back and rename it. Just right-click on the file and click rename. Rename it to something unique that suits you... you could name it xyz.utm for all it matters. For the intents and purposes of this mod, I renamed it janitorshop.utm (because I'm just going to attatch it to the Janitor in Taris). Now then open up GFF editor (I'll be using the Kotor Tool GFF editor, because in my opinion it looks a little more simplified).
ResRef:
Change the ResRef to the exact same thing that you changed your .UTM file to, only leave off the .utm extension. ie I named my .UTM file to "janitorshop.utm" I put the ResRef as "janitorshop"
http://i1010.photobucket.com/albums/af221/ViridianBandit/resrefchange.jpg)
LocName:
Set this to name of the store... normally it is the name of NPC who runs/owns the store... but you could set it to whatever...
http://i1010.photobucket.com/albums/af221/ViridianBandit/locnamechange.jpg)
Tag:
An identifier that scripts can use to gain access to your custom store... probably you should rename it to what you named your ResRef, unless you really don't want to or you have a reason to do otherwise...
http://i1010.photobucket.com/albums/af221/ViridianBandit/tagchange.jpg)
Buy/Sell Flag:
Obviously, this is what you can set to make it to where the merchant will only buy, only sell, or buy and sell. Just click the arrow and then change it to whichever one you want.
http://i1010.photobucket.com/albums/af221/ViridianBandit/buysell.jpg)
Mark Up:
This will set the store's price to sell their goods. 100 is the base price of the item... 125 is 25% more than the base price, 130 is 30% more than the base price and so forth and so forth.
http://i1010.photobucket.com/albums/af221/ViridianBandit/markupchange.jpg)
Mark Down:
Is the exact opposite of Mark Up, it sets the percentage at which the store will buy from you. Once again 100 is the base price, though normally it will be set to below 100, it's usually at about 40-60. 40 is 40% of the base price that they will use to buy from you... 50 is set to half of the base price and so forth and so forth.
http://i1010.photobucket.com/albums/af221/ViridianBandit/markdownchange.jpg)
OnOpenScript:
Just a ResRef to a script that will fire when the store is open... unless you want something a little different to happen, just leave it blank.
http://i1010.photobucket.com/albums/af221/ViridianBandit/OnOpenScript.jpg)
ID:
The ID is always set to 5 for stores... so don't change anything.
http://i1010.photobucket.com/albums/af221/ViridianBandit/ID.jpg)
INVENTORY:
Obviously this is what the store contains... you can add or destroy items within the store. To destroy an item from the inventory, just set the quantity to 0. To add them, click the + symbol on whatever type of thing you want to add and then drag one of the items over onto the grey inventory box. (As far as I can tell, you can't set any item as infinite in Kotor Tool, to do that, you'll need to download K-GFF by tk102 (
http://www.starwarsknights.com/mtools/kgff_131.zip) and you'll need to look at this thread (
http://www.lucasforums.com/showthread.php?t=147231).
http://i1010.photobucket.com/albums/af221/ViridianBandit/iventore.jpg)
http://i1010.photobucket.com/albums/af221/ViridianBandit/iventory.jpg)
Now then, resave your Merchant's store and over write the file, that you had it renamed as...
Now you've created the blueprint for your store. Place it in the override folder. In order to actually use this store in the game though, you'll need to do two things. First you need to create an object of your store in-game, then you'll need to create or add onto an NPCs conversation that will start the store.
This is done the easiest way through a script that you attach to the dialog node that will start your store. I believe a script like this would work:
// ST: st_startstore.nss
void main()
{
object oStore = GetObjectByTag("TAG_OF_STORE_HERE");
object oSpeaker = GetPCSpeaker();
if (!GetIsObjectValid(oStore))
oStore = CreateObject(OBJECT_TYPE_STORE, "RESREF_OF_STORE_HERE", GetLocation(OBJECT_SELF));
if (GetIsObjectValid(oStore))
DelayCommand(0.5, OpenStore(oStore, oSpeaker));
}
Edit the script and put the tag you specified above where it says "TAG_OF_STORE_HERE", and put the resref you specified above where it says "RESREF_OF_STORE_HERE".
Then name the script something unique, compile the script and put it in the override folder. In your Dialog file, where you want the store to start, put the name of this file in the field labeled "Script #1" if you are using the DLG Editor.