JPTR1 Posted June 7, 2023 Share Posted June 7, 2023 Hi, I would like to add a note to an existing actor's inventory without editing the source. Favorite way would be that it is in his inventory as soon as my mod is installed/started. (It is possible that he is dead, hope this isn't a problem?!)Alternative way would be to add the note with the first quest stage. (It is not a questitem) Is this even possible, and if yes, can someone provide me a script or method for this? greetingsJPTR Link to comment Share on other sites More sharing options...
greyday01 Posted June 7, 2023 Share Posted June 7, 2023 Make a run once quest. In the script section make a script with properties for the actor and the item. Use Event OnInit(). and under that event YourActor.AddItem(youritem, 1) Try something like that. I don't think you need to bother with using aliases. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 7, 2023 Share Posted June 7, 2023 In a start game enabled run once quest, create an alias that points to the target actor. Put the note in the inventory section of the alias. If not using the quest for anything else, you can stop the quest once the player picks up and reads the note. Link to comment Share on other sites More sharing options...
JPTR1 Posted June 7, 2023 Author Share Posted June 7, 2023 Thank you for the quick answers, will try that out. :thumbsup: Link to comment Share on other sites More sharing options...
JPTR1 Posted June 12, 2023 Author Share Posted June 12, 2023 Couldn't get that to work. I've created the new alias in my mainquest which is "start game enabled" and "run once". Have chosen an unique Actor and placed the note in the alias inventory. Only box checked is "allow dead"? But Ingame the note isn't in the Actor's inventory, not even after I've activated the Questlog. What could be wrong? Link to comment Share on other sites More sharing options...
maxarturo Posted June 12, 2023 Share Posted June 12, 2023 (edited) You could try a different route if you couldn't make the quest's alias approach to work which is the preferred method, you can do the other option already meantioned: 1) Create your note or book or journal 2) Place in a cell, any cell, but preferable one of yours, an xMarker 3) Add to the xMarker this script: Actor Property MyActor Auto Book Property MyNote Auto EVENT OnInit() MyActor.AddItem(MyNote, 1) Self.Disable() Self.Delete() ENDEVENT And you are done. Once you load a save the script will run once and add to the actor selected your note, have fun. * Don't forget to fill in the properties, otherwise nothing will happen. Edited June 12, 2023 by maxarturo Link to comment Share on other sites More sharing options...
greyday01 Posted June 13, 2023 Share Posted June 13, 2023 You could try a different route if you couldn't make the quest's alias approach to work which is the preferred method, you can do the other option already meantioned:1) Create your note or book or journal2) Place in a cell, any cell, but preferable one of yours, an xMarker3) Add to the xMarker this script: Actor Property MyActor Auto Book Property MyNote Auto EVENT OnInit() MyActor.AddItem(MyNote, 1) Self.Disable() Self.Delete() ENDEVENT And you are done.Once you load a save the script will run once and add to the actor selected your note, have fun. * Don't forget to fill in the properties, otherwise nothing will happen. If you add an item to the actor reference wouldn't that actor's inventory eventually respawn back to what the base actor's inventory was set as? Like merchants.If you want that actor to always keep that item wouldn't you need to add it to the actor base object?If you needed the actor to only have it for a short period is there a way to add it to the actor reference shortly before you encounter him? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 13, 2023 Share Posted June 13, 2023 @greyday01There is a chance that I am wrong on this...It is my understanding that while an NPC is assigned to an alias on an active quest that they are persistent and their inventory will not change or reset. Link to comment Share on other sites More sharing options...
greyday01 Posted June 13, 2023 Share Posted June 13, 2023 I believe you are right about actors in active quests. I'm not sure what would happen if you start a quest, add an item then immediately end the quest. For the player since the player never respawns they keep the object, but for a npc I'm not sure if they keep it, keep it until they respawn, or lose it immediately. Link to comment Share on other sites More sharing options...
JPTR1 Posted June 13, 2023 Author Share Posted June 13, 2023 Thank you guys!@maxarturo, now understood what you meant. I think that should work and the default inventory of the Actor shouldn't change that way too. (edit: works) Link to comment Share on other sites More sharing options...
Recommended Posts