TheAdoringFan1 Posted September 1, 2014 Author Share Posted September 1, 2014 On 9/1/2014 at 9:29 PM, Darren83 said: 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 thingThat will probably work to remove it, but then it still doesn't add it to the npc's inventory. Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 1, 2014 Author Share Posted September 1, 2014 On 9/1/2014 at 10:14 PM, lofgren said: 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.To start with, it was a vanilla book that can be found in a vanilla dungeon on a table. The player must grab the journal to advacne the quest, and upon completion of the quest it should be transfered from the player's inventory to the mod-created npc questgiver's inventory (Cassius). After that didn't seem to work, I duplicated the vanilla journal, gave it the same scripts, and then removed the vanilla journal from the dungeon and added the new one to the inventory of the enemy the journal belongs to. I then changed the quest alias accordingly so it now refers to the new mod-created journal. Link to comment Share on other sites More sharing options...
lofgren Posted September 2, 2014 Share Posted September 2, 2014 OK. Going back to the first incarnation (vanilla book on a table), you want to set up your alias as Specific Reference and then click the button to select forced reference and point the alias at the book on the table. That should make the original version of your script work correctly. Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 2, 2014 Author Share Posted September 2, 2014 On 9/2/2014 at 12:18 AM, lofgren said: OK. Going back to the first incarnation (vanilla book on a table), you want to set up your alias as Specific Reference and then click the button to select forced reference and point the alias at the book on the table. That should make the original version of your script work correctly.Nope, didn't work. I did everything like you said, but when I complete the quest I get my reward, but the journal isn't removed from the players inventory and no journal is added to the npc's inventory. Link to comment Share on other sites More sharing options...
lofgren Posted September 2, 2014 Share Posted September 2, 2014 Forgive me for asking but you did test it on a clean, new game and not a save, right? Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 2, 2014 Author Share Posted September 2, 2014 I have quite a few mods installed, but it is a brand new character, yes. Link to comment Share on other sites More sharing options...
lofgren Posted September 2, 2014 Share Posted September 2, 2014 OK, just checking because aliases are set when the quest starts, so if the quest had already started then it wouldn't pick up the change to the alias. OK, first, instead of using the additem command, let's try using the remove item command. So something like:Game.GetPlayer().RemoveItem(Alias_Journal.GetReference(), 1, false, Alias_ModCassius.GetReference())Next up I would add a script to the alias that gives a notification whenever it is picked up or dropped. That way we can see if the alias is still empty or the problem is with the command. Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 2, 2014 Author Share Posted September 2, 2014 So the new code looks like ths:Game.GetPlayer().RemoveItem(Alias_Journal.GetReference(), 1, false, Alias_ModCassius.GetReference()) Game.GetPlayer().AddItem(Gold001, 1000) SetObjectiveCompleted(30) Still nothing. The journal is not removed from the player and not given to the npc. Link to comment Share on other sites More sharing options...
lofgren Posted September 2, 2014 Share Posted September 2, 2014 You definitely need to add a debug script to the alias so we know if it is getting filled at all. I still think that is the most likely culprit. Link to comment Share on other sites More sharing options...
TheAdoringFan1 Posted September 2, 2014 Author Share Posted September 2, 2014 On 9/2/2014 at 3:54 AM, lofgren said: You definitely need to add a debug script to the alias so we know if it is getting filled at all. I still think that is the most likely culprit.Okay, how do I do that? Link to comment Share on other sites More sharing options...
Recommended Posts