Jump to content

Working noose - proof of concept


Recommended Posts

Actor.SnapIntoInteraction(ObjectReference akTarget)

 

That's probably what you want.

Scriptname sacScrFurnitureKill extends ObjectReference

;import WorkshopDataScript

event OnInit()
	; Blocking the activation, so that the player doesnt accidentally hang himself
	BlockActivation(true)
endEvent

event OnActivate(ObjectReference akRef)
	;parent.OnActivate(akRef)
	; OnActivation block runs even on objects with BlockActivation(true), so the following checks if its NOT the player activating.
	if akRef != Game.GetPlayer()
		; We know its not the player, so force the actor to bypass the BlockActivation(true) state and activate (sit) in the furniture anyway
		Actor actorRef = (akRef as Actor)
		actorRef.ChangeAnimFaceArchetype(GetKeyword(0x00111073))
		ActorRef.SnapIntoInteraction(akRef)
		utility.wait(20)
		actorRef.SetRestrained(true)
		actorRef.RemoveFromAllFactions()
		actorRef.IgnoreFriendlyHits(true)
		actorRef.SetProtected(false)
		; Wait 1 second to let the actor enter the furniture (adjust to however long your entry animation takes + a small buffer)
		;utility.wait(60)
		; Kill the actor
		;actorRef.Kill()
	endif
endEvent

Keyword function GetKeyword(int keywordId)
	return Game.GetForm(keywordId) as Keyword
endFunction

YES!! That works! Finally!

 

I'll post a scripted version today, or tomorrow latest, I need to do some mopping up.

 

Now I need a proper animation, ideally with some choking sounds :D

 

Thanks!

Link to comment

Just noticed something: since the script fires on activation (i.e. on issuing the "sit" command), regardless of whether the NPC is actually "sitting" in the noose or just trying to get there, if the NPC is far from the noose and has trouble navigating, they will be restrained and killed on the way, before actually reaching the noose.

 

Until I have the chance to fix this (most likely by replacing onactivate with onsit, but need to test), a very simple workaround is to first direct the NPC to go near (behind) the noose, and, only after successfully navigating there, then issue the actual "sit" command.

 

Link to comment

how do i get this to work when loading it up it just places a rope above the ground

how do i attach it to something or where do i find the wooden thing that shows in the pics

The easiest way is to build the rope (you can place it anywhere), then click the NPC in console, type setcommandstate 1 in console, exit console, then point and "E" somewhere around the slipknot, where the prompt changes into "sit". The NPC will then assume the position.

 

The wooden frame you need to build yourself, the mod just places the rope. I made it that way in order to have flexibility where you want to place the rope (trees, ceilings, own gallows).

 

The next version will include a simple gallows frame, just for convenience, but you should experiment with other placement options.

 

I am working on a hanging gun version which will make it easier.

Link to comment

Hi, I get the special and noose menu but they are empty.

I'm not sure what you mean. There is no noose menu. And special should not be empty, you should have, at least, the vanilla minuteman artilery there. Can you post a screenshot with the empty special menu?

Link to comment

 

Hi, I get the special and noose menu but they are empty.

I'm not sure what you mean. There is no noose menu. And special should not be empty, you should have, at least, the vanilla minuteman artilery there. Can you post a screenshot with the empty special menu?

 

Thanks for the quick reply. In the special i have the option to build the oversears desk but none of this mod's items. No option to build is given.

 

post-138206-0-62239400-1494655185_thumb.jpg

post-138206-0-94651700-1494655188_thumb.jpg

post-138206-0-66650900-1494655191_thumb.jpg

Link to comment

 

 

Hi, I get the special and noose menu but they are empty.

I'm not sure what you mean. There is no noose menu. And special should not be empty, you should have, at least, the vanilla minuteman artilery there. Can you post a screenshot with the empty special menu?

 

Thanks for the quick reply. In the special i have the option to build the oversears desk but none of this mod's items. No option to build is given.

 

 

Very strange, I've got no idea why, I just retested and my 3.0 version builds and works as designed. By the way, I just tried hanging my PC and the camera failed miserably, so don't try it :))

 

I can only suggest that you try reinstalling v3.0 manually, just overwrite everything from my data folder into your data folder. If that fails, I've got no clue, other than trying to place them via console, see what happens. Try clicking a tree or something in the vicinity and pt.xx01CF83 (or ...84 / 85 / 86), where xx is my noose.esp in your load order. If this doesn't make sense to you, please send me your load order and I'll give you the complete codes.

 

Maybe try building them in god mode? Although there are no material requirements in the recipe, but just try anyway (enter console, tgm <enter>)

 

