Goenitzthewind Posted December 11, 2017 Share Posted December 11, 2017 Hi everyone!I need your help for a script, which has been driving me insane since a week ago. I am trying to add an item to a vendor chest (Ronthil, vampire castle) after the end of the last Dawnguard quest, but without any success. Scriptname DLC1VQ08RoyalArmor extends Quest Hidden Event OnInit() If (DLC1VQ08.GetStageDone(200)) Debug.MessageBox("Mission Complete") RoyalArmorBlack.AddForm(DLC1ClothesVampireRoyalArmorBlack, 1,1) BlackVendorChest.AddItem(DLC1ClothesVampireRoyalArmorBlack, 1) EndIf EndEvent That's the script I am currently using. It compiles but there are no changes ingame. Do you have any suggestion? Thanks in advance for your help Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 12, 2017 Share Posted December 12, 2017 Is that the complete script? If so, I do not see how it would compile without property declarations for your various variables. If you do have property declarations that you did not include in the copy/paste, make sure that they have been assigned the correct data. Lack of data would cause the code to fail. Link to comment Share on other sites More sharing options...
Goenitzthewind Posted December 12, 2017 Author Share Posted December 12, 2017 (edited) Thanks for your reply. Here are the two different scripts I tried without any success: 1) Scriptname DLC1VQ08RoyalArmor extends Quest Hidden Event OnInit() If (DLC1VQ08.GetStageDone(200)) Debug.MessageBox("Mission Complete") DLC1RoyalArmorBlack.SetValue(0) BlackVendorChest.AddItem(DLC1ClothesVampireRoyalArmorBlack, 1) DLC1RoyalArmorRed.SetValue(0) RedVendorChest.AddItem(DLC1ClothesVampireRoyalArmorRed, 1) EndIf EndEvent ObjectReference Property BlackVendorChest Auto ObjectReference Property RedVendorChest Auto GlobalVariable Property DLC1RoyalArmorBlack Auto GlobalVariable Property DLC1RoyalArmorRed Auto Armor Property DLC1ClothesVampireRoyalArmorBlack Auto Armor Property DLC1ClothesVampireRoyalArmorRed Auto Quest Property DLC1VQ08 Auto 2) Scriptname DLC1VQ08RoyalArmor extends Quest Hidden Event OnInit() If (DLC1VQ08.GetStageDone(200)) Debug.MessageBox("Mission Complete") RoyalArmorBlack.AddForm(DLC1ClothesVampireRoyalArmorBlack, 1,1) BlackVendorChest.AddItem(DLC1ClothesVampireRoyalArmorBlack, 1) RoyalArmorRed.AddForm(DLC1ClothesVampireRoyalArmorRed,1,1) RedVendorChest.AddItem(DLC1ClothesVampireRoyalArmorRed, 1) EndIf EndEvent ObjectReference Property BlackVendorChest Auto ObjectReference Property RedVendorChest Auto Armor Property DLC1ClothesVampireRoyalArmorBlack Auto Armor Property DLC1ClothesVampireRoyalArmorRed Auto Quest Property DLC1VQ08 Auto LeveledItem Property RoyalArmorRed Auto LeveledItem Property RoyalArmorBlack Auto The problem is, I don't even get the message in the box, the script just doesn't activate Edited December 12, 2017 by Goenitzthewind Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 12, 2017 Share Posted December 12, 2017 Two things that can block this script. The first would be testing while the quest holding this script has already started. The OnInit event will only run when a quest is started. Failure to test in an environment where that quest is not running would cause the script code to not run.The second would be testing without having assigned data to the property variables. Papyrus doesn't care what you name the properties. What is important is the data linked to those properties. Without data the code will fail. To confirm that the OnInit() runs, add a temporary notification statement prior to your IF statement i.e. Scriptname DLC1VQ08RoyalArmor extends Quest Hidden Event OnInit() Debug.Notification("My quest just initialized") If (DLC1VQ08.GetStageDone(200)) Debug.MessageBox("Mission Complete") RoyalArmorBlack.AddForm(DLC1ClothesVampireRoyalArmorBlack, 1,1) BlackVendorChest.AddItem(DLC1ClothesVampireRoyalArmorBlack, 1) RoyalArmorRed.AddForm(DLC1ClothesVampireRoyalArmorRed,1,1) RedVendorChest.AddItem(DLC1ClothesVampireRoyalArmorRed, 1) EndIf EndEvent ObjectReference Property BlackVendorChest Auto ObjectReference Property RedVendorChest Auto Armor Property DLC1ClothesVampireRoyalArmorBlack Auto Armor Property DLC1ClothesVampireRoyalArmorRed Auto Quest Property DLC1VQ08 Auto LeveledItem Property RoyalArmorRed Auto LeveledItem Property RoyalArmorBlack Auto To confirm that your properties have the correct data, load up the mod in the CK, open the quest, highlight the script, press the properties button, highlight each property in the property window and confirm the correct data is assigned by using the data fields that appear on the right hand side of the property window. If none of that helps, I don't know how to help. Link to comment Share on other sites More sharing options...
Goenitzthewind Posted December 13, 2017 Author Share Posted December 13, 2017 As I supposed. unfortunately OnInit doesn't run, I get no notification at the beginning of the quest. Could you suggest any workaround? Link to comment Share on other sites More sharing options...
Goenitzthewind Posted December 13, 2017 Author Share Posted December 13, 2017 Nevermind, i was able on my own to find a solution. Instead of editing the vanilla quest, I created a new one to add the new items as reward in the 2 vendor chests. Thank you anyway for your time Link to comment Share on other sites More sharing options...
Recommended Posts