Jump to content

Permanently add object to merchant chest via script?


TangerineDog

Recommended Posts

I'd like to make the availability of different mage robes (Novice, Apprentice, Adept etc) depend on the corresponding skill level instead of the overall character level.

 

I've found this skill level tracker so that's how I can find out when the intervals of 25, 50 and 75 are reached. So far so good.

 

Bu tif I was to use the tracker to add the leveled items to the merchant chests of any merchant I want to sell the robes, they'd be in there 'til the thing resets. I don't want that, I want them to be available permanently from there on.

 

How could I go about that?

Link to comment
Share on other sites

Place an xMarker next to each merchant chest.

Place a script on the xMarker.

Have it run the OnCellAttach and / or OnCellLoad events (both might be useful).

Use it to check the contents of the merchant chest.

If the robes are not present, add the correct one based upon skill level.

You can even use the OnInit event to add the robes the first time but one of the other two events would possibly do it then too.

 

In theory, should work. Technically, won't be "permanent" but will make sure that robes are present.

 

Another option would be to assign an empty form list to the merchant chests via the Creation Kit. By being directly on the chest, whatever is in that list should be spawned. Then as the player progresses in skill, use the tracker to determine what robe should be in the chest and add it to the formlist. As long as you have at least one script (like a quest) actively in memory with the modifications to the empty list, the container will pick up on those changes with each reset (otherwise it sees an empty list and displays nothing).

The formlist can be reset (i.e. emptied) and new items added as needed.

 

This too in theory, should work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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