Jump to content

Recommended Posts

  

1 hour ago, TrainWrecker5 said:

 

That gives me an idea.  So AAF Violate adds the shock trigger to the NPC's inventory.  There must be a way to remove all other weapons meaning that the only thing they have is the shock trigger, right?  I haven't done anything like this before but I'll see if I can figure it out.  Hoping that would work!


Just in case I can't figure it out, if anyone can offer me any help on how to do this I'd appreciate it!

 

I was able to use the code at the bottom of the post to remove weapons from the NPC.  I also noticed that the script "NonCombatWeapon.psc" was attached to the remote trigger so removed that.

 

That improved things to where the NPC would run around with the remote trigger in hand, but was fleeing in fear without being willing to use it.  One thing I wanted to try and confirm with ThirdPartyApi.psc is what the variable RemoteTrigger was assigned to.  I tried to view this in Creation Kit by opening up Script properties from RH_MainQuest, but for some reason I can't view the properties for ThirdPartyApi.  In fact, I can't open properties for most scripts.  I can open it for Resources so I know it works.  I'm assuming RemoteTrigger must be the weapon RH_RemoteTrigger, but it would be nice to confirm.

 

I tried setting damage to 100 for RH_RemoteTrigger and then took the weapon off the dead body and used it on myself, but it did no damage to me.

 

I'm at a loss at this point!  So close but I can't get these last things figured out.

 

Function RemoveNPCWeapons(Actor akActor)
    int index = 0

    While (index < 12)
        Weapon equippedWeapon = akActor.GetEquippedWeapon(index)
    
        if equippedWeapon
            akActor.RemoveItem(equippedWeapon, -1, True, None)
            return
        endIf
        index += 1
     endWhile
EndFunction

Link to comment
3 hours ago, TrainWrecker5 said:

That gives me an idea.  So AAF Violate adds the shock trigger to the NPC's inventory.  There must be a way to remove all other weapons meaning that the only thing they have is the shock trigger, right?  I haven't done anything like this before but I'll see if I can figure it out.  Hoping that would work!

I've tried that before via openactrocontainer 1 and all they did was run away and either hide or grab a real weapon. The remote does 0 damage so the engine can't calculate the damage and thus sees it as nothing. I just wonder if you made a 3rd version that did damage and tweaked Violate to use that version when collared...

Link to comment
3 hours ago, TrainWrecker5 said:

There must be a way to remove all other weapons meaning that the only thing they have is the shock trigger, right?  I haven't done anything like this before but I'll see if I can figure it out.  Hoping that would work!

 

It might work, but NPC combat behavior includes automatically scavenging for nearby weapons and ammo (loose or in containers, including corpses of their comrades). Without changing that aspect of combat behavior, simply removing their other weapons is likely to result in them picking up more and switching to using those.

Link to comment
41 minutes ago, vaultbait said:

 

It might work, but NPC combat behavior includes automatically scavenging for nearby weapons and ammo (loose or in containers, including corpses of their comrades). Without changing that aspect of combat behavior, simply removing their other weapons is likely to result in them picking up more and switching to using those.

Or going bare knuckle.  It depends on distance from PC. So yeah, the combat AI needs to be overridden in order to use a "weapon" that really isn't a weapon, but acts like a weapon.

Link to comment

The only way to do this reliable outside of butchering the npc from top to bottom, is to take control of it's behaviour using a scene with packages with the npc getting filled in an "attacker" alias. no other elegant way around that and also not that difficult to do tbh. 

 

It could be added in RH as a "force trigger" addition to the framework or add it into Violate as part of the capture event. Both have their pro's and con's.

Link to comment

