Guest Posted May 5, 2020 Posted May 5, 2020 Recently I wanna do a mod about whipping. I don't know if it is realizable: When a NPC stuck at furniture (like tara's furniture), the other can hit the npc by whip or punch but with no damage, just play react animation like struggle, npc can play different animation, also voice according to weapon type when npc get hit. I think the main process is: NPC use device->play idle animation. (like tara's furniture idle animation) NPC get hit->play struggle animation. NPC struggle animation end->return to idle animation. Anybody know how to do it? I really want it!
Corsayr Posted May 5, 2020 Posted May 5, 2020 19 minutes ago, PsycheHHH said: Recently I wanna do a mod about whipping. I don't know if it is realizable: When a NPC stuck at furniture (like tara's furniture), the other can hit the npc by whip or punch but with no damage, just play react animation like struggle, npc can play different animation, also voice according to weapon type when npc get hit. I think the main process is: NPC use device->play idle animation. (like tara's furniture idle animation) NPC get hit->play struggle animation. NPC struggle animation end->return to idle animation. Anybody know how to do it? I really want it! Conditional idles can be initiated fairly easy using this mod Dynamic Animation Replacer as long as you can provide a qualification like: IsFemale() AND NOT IsWornHasKeyword("Skyrim.esm"| 0x0006C0EC) AND NOT IsWornHasKeyword("Skyrim.esm"| 0x000A8657) This is for one that plays the animation when there is no main body item equipped (so naked)
Corsayr Posted May 5, 2020 Posted May 5, 2020 I was actually just getting ready to post a thread asking if anyone knew of a condition i could add that would exclude these types of conditional idles from triggering if you were in a ZAZ furniture, as the conditional idles tend to break zaz furniture by playing. ? That same condition as a NOT would be the condition you are looking for as an IS
Guest Posted May 5, 2020 Posted May 5, 2020 7 minutes ago, Corsayr said: I was actually just getting ready to post a thread asking if anyone knew of a condition i could add that would exclude these types of conditional idles from triggering if you were in a ZAZ furniture, as the conditional idles tend to break zaz furniture by playing. ? That same condition as a NOT would be the condition you are looking for as an IS Alright, if I let npc play idle animation with object (like my furniture anim) without using furniture, hitting makes her change idle to struggle (also with object), is that available?
Corsayr Posted May 5, 2020 Posted May 5, 2020 44 minutes ago, PsycheHHH said: Alright, if I let npc play idle animation with object (like my furniture anim) without using furniture, hitting makes her change idle to struggle (also with object), is that available? I can't think of a condition to check for in that instance, unless you had the strike put the target in combat but somehow prevented combat initiation? @Blackbird Wanderer Does something like that on a subjugation attempt in SBC. I don't know if that particular thing would work as it takes some doing to prevent your followers from killing the Bandit captive when it does that, and you are basically taking about something that could happen in a very uncontrolled environment like a city, right? But if it could work, that would be perfect. Then you could condition basically IS in ZAZ furniture AND is in this combat mode... play this animation.
Blackbird Wanderer Posted May 5, 2020 Posted May 5, 2020 10 minutes ago, Corsayr said: @Blackbird Wanderer Does something like that on a subjugation attempt in SBC. Sorta. 13 minutes ago, Corsayr said: I can't think of a condition to check for in that instance, unless you had the strike put the target in combat but somehow prevented combat initiation? I wrote a Function that does this; it turns it on and off depending on one of the variables passed to it, and does it via applying an AI Package with the ActorUtil script. Were I to do it again, I would do it via an Alias. For this application I would do it via an Alias with a script attached with something like this: Spoiler Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If InZazFurnitureCondition Self.SetActorValue("aggression", 1) ; Change Aggression back to Aggressive Self.StopCombat() (akAggressor as Actor).StopCombat() EndIf EndEvent The condition InZazFurnitureCondition that would need to be built could be done various ways. A Keyword attached to the Alias is probably the cleanest way to go about it and would use the Actor.HasKeyword(Keyword) Function. Does this help, or just muddy the waters?
Guest Posted May 5, 2020 Posted May 5, 2020 1 hour ago, Blackbird Wanderer said: Does this help Helpful, but how to make the npc in ZazFurniture play animation from static to react, just Actor.PlayAnimation("struggle") and then turn back? (Sry im a noob modder?)
Blackbird Wanderer Posted May 5, 2020 Posted May 5, 2020 9 hours ago, PsycheHHH said: Helpful, but how to make the npc in ZazFurniture play animation from static to react, just Actor.PlayAnimation("struggle") and then turn back? (Sry im a noob modder?) I didn't address that part of the question because I thought it was already covered by @Corsayr with the Dynamic Animation Replacer (I have no experience with that). The Function "PlayAnimation()" you suggested is an ObjectReference Function and it cannot be called on Actors. It's really used mostly to animate switches, doors, etc. The library suggests using SendAnimationEvent() from the Debug script instead . . . but that one is powerful like a shotgun pointed at your foot. I do use it, but sparingly. There's even a warning on it's library page: "This bypasses the check on ObjectReference that prevents sending events to actors. If you use it to send an event to actors, you will most likely mess up the actor permanently as the internal actor data may no longer match their animation state." I think PlayIdle() from the Actor script is the Function you actually want here. If you chose to do the reaction directly, the safest way to do so would just be a matter of adding a line to the previously suggested OnHit() script like so: Self.PlayIdle(WhateverIdle) If you wanted to have each reaction not be exactly the same idle, you could additionally randomly select from appropriate idles to define "WhateverIdle" as a variable -- I did something just like this to randomize selected idles from GSPoses upon Captive release. To return to the previous static state you just apply the same idle again, however this is best applied if the idle is defined as a loop. The downside is the Actor will "snap" to the new idle. If it's not a loop, and it's already run out its allotted time, reapplying it will (of course) just turn it back on again. If it were me setting this up, I would define custom versions of all the idles and make them non-looping so they just run their allotted time unless overridden by another subsequent animation. This way they are then applied only once and just expire so the Actor returns to whatever underlying idle(s) may be set for them, possibly in the ReferenceAlias. You're new to modding, but do you know how to script in Papyrus at all? I can provide examples, but that's only fruitful if you sort of know what you're looking at.
Guest Posted May 5, 2020 Posted May 5, 2020 15 minutes ago, Blackbird Wanderer said: You're new to modding, but do you know how to script in Papyrus at all? I can provide examples, but that's only fruitful if you sort of know what you're looking at. Toooooons of thank for your advice!!! I'm looking for tutorial to make mod, but most of them just tell me how to level design, navmesh, create a npc......but script part is hard to find (I think), I really appreciate it if you share some examples for me.?
Blackbird Wanderer Posted May 5, 2020 Posted May 5, 2020 2 hours ago, PsycheHHH said: Toooooons of thank for your advice!!! I'm looking for tutorial to make mod, but most of them just tell me how to level design, navmesh, create a npc......but script part is hard to find (I think), I really appreciate it if you share some examples for me.? This is simplified/truncated, but should provide you an example of how to do some of what I outlined. The part not listed is the Script definition that will say "Extends" to something, and all of the property declarations. This is just what is inside the Function itself, but could just as easily be inside an Event like OnHit() like I described. Idles, unfortunately, are rather FormList unfriendly, otherwise I would have built this that way. Some Forms aren't accepted by FormLists inside CK, but there are other elaborate ways of doing it. This is the cave-dweller blunt force method/version. Spoiler Function SBCReleaseCaptive(Actor akActor, Int iState) ; 0: Cower ; 1: No Cower If iState Int i = Utility.RandomInt(0,13) Idle akIdle If i == 0 akIdle = SBC_HipSway02 ElseIf i == 1 akIdle = SBC_GS7 ElseIf i == 2 akIdle = SBC_GS9 ElseIf i == 3 akIdle = SBC_GS36 ElseIf i == 4 akIdle = SBC_GS45 ElseIf i == 5 akIdle = SBC_GS92 ElseIf i == 6 akIdle = SBC_GS105 ElseIf i == 7 akIdle = SBC_GS122 ElseIf i == 8 akIdle = SBC_GS125 ElseIf i == 9 akIdle = SBC_GS126 ElseIf i == 10 akIdle = SBC_GS146 ElseIf i == 11 akIdle = SBC_GS149 ElseIf i == 12 akIdle = SBC_GS152 ElseIf i == 13 akIdle = SBC_GS153 EndIf akActor.PlayIdle(akIdle) Else akActor.PlayIdle(SBCIdleHandsBound) Utility.Wait(0.1) akActor.PlayIdle(SBCIdleFree) akActor.PlayIdle(IdleCoweringLoose) EndIf Utility.Wait(1.5) akActor.SetRestrained(False) akActor.GetActorBase().SetEssential(false) Utility.Wait(2.5) akActor.PlayIdle(SBCIdleFree) EndFunction
Recommended Posts
Archived
This topic is now archived and is closed to further replies.