Jump to content

[LE] How to add a note to a existing actor without editing the source?


JPTR1

Recommended Posts

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?

 

greetings

JPTR

Link to comment
Share on other sites

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

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

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

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 by maxarturo
Link to comment
Share on other sites

 

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.

 

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...