Restocking Vendors via Quest

Post » Sat Nov 17, 2012 11:17 am

I'm currently using a QuestAlias to give some vendors my new ingredients to sell... works like a charm.

However, they never seem to restock - when you buy the items, they are gone forever. What do I need to do to get them to restock these items?
User avatar
Sophie Morrell
 
Posts: 3364
Joined: Sat Aug 12, 2006 11:13 am

Post » Sat Nov 17, 2012 3:03 pm

You need to add your items to the merchant's "levelled list" (which is part of the FACTION process - so look in the faction you put the merchant in to find the existing list) ...

... Or you can make your OWN LIST (including vanilla items in it), and add that to the Faction ... which from a compatibility view is a much better idea

(and, if these are vanilla merchants ... then you probably got compatibility issues anyway ... Which may mean you need to restock by script ... Have an OnUpdate on a merchant, or something similar?)
User avatar
Samantha Mitchell
 
Posts: 3459
Joined: Mon Nov 13, 2006 8:33 pm

Post » Sat Nov 17, 2012 10:43 pm

These are indeed Vanilla merchants, so this needs to happen as cleanly as possible, therefore directly modifying actors, lists or factions is out of the question. The whole purpose of the Quest Alias approach is to avoid incompatibilities with vanilla merchants/factions.

I'm good with a scripted approach - just update the vendor every few days - but again, its a matter of how to do this cleanly, and what to actually call the update event on. The quest this happens from is set to fire once - is there a way to cause the quest to reset and start over, say, every three days?
User avatar
Tom
 
Posts: 3463
Joined: Sun Aug 05, 2007 7:39 pm

Post » Sat Nov 17, 2012 12:16 pm

Why not use http://www.creationkit.com/AddForm_-_LeveledItem? Added forms stick since 1.6 and, in your mod's absence, the LVLIs will purge the added forms automatically.
User avatar
Tamika Jett
 
Posts: 3301
Joined: Wed Jun 06, 2007 3:44 am

Post » Sat Nov 17, 2012 6:43 pm

I wasn't aware that they fixed that! I'll look into it, thanks.

While we are on the subject...

The wiki lists some of the new commands (but you have to dig) but I'd never have known that addform was fixed unless you mentioned it: is there a list of all the 1.6 ***CK*** changes anywhere? It would be really helpful to know what we can do now. But all the sites I've seen just have the usual end-user garbage: "we made the graphics better!" "we fixed a bug!" "mounted combat"! What changes for US, the mod community?
User avatar
Baylea Isaacs
 
Posts: 3436
Joined: Mon Dec 25, 2006 11:58 am

Post » Sat Nov 17, 2012 5:13 pm

These are indeed Vanilla merchants, so this needs to happen as cleanly as possible, therefore directly modifying actors, lists or factions is out of the question. The whole purpose of the Quest Alias approach is to avoid incompatibilities with vanilla merchants/factions.

I'm good with a scripted approach - just update the vendor every few days - but again, its a matter of how to do this cleanly, and what to actually call the update event on. The quest this happens from is set to fire once - is there a way to cause the quest to reset and start over, say, every three days?

Use a script that is registered to update every 72 hours game time (or however long you want to wait). When that time elapses, Stop-Start the quest.

Just keep in mind that when you do this, all of the scripts you attach to that quest will be reset. The advantage is that using this approach will fire a fresh OnInit Event to your quest, so you can reset things from there, but any non-Global variables in your scripts you may have changed over the course of the mod's operation will be lost.

And if you are using Aliases to provide the items, anything that is added via the Inventory window is stuck with them permanently, no amount of quest resets or container respawns will dislodge the items you gave them (since the intention was to hand out Quest Items through that window, this was done that way to prevent the item from vanishing and breaking the quest). You'll need to manually remove whatever you gave them before restocking them if you are going about things that way.
User avatar
Jade Payton
 
Posts: 3417
Joined: Mon Sep 11, 2006 1:01 pm

Post » Sat Nov 17, 2012 8:31 am

I wasn't aware that they fixed that! I'll look into it, thanks.

While we are on the subject...

The wiki lists some of the new commands (but you have to dig) but I'd never have known that addform was fixed unless you mentioned it: is there a list of all the 1.6 ***CK*** changes anywhere?
NP :)

Well, I know AddForm now sticks in saves, and that several new functions/events were introduced with v1.6. Jeff Lundin made a http://www.creationkit.com/Special:Contributions/JLundin to the Wiki for 'em.
User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am

Post » Sat Nov 17, 2012 3:46 pm

is there a list of all the 1.6 ***CK*** changes anywhere? It would be really helpful to know what we can do now. But all the sites I've seen just have the usual end-user garbage: "we made the graphics better!" "we fixed a bug!" "mounted combat"! What changes for US, the mod community?
Sadly, as far as I know, there is no definitive CK Bug/Fixes post ... You'd think there would be ... Even if it was just a blog entry, or even better a set of pages on the wiki.

You can check through the Steam-News-Game Updates log ... but those rely on the developer to update and often (see Skyrim ;)) little detail is included




I also didn't know AddForm had been "fixed", so thanks for the heads-up, Justin :)
User avatar
Big mike
 
Posts: 3423
Joined: Fri Sep 21, 2007 6:38 pm


Return to V - Skyrim