Jump to content

Changing Merchant Inventory


berettastorm88

Recommended Posts

I'm currently working on a mod to change the available inventory of an existing merchant in game, specifically Knight Torres.

I'm looking to add a new container of goods into her vendor inventory after completion of either the quests "Eyesight to the blind" or "Tend to your business". At the moment I have made a second container that has new items to be sold and I'm looking to either add those items by setting the new containers ownership to Knight Torres or another option would be to swap her original vendor container to my new container that would include her old items along with the new ones I'm including.

 

Where I'm running into issue is how to set the ownership of that new container

The GECK wiki states that the syntax would be

RefID.SetOwnership Owner:FormID

I currently have

 

VendorContainerTorresREF2.SetOwnership Owner:TorresREF

(I have also swapped "TorresREF" with the FormID I found in the GECK with no luck either)

 

and it doesn't seem to be accepting the change in code as the GECK doesn't accept the script when I hit OK and am wondering what I might be messing up here

 

As for the alternate option, does anyone know who the code/script would be to completely change a merchants vendor container to a completely new one you have created?

Link to comment
Share on other sites

Usually when the syntax appears to be correct but it fails to compile (save), it's because you are using the wrong type of "Form-ID". Please see the "GECK Form-ID Base-ID Ref-ID and Editor-ID" section of the wiki "Getting started creating mods using GECK" article.

 

Are you checking anywhere that you have successfully assigned a valid value to your Ref variables? Maybe include some debug print statements?

 

(I will comment that "VendorContainerTorresREF2" implies it is a second ref to the same container, instead of your intent to refer to a second container. "VendorContainer2TorresREF" will make more sense to you when you have to revisit it in six months or a year. But up to you. It does not make the variable invalid.)

 

Also, please see 'TIP Adding Items to Actors aka Leveled Lists' in the "Scripting" section regarding adding to vendor Inventory.

 

-Dubious-

Link to comment
Share on other sites

Usually when the syntax appears to be correct but it fails to compile (save), it's because you are using the wrong type of "Form-ID". Please see the "GECK Form-ID Base-ID Ref-ID and Editor-ID" section of the wiki "Getting started creating mods using GECK" article.

 

Are you checking anywhere that you have successfully assigned a valid value to your Ref variables? Maybe include some debug print statements?

 

So I went back through and have changed the script to use the RefID of the container and the FormID of the actor Torres, or at least what appears to be, but it still doesn't seem to want to compile.

How do I know the IDs are the appropriate IDs? I'm using what the GECK has listed as the RefID and FormID. If not how would I manually assign the IDs?

Is there a chance the issue is coming from me trying to duplicate the original chest and changing the values for the name and Ref after?

 

On another note I have changed the "VendorContainerTorresREF2" to something more appropriate, thank you for mentioning that!

 

I'm also guessing there's no system at all for completely changing what trunk a vendor might use? For example at some point in a quest maybe a vendor stops selling chems and food and now only sells from a new separate trunk of weapons and armor.

Link to comment
Share on other sites

Did you set any debug prints of the ref variables to determine if they have valid references? Please see 'TIP Debugging data to file' under the "Scripting" of the wiki "Getting started creating mods using GECK" article. You need to use NVSE's "ToScript" function to print out References. (See 'Issue How to get GECK to load with NVSE'.)

 

"Form-ID" is the more generic term for "Base", "Ref", and "Editor" IDs. I believe what you want is the "Ref-ID" of Torres where she is placed in the BoS bunker (or possibly her "Base-ID", which is a "template" that may be used by multiple Actors; so be careful not to alter that. You may want to try setting the ownership of the container to that "shop" Interior Cell instead of to her directly.

 

Changing the "Editor-ID" of a copy of her original container makes a new one. Make sure it is marked as a "persistent reference". But you don't have a "Ref-ID" for it until you place your "new container" into a cell either in the Render window or by way of a script. Such are automatically assigned a Ref-ID by the GECK and you do not attempt to modify those Ref-IDs manually. Please re-read that section of the wiki (including the "Tips"). If you feel it does not make that clear, please let me know so it can be improved.

 

A vendor will use any container it (or it's interior cell/shop or Actor Inventory) owns collectively. But it will only sell things that are on it's vendor list. (That's how it prevents selling "display only" or "personal" items.) You can change what it sells by changing which vendor list it is using with a script. The container is merely a convenient place to keep items.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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