Jump to content

How to make an NPC forcegreet the player during combat?


mooglechick

Recommended Posts

So to put it simply I'm trying to do something like this:

 

Player is fighting a group of NPCs.

One of the NPCs forcegreets the player and combat stops.

When the scene/dialogue is over, combat happens again.

 

The only problem I'm having is the first part where I can't get the dialogue to start and the NPC just keeps attacking. I have a forcegreet package that overrides combat but nada. Anyone got any ideas? Thanks in advance!

Link to comment
Share on other sites

Thats hard to say, not enough details ... Is this the only package you attached to them ? Is this package on the top of the stack? Have you set some conditions for your package? Something like "GetDistance" to Player or something else to detect that the package has to start in some certain moment.

 

I can show my example, but I have not tried using forcegreet and to override combat, so maybe this is not the case. I have "useweapon" package that makes npc (2 quest aliases) practice weapons with each other. And the second package that makes them stop if one of them is bleeding out. All packages have conditions. The UseWeapon package has condition for Alias " IsBleedingOut == 0 ", and the HoldPosition/Stop package has condition " IsBleedingOut == 1". Because their re-evaluate their packages only once in 10(or so on) seconds, I added a magic effect that detects the bleeding out situation and forces aliases to evaluate their stack "OnEnterBleedOut" .

Link to comment
Share on other sites

I've honestly never really gotten forcegreet to work properly, combat or not, so I feel your frustration! I'm trying to do something somewhat similar to you, but in my mod:

 

1. the PC and the companion I made as part of this mod greet an NPC

2. They to that NPC for a moment

3. Combat begins

4. Once combat ends, the PC is forcegreeted by their companion and they talk about what just happened.

 

I can get everything to work up to number 4. After combat is over (and the NPC is dead) the companion I made just wanders around and has the default dialogue I gave them, even though I tried adding a forcegreet package with conditions such as getdistance (between the PC and the companion I made) and isdead (for the NPC that has to be killed). I even tried setting quest stages using defaultaliasondeath, and even though that *does* set the quest stage I want, the companion I made still won't talk to me afterwards, even if I add a dialogue condition for that particular quest stage.

 

I would also be really grateful for any help on this! Sorry I can't be of more help to you, OP. =( But maybe someone can point us both in the right direction? =)

Link to comment
Share on other sites

Thats hard to say, not enough details ... Is this the only package you attached to them ? Is this package on the top of the stack? Have you set some conditions for your package? Something like "GetDistance" to Player or something else to detect that the package has to start in some certain moment.

 

I can show my example, but I have not tried using forcegreet and to override combat, so maybe this is not the case. I have "useweapon" package that makes npc (2 quest aliases) practice weapons with each other. And the second package that makes them stop if one of them is bleeding out. All packages have conditions. The UseWeapon package has condition for Alias " IsBleedingOut == 0 ", and the HoldPosition/Stop package has condition " IsBleedingOut == 1". Because their re-evaluate their packages only once in 10(or so on) seconds, I added a magic effect that detects the bleeding out situation and forces aliases to evaluate their stack "OnEnterBleedOut" .

 

Yes, it's the only package. I'm not sure what on top of the stack is though? Sorry, I'm a bit new modding and just watched a YouTube tutorial! lol And yeah, I have a few conditions such as GetInFaction and IsInCombat.

 

I took some screenshots of the forcegreet package, the quest alias for the NPC/s, and the initial forcegreet dialogue line. Maybe you or someone else could tell from this what I'm doing wrong? The blurred out parts is just the name of the mod and stuff that I don't want to give away since I just started making it, sorry.

 

Thanks for the help so far!

Edited by friendlyyan
Link to comment
Share on other sites

I can`t find anything wrong , but as I said, I have not created forcegreet packanges, so maybe I`m missing something and hopefully someone else can give you more info on this.

I`d try to check if your alias was filled at all. If this is some certain npc, you can click on him in console and type SV . And scroll to check if your alias is listed there.

 

It`s possible that some other things are required to make it work .

I tried to use the "MQ302MinPrestonForcegreetRoof" Package on some settlement vendor. Found the package in the CK and it looked like something close to your situation. Duplicated, changed conditions , place and some other things...And it worked..though in some unexpected way. .Each time I was enough close to the NPC, my character started to ask "can we trade a few things" :D The NPC did not say anything. But I don`t have any stages, quest dialogs or anything like this. Just an epty quest with aliases...so maybe this is the reason it worked this way.

Link to comment
Share on other sites

Hmm...how are you trying to trigger the forcegreet package to fire? How are you stopping combat, in other words. We might need to see the scene you created to get a better idea of how this is supposed to work.

 

And it's just a suggestion but I would clear most if not all of those interrupt flags; almost every forcegreet package I've seen from the vanilla game doesn't use them. Just a suggestion! And I'm also not sure what is going on with your quest alias? Is that supposed to be one of the NPCs your PC talks to? If so, why not just use the uniqe actor reference?

Link to comment
Share on other sites

Hmm...how are you trying to trigger the forcegreet package to fire? How are you stopping combat, in other words. We might need to see the scene you created to get a better idea of how this is supposed to work.

 

And it's just a suggestion but I would clear most if not all of those interrupt flags; almost every forcegreet package I've seen from the vanilla game doesn't use them. Just a suggestion! And I'm also not sure what is going on with your quest alias? Is that supposed to be one of the NPCs your PC talks to? If so, why not just use the uniqe actor reference?

 

I thought the combat override on the forcegreet package was supposed to stop the combat? If that's not how it works, then I'm sure that's my problem lol The package just triggers if the player is near the quest alias and combat is happening. Or that's what supposed to happen anyway. I need the combat to stop and the dialogue to start at the same time and not have a delay (at least not a hugely noticeable one) between the two which is why I didn't try stopping combat in a quest stage.

The quest alias is an NPC but there is no unique actor because it's random/generic NPCs in the same ways settlers aren't unique actors. So I used matching reference and then set conditions to make sure the alias is only filled with an NPC that has the same faction and voice type. Basically the scene I'm trying to do is the player is fighting a group of generic NPCs and the quest picks a random one to do the forcegreet for the dialogue/stop combat. I did think this was my problem to begin with but when I tested it, it didn't work with a unique actor either which leads me back to thinking the package is the problem.

Thanks for the tips!

Edited by friendlyyan
Link to comment
Share on other sites

You most likely need to stop combat with script, make the actor who you want to forcegreet non-hostile and evaluate his package. Then when conversation ends you can turn him hostile again and force start combat with script.

 

Have you done console command "sqv quest number" to see if the alias fills too?

Link to comment
Share on other sites

You most likely need to stop combat with script, make the actor who you want to forcegreet non-hostile and evaluate his package. Then when conversation ends you can turn him hostile again and force start combat with script.

 

Have you done console command "sqv quest number" to see if the alias fills too?

 

Yeah, the alias is filled. I thought that was my problem initially too but I even tried using a unique actor and even though it says the alias is filled, it still didn't work, so I'm back to trying to suss out the package.

 

As for the script, I'm not sure how to go about doing that because none of the NPCs are unique actors. The alias is supposed to randomly pick one to forcegreet the player based on which NPC is closest, or at least I assumed that's how it works.

Edited by friendlyyan
Link to comment
Share on other sites

  • Recently Browsing   0 members

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