Using ForceGreet

Post » Thu Jun 21, 2012 12:18 pm

I'm trying to set it up so an NPC will confront the player if the player tries to get into the town before the quest begins.

I'm trying several options to no avail.

I've been trying....

*Using a mini-quest that is triggered by a trigger box covering the whole entrance area to the town. This trigger tells the NPC to run up to the player and greet him. So far all I've been able to get nothing really

*Putting an AI Package on the NPC. There are no default scripts for ForceGreet so I have created a new package with the Package Template set to "ForceGreet", but all the NPC does is run up to the player then follows him around. There is an dropdown for Topic in which I selected [hello] lust to try to get something to work but that doesn't do anything.

I could just leave thing as they are...in which the player finds that he can't get into the cave entranced because it's blocked by a collision marker. But I think that leave the player with the feel of WTF?? ya know.


I think I need the NPC to tell the player to get lost and he's not welcome and once the player has finished the quest that points to the town he is disabled..

Any ideas?
User avatar
BrEezy Baby
 
Posts: 3478
Joined: Sun Mar 11, 2007 4:22 am

Post » Thu Jun 21, 2012 9:01 am

I do ...
  • A Trigger (a trigger box will do ... or GetDistance between PC and NPC) - starts a sub-quest with a Scene
  • In the Scene do a "pathtoreference" (http://www.creationkit.com/PathToReference_-_Actor) on the NPC to the location of the PC (it's a bit rubbish, so you may want markers to define positions instead ... )
  • Next step in Scene is dialoguie spoken by the NPC
  • Complete Quest
Other than the pathtoref issue (NPC barges into PC) it all works well ... if you can dynamically position markers, when and where you need them, that would be even better ... then pathtoref to the relevant marker)
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Thu Jun 21, 2012 4:37 pm

What I've done so far is to create a trigger box that enables the enc NPC. The NPC has a ForceGreet Package attached to it.

When the player enters the trigger the NPC appears in the entrance to the town and runs to you (under flags in the package I have it set to "run")

The AI Data of the NPC is Angry and Very Aggressive.

The trigger also sets the stage to 10 of the NPC encounter quest if it isn't already running and if the main quest has not started.

I am able to get the NPC to respond to several branches of dialog but when the final dialog is finished (with the Quest Complete box ticked on stage 20) in this case the player is ready to fight him, the NPC doesn't do anything unless the player moves. When the player moves the NPC unsheathes his weapon BUT he doesn't attack the player and the dang quest is started again and the dialog pops up again because the quest has been completed....so it starts over.

What I need to do is have the quest finished when the NPC is dead. Somehow.

I'm also trying to create a branch where the player can back out by saying "Ok. I will leave" but I haven't been able to figure out how to insert that.

If you want I can make a vid of it if what I'm saying is not clear.

Any ideas?
User avatar
no_excuse
 
Posts: 3380
Joined: Sun Jul 16, 2006 3:56 am

Post » Thu Jun 21, 2012 4:02 am

OK...

I've added a script to the NPC, SetStageOnDeath.

Yet I am still having a problem with the quest stating over immediately after the final dialog.

Now it's a matter of logic within the trigger, the quest and the NPC.

Oh...how much I love quest making :/
User avatar
Katie Louise Ingram
 
Posts: 3437
Joined: Sat Nov 18, 2006 2:10 am

Post » Thu Jun 21, 2012 6:37 pm

So your final dialogue stops your quest running, and your trigger starts it if it isn't running? I'd have thought you probably wanted your quest to stop either when the NPC dies or when the player leaves the area (so that it can start again if the player returns).


To add a dialogue option you just right click inside the branch rectangle and choose Add topic, set 'OK I'll leave' as the topic text and whatever the NPC should say as response info, and then click on the parent topic, and when the cursor changes to a hand, drag and drop onto your new topic.
User avatar
jessica breen
 
Posts: 3524
Joined: Thu Aug 03, 2006 1:04 am

Post » Thu Jun 21, 2012 5:42 pm

Is the Quest flagged as "Repeatable"?

If not ... then it shouldn't repeat once it is completed once (whatever scripting is involved)
User avatar
kyle pinchen
 
Posts: 3475
Joined: Thu May 17, 2007 9:01 pm

Post » Thu Jun 21, 2012 5:46 am

The whole issue I am trying to avoid is players losing their suspension of disbelief. Once something happens that is pretty odd you instinctively go out of the environment and think "WTF??". Having the auto-load door disabled without any sort of prompt or heads-up will do exactly that, I think.

So I am trying to devise a way that players who have not started the main quest cannot get into the town but instead have some of the characters from the mod try to keep them from getting near the door.

