accessing merchant event

Post » Tue Jun 24, 2014 11:52 am

I am new to modding skyrim, but have had a few years experience working with UDK, UNITY, C++, C#, java, and python each plus work translating from one language to another, so I can figure out most of what is written if you wish to go higher level. my key question here actually has to do with accessing a few key things for my mod (when completed will be released to community + steam)

I have made some progress, but now there are documentation walls.

is there any specific way to access when the player opens a merchant interaction (actually buying and selling, but before any transaction actually takes place)? I want to say that the player is opening a special container, but am not sure (this comes from looking at tutorials on creating merchants, and the special container having all the stuff to buy, and sell)

is there any way to intercept the OnSell(), or to get what/when something was sold


is a FormList instance driven, or reference driven? (if I have a lockpick in a chest, and then put another lockpick into the chest are there now to instances of lockpick, or is there just 1, and if there is just 1 then where is the count stored) if the game doesn't use a FormList for inventory then why wouldn't they use their own data structure?

User avatar
I love YOu
 
Posts: 3505
Joined: Wed Aug 09, 2006 12:05 pm

Post » Tue Jun 24, 2014 12:59 am

Yes. It will require SKSE.

You can http://www.creationkit.com/RegisterForMenu_-_Form. This will send an http://www.creationkit.com/OnMenuOpen_-_Form event to your script when the barter menu is first opened. You can then use http://www.creationkit.com/Onitemadded/http://www.creationkit.com/OnItemRemoved_-_ObjectReference events to track what is sold or bought while the barter menu is open. The last question is tricky, sometimes things can have a unique instance, but in the vast majority of cases items are simply stored by count in containers (including the inventory) and do not have a unique instance.

User avatar
Elle H
 
Posts: 3407
Joined: Sun Aug 06, 2006 3:15 am


Return to V - Skyrim