Getting an NPC to stay put in her shackles >.<

Post » Sat Nov 17, 2012 7:53 am

So I have a room in which your supposed to stealth around and not get caught by a man that walks around the room. In this room there is also a woman who is shackled to the wall. Right now if you enter combat with the woman or enter combat with the man nearby the woman, since she is set to cowardly, she stands up and gets out of her shackles and tries to run away.

How would I make it so that whether she is attacked or not and whether there is combat near her or not she will just stay shackled and not be able to escape?

I did find somewhere in the game that Bethesda had something like this in the Dawnstar Dark Brotherhood Sanctuary, but I couldn't make heads or tails out of what they did and wasn't able to properly copy paste it all to get it to work.
User avatar
Bones47
 
Posts: 3399
Joined: Fri Nov 09, 2007 11:15 pm

Post » Sat Nov 17, 2012 1:30 pm

are you using a package to get the NPC into the shackles?

if not, you can use something like SitTarget, and set the flags to ignore combat, etc
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Sat Nov 17, 2012 11:05 pm

The title had me thinking something else.

I'm glad it turned out to be a Modding Question.
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Sat Nov 17, 2012 4:40 pm

right now she just has the Linked Ref set to the shackles. How do I get the SitTarget into her package list? when I tried to add it to her list all that shows up in the filter is CarriageSitTarget
User avatar
Chase McAbee
 
Posts: 3315
Joined: Sat Sep 08, 2007 5:59 am

Post » Sat Nov 17, 2012 6:17 pm

There should be a template just called "Sit"? http://www.creationkit.com/Sit_%28Procedure%29

You may also need to use a Template called "Wait"? http://www.creationkit.com/Wait_%28Procedure%29

(I'm not certain either/both will do the job ... Not something I've ever tried to do*)


* though I plan to do something similar, so if you do get something to work, please post and let us know :)
User avatar
Ashley Clifft
 
Posts: 3468
Joined: Thu Jul 26, 2007 5:56 am

Post » Sat Nov 17, 2012 7:30 pm

The template just called sit wouldn't let me link her to the shackle furniture. I had to use SitTarget to let me link her to it and then I checked the flags for "Ignore Combat" and "No Combat Alert". Right now that fixed half the problem she no longer runs out of the shackles if you enter combat nearby her. However if I hit her directly she still falls out of the shackles and oddly enough despite having given her a ridiculous amount of health and checked off the "Invulnerable" box I can still kill her. :stare:
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Sat Nov 17, 2012 8:31 pm

Check IsGhost
It'll make her ignore all hits
User avatar
Monique Cameron
 
Posts: 3430
Joined: Fri Jun 23, 2006 6:30 am

Post » Sat Nov 17, 2012 11:14 pm

The checkboxes like IsGhost and Invulnerable don't seem to work at all, with both checked she still gets hit and then when she stands up out of the shackles all of a sudden my arrows go right through her and hit the wall behind her.


EDIT: After attempting to fix this my brother tested my mod on his computer and the IsGhost and Invulnerable options seem to be working correctly without her leaving her shackles, yet when I test it, it doesn't work at all and on the other computer so many more things are broken that work fine on my computer. :swear: So as far as shackle girl goes this seems to make it work.
User avatar
Greg Swan
 
Posts: 3413
Joined: Tue Jun 05, 2007 12:49 am

Post » Sat Nov 17, 2012 12:32 pm

The checkboxes like IsGhost and Invulnerable don't seem to work at all, with both checked she still gets hit and then when she stands up out of the shackles all of a sudden my arrows go right through her and hit the wall behind her.


EDIT: After attempting to fix this my brother tested my mod on his computer and the IsGhost and Invulnerable options seem to be working correctly without her leaving her shackles, yet when I test it, it doesn't work at all and on the other computer so many more things are broken that work fine on my computer. :swear: So as far as shackle girl goes this seems to make it work.

If your actor is in an alias, you definitely want to test from a save that did not have your mod installed when you saved it. Wired things happen if you don’t and you may be experiencing some of that.
User avatar
Elisabete Gaspar
 
Posts: 3558
Joined: Thu Aug 31, 2006 1:15 pm

Post » Sat Nov 17, 2012 11:26 am

If your actor is in an alias, you definitely want to test from a save that did not have your mod installed when you saved it. Wired things happen if you don’t and you may be experiencing some of that.
You can also (to ensure a "blank" game):

Load Skyrim
At Main Menu type:
coc theCellIWantMyCharacterToStartIn
That will give you a vanilla nord character in a brand new game in which almost no scripts have run (including vanilla quests)


Note: Before you release your mod, you must also test your mod using a vanilla game start (i.e. suffer escaping from Helgen) to make sure your stuff runs alongside all of the vanilla setup stuff (wagon ride, dragon attacks and so forth).
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Sat Nov 17, 2012 2:04 pm

This reminds me of the Witcher 2 XD
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Post » Sat Nov 17, 2012 8:01 pm

Necro-ing this thread.

The jail has been taken over by the Bandit King's faction.
I have a captive that needs to be in shackles - OK use the sit target package.
When I kill the boss character NPC (Bandit King), the captive should be able to be freed (and then recruit-able - already done with factions tab).
Any ideas?
Thanks!

Oh, and I am not able to do scripting. Use scripts, yes; create scripts, no!
If I can use a package conditions or something on that level that is understandable to me. :smile:
User avatar
Christina Trayler
 
