TheAdoringFan1 Posted September 1, 2014 Share Posted September 1, 2014 Hi, I'm trying to make a simple quest mod in the creation kit, but I've come accross a problem I cant seem to fix. Basically, the quest is to find a guy, kill him, take his journal, return it to the quest giver and get your gold. When I return to the quest giver and complete the quest, however, the gold is added to my inventory but the journal is not removed. Here is the code that I used in the completion stage (stage 40): SetObjectiveCompleted(30) Alias_ModCassius.GetReference().AddItem(Alias_Journal.GetReference()) Game.GetPlayer().AddItem(Gold001, 1000) I think that everything in there is right, so that leads me to believe that something in the Quest Ailases is messed up. Right now, for the journal I chose "Create Reference to Object", selected the object, and chose none for the at and in section. Does that seem right? Also, the journal is a vanilla object, and I didn't create it with my mod. I am fairly new at modding and I still need to get a feel for things. Thanks for the help! Link to comment Share on other sites More sharing options...
lofgren Posted September 1, 2014 Share Posted September 1, 2014 Did you manually add the journal the NPC's inventory in the CK? Or did you do it by script? Link to comment Share on other sites More sharing options...
JetSteele Posted September 1, 2014 Share Posted September 1, 2014 Create another alias for the player: Make an alias like your making it for an NPC but choose Player in the dropdown menu and add this to stage complete (for the sake of example I will use Player for the player ID): SetObjectiveCompleted(30) Alias_Player.GetReference().RemoveItem(Alias_Journal.GetReference())Alias_ModCassius.GetReference().AddItem(Alias_Journal.GetReference())Game.GetPlayer().AddItem(Gold001, 1000) Hope this helps :) Link to comment Share on other sites More sharing options...
lofgren Posted September 1, 2014 Share Posted September 1, 2014 (edited) He shouldn't need to remove the item from the player's inventory because it should be removed from the player's inventory when it is added to Cassius'. I suspect the journal alias is not properly getting filled. Anyway either way there is no need to create an alias for the player. Edited September 1, 2014 by lofgren Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 1, 2014 Author Share Posted September 1, 2014 (edited) On 9/1/2014 at 4:29 PM, lofgren said: Did you manually add the journal the NPC's inventory in the CK? Or did you do it by script? I didn't add the journal manually, shouldn't it be removed from the players inventory and added to the npcs from the original script I had? Also I will try what JetSteele recommended and report back. Edited September 1, 2014 by TheAdoringFan1 Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 1, 2014 Author Share Posted September 1, 2014 Nope, adding the player alias and adding the code didn't work. Here are the screenshots of the code that I currently have and also of the quest alias of the journal. Does anything stand out ot you? http://i.imgur.com/v0BnwiM.jpg?1?9794http://i.imgur.com/TwNhbOt.jpg?1 Link to comment Share on other sites More sharing options...
lofgren Posted September 1, 2014 Share Posted September 1, 2014 I am pretty sure that your journal alias is empty. You say the journal is a vanilla item? Probably what you are going to have to do is make the NPC drop the journal (so that it becomes a reference object) and then assign it to the alias using forcerefto(). Link to comment Share on other sites More sharing options...
DDProductions83 Posted September 1, 2014 Share Posted September 1, 2014 You dont even need a ref alias to remove a item.. just make a property that points to the item as a book like so Book property journal1 auto then run game.getplayer().removeitem(journal1, 1) Removing a item will remove it lol, even if it is a quest specific alias it will just delete it from their inventory and your other script should put a new one in the other guy. I know it's not 'optimal' and/or moving the 'same' reference but it accomplishes the same thing Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 1, 2014 Author Share Posted September 1, 2014 Ok, so to eliminate the vanilla book from being the problem, I duplicated the book and replaced the new one with the vanilla one. Then instead of having the journal sitting on the table, I added it to the enemy the jounral belongs to. Then in the in/at section of the alias, I chose in and enemy(the alias of the enemy npc). Now there should be a unique book being transfered to a unique npc, but it still doesn't work. What is this about assigning it to the alias using forcerefto()? Link to comment Share on other sites More sharing options...
lofgren Posted September 1, 2014 Share Posted September 1, 2014 (edited) It sounds like we have an incomplete picture of what is going on. To be clear you are trying to take a vanilla item in a vanilla NPC's inventory, which you did not add, and put it in an alias. Is that correct? The main question here is how is the journal getting into the NPC's inventory. Edited September 1, 2014 by lofgren Link to comment Share on other sites More sharing options...
Recommended Posts