The trigger is not a real weapon and the AI sees that it does 0 damage and gets scared or uses a different weapon. Which is correct, if you point it at somebody and pull the trigger then it does do no damage, it only works on people who are wearing a shock collar (and in that case you don't need to point it at them, you just need to be nearby).

 

Yeah, you would need to take control of the actor in your mod and make them use the trigger, either using a package or with scripts. There is a function in ThirdPartyLibrary that can be used to do this (NpcAimAndFireRemoteTrigger) but it was designed for cut scenes, I don't know if it will work if the NPC is in combat. It's possible that the combat package will take over and prevent the function from working, you would have to try it out.

Link to comment

I have this bug where my 3rd person View is stuck. It acts like I still have the cuffs on even after they have been removed. Its very annoying because my view is permanently stuck Dead Center all zoomed in n shit.... Please tell me I'm not the only one whos seen this, and who knows how to fix it?

 

Sorry if the Answer is already here but I'm not reading 65 pages of text in hopes that I find something.

Edited by kaindayo
Link to comment
On 11/4/2023 at 5:52 AM, TrainWrecker5 said:

With AAF Violate, when the player gets collared by someone the enemy who collared them will be holding the remote trigger in their hands.  However, if a battle breaks out between the player and the enemy, the enemy just switched to their normal weapon rather than using the convenient shock trigger that was already in their hands.

 

I know AAF Violate is just making use of the Real Handcuffs framework so I wondered if someone here knows if there is a way to have the enemy utilize the shock trigger in combat.  I tried going in an editing the shock trigger to be "Playable" and removed Non-Hostile but still they just put it away during combat and not sure why.

No clue if you solved this issue or not, but I made a mod that actually does exactly what you're talking about. I never released it, but the solution I found was that the API for RH has a function called `NpcAimAndFireRemoteTrigger`, Which does exactly what it says on the tin. My solution wasn't to actually modify the AI behavior packages, but instead periodically call that function every few seconds. When called, that function will override the combat AI, and the NPC will pull out the trigger and... well... trigger it. They then put it away and continue shooting with their normal gun. This is the exact code that I wrote to get this behavior to work.

 

Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
    if (akTarget == GetPlayer())
        while (aeCombatState == 1 && !self.GetActorRef().isDead())
            RH_MainQuest.NpcAimAndFireRemoteTrigger(self.GetActorRef(), akTarget, numberOfTimes = 1)
            Utility.Wait(Utility.RandomInt(10,15))
        EndWhile
    EndIf
EndEvent

 

Its part of a larger mod that I wrote for myself, but never actually released because I was embarrassed AF that the most complex mod I've ever made is an extension of a mod from this site. But fuck it, here y'all go. https://github.com/Noncorporeal/KO-Consequences

 

Pretty sure there's still a bunch of Debug popups in the mod tho, so heads up.


The specific file this code is in is here: https://github.com/Noncorporeal/KO-Consequences/blob/main/Scripts/Source/User/TriggerCollar.psc

 

On 11/7/2023 at 12:08 PM, Kharos said:

I don't know if it will work if the NPC is in combat. It's possible that the combat package will take over and prevent the function from working, you would have to try it out.

 

Figured I should probably loop you into this response, but to answer your question, yes. This function does indeed work in combat. Tho I had to make some modifications so that they would only ever use a high powered trigger, because the regular one has such a small range that its basically useless in a combat scenario

Edited by noncorporeal
Link to comment
22 hours ago, noncorporeal said:

Figured I should probably loop you into this response, but to answer your question, yes. This function does indeed work in combat. Tho I had to make some modifications so that they would only ever use a high powered trigger, because the regular one has such a small range that its basically useless in a combat scenario

 

Cool  and thank you - I honestly did not know if it would work, when I wrote the function I intended it for "cut scenes", not for combat.  And I think using the high-powered one for that purpose is a good idea ?.

 

Btw, I did not dig into your code to see how you made it use the high powered one, but there is an override for that function:


Bool Function NpcAimAndFireRemoteTriggerWithMods(Actor akActor, Actor target, Int numberOfTimes = 1, Int mods = 0)

And the following definition:

Int Property ModPowerfulTransmitter = 1 AutoReadOnly

So if you call that override with mods = 1, and the NPC does not have a remote trigger, then the one that is created will use a high-powered transmitter.

 

Edited by Kharos
Link to comment
3 hours ago, Kharos said:

 

Cool  and thank you - I honestly did not know if it would work, when I wrote the function I intended it for "cut scenes", not for combat.  And I think using the high-powered one for that purpose is a good idea ?.

 

Btw, I did not dig into your code to see how you made it use the high powered one, but there is an override for that function:

 

 

Well the short version of it is when the player gets KO'd, I just... give that NPC a trigger and call it a day. Since they already have one any time I call the function, they use the one they have. Plus it has the added benefit of giving the player one for defeating an enemy that can just stun you at will, or worse, instantly kill you.

Link to comment
  • 2 weeks later...
On 11/10/2023 at 11:47 PM, Kharos said:

 

Cool  and thank you - I honestly did not know if it would work, when I wrote the function I intended it for "cut scenes", not for combat.  And I think using the high-powered one for that purpose is a good idea ?.

 

Btw, I did not dig into your code to see how you made it use the high powered one, but there is an override for that function:


Bool Function NpcAimAndFireRemoteTriggerWithMods(Actor akActor, Actor target, Int numberOfTimes = 1, Int mods = 0)

And the following definition:

Int Property ModPowerfulTransmitter = 1 AutoReadOnly

So if you call that override with mods = 1, and the NPC does not have a remote trigger, then the one that is created will use a high-powered transmitter.

 

I didn't know about this feature, very cool. I tried it on a script to replace "TriggerRestraint()" and the NPC did aim at the PC but nothing happened (PC didn't get shocked). There is nothing in the log so any idea what went wrong ? is there a flag that has to be set (unset) on the collar for the function to work ?

