Changing an NPC into a Merchant

Post » Wed Jan 05, 2011 1:55 am

I have a situation where I want an NPC to become a Merchant after a certain point in the quest. The approaches I've tried so far all have flaws.

1) Create the NPC as a merchant from the start, but don't have any AI packages with "offers services" apply until quest stage is reached. The problem with this is that the ability to invest in the shop is always present, which reveals things too soon.
2) Create the NPC as non-merchant and use OBSE's SetOffersXxx functions when the quest stage is reached. This leaves the NPC not offering any services, as it appears the functions don't set a merchant status, just change the range of items offered.
3) Create two separate NPC's - one merchant and one not - and swap them at the quest stage. The problem with this is making it happen seamlessly, without one obviously disappearing and the other appearing. I'd have to wait until the player leaves the cell, and do it then, but that interrupts the flow of the story.

Are there any other options I've missed? Or any ways to fix the ones I've tried? The stage is set via a dialog, so if the NPC swap can be done invisibly at the close of the dialog, I'd like to know how it's done.
User avatar
Mark Churchman
 
Posts: 3363
Joined: Sun Aug 05, 2007 5:58 am

Post » Wed Jan 05, 2011 12:56 am

Is there a point at which the swap out could be made while not near the player somewhere earlier in the questline that would at least keep the invest option out of the picture until that later point ?
User avatar
Alisha Clarke
 
Posts: 3461
Joined: Tue Jan 16, 2007 2:53 am

Post » Wed Jan 05, 2011 6:07 am

How about class hot-swapping, assuming that's what defines an NPC to be a merchant ?
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Wed Jan 05, 2011 8:37 am

How about class hot-swapping, assuming that's what defines an NPC to be a merchant ?

Yes, I could define a merchantified? vendorized? class that matches the NPC's existing class with the addition of the services I need, and nothing else should change. Thanks!
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm


Return to IV - Oblivion