Jump to content

Adding items to existing merchants / getting AddForm() from the LeveledItem script to work


mattrk

Recommended Posts

Hello All,

 

I have been trying to add 3 items to all blacksmith merchant inventories and I cannot get it to work.

 

AddForm() appears to be the best approach.

 

I have looked at the Creation Kit reference and looked at previous posts. I suspect I am overlooking something really obvious... if I have had a major oversight I apologise.

 

The code I am using (attached to a new quest, set to "Start Game Enabled" and "Run Once") is as follows:

 

 

  Reveal hidden contents

 

 

I have tried the commented-out variant.

 

Any suggestions?

 

Thanks & regards,

--QC

Link to comment
Share on other sites

If you add the items to the leveled list(s) as you are doing, then the items will only show up when the player is at the appropriate levels. Also, any changes made will not be noticeable until the merchant's inventory resets (48 in-game hours by default).

 

So ensure your test character is of the correct level and wait at least 2 days somewhere and see if it takes affect.

Link to comment
Share on other sites

Hello IsharaMeradin,

 

If I understand correctly, I have set the items to be added at level 1. I also wait 48 hours before talking to the merchants. It is very puzzling...

 

If I instruct the item to be added at level 1, and my test character is level 6, will it still add the item? That is the only thing I can think of at the moment.

 

Still, thank you very much for the response.

 

I'll try a MWE mod from scratch I think.

 

Regards, --QC

Edited by quixoticynic
Link to comment
Share on other sites

Do you have any other mods that affect this list?

 

If one mod adds to the list and for some reason reverts the list, your added items will be wiped off the list and not restored. Might be worth testing without any other mods installed (if you are not already).

 

Beyond that, I'm just as stumped as you.

 

Unless...

Ensure that the leveled list you are using is used by the merchant you are testing with. Cause if the merchant isn't using that list, that would explain why it is not working.

Link to comment
Share on other sites

Thank you both for your replies.

 

  Quote

 

Add the item to the leveled list manually and then merge your leveled lists with a bash patch.

 

I have now read up on Bashed patches. As I understand it, each user would have to make their own patch, dependent on the mods they have installed, which would clearly be a problem. Perhaps I am misunderstanding?

 

  Quote

 

Do you have any other mods that affect this list?

 

None of the other mods loaded affected the list. To check (just in case) I made a minimum example esp (attached) and tried using just that esp. Sadly, it did not work.

 

  Quote

 

Beyond that, I'm just as stumped as you.

 

Nice to know I'm not completely crazy having problems with this.

 

  Quote

 

Unless...

Ensure that the leveled list you are using is used by the merchant you are testing with. Cause if the merchant isn't using that list, that would explain why it is not working.

 

The leveled list I am using is LItemBlacksmithMinimum which is contained within MerchantWhiterunWarmaidensBlacksmithChest.

 

I am testing by looking at the inventory of Adrianne Avenicci and her husband after 48 hours.

 

The strangest thing is, I have managed to convert a non-merchant NPC into a merchant and get them to sell items before without problems.

 

I'm very puzzled. ^_^

 

Thanks & regards,

--QC

Edited by quixoticynic
Link to comment
Share on other sites

OK. I worked this out. I'll mention it in case it is useful for someone else.

 

Clearly the merchants will only purchase certain item types from you (unless you have your speechcraft up enough and have the Merchant perk).

 

What I did not realise is that they will only sell certain item types also.

 

For the blacksmiths, this is determined by the list VendorItemsBlacksmith that contains keywords. Each item that the blacksmiths sell has one of these keywords...

 

It turns out that blacksmith hammers, e.t.c. do not have one of these keywords and hence, even though they will be in the vendor's chest, the vendor will not sell them.

 

I added VendorItemTool to the appropriate items and it works now. :)

 

A case with an obvious solution, but I was looking in the wrong place.

 

Thanks to those who tried to help,

Regards,

--QC

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...