Var[] gkArgs = new Var[4]
gkArgs[0] = akSource as Actor
gkArgs[1] = akTarget as Actor
gkArgs[2] = Count as Int
gkArgs[3] = 1 as Int
Bool Success = RHthirdPartyApi.CallFunction("NpcAimAndFireRemoteTriggerWithMods", gkArgs)

Success == True and i think i didn't see any trigger in NPC hand, he just aimed with his default weapon.

Edited by lee3310
Link to comment
On 11/22/2023 at 8:49 PM, lee3310 said:

I didn't know about this feature, very cool. I tried it on a script to replace "TriggerRestraint()" and the NPC did aim at the PC but nothing happened (PC didn't get shocked). There is nothing in the log so any idea what went wrong ? is there a flag that has to be set (unset) on the collar for the function to work ?

Var[] gkArgs = new Var[4]
gkArgs[0] = akSource as Actor
gkArgs[1] = akTarget as Actor
gkArgs[2] = Count as Int
gkArgs[3] = 1 as Int
Bool Success = RHthirdPartyApi.CallFunction("NpcAimAndFireRemoteTriggerWithMods", gkArgs)

Success == True and i think i didn't see any trigger in NPC hand, he just aimed with his default weapon.

 

Looks like he weapon switch somehow did not work   ?  (the script needs to temporarily force the NPC to switch weapons). That was the reason that the collar was not tiggered, there is no flag that needs to be set.

Link to comment
10 hours ago, Kharos said:

 

Looks like he weapon switch somehow did not work   ?  (the script needs to temporarily force the NPC to switch weapons). That was the reason that the collar was not tiggered, there is no flag that needs to be set.

I see, maybe it has to do with "classic holstered weapons" or the weapon has the prevent unequip flag. Will investigate, thanks.

Link to comment
On 11/24/2023 at 8:54 AM, Kharos said:

 

Looks like he weapon switch somehow did not work   ?  (the script needs to temporarily force the NPC to switch weapons). That was the reason that the collar was not tiggered, there is no flag that needs to be set.

Turns out the problematic NPC was in furniture (Bar), that's why the trigger was failing. I think the trigger event is called before the exit furniture idle is complete (exit to stand), so i added this check in my function call:
 

If akSource.GetSitState() != 0
		Action ExitFurn = Game.GetForm(0x2248C) as Action ;FurnitureInteractionExitQuick
		akSource.PlayIdleAction(ExitFurn)
		Utility.wait(1.1)
EndIf

And "NpcAimAndFireRemoteTriggerWithMods" never failed again after that (on the same ref). When the aim idle is played, the NPC would have already fully exited the furniture.

Edited by lee3310
Link to comment
  • 2 weeks later...

Patch that uses RobCo Patcher to add the TARDIS Exteriors from Fallout Who Regenerated to be useable while handcuffed (as the TARDIS exteriors are technically activators that act as doors, and needed to be added to the list of exclusions) Also includes a file for the exteriors added by DaimianK13's addon (which is posted on the FWR discord (note, that discord doesn't allow NSFW))

 

Made into a zip so you can install via your favorite mod manager, or just unzip the contents into Data, if you want to do it manually.

 

FWR_RealHandcuffs.zip

EDIT: Initial testing seems to work correctly.