Posts: 3434
Joined: Tue Nov 07, 2006 3:27 am

Post » Sat Nov 17, 2012 11:02 am

Necro-ing this thread. The jail has been taken over by the Bandit King's faction. I have a captive that needs to be in shackles - OK use the sit target package. When I kill the boss character NPC (Bandit King), the captive should be able to be freed (and then recruit-able - already done with factions tab). Any ideas? Thanks! Oh, and I am not able to do scripting. Use scripts, yes; create scripts, no! If I can use a package conditions or something on that level that is understandable to me. :smile:

Wow, it's is extremely timely you posted this because I spent last weekend doing EXACTLY what you want to do, and already have the bugs worked out for you. I'm at the office right now and can't get to the CK, so some of this is from memory, and the rest I will fill in when I get home this evening. It works VERY well!!

OK, so first it sounds like you have the SitTarget package working correctly. I don't know how your quest stages are set up, so I'll just make up some as an example to go by, sort of based on how mine is set up.

I have 2 different variations on mine, but the closest to what you want to do works like this. My actor (Korst) is in his shackles, and the player has to fight his way to Korst. After all the bad guys are dead the journal updates telling the player to free Korst from his bonds. The quest pointer points at the shackles. The player goes to where Korst is locked up and points at an activator I placed around the shackles object. Click on the activator and Korst is released and sort of slumps down (in a mini bleed-out animation), and gets to his feet. In my case, he then force-greets the player asking "who are you?", and the player tells him he is there to rescue him or whatever. Korst basically says thank you, and tells the player the bad guys stashed his gear in a chest (he is in prison rags). So Korst goes and gets his gear out of the chest and equips his armor and weapon and is ready to go. So, here's how I put it together by stage:

STAGES

10 - your actor is locked up in his shackles as you are fighting the bad guys. You will need an "OnDeath" script on your bad guy so that when he dies it sets your quest to stage 20. Stage 20 will update your quest journal to tell you you need to release the prisoner. (It's probably a good idea to have the shackles activator I talk about set to initially disabled and enable it AFTER this stage. This prevents the player form activating it prematurely.)

20 - Enable the shackle activator here. Objective for this stage points to the shackle activator I placed around the shackles object. You will need an "OnActivate" script on the activator that updates the next quest stage when you click on it. Your prisoners SitTarget package can ONLY be valid up to when you click on the activator so that when the next stage (30) is set he is released from the bonds.

30 - place an "evaluate package" for your prisoner here so that when this stage is set he immediately realizes that he should no longer be locked up and falls from the shackles. From here, it's up to you to decide what you need, but in my case I handled it with the force greet as I said.

NOTE: On the force greet I mention above, in my testing I found that I needed a tiny delay between the time Korst was released and falls to the ground, and the time he force greeted the player. He was pretty much force greeting immediately while he was still in the bleed out animation which I didn't like. So what I did was this:

Stage 30 - (As I said above in stage 30 Korst is released from his shackles and evaluates his package. I also created myself a little mini scene that is also started by stage 30. This scene only has one action and package for Korst to walk a few steps away from the shackles, the THEN force greet the player. So I placed an XmarkerHeading a few feet in front of the shackles that is the target for a travel package that is used in the action for the mini scene. And when stage 30 hits, he falls from the bonds (and starts the mini-scene) gets to his feet and walks a couple of steps and THEN force greets the player. You could probably just do that part with a straight forward package, and not use a scene, but I have a couple of variations on this sequence that I wanted there to be a scene in place in case I wanted to be more creative. Plus, the scene over rides all other packages, so I didn't have to add more packages on his alias stack and make it even more confusing. It just solved a couple of problems doing it this way.

Anyway, that is the basic structure. I can help you with the scripting tonight when I can access the CK. Let me know if you have any questions. Also, I'm only a novice modder and I'm sure some of the guru's around here know of a better way to do all of this, but I was happy I figured out most of this on my own - even if it seems hacked together with chicken wire and duct tape, lol.
User avatar
Britta Gronkowski
 
Posts: 3475
Joined: Mon Apr 09, 2007 3:14 pm

Post » Sat Nov 17, 2012 8:11 am

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?

Is the "On Death" script placed on the bad guy object screens, or on the reference - or does it matter.

Is this free the prisoner its own quest, or inside of your larger quest?

Also - do you handle the prisoner garb outfit via a scene, or how? 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?
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Sat Nov 17, 2012 8:52 pm

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. :smile:

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.
User avatar
Ludivine Poussineau
 
Posts: 3353
Joined: Fri Mar 30, 2007 2:49 pm

Post » Sat Nov 17, 2012 10:53 pm

Thanks, Balok!
I am fave-ing this thread, and may well have more questions when I try to implement the solution.
User avatar
Chavala
 
Posts: 3355
Joined: Sun Jun 25, 2006 5:28 am

Post » Sat Nov 17, 2012 11:57 pm

One last thing shalani, I thought it still might be a little confusing as the the actual size I shaped the shackles trigger to. So I took a shot of it for you. Hope that helps!

http://ypdesign.com/skyrim/files/capture.png
User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Post » Sat Nov 17, 2012 6:26 pm

Thanks, Balok; most helpful!!
User avatar
NAtIVe GOddess
 
Posts: 3348
Joined: Tue Aug 15, 2006 6:46 am


Return to V - Skyrim

cron