lfnetwork.com mark read register faq members calendar

Thread: Shopkeepers are Expendable
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-29-2012, 01:17 AM   #1
RogueSplinterCell
Rookie
 
RogueSplinterCell's Avatar
 
Join Date: Jul 2012
Location: WA
Posts: 93
Current Game: Skate 3, Ultimate Tenkaichi
Shopkeepers are Expendable

Starting up a new game in KotOR i thought "I sure wish i could just slaughter this clueless shopkeeper and take all his goods." Well i want to have that made possible so first things first...

Where should i start? I havent the slightest clue where to find the shopkeepers files at, i would like to start trying to modify the first shop owner in the abandoned apartment on Taris.

Anyone know where those files are? I obviously need to add the items somehow where his Kiosk is set up at to what is originally in his inventory and to make it to where he fights you if you decide to take his supplies by force.

I would appreciate any assistance from you guys at Holowan Labs = )


RogueSplinterCell is offline   you may: quote & reply,
Old 08-29-2012, 03:28 AM   #2
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
I don't believe stores have an inventory in the traditional sense, so there would be no way to move their items from one place to another. You could open the store with a script that tells it to give you a 100% discount, but then you would still be able to sell items to any merchant that usually sells items, and then buy them back for free.


JCarter426 is offline   you may: quote & reply,
Old 08-29-2012, 04:13 AM   #3
RogueSplinterCell
Rookie
 
RogueSplinterCell's Avatar
 
Join Date: Jul 2012
Location: WA
Posts: 93
Current Game: Skate 3, Ultimate Tenkaichi
Think theres a way to remove the character that sells items after you kill them and add the items that they had in a "loot bag" where the body was?


RogueSplinterCell is offline   you may: quote & reply,
Old 08-29-2012, 04:21 AM   #4
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
No, because it isn't the character that had the items in the first place.


JCarter426 is offline   you may: quote & reply,
Old 08-29-2012, 04:52 AM   #5
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 557
You'll manually have to add the entire stock to the characters inventory for this to work...
Hassat Hunter is offline   you may: quote & reply,
Old 08-29-2012, 06:37 AM   #6
Canderis
Mercenary
 
Canderis's Avatar
 
Join Date: Jun 2008
Location: Unknown
Posts: 2,509
Current Game: Skyrim
Veteran Modder Helpful! 
And what you already bought would be duplicated
Canderis is offline   you may: quote & reply,
Old 08-29-2012, 08:03 AM   #7
Nick Vader
Junior Member
 
Nick Vader's Avatar
 
Join Date: Apr 2009
Location: Right behind you !
Posts: 301
Current Game: Dead Rising 2
As stated above, you could insert a dialog option that would make it look like you killed the shopkeeper, then a dialog option appears allowing you to loot the shopkeepers bbody. There you could attach a script that would either give you the items, or open up the shop with no cost for any items. In that script, however you will also have tto actually kill the NPC, or just make him vanish.


Nick Vader is offline   you may: quote & reply,
Old 08-29-2012, 06:16 PM   #8
CptPriceless
Junior Member
 
CptPriceless's Avatar
 
Join Date: Jun 2011
Location: California
Posts: 351
Current Game: TSL
The script would be tedious; if you want to make it even more realistic, not only would you have to script in all the original items manually, but you'd also have to script:

If PLAYER bought ___, then ___ will not appear in loot. Obviously that's no code, but you get the idea.

Even so, I really like this concept.


CptPriceless is offline   you may: quote & reply,
Old 08-29-2012, 06:29 PM   #9
RogueSplinterCell
Rookie
 
RogueSplinterCell's Avatar
 
Join Date: Jul 2012
Location: WA
Posts: 93
Current Game: Skate 3, Ultimate Tenkaichi
Hmm... Yeah i can do tedious work because i got nothing else better to do with my time. As soon as i find a starting point im on it. Thanks for the information, i see that the shopkeeper doesnt have an actual inventory but like Hassat Hunter said im willing to manually insert all the items, but the problem i expected to encounter is what CptPriceless said. If you purchase an item then it shouldnt appear in the bag thats left from the body.


RogueSplinterCell is offline   you may: quote & reply,
Old 08-29-2012, 07:29 PM   #10
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
I guess you could set the on death script of the merchants to run this:

Code:
void main()
{

object oPC = GetFirstPC();
OpenStore(object oStore, oPC, 0, 100);

}
You'd have to find the merchant's UTM file (their store file) and put it in for object oStore but this would basically make it, I think, so that once the player killed the merchant the store would pop up and everything would be free.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 08-29-2012, 08:51 PM   #11
RogueSplinterCell
Rookie
 
RogueSplinterCell's Avatar
 
Join Date: Jul 2012
Location: WA
Posts: 93
Current Game: Skate 3, Ultimate Tenkaichi
Thanks, where would someone find the store files? I cant look in KotOR Tool right now cause my Desktop is being used at the moment and my laptop is riddled with problems.