Edited by ptmc2112
Link to comment

This mod removes handcuffs from some leveled lists.

 

Wrye Bash merges leveled lists, but I do not see a tag for it to respect this change.

 

Forcing this mod to load after the bashed patch "fixes" that problem, but I was wondering if there's a better way? (I cannot figure out how to remove an item from a leveled list in fo4edit, for example).

Link to comment
7 hours ago, sen4mi said:

This mod removes handcuffs from some leveled lists.

 

Wrye Bash merges leveled lists, but I do not see a tag for it to respect this change.

 

Forcing this mod to load after the bashed patch "fixes" that problem, but I was wondering if there's a better way? (I cannot figure out how to remove an item from a leveled list in fo4edit, for example).

In xedit, Right click and remove, that's it.

Edited by lee3310
Link to comment
10 minutes ago, lee3310 said:

In xedit, left click and remove, that's it.

 

Right-click in my case (maybe that's what you meant?). What usually trips me up for a moment is that you have to right-click on the value, not the field name. I always end up clicking in the wrong place and then scratching my head for a bit before I realize what I did.

 

Also though, I avoid bashed patches like the plague. There are lots of mods that intentionally remove records from various kinds of lists with their plugins, so if Wrye Bash adds them all together then that sounds absolutely frightening. But it really seems like a tool designed for an earlier era of modding, before as much was understood about plugin flags, archives, and techniques for avoiding plugins entirely for certain kinds of patching.

Link to comment
8 hours ago, vaultbait said:

Also though, I avoid bashed patches like the plague. There are lots of mods that intentionally remove records from various kinds of lists with their plugins, so if Wrye Bash adds them all together then that sounds absolutely frightening. But it really seems like a tool designed for an earlier era of modding, before as much was understood about plugin flags, archives, and techniques for avoiding plugins entirely for certain kinds of patching.

Other than Real Handcuffs, I don't think I have any of those installed.

 

(I spend a lot of time, before each game, in fo4edit and other programs, trying to go over the tremendous volume of mod install instructions, in part to resolve conflicts between mods, and to address issues I have found in previous playthroughs. I do not particularly like the design of wrye bash, but it's one of my tools for dealing with the problem where too mods edit leveled lists directly rather than manipulating them at runtime. (Other tools include: not installing mods and manually editing mods and adding load order constraints.))

Link to comment
13 hours ago, sen4mi said:

Other than Real Handcuffs, I don't think I have any of those installed.

 

(I spend a lot of time, before each game, in fo4edit and other programs, trying to go over the tremendous volume of mod install instructions, in part to resolve conflicts between mods, and to address issues I have found in previous playthroughs. I do not particularly like the design of wrye bash, but it's one of my tools for dealing with the problem where too mods edit leveled lists directly rather than manipulating them at runtime. (Other tools include: not installing mods and manually editing mods and adding load order constraints.))

 

An obvious one which comes to mind is the Gender Ratios mod (a modern flexible alternative to MTO), because it needs to clear the ungendered face pools (stored as leveled actor lists in the base game and DLC plugins) and then use a script to repopulate them from proportional copies of the gendered pools based on what ratios the user chooses for each in MCM. This ends up conflicting with face overhauls like Simple Settlers or the Diverse NPC mods which replace or extend faces in all those pools, so I've been working through creating patches to get them to interoperate correctly (this involves a new plugin which forwards the ungendered list deletion from GR and then replaces the gendered pools with those from the face overhauls).

Link to comment
10 hours ago, vaultbait said:

 

An obvious one which comes to mind is the Gender Ratios mod (a modern flexible alternative to MTO), because it needs to clear the ungendered face pools (stored as leveled actor lists in the base game and DLC plugins) and then use a script to repopulate them from proportional copies of the gendered pools based on what ratios the user chooses for each in MCM. This ends up conflicting with face overhauls like Simple Settlers or the Diverse NPC mods which replace or extend faces in all those pools, so I've been working through creating patches to get them to interoperate correctly (this involves a new plugin which forwards the ungendered list deletion from GR and then replaces the gendered pools with those from the face overhauls).

Thanks... I might try that mod in a future run - it sounds like a good start on simulating some consequences of long-term combat. (After you have gotten your patches working, I mean. For now, I haven't downloaded it.)

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