Sounds like a very possible solution, Balok! And very creative - thanks for sharing.
What is the shackles activator? I initially treated it as a simple furniture piece activator. Is it a primitive that you only use to update the stage to 30, and then drive the prisoner actions off stage 30+ packages?
Yes, that's correct. The way I did it was place the ShackleWallMarker furniture object where I needed it to be and leave it selected and hit the "Create Trigger" button which is the T inside of a box. This will prompt you to select a base object to use as your primitive. You can just use the DefaultBlankTrigger for your base. I would go ahead and give it a Reference Editor ID as well. Use the gizmo to size it so it is above where your NPC is hanging but big enough to not be really difficult to find the sweet spot when you try to activate it. You may have to experiment with the size a little. Then you can use this script:
Spoiler Scriptname ShacklesActivatorScript extends ObjectReference Quest Property MyQuest AutoInt Property Stage AutoEvent OnActivate(ObjectReference akActionRef)If (akActionRef == Game.GetPlayer()) MyQuest.SetCurrentStageID(stage) EndIfEndEvent
Set the "MyQuest property to your quest, and the stage integer value to what stage you need to set when it is clicked on and activated. Then, as you mentioned, just control your actors AI with the quest stages in your quest.
Is the "On Death" script placed on the bad guy object screens, or on the reference - or does it matter.
My OnDeath scripts are placed in the alias form that these NPC's are in during this part of my quest. If you do not have any other use for your King after he is killed, you could put the script on his base form if you wanted to. But most everything I have seen always uses aliases, so I'm trying to use the same methods as the devs used (sometimes that is!).
Is this free the prisoner its own quest, or inside of your larger quest?
It's a separate quest form that I'm using to control the objectives of my main quest. There are no objectives marked in my prison quest, as all of that is in my main quest. I'm using the stages in my prison quest to control all the AI of my actors while they are in the alias for that quest form. I'm also using it to trigger scenes and keep a running count of how many bad guys you have left to kill and a couple of other things. But all of the objectives the player will actually see are in my main quest.
Also - do you handle the prisoner garb outfit via a scene, or how?
Very good question! Korst is initially in prison garb, but I created a very small scene that is triggered by the force greet I mention above. The quick version is:
Korst (force greet) "Who are you?"
Player - "I'm here to rescue you"
Korst - "OK, let me get my gear"
In the dialog fragment for "let me get my gear" I set the next stage which starts a scene where he quickly walks over to a chest and swaps his outfit to his armor. You'll have to create an outfit for your prisoner or just use one of the vanilla outfits already in the game. You can swap outfits in a number of ways, but I try to keep most of that stuff in my quest stages as I find it easier to troubleshoot that way. But in this case, I used the fragment at the completion of the scene to equip his gear because that was the easiest way to work out the timing of him walking over to the chest first, the then equipping his gear. You'll have to add a property for the outfit in your quest or fragment properties as well as an alias property for your prisoner. Then use "Alias_Prisoner.SetOutfit(WhateverOutfit)" and it should change her clothes. I should also note that I'm currently trying to decide if I want to edit this part so that my guy casts a spell on himself to change outfits. But I don't know how hard that would be to do so I'm still undecided on that, lol.
I want to make sure that if she is released from following that she does not go back to the prison and re-equip prison garb. How would I make prison garb and temporary and sandbox, say in the Bannered Mare?
Conditions on your packages are your friend! Using my stages above, you would want her to be in shackles up to stage 30 because when stage 30 is set you want her to be released from the lock up. So, her SitTarget package would have a condition set for "GetStage" set to your quest with a comparison of < and value of 30. (GetStage - MyQuest < 30)
So what that says is that she will be stuck in lock-up as long as your quest stage is less than 30. When stage 30 is set, the comparison is no longer valid (because 30 is not less than 30), and she automatically goes to the next valid package in her stack.

For the outfit, so far for me, once I've changed my guy to his armor, he has not reverted back to the prison garb.
For the sandbox package, unfortunately, I have not set up a permanent type of follower like the ones in the game. My followers only do so during specific stages, and revert to their normal packages after those stages are complete. There are quite a few folks who are doing companion type followers, and I think there are some tutorials out there as well. My guess would be that that AI is controlled through aliases, conditions and quest variables, but I haven't delved into that complex stuff yet. But, I hope what I've offered thus far helps you along some. Please let me know if you have any questions.