Jump to content

HELP! How to add a leveled list to a leveled list via script.


Recommended Posts

I am attempting to add some new inventory to an existing vendor. It is a leveled list so that the player level affects the merchandise which is available. As a proof of concept I created the leveled list and stuck it into the vendors container. It worked wonderfully.

 

Now, I want to add the leveled list to the vendor via Script. But I cannot figure out how to add a leveled list to a leveled list or to a container. I really need some help with the scripting. I already learned that it is not possible to AddForm to a container, So I am stuck with adding my leveled list to another list.

 

Here is the script I have:

 

ScriptName bleu_questscript_Vendor_PA_Additions extends Quest

;
;
;
Event OnQuestInit()
debug.notification("Got into the quest bit.")
LL_Vendor_Components_Diamond_CommonwealthWeaponry.AddForm(bleu_VL_Vendor_PowerArmor, 1, 1)
debug.notification("Got through AddForm.")
bleu_quest_Vendor_Power_Armor_Additions.Stop()
debug.notification("Stopped Quest.")
EndEvent
LeveledItem Property LL_Vendor_Components_Diamond_CommonwealthWeaponry auto
LeveledItem Property LL_Vendor_Components_Goodneighbor_KillorBeKilled auto
LeveledItem Property bleu_VL_Vendor_PowerArmor auto
Quest Property bleu_quest_Vendor_Power_Armor_Additions auto

 

I know the script is executing, I get the debug messages. And there are not runtime errors in the script log. But nothing shows up in the vendors inventory after 11 days and 21 hours game time.

Edited by PoorlyAged
Link to comment
Share on other sites

For adding leveled items to a container use AddItem. It will spawn a required number of items in your container.

 

Adding leveled lists to another leveled list by AddForm seems to work fine for me. Have not tested it in a long run but this changes stay after restarting the game. Not sure if it makes any difference when adding a list to an existing leveled list that is already added to some container.

What problem do you get? What exactly is not working?

 

If your quest is " start game enabled" adding some pause (utility.wait(5)) in OnQuestInit can help. Some things might be not loaded yet when you are trying to run your functions.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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