RogueSplinterCell is offline   you may: quote & reply,
Old 08-29-2012, 09:21 PM   #12
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
As I said though, the sell function should still be there. I'm not entirely sure how the bonus markup or markdown affects selling, but I believe you would be able to buy back any items you sell for free, which would lead to abuse. Not to mention it makes no sense to get cash for selling to a dead guy. I guess it's worth a try though.

But if you attach the script to the NPC's OnDeath, you'd only be able to access it once. Yeah, you could take everything at once, but some NPCs have an infinite supply of certain items, so it would be better to keep the store open, so to speak. So I would suggest spawning an invisible placeable that triggers the store, somewhere that would make sense like over their kiosk or on a shelf.

The store files are UTM files, found in the _s.rim of each module.


JCarter426 is offline   you may: quote & reply,
Old 08-29-2012, 09:58 PM   #13
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
JC, couldn't you use the clone inventory script that you created, to clone whatever merchant's inventory you wanted over to a new, blank, generic UTM file that would have the OnlySells flag set to true?


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 08-29-2012, 10:36 PM   #14
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
That's a nice thought, but I've been unable to get the game to recognize an item from a UTM's inventory. That probably would be the best option in order to account for infinite items, but the games refuse to do it. I can get them to recognize the UTM, but not anything it might have. For the record I wasn't using the same functions, though. I used GetItemInSlot for cloning, but UTMs don't have inventory slots (or at least I don't think they do) so I tried GetFirstItemInInventory and GetNextItemInInventory, both of which worked for the PC's inventory but not for a UTM's. Maybe GetItemPossessedBy would work, but I didn't try that as it requires you input the item tag. I guess I could give it a try later. EDIT: Didn't work, probably limited to creatures, though the other two say they support stores in NWScript. I can, however, confirm that
Code:
DelayCommand(0.1, OpenStore(oStore, GetFirstPC(), -100, 0));
does work, but you can indeed sell items for their regular price and then buy them back for free.

I feel like there must be something more to this, though. K2 doesn't have static merchant inventories, which would imply there's a way to script items into the UTM. One would expect the reverse to be true, but I never expect the expected when it comes to these games.

I suppose you could change every merchant to "only sells" and then have a merchant on every planet you can sell to that's unkillable.



Last edited by JCarter426; 08-30-2012 at 12:15 AM.
JCarter426 is offline   you may: quote & reply,
Old 08-30-2012, 12:54 AM   #15
RogueSplinterCell
Rookie
 
RogueSplinterCell's Avatar
 
Join Date: Jul 2012
Location: WA
Posts: 93
Current Game: Skate 3, Ultimate Tenkaichi
So what your saying is that you wouldn't be able to sell items to the merchants that you can kill to prevent abuse? I thought that after you killed them the interactions with the merchants would cease to exist.


RogueSplinterCell is offline   you may: quote & reply,
Old 08-30-2012, 01:26 AM   #16
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
It doesn't matter if the character is dead or alive, because the stores are their own objects, not dependent on any specific character. Because of this, it's possible to use two different merchants to open the same store - I did this a while back to let you access Samhan's secret stash after he's been arrested, by talking to his brother Dendis - or to access it via a placeable or anything else that is capable of firing a script. With the OpenStore function you can reduce the buy price of all items down to zero, but it does not seem to support reducing the sell price at all.

The details are a bit complex, but the short answer is if there were a way to do what you say, to move items from a store to a placeable, then you would also be able to move them from a store to another store and, as Fallen Guardian suggested, set the new one to "only sells". The advantage is you would have access to an infinite supply of whatever items of which the store had an infinite supply. But they are both hindered by one problem - I can't figure out how to grab an item from a store's inventory inside a script.


JCarter426 is offline   you may: quote & reply,
Old 08-30-2012, 10:01 PM   #17
RogueSplinterCell
Rookie
 
RogueSplinterCell's Avatar
 
Join Date: Jul 2012
Location: WA
Posts: 93
Current Game: Skate 3, Ultimate Tenkaichi
Oh okay i think i got it now, i dont suppose its possible to remove or negate a script and replace it with your own. Uh an example here:

Say you wanted the infinite items that are in a script replaced with yours that makes the infinite items into a set number like 1. And leave a few shopkeepers unmodified so that some of their infinite items are still purchasable throughout the game. Is that a possibility?


RogueSplinterCell is offline   you may: quote & reply,
Old 08-31-2012, 01:17 AM   #18
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
I'm not sure if I follow. You can edit the merchant files to remove infinite items, yes, but that doesn't resolve any problems here.


JCarter426 is offline   you may: quote & reply,
Post a new thread. Add a reply to this 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 > Shopkeepers are Expendable

Tags
holowan laboratories, kill merchants, roguesplintercell, sae

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 08:22 PM.

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