In doing so I should have the scene repeatable, cover the entire area around the map marker (so it gives the NPC time to materialize and confront) and a number of other things.

I'm sure there are more elegant ways to do it but I want even this encounter to remain within the realm of the mod.

So that means it has to be repeatable, not restart until the player flees or the NPC is killed (in which case another NPC is enabled)

What I would like to have happen is have so many of the mod's character show up the player will know he has no chance and back off. But in the mean time I have to know everything is working if they decide not to.
User avatar
Ezekiel Macallister
 
Posts: 3493
Joined: Fri Jun 22, 2007 12:08 pm

Post » Thu Jun 21, 2012 5:55 am

I forgot to add this.

This is the script that is on the trigger outside the entrance to the town:

Scriptname LBGSetStageOnEnter extends objectReference{sets a quest stage when the specified ref or refs are in the trigger}ObjectReference Property NPCWarning auto{ NPC to enable }quest property myFirstQuest auto{ The quest that must be completed before trigger }quest property myQuest auto    { quest to call SetStage on}int property stage auto{ stage to set}Event OnTriggerEnter(ObjectReference akTriggerRef)    if (akTriggerRef == Game.GetPlayer() && myFirstQuest.GetStage() < 30 && !myQuest.IsRunning())        NPCWarning.Enable()	       myQuest.SetStage(Stage); debug.messagebox("Stage has been set!")    endif    if (akTriggerRef == Game.GetPlayer() && myFirstQuest.IsCompleted())        Disable()        Delete()    endifEndEvent
User avatar
Jessie Rae Brouillette
 
Posts: 3469
Joined: Mon Dec 11, 2006 9:50 am

Post » Thu Jun 21, 2012 6:29 am

