Script to have npc extinguish torch if sneaking

Post » Thu Jun 21, 2012 12:20 pm

Cool.. Thanks!
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Wed Jun 20, 2012 9:17 pm

Oh no.. have we lost him?
User avatar
evelina c
 
Posts: 3377
Joined: Tue Dec 19, 2006 4:28 pm

Post » Thu Jun 21, 2012 12:49 pm

So here's http://www.mediafire.com/?wxkiviwgfgl5o9e, from all I could tell. You'll find a "Note to Follower" in your inventory which, when given to a follower, will fill the first available of ten alias slots. Each save load, the aliases are checked and emptied if no longer applicable. While filling a slot, a follower will have their torches swapped with unequipable dummy items when sneaking.
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Thu Jun 21, 2012 3:18 am

So here's http://www.mediafire.com/?wxkiviwgfgl5o9e, from all I could tell. You'll find a "Note to Follower" in your inventory which, when given to a follower, will fill the first available of ten alias slots. Each save load, the aliases are checked and emptied if no longer applicable. While filling a slot, a follower will have their torches swapped with unequipable dummy items when sneaking.

Awesome, thanks for you work @JustinOther. Am I allowed to use a slightly modified version of this in my Mod?
User avatar
Jessie Butterfield
 
Posts: 3453
Joined: Wed Jun 21, 2006 5:59 pm

Post » Thu Jun 21, 2012 6:25 am

Yeah, whoever can do ...whatever with it. It's currently masterless and could probably be merged into something else easily enough.
User avatar
Sista Sila
 
Posts: 3381
Joined: Fri Mar 30, 2007 12:25 pm

Post » Thu Jun 21, 2012 5:53 am

Thanks.. I will give it a whirl if I can ever get passed some major game breaking bugs I have encountered. Unfortunately it looks like the game is unhappy that I had progressed in the civil war story line before doing much with the main quests.. word to the wise.. don't do that. I've had to reload an old save and this time I'm trying to get a little further in the main quest before the Whiterun incident....
User avatar
Big mike
 
Posts: 3423
Joined: Fri Sep 21, 2007 6:38 pm

Post » Thu Jun 21, 2012 6:29 am

I am not sure this is working as intended. I got the note and the second I handed it to my follower, she disarmed her torch, however we weren't sneaking. She refuses to use her torch now, regardless of sneaking or not sneaking. Also, shouldn't the note be in the follower inventory? It's not there so I don't know how you would give the note to a 2nd follower.
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Thu Jun 21, 2012 12:59 pm

It doesn't prevent them from equipping torches when not sneaking. When they stop sneaking, the dummy torches are swapped with real ones and visa versa when they crouch. The note is to be in the player's inventory as it's the means by which followers fill the ten alias slots, so you give 'em the note, they read it, then hand it back after their REF is forced into the first available slot.
User avatar
M!KkI
 
Posts: 3401
Joined: Sun Jul 16, 2006 7:50 am

Post » Wed Jun 20, 2012 9:08 pm

I realize the intention, I'm just letting you know it isn't working like that. They are unequipping the torch and never using it again regardless of their stance. And it never gave me the note back though I could be mistaken on that one and will report back. Thanks.
User avatar
Sam Parker
 
Posts: 3358
Joined: Sat May 12, 2007 3:10 am

Post » Thu Jun 21, 2012 12:52 am

Ah, they already had a torch equipped and wern't sneaking. The note is given back immediately.

http://www.mediafire.com/?2n1655o92rdy6dg should fix it. Reworked the self check part when the note is given.
User avatar
Jenna Fields
 
Posts: 3396
Joined: Mon Dec 11, 2006 11:36 am

Post » Thu Jun 21, 2012 6:59 am

Thanks.. and yes, I checked my inventory and it was still in there, so she did give it back. I will test out your fix. Thanks again!
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Wed Jun 20, 2012 9:06 pm

Oh, forgot to pack the innocuous container NIF.

http://www.mediafire.com/?5s5pduaby2uq7a0
User avatar
Jack Walker
 
Posts: 3457
Joined: Wed Jun 06, 2007 6:25 pm

Post » Thu Jun 21, 2012 4:08 am

Oh, forgot to pack the innocuous container NIF.

http://www.mediafire.com/?5s5pduaby2uq7a0

Are we supposed to use all three scripts or will they work individually from each other? Right now I'm using the whole package and what does happen, is:

1. I recruit Sven, go out and wait until it's nightime
2. Sven gets his torch out
3. I'm handing over the note to Sven, he puts the Torch away when I start to sneak
4. Once I stand up again, Sven does not sheath the torch
5. Looking into Svens inventory I see there are two torches when he previously only had one torch in his inventory
6. I then thought the problem may be fixed by changing cells, so I got inside the Riverwood Inn with him
7. For a snip of a second I was able to see how Sven tried to sheath the torch, but instantly took it away again
User avatar
Kayleigh Mcneil
 
Posts: 3352
Joined: Thu Jun 29, 2006 7:32 am

Post » Thu Jun 21, 2012 5:00 am

Well you definitely fixed the problem when you first give the follower the note, they did not disarm the torch until I took a sneak stance. However, after taking a normal stance, the follower did not seem to be using the torch again even if we were standing in complete darkness. I will continue testing...
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Wed Jun 20, 2012 9:45 pm

Are we supposed to use all three scripts or will they work individually from each other?
The three scripts and the plugin all work in tandem.
Well you definitely fixed the problem when you first give the follower the note, they did not disarm the torch until I took a sneak stance. However, after taking a normal stance, the follower did not seem to be using the torch again even if we were standing in complete darkness. I will continue testing...
Hmmm... Not sure just what's happening with that, but there's nothing preventing them from equipping a torch again at that point. I'll tinker with it some more and perhaps force equip a torch once they're upright.

