I have an object which is a quest alias created in an actor. Only I want to prevent the player from seeing or stealing these objects from the actor's inventory. Is there an easy way of doing this?
I thought about placing all the items in a locked container instead but the player could still use a console command to open the box and get to the objects.
You could add the item to the actor only at the right moment (once dead or when the quest reach the propper state). Avoiding the player cheating is not as good idea as it may look. Your mood could have flaws and your anti-cheating efforts could hinder users trying to help you pinpoint them. Besides, modding is about adding options, if someone wants cheating so badly you shouldnt avoid it.
This seems like the best solution. I only really have one item I want to protect which is the quest reward. But how do I go about doing this? I've made the quest alias optional, which means it doesn't get filled at the start of the quest, but how do I fill the alias later?
A lot of the time when I make quests I do situations where the player is "handed" something from an NPC. I don't even give the NPC the item to begin with, it's easier just to use Game.Player().addItem() at the appropriate time. To get the quest marker to point at the right place you can point it to the NPC instead of the quest item.
The problem is my reward item is a note (a certificate) which uses text replacement for the name of the player. It has to be a quest item and it has to be filled for the text replacement to work(i think). If I used additem I don't think the text replacement would work.
I've solved the problem by putting the items in a chest that is hidden - all tested and it works nicely. Took me all day to figure out that the aliases are filled in the order that they are listed so my chest didn't work for ages because I had it at the bottom of the list!