lfnetwork.com mark read register faq members calendar

Thread: Creating Merchants (with Kotor Tool)
Thread Tools Display Modes
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Prev Previous Post   Next Post Next
Old 07-14-2010, 03:48 AM   #1
Canaan Sadow
Junior Member
 
Canaan Sadow's Avatar
 
Join Date: Jul 2010
Location: Endor
Posts: 366
Current Game: Pokemon & K2
Creating Merchants (with Kotor Tool)

First off, I would suggest that you create a new folder for your mod to go in...

Show spoiler


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.

Show spoiler


Show spoiler


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"

Show spoiler


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...

Show spoiler


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...

Show spoiler


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.

Show spoiler


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.

Show spoiler


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.

Show spoiler


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.

Show spoiler


ID:
The ID is always set to 5 for stores... so don't change anything.

Show spoiler


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 and you'll need to look at this thread.

Show spoiler


Show spoiler


Now then, resave your Merchant's store and over write the file, that you had it renamed as...


Quote:
Originally Posted by stoffe
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:

Code:
// 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.

Last edited by Canaan Sadow; 04-18-2011 at 04:31 AM. Reason: noticed a few things that didn't go along with the sceenshots, fixing that :P
Canaan Sadow is offline   you may: quote & reply,
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Creating Merchants (with Kotor Tool)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:57 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.