Here I have an image of what the dialog views look like (because the second response "Ok, I'll leave" doesn't show up.

Am I missing something?

http://lamplight.pcgamingnetwork.com/tmp/dialogviewforexteriorbeforemodstarts.jpg
User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm

Post » Thu Jun 21, 2012 6:22 pm

In the "Be gone or die" response:

What is the script meant to be doing?
Is that script running?

(Are the conditions correct on the "We shall see" response (for the NPC)?


And your script: Is
NPCWarning
an
ObjectReference
Or should it be an

ReferenceAlias
(Is it an Alias in your quest?)
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Thu Jun 21, 2012 11:35 am


And your script: Is
NPCWarning
an
ObjectReference
Or should it be an

ReferenceAlias
(Is it an Alias in your quest?)

Heck..I don't know. I'm just winging it.

I'm uploading a youtube vid that shows what it is doing. It's going to take another 1.5 hours to upload though.
User avatar
Melissa De Thomasis
 
Posts: 3412
Joined: Tue Feb 27, 2007 6:52 pm

Post » Thu Jun 21, 2012 4:45 pm

Your dialogue boxes don't seem to have topic texts, which are the things the player says to the NPC, only responses. You also seem to be creating a branch for every topic, which is unnecessary (but not fatal).
User avatar
Darlene DIllow
 
Posts: 3403
Joined: Fri Oct 26, 2007 5:34 am

Post » Thu Jun 21, 2012 6:49 pm

So that means it has to be repeatable, not restart until the player flees or the NPC is killed

So you should not set the quest to be completed in the dialogue (or allow it to be set back to stage 10 by the trigger, if it is running but at a later stage). Just set it to complete on the death of the NPC or when you leave the area, which you'd find by using the ChangeLocation event.
User avatar
Kay O'Hara
 
Posts: 3366
Joined: Sun Jan 14, 2007 8:04 pm

Post » Thu Jun 21, 2012 8:02 am

Your dialogue boxes don't seem to have topic texts, which are the things the player says to the NPC, only responses. You also seem to be creating a branch for every topic, which is unnecessary (but not fatal).

I thought about that with the branches not displaying the player responses. But I haven't seen where to make them show.

They are in the appropriate areas, I think. I mean you see them when talking with the NPC but they don't show in the dialog view.

When the video is finished uploading to youtube you'll better understand everything.
User avatar
Arnold Wet
 
Posts: 3353
Joined: Fri Jul 07, 2006 10:32 am

Post » Thu Jun 21, 2012 10:44 am

in order for the force greet package to work you need to link it to a topic in your quest. linking it to (Hello) will just play a generic hello if any.

create a dialogue in your quest where the NPC says something like "get out of here", or you can use the existing trespassing dialogue (if the npc is a vanilla voice type). having it in a player dialogue topic with the ability for the player to respond back, will force greet the player and stop them in their tracks. once the player responds with their line, you can execute a papyrus fragment to do whatever it is you need to do
User avatar
X(S.a.R.a.H)X
 
Posts: 3413
Joined: Tue Feb 20, 2007 2:38 pm

Post » Thu Jun 21, 2012 4:42 am

Ok...the video is ready.

You'll notice the NPC saying "I'm waiting!' That is because the trigger restarted the quest but since all other dialogs have been said it was the only one available and I selected it on accident.

Then the player commences to follow you around like a follower and doesn't start combat or react to being hit.

http://youtu.be/bhjtYMhcuNg

Thanks for any insight on what I should do!
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Thu Jun 21, 2012 4:21 pm

in order for the force greet package to work you need to link it to a topic in your quest. linking it to (Hello) will just play a generic hello if any.

create a dialogue in your quest where the NPC says something like "get out of here", or you can use the existing trespassing dialogue (if the npc is a vanilla voice type). having it in a player dialogue topic with the ability for the player to respond back, will force greet the player and stop them in their tracks. once the player responds with their line, you can execute a papyrus fragment to do whatever it is you need to do

Ok..In the ForceGreet package I put on the NPC (under AI Packages) for the Topic Value I pointed in to the first branch Topic.

I didn't see any difference in the behavior of the NPC.

The rest of what you said went over my head. :/
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

Post » Thu Jun 21, 2012 6:14 am

So you should not set the quest to be completed in the dialogue (or allow it to be set back to stage 10 by the trigger, if it is running but at a later stage). Just set it to complete on the death of the NPC or when you leave the area, which you'd find by using the ChangeLocation event.

I have it so the NPC has a SetStageOnDeath script which set the stage to 30 and on that stage the Quest Complete box is ticked.

I have no idea how to manipulate the NPC through the quest. Like make him go into the combat mode and begin fighting or just stand there to let me leave.
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Post » Thu Jun 21, 2012 8:25 pm

I'm wondering

Is there a way to halt the trigger from triggering again for X number of minutes?

That would keep it from firing again while things are happening.
User avatar
Nicola
 
Posts: 3365
Joined: Wed Jul 19, 2006 7:57 am

Post » Thu Jun 21, 2012 1:13 pm

Have you put a condition on your NPCs ForceGreet package that would make it end? I mean something like a GetStage() <= 10?
User avatar
kelly thomson
 
Posts: 3380
Joined: Thu Jun 22, 2006 12:18 pm

Post » Thu Jun 21, 2012 5:07 am

Have you put a condition on your NPCs ForceGreet package that would make it end? I mean something like a GetStage() <= 10?

On the player I have DefaultSetStageOnDeath:

scriptName defaultSetStageOnDeath extends actor{Set stage on specificed quest when this actor dies.  Pre-Requistite stage optional}quest property myQST auto{quest to set stage upon}int property preReqStage = -1 auto{(Optional)Stage that must be set for this script to run. Default: NONE}int property StageToSet auto{Set this stage when the actor dies}auto STATE waiting    EVENT onDeath(actor killer)        if preReqStage == -1 || myQST.getStageDone(preReqStage) == TRUE            myQST.setStage(stageToSet)            gotoState("inactive")        elseif preReqStage != -1 && myQST.getStageDone(preReqStage) == FALSE;             debug.trace(self + " was killed before stage " + preReqStage + " of " + myQST + " was set")        else;             debug.trace(self + " got defaultSetSTageonDeath script into a bad state!")        endif    endEVENTendSTATESTATE inactiveendSTATE

The ForceGreet is an AI Package on the Base of the character
User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Post » Thu Jun 21, 2012 4:27 am

Oh yea....No. I didn't put any code that would make it "end".

It is something that it need I guess. Something to tell the NPC that either the player wishes to walk away and therefor wait X minutes and me moved back to its xmarker and be disabled. Or fight the player.
User avatar
Maeva
 
Posts: 3349
Joined: Mon Mar 26, 2007 11:27 pm

Post » Thu Jun 21, 2012 11:49 am

You could use a Guard package, which would take over once the ForceGreet finished. Only you'd have to make that finish first :)
User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Thu Jun 21, 2012 1:35 pm

You mean one of the defaultguard packages?

I don't know how to trigger that when the dialog is finished.

As I told Amethyst one day. I find making quests so convoluted and difficult I would rather pull my nails out. I'm down to just one thumb now.
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am

Post » Thu Jun 21, 2012 5:22 am

Give your NPC a guard package as well as the forcegreet package and make sure the forcegreet is topmost. Put a condition (GetStage <= 10) on your forcegreet package. In the dialogue advance the quest stage to 15 (for example) when the player first responds. The guard package will take over automatically when the NPC evaluates packages.

Edit: that's about how I feel about designing dungeons.
User avatar
Beth Belcher
 
Posts: 3393
Joined: Tue Jun 13, 2006 1:39 pm

Next

Return to V - Skyrim