EPDGaffney Posted October 24, 2017 Author Share Posted October 24, 2017 Thank you, but it's not working. I'm using a Find package and I've set it to find the corpse in question. However, my NPC runs over to the corpse and stands on it, and does nothing for a while (default idle), then loads the Sandbox package I made for him to use in general gameplay. I'm assuming the Find package is the problem. Does that not have NPCs loot other NPCs? Here's my script in case that matters. I've tried a few other variations on this, but this is the last one I tried. I should be attaching this to the corpse, correct? Thanks. scn GSBMariaCorpse Begin OnActivate If isActionRef GSBCarmineRef == 1 PlayIdle ttnpcSadArmsLooseListenA GSBCarmineRef.AddScriptPackage GSBCarmineFoundMariaSit set GSBCarmineDialogueQUEST.GSBCCS2 to 1 Else Activate Endif End Link to comment Share on other sites More sharing options...
dubiousintent Posted October 24, 2017 Share Posted October 24, 2017 "AddScriptPackage" is a one-shot command. The package runs once, taking precedence over other packages assigned to the actor. You need to add a "EVP" command to get it to activate "immediately" otherwise it will not get run until packages are next evaluated (every 10 seconds). When you say "Does that not have NPCs loot other NPCs", just what are you expecting? An NPC to bend down over another and reach for something? Never have seen that behavior. It would have to be a custom animation I imagine. Usually their "loot" just appears in their inventory, apparently based upon proximity. I haven't seen anything about how to determine/force when an idle animation is played. Something to add to the "Getting started creating mods with GECK" article if anyone knows. -Dubious- Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 24, 2017 Author Share Posted October 24, 2017 (edited) I was expecting the NPC to 'activate' the corpse, and for this script to change that from the default behaviour of looting to playing this animation. I have seen many NPCs loot other NPCs, so I know it happens; I'm just not sure what to do to use that in a script or package. I think I've read that the AI will normally only loot a body during combat and I think it needs to be for some weapon that's more powerful than what they already have (or ammo for it) and probably needs to be a weapon their Combat Style allows them to use. But in this case, I thought the Find package would cause this NPC to activate the corpse as it would any other Activator. The question then becomes, is a corpse an Activaor? I thought it was, but it's possible the game doesn't see it that way. In my experience so far, the AddScriptPackage command causes the new package to load instantly if it's called in ways that intend it to be used that way. I have been using three in a row, and they transition seamlessly and instantly. In my case here, the trouble is that I can't get it to play this animation. If I settled for an animation that looks ridiculous, as I can do, everything works as intended (well, if I speak to the NPC at a certain point, at least, so not completely as intended, but close). I made a custom furniture marker (which if it isn't in your guide, probably should be, because it's nowhere else but some comment I found, far as I saw), and it seems to loop incorrectly, but if I knew more about the Gameplay-->Idle Animations menu, I imagine I could fix that. I just expected this to be simpler. So, what happens when you set an NPC to find a corpse? Because even if it's not intended to loot it, the package is not iterating to done or it would set variables it isn't setting and load a package it isn't loading (I've since moved that particular AddScriptPackage command to the corpse's script, but it didn't work before that, either). As I said earlier, when using the custom furniture marker, it did work, but only if I spoke to the NPC during that animation; otherwise he would just go home and sandbox. Edited October 24, 2017 by EPDGaffney Link to comment Share on other sites More sharing options...
Mktavish Posted October 24, 2017 Share Posted October 24, 2017 For starters ... eegads ... sorry to EPDGaffney and Uhmatt for the cross chatter on another mod.I was expecting the NPC to 'activate' the corpse, and for this script to change that from the default behaviour of looting to playing this animation. I have seen many NPCs loot other NPCs, so I know it happens; I'm just not sure what to do to use that in a script or package. Like dubious mentioned , there is no animation for that to happen. And the only reason Uhmatt mentioned it , is to get an OnActivate script to run. Looting is besides the point. ? I think I've read that the AI will normally only loot a body during combat and I think it needs to be for some weapon that's more powerful than what they already have (or ammo for it) and probably needs to be a weapon their Combat Style allows them to use. But in this case, I thought the Find package would cause this NPC to activate the corpse as it would any other Activator. The question then becomes, is a corpse an Activaor? I thought it was, but it's possible the game doesn't see it that way. The corpse is more directly a container ... but those work as activators just fine also. In my experience so far, the AddScriptPackage command causes the new package to load instantly if it's called in ways that intend it to be used that way. I have been using three in a row, and they transition seamlessly and instantly. In my case here, the trouble is that I can't get it to play this animation. If I settled for an animation that looks ridiculous, as I can do, everything works as intended (well, if I speak to the NPC at a certain point, at least, so not completely as intended, but close). It is a happy accident that your npc changed their script imediately through AddScriptPackage ... the game has an internal clock running that calls EVP on them ... I guess about every 10 seconds. But would imagine that can vary with frame rates.So yes some times they will call it right away , and some times it will wait nearly 10 seconds. Hence use EVP for consistency. I made a custom furniture marker (which if it isn't in your guide, probably should be, because it's nowhere else but some comment I found, far as I saw), and it seems to loop incorrectly, but if I knew more about the Gameplay-->Idle Animations menu, I imagine I could fix that. I just expected this to be simpler. A custom furniture marker might be the way to go in this case , but as you can see , is out of the norm. So that's a lot of geck testing for you to do. Of which I still say , hiring a method actor (hehe) to fill in for the dramatic scene (duplicate)Would be easier and at the very least ... tell you it wasn't something else with your npc tripping it up. So, what happens when you set an NPC to find a corpse? Because even if it's not intended to loot it, the package is not iterating to done or it would set variables it isn't setting and load a package it isn't loading (I've since moved that particular AddScriptPackage command to the corpse's script, but it didn't work before that, either). As I said earlier, when using the custom furniture marker, it did work, but only if I spoke to the NPC during that animation; otherwise he would just go home and sandbox. Have you tried the "UseItem" package ? But I remember you saying something about the npc is going to find a note on the corpse ... and is this to say , you are using "GetHasNote" as a conditional statement to play the idle. Which I think typically that is just a player condition. Cuz npc's aint gona read it. So try to use something else ... like a pencil for example. Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 25, 2017 Author Share Posted October 25, 2017 (edited) Thanks, Mktavish. I really thought the Use Item At package was going to do it but it didn't. I've been doing a lot of testing for this mod and for some bug fixes (more like model oversights), and I admit I didn't remember seeing NPCs loot corpses before I started doing a lot of this, but now that I have, I can assure you that NPCs loot corpses and there is an animation for it. The main antagonist of my mod is now a humanoid Creature type, but when it was originally an NPC, before I changed it to Creature, it would loot every corpse it found if that corpse had weapons, because I hadn't given it any weapons yet. Similarly, I tested this earlier on the Powder Gangers by Goodsprings. I took away all the weapons from one via console, killed the other one, and watched the first one run over to his comrade's body and loot it, animation and all. Not that the looting animation is really important here, as I'm trying to change it to something else anyway. I just wanted to attempt to use OnActivate to trigger the animation in question, because Idle Markers aren't working, nor any other method I've tried. The note was always going to be faked. This corpse has a note that if the player picks up, they can give to this NPC. Otherwise, the dialogue option without the note causes this scene to play out, at which point I'll just remove the note from the corpse via script. I was never planning to check the NPC for the note in a script. I only mentioned that because at this point, I'd consider settling for my NPC doing the looting animation at the corpse before loading the last package, just to show the player he's seen the corpse, and if he mentions the note afterwards, it will make sense to the player that he did the looting animation beforehand. Not what I wanted, but I'm starting to care less and less about what I wanted. See, what I don't get is why none of what's on geck.bethsoft.com is working for me. Why are Idle Markers not playing idles? Why does my NPC not play the idle animation specified in the End tab in the Package menu? Why does my NPC not activate the corpse if containers count as activators? I really don't know what I'm doing wrong but as far as I understand it, this is supposed to work. If I put an idle marker in a patrol package and the idle has no conditions on it, the idle is supposed to play for the duration set in the patrol data tab when you double-click that marker...isn't it? I haven't been setting a topic along with the idles in these tabs. I didn't think I had to, but perhaps I misunderstood? Can someone please give me an example of a PlayIdle command that they know works? I can't get it to play under any circumstances, even with the console, so I imagine I'm using the wrong syntax or something. About the EVP, I can include that in my scripts if that's the standard thing to do, no problem, but I really don't think that it's been an accident that it's working instantaneously for me without it. Perhpaps certain package types will change automatically? I have been switching between the initial patrol package and several others maybe 100 times over the past week testing this, and the transition at that point is always seamless. Thanks for all the help. I'm going crazy with this here (my game has I think ten or fifteen hours logged just testing this short scene), so I appreciate it. Edited October 25, 2017 by EPDGaffney Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 25, 2017 Share Posted October 25, 2017 Thank you, but it's not working. I'm using a Find package and I've set it to find the corpse in question. However, my NPC runs over to the corpse and stands on it, and does nothing for a while (default idle), then loads the Sandbox package I made for him to use in general gameplay. I'm assuming the Find package is the problem. Does that not have NPCs loot other NPCs? Here's my script in case that matters. I've tried a few other variations on this, but this is the last one I tried. I should be attaching this to the corpse, correct? Thanks. scn GSBMariaCorpse Begin OnActivate If isActionRef GSBCarmineRef == 1 PlayIdle ttnpcSadArmsLooseListenA GSBCarmineRef.AddScriptPackage GSBCarmineFoundMariaSit set GSBCarmineDialogueQUEST.GSBCCS2 to 1 Else Activate Endif EndYou're forcing a package right as the idle is supposed to play. You need something to give the idle time to play. I don't know if IsAnimPlaying will work right on an idle, but haven't tested it or anything, so you may need to use a timer. Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 25, 2017 Author Share Posted October 25, 2017 (edited) Thanks, Matt. Unfortunately, that script is one of maybe twenty (or more) different ways I've tried to do this. I've tried it without even having the AddScriptPackage line there just to see would it play the idle and it doesn't. Right now, I've stopped even trying to add the next package and this script is not active as I've been trying to use markers, which as I understand it is supposed to be a normal method. The GECK site says that selecting an idle in the On End tab of a package will play that idle before the next package so long as Must Complete is flagged. I've tried this even without any other packages set to load afterwards and no idle ever plays (besides the default one). Edited October 25, 2017 by EPDGaffney Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 26, 2017 Author Share Posted October 26, 2017 Sorry for the double post (if that's frowned upon here, which I don't actually know that it is), but in case anyone's planning to give me any more help with this, I just want to make sure they see this: I've sorted out my problem, at least to a reasonably satisfactory degree. I'm not planning to do any more work on this part of the mod unless someone has a suggestion on how to achieve my ideal goal. I've settled for having my NPC loot the corpse, stand there for a moment, and then load the final package. The looting in this case was done using a dummy item I made for this purpose, which was then made the target of a Find package and placed in the corpse's inventory. I actually forgot to remove that script from the corpse before testing this, and he never played the animation I put in that script (PlayIdle ttnpcSadArmsLooseListenA), whether before or after the looting. He played the standard looting animation (which annoyingly was the mid-height one and not the floor-height one but I'm not sure I can test this scene again without going utterly mad, so I'm going to have to accept that). I have a feeling I could have used an Actor Effect as a workaround, an idea I got from the GECK site's suggestion for using PlayIdle on the player (which is bugged, according to the site), but again, I can't do any more stuff with this if I want to remain sane. I'm moving on. Thanks, everyone. Link to comment Share on other sites More sharing options...
Mktavish Posted October 28, 2017 Share Posted October 28, 2017 (edited) I know you figured something out and decided that is enough pulling you hair out. But just to check ... did you toggle archive invalidation. Meaning turn it off then on again ?It helps ... with packages ... not sure why. And one last idea ... what if you used the Quest Conversation tab to play the idle.But not just play the idle ... have it voice the mourning you want to convey to the player at that scene ? Although I have to say I tried it , and the idle animation you mention "ttnpcSadArmsLooseListenA" .... in my opinion has a problem.So could be as simple as different animation will fix your problem ^shrug^ I would say ... look at ConfessorCromwell in the fallout 3 game (megaton) and see if those methods work for FNV Oh wait ... could be specific to the armour the speaker is wearing ? Edited October 28, 2017 by Mktavish Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 28, 2017 Author Share Posted October 28, 2017 I really appreciate all that. If I decide to come back to this later, I'll be glad to have your suggestions here. I tried a couple of animations and none of them worked (nor did the scripts usually run, meaning the package wasn't finishing). Didn't try archive invalidation, though, or any of your other ideas. Thanks for those. Link to comment Share on other sites More sharing options...
Recommended Posts