PoorlyAged Posted March 5, 2017 Share Posted March 5, 2017 (edited) 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 autoLeveledItem Property LL_Vendor_Components_Goodneighbor_KillorBeKilled autoLeveledItem Property bleu_VL_Vendor_PowerArmor autoQuest 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 March 6, 2017 by PoorlyAged Link to comment Share on other sites More sharing options...
kitcat81 Posted March 6, 2017 Share Posted March 6, 2017 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 More sharing options...
Recommended Posts