Does the hanging gun work?

Link to comment

 

How about a version without needing any of the DLC packages?

I am not aware of any DLC dependency. Which one does it say it requires?

 

 

The very latest version 3 which got a hanging gun on it. Had checked with the NMM it required DLCRobot.esm, DLCCoast.esm, DLCworkshop02.esm, DLCworkshop03.esm and DLCNukaWorld.esm MASTER files is MISSING red warring words comes out.

post-776520-0-84278100-1494667332_thumb.jpg

Link to comment

 

 

How about a version without needing any of the DLC packages?

I am not aware of any DLC dependency. Which one does it say it requires?

The very latest version 3 which got a hanging gun on it. Had checked with the NMM it required DLCRobot.esm, DLCCoast.esm, DLCworkshop02.esm, DLCworkshop03.esm and DLCNukaWorld.esm MASTER files is MISSING red warring words comes out.
Yes, I've seen that too. I don't really know how that happened, it shouldn't be that way. I'm currently on my mobile, with no access to my computer until tomorrow evening - what I want to try when I get back is to simply remove the dependencies from the ESP header in FO4Edit, and see what happens.

 

If you have FO4edit and you're willing to give it a try until I get back, please do so. Open the ESP, go to header, right click every dependency (except Fallout4.esm!) and "remove", then save the ESP and test it in game. NMM will launch the game for sure, worst case scenario you get CTD when loading a save. If that happens, deactivate the ESP and I'll look into it when I get back.

Link to comment

 

 

How about a version without needing any of the DLC packages?

I am not aware of any DLC dependency. Which one does it say it requires?

 

 

The very latest version 3 which got a hanging gun on it. Had checked with the NMM it required DLCRobot.esm, DLCCoast.esm, DLCworkshop02.esm, DLCworkshop03.esm and DLCNukaWorld.esm MASTER files is MISSING red warring words comes out.

 

 

Please try this esp, it should work. The new version that I am working on (WIP) should have no such dependency.

Noose.esp

Link to comment

Well sorry but it still need those DLC files.

 

I don't understand why. Unfortunately, I am in the middle of rebuilding the mod, so I cannot tweak around this at this time, although the esp I uploaded previously had the masters removed (are you sure you replaced the esp with the one posted / attached in my post above?).

 

You can try to remove the dependencies yourself from FO4Edit:

 

1. Launch FO4Edit, it will list all your esps

2. To save time, right click and unselect all, then select just noose.esp

3. Go to header and remove each dependency, one at a time, with the exception of Fallout4.esm, just like in my screenshot attached

4. Close FO4Edit, it will prompt you to save the esp, save it

5. Hopefully profit

post-1591796-0-46417600-1494862493_thumb.png

Link to comment

 

Well sorry but it still need those DLC files.

 

I don't understand why. Unfortunately, I am in the middle of rebuilding the mod, so I cannot tweak around this at this time, although the esp I uploaded previously had the masters removed (are you sure you replaced the esp with the one posted / attached in my post above?).

 

You can try to remove the dependencies yourself from FO4Edit:

 

1. Launch FO4Edit, it will list all your esps

2. To save time, right click and unselect all, then select just noose.esp

3. Go to header and remove each dependency, one at a time, with the exception of Fallout4.esm, just like in my screenshot attached

4. Close FO4Edit, it will prompt you to save the esp, save it

5. Hopefully profit

 

 

Dude, what i need to do now if this thing comes out?

Need some help.

post-776520-0-87794800-1494950607_thumb.jpg

Link to comment

Attached the succession of operations, in screenshots.

 

Have you downloaded and replaced noose.esp from my link above? Because I removed the masters from that one.

 

Yes i have done it on few days back. Sorry, but still got the same problem back.

 

Anyway will try that method you suggested.

 

Link to comment

 

 

Yes i have done it on few days back. Sorry, but still got the same problem back.

 

Anyway will try that method you suggested.

 

 

Yes, try the FO4Edit method above, it worked for the WIP version I am working on, and it's been stable. No reason why it shouldn't work on your side.

Link to comment

 

 

 

Yes i have done it on few days back. Sorry, but still got the same problem back.

 

Anyway will try that method you suggested.

 

 

Yes, try the FO4Edit method above, it worked for the WIP version I am working on, and it's been stable. No reason why it shouldn't work on your side.

 

 

Any idea what to do next? Any way to change the FO4Edit.ini file to allow change something on it to allow edit or do the thing you want?

 

BTW any progress so far for the newer updates?

post-776520-0-45863900-1495032852_thumb.jpg

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use