Kinda swamped right now with other stuff, but I'll revisit this soon'ish.
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Thu Jun 21, 2012 11:50 am

Hey thanks a lot... this is really an awesome little mod.

When you say, "force equip", do you mean only if it's dark?
User avatar
Sandeep Khatkar
 
Posts: 3364
Joined: Wed Jul 18, 2007 11:02 am

Post » Thu Jun 21, 2012 9:44 am

Guys, you'll be happy to hear I got it working. It works 100% if put on an actor, and all I had to do was putting an int counter into the script. This is how the script looks now:

Spoiler
Scriptname SI_FollowerNoTorchWhenSneakingScript extends Actor  Bool bDisallowTorchLight Property Torch01 AutoLight Property Torch01Shadow AutoLight Property SI_UseableLanternLight Autoint FollowerTorchCountEvent OnInit()    RegisterForUpdate(1)EndEventEvent OnUpdate()    If bDisallowTorch != IsSneaking()        bDisallowTorch = !bDisallowTorch            If bDisallowTorch                FollowerTorchCount = GetItemCount(Torch01)                RemoveItem(Torch01, FollowerTorchCount, true)            Else                AddItem(Torch01, FollowerTorchCount, true)            EndIf    EndIfEndEvent

I couldn't resign the whole thing got so complicated and spread across 3 scripts, a quest and formlists, so I kept on building the old script. The script is foolproof, you can put in as much light propertys in there as you want, just make sure to use different int count variables. The only disadvantage is, you'll have to put it on every follower individually. Or you could use a perk/spell that puts the script on said followers.

Feel free to do with it what you want, I'm out...:D
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm

Post » Thu Jun 21, 2012 11:50 am

@JustinOther I have been using the script for a few days now and since giving my follower/wife the note, she has never equipped a torch again, not even if she should. I will have to disable it for now since there are times I want her to use a torch. Thanks.
User avatar
Marine x
 
Posts: 3327
Joined: Thu Mar 29, 2007 4:54 am

Post » Thu Jun 21, 2012 5:36 am

Guys, you'll be happy to hear I got it working. It works 100% if put on an actor, and all I had to do was putting an int counter into the script. This is how the script looks now:
Spoiler
Scriptname SI_FollowerNoTorchWhenSneakingScript extends Actor Bool bDisallowTorch Light Property Torch01 Auto Light Property Torch01Shadow Auto Light Property SI_UseableLanternLight Auto int FollowerTorchCount Event OnInit() RegisterForUpdate(1) EndEvent Event OnUpdate() If bDisallowTorch != IsSneaking() bDisallowTorch = !bDisallowTorch If bDisallowTorch FollowerTorchCount = GetItemCount(Torch01) RemoveItem(Torch01, FollowerTorchCount, true) Else AddItem(Torch01, FollowerTorchCount, true) EndIf EndIf EndEvent
I couldn't resign the whole thing got so complicated and spread across 3 scripts, a quest and formlists, so I kept on building the old script. The script is foolproof, you can put in as much light propertys in there as you want, just make sure to use different int count variables. The only disadvantage is, you'll have to put it on every follower individually. Or you could use a perk/spell that puts the script on said followers. Feel free to do with it what you want, I'm out...:D

Why is "Light Property SI_UseableLanternLight Auto" in there? I don't see that it's doing anything.
User avatar
Luna Lovegood
 
Posts: 3325
Joined: Thu Sep 14, 2006 6:45 pm

Post » Thu Jun 21, 2012 12:10 pm

Hey thanks a lot... this is really an awesome little mod.

When you say, "force equip", do you mean only if it's dark?
Well, if they would normally equip one, yeah. I'm thinking there's probably something wonky with the scrip though if they're not.
@JustinOther I have been using the script for a few days now and since giving my follower/wife the note, she has never equipped a torch again, not even if she should. I will have to disable it for now since there are times I want her to use a torch. Thanks.
I'll have to tinker with it more as something must be wrong with the script, in that case, like it's not updating once after ceasing to sneak. This has proven more complicated than I thought it would be...
User avatar
Joey Avelar
 
Posts: 3370
Joined: Sat Aug 11, 2007 11:11 am

Post » Thu Jun 21, 2012 5:02 am

This has proven more complicated than I thought it would be...

Sorry... haha! Just thought it was silly when I was trying to sneak and my follower whipped out a torch.. "HEY LOOK AT US!!". Definitely appreciate the effort you've put into this.
User avatar
Rob Smith
 
Posts: 3424
Joined: Wed Oct 03, 2007 5:30 pm

Post » Wed Jun 20, 2012 11:34 pm

I thought my script was working so far. Doesn't it?

Why is "Light Property SI_UseableLanternLight Auto" in there? I don't see that it's doing anything.

Cause I've left it there accidentaly. NPC's also use Lanterns in my mod, you know.
User avatar
luis ortiz
 
Posts: 3355
Joined: Sun Oct 07, 2007 8:21 pm

Post » Thu Jun 21, 2012 1:00 am

I thought my script was working so far. Doesn't it?



Cause I've left it there accidentaly. NPC's also use Lanterns in my mod, you know.

Got you...
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Thu Jun 21, 2012 5:16 am

Well honestly. If no one makes up his mind to release it, I'm gonna do it. Believe me, people will download this like hot buns.
User avatar
Josh Sabatini
 
Posts: 3445
Joined: Wed Nov 14, 2007 9:47 pm

Post » Wed Jun 20, 2012 11:45 pm

One of them will be released in the better stealth ai mod. Don't know which yet.
User avatar
Claire
 
Posts: 3329
Joined: Tue Oct 24, 2006 4:01 pm

PreviousNext

Return to V - Skyrim