Thread: [KotOR 1 WIP] Shopkeepers are Expendable
View Single Post
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,635
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,