Need Quest Help

Post » Fri Aug 06, 2010 7:25 pm

I have just started learning how to create my own missions and I have hit a problem with the mission I want to create.

All the tutorials I have found teach me how to use items or locations to complete my quest, but not killing an NPC, so I have no idea how.

My mission starts up fine, I just need to know how to attach the Raider NPC I want killed off to the quest and have his death automatically trigger the next objective.
User avatar
Niisha
 
Posts: 3393
Joined: Fri Sep 15, 2006 2:54 am

Post » Fri Aug 06, 2010 6:00 pm

I have just started learning how to create my own missions and I have hit a problem with the mission I want to create.

All the tutorials I have found teach me how to use items or locations to complete my quest, but not killing an NPC, so I have no idea how.

My mission starts up fine, I just need to know how to attach the Raider NPC I want killed off to the quest and have his death automatically trigger the next objective.


If you have created a custom, special objectID raider - - not reused one of bethesda's - what you would do is:

put a script on him.

It sounds like you want the script to say -
scriptname MyHappyRaiderSCRIPTbegin ONDEATHSetObjectiveCompleted MyQuest 10 1SetObjectiveDisplayed MyQuest 20 1END


adapt as needed ..
User avatar
Janette Segura
 
Posts: 3512
Joined: Wed Aug 22, 2007 12:36 am

Post » Fri Aug 06, 2010 10:33 pm

I think I understand, thank you, I will go try it out.

Edit - The quest works now the way I want it, thanks! :)

Now on to the next few parts. :D
User avatar
Brooke Turner
 
Posts: 3319
Joined: Wed Nov 01, 2006 11:13 am

Post » Fri Aug 06, 2010 8:00 pm

I need help again. :)

I have decided to add a new part to my original quest, but again I am stuck.

I want to add a new objective, saving villagers. When one dies it fails that objective, but not the quest. Also depending on success and failure gives a different ending.

How would I track this so I can have my end conversation recognise what the player has done?
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Fri Aug 06, 2010 10:24 pm

Maybe add a script to the quest with a var to track deaths:
short iVillagersDead

And in the villagers script, have it add 1 to the quest var on death: Quest.iVillagersDead = Quest.iVillagersDead + 1

Then you could check it for > 0 in the dialogue, you'll know at least one of them died.
User avatar
Elena Alina
 
Posts: 3415
Joined: Sun Apr 01, 2007 7:24 am

Post » Sat Aug 07, 2010 9:20 am

I think I know what you mean, I will give it a go, thanks. :)
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Post » Sat Aug 07, 2010 7:31 am

I added the villagers and raider NPC'S, I also added the death scripts to track the number of villagers and raiders killed.

Unfortunately I can not get it to work, when I add the relevant lines to check the NPC'S into the objectives I get an error when I save. Untill I can get the objective to even complete, their is no point doing various dialogue options yet.

I am obviously doing something wrong. Can you explain it in a little more detail please? :)
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Fri Aug 06, 2010 8:32 pm

Haven't messed with objectives yet, I would look at a vanilla quest that is similar to yours. I know wasteland survival guide has quests with optional objectives. If they are completed, then the PC gets some extra stuff.

What's the error say?
User avatar
u gone see
 
Posts: 3388
Joined: Tue Oct 02, 2007 2:53 pm

Post » Sat Aug 07, 2010 5:06 am

What's the error say?


Reading the error message and seeing precisely what it means can be a really good thing.
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Sat Aug 07, 2010 3:25 am

I fixed the error, but the quest is still not working 100%

The quests show up fine, objective and bonus objective. But the bonus objective will not end when I completed the objective when playing. Which makes me think I messed up the script.

This is the script I am using, it is attached to the villagers.

BEGIN OnDeath

set WPMS01.WPMS01VillagersHos to (WPMS01.WPMS01VillagersHos + 1)

end

and I am using this to check if the villagers have taken a casualty.

if(WPMS01.WPMS01VillagersHos == 1)
SetObjectiveCompleted WPMS01 20 1

endif


Perhaps I am not tackling it the right way, I am still new to all this. I hope someone knows what I am doing wrong, or how it should be done. :)
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Sat Aug 07, 2010 3:31 am

Well, if two villagers were killed, this line

if(WPMS01.WPMS01VillagersHos == 1)


would equal 2 and thus not evaluate true.
User avatar
mishionary
 
Posts: 3414
Joined: Tue Feb 20, 2007 6:19 am

Post » Sat Aug 07, 2010 9:01 am

Well, if two villagers were killed, this line

if(WPMS01.WPMS01VillagersHos == 1)


would equal 2 and thus not evaluate true.

But wouldn't that only occur if two villagers were killed instantly in the exact same frame as eachother. Otherwise it would be true while ONE was killed, and any extras would make it false and ignore it. You can try using a DoOnce variable and make it more like this.

if DoOnce == 0  if WPMS01.WPMS01VillagersHos >= 1	Do Whatever	Set DoOnce to 1  endifendif

That would make it work only once, and no matter how many villagers were killed, as long as one or more were.
User avatar
Angela Woods
 
Posts: 3336
Joined: Fri Feb 09, 2007 2:15 pm

Post » Fri Aug 06, 2010 10:40 pm

Using the info you all gave me and my gradual understanding of how it all works I managed to get the quest functional. :D

The script checking if the villagers or raiders are dead is

BEGIN OnDeath	set WPMS01.WPMS01RaidersHos to (WPMS01.WPMS01RaidersHos + 1 )	BEGIN OnDeath	set WPMS01.WPMS01VillagersHos to (WPMS01.WPMS01VillagersHos + 1 )


	if ( GetStage WPMS01 == 40  && WPMS01.WPMS01RaidersHos >= 4 && WPMS01.WPMS01VillagersHos == 0)	   SetObjectiveCompleted WPMS01 20 1	if WPMS01.WPMS01VillagersHos >= 1	   SetObjectiveCompleted WPMS01 20 1	endif


I then modified my raider leader death script so the player gets a different result depending if they saved the villagers.

BEGIN OnDeath	if WPMS01.WPMS01VillagersHos >= 1		SetObjectiveCompleted WPMS01 30 1		setStage WPMS01 60	endif	if WPMS01.WPMS01RaidersHos >= 4 && WPMS01.WPMS01VillagersHos == 0		SetObjectiveCompleted WPMS01 30 1		setStage WPMS01 50	endifend



I then have the end dialogue check the stage and give the appropriate reward.

The only bit I am unsure about is;

if WPMS01.WPMS01VillagersHos >= 1
SetObjectiveCompleted WPMS01 20 1
endif.

That part means the player let the hostages die and thus failed the bonus objective. I do not want the player to fail the quest, just that objective, can I use something else other than SetObjectiveCompleted to visually represent that in game?


One more thing, is there a tutorial on one time only force greeting? I am thinking of have the raider leader give a few lines before actual combat.


Also, thank you to all those that have replied to my topic, you have all been a great help. :)
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am

Post » Sat Aug 07, 2010 9:27 am

Setting the objective completed won't fail the whole quest. In fact, you should probably have teo commands for it: one where the player fails the bonus objective (and the objective is shaded out) accompanied by a message indicating tothe player that he has failed the objective; and second command that sets the objective completed for when the player sucessfully completes the objective. You can use a different value of the quest stage to represent the sucess of fauilure of the objective if you want.

As for a force greet, I do it this way:

1) Make a topic with the sayonce flag and top-level ticked. Do not put any prompt in for that topic info.
2) Add a second info to the same topic that does not have the say once flag ticked. The first info is what the nPC will force greet the player with, the second is what he will say on any subsequent conversations using this topic.
3) Make a dialogue package for the NPC using the topic from steps 1&2 and a FOV of 100. You can ignore the starting position stuff.
4) Add a condition to the dialogue package that you can control, like GetStage = X. Then when you set the stage to X, that package will fire. Make sure this package is high enough in the package list than no other packages will evaluate true before the dialogue package. Add an "actorref.evp" command after you set the stage to X to force the package to fire immediately.

That should pretty much do it. You may still want to link "choices" for your force greet topic, but having two infos will make him say the first and then the second (which you can add prompts to like a regular dialogue).
User avatar
Adam
 
Posts: 3446
Joined: Sat Jun 02, 2007 2:56 pm

Post » Sat Aug 07, 2010 3:15 am

I added the message boxes, like you mentioned, good idea. :) I am not entirely sure what you mean about shading out the objective for failing the bonus, the only way I know to end it is to use SetObjectiveCompleted. Is there another way to shade it out rather than setting it to completed?

Unfortunately the force greet thing went over my head. :D
User avatar
Kristina Campbell
 
Posts: 3512
Joined: Sun Oct 15, 2006 7:08 am

Post » Sat Aug 07, 2010 12:25 am

Sorry 'bout the force greet thing. I guess one would need a basic understanding of all the aspects before that would make sense. Perhaps I'll try to throw a real tutorial together about that.
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Post » Fri Aug 06, 2010 8:12 pm

...
As for a force greet, I do it this way:

1) Make a topic with the sayonce flag and top-level ticked. Do not put any prompt in for that topic info.
2) Add a second info to the same topic that does not have the say once flag ticked. The first info is what the nPC will force greet the player with, the second is what he will say on any subsequent conversations using this topic.
...

...Perhaps I'll try to throw a real tutorial together about that.

That would be cool :). I was dabbling with this and just wanted to mention that I didn't have to set the greet to top-level if it was it's own topic. I don't know if that's proper, but it works. Then it won't show up in the NPC talk before the greet is triggered.

NormalTopic1 (Top-Level)
NormalTopic2 (Top-Level)
NormalTopic3 (Top-Level)
ForceGreet
ForceGreetChoice1 (ForceGreet -> Choices -> 1)
ForceGreetChoice2 (ForceGreet -> Choices -> 2)

Dialogue Package -> Topic -> ForceGreet

Just wondering if there's a difference if it's top-level vs not - for force greets. In case you interact with the NPC before the dialogue package it triggered - they'll just use the normal topics. Then you can set a condition to run the package or do a AddScriptPackage at a certain time to force the greet. No?
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Sat Aug 07, 2010 11:03 am

A tutorial sounds like a great idea Pkleiss, the more tutorials for the GECK, the better. :)

I gave Force Greet a go and it sort of works, I have a problem though.

When close to the character it does the animation as if talking, after talking the quest moves onto the next objective as it should. But no dialogue window pops up for me to read.

Any of you happen to know what I have done wrong?
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Sat Aug 07, 2010 6:45 am

I've had my ups ond downs with "top-level". I used to use the "addtopic" command in a script running on the NPC in an OnLoad block to get the topics (force greet or otherwise) to show up. But I have noticed that on occasion I don't seem to need either to get them to show up in an on-screen dialogue box.

Akallabeth - I think this is the exact thing you may have missed. Try ticking the "top-level" flag on the upper right of the topics tab in your quest with your force greet topic info highlighted. Either that or use the AddTopic command in a script like I stated above. Its either that or you have subtitles turned off in your game settings.
User avatar
Maeva
 
Posts: 3349
Joined: Mon Mar 26, 2007 11:27 pm

Post » Sat Aug 07, 2010 3:44 am

No, I have it ticked.

Perhaps I am not doing what is needed for what I want it to do. What I want is the player to be forced straight into a dialogue with an NPC when approached, just like Burke when he is first met.
User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Fri Aug 06, 2010 9:18 pm

Sorry I took so long to reply. I have been working on the tutorial. Listen, I have deduced that ticking top-level is NOT what you want to do with a force greet. The reason is that if the player happens to engage the NPC in dialogue just before the force greet happens, you will see the force greet default prompt as a dialogue option. That's no good. So I am now of the opinion that top-level is a no go for this. But that still leaves your problem open. There are many reasons why that might happen; from the quest not being start game enabled to improper use of conditions or quest stages or user variables.

I have some 24 pictures for the force greet tutorial, but no text as of yet. You could wait a while longer for me to finish, or you could send me a link to your file and I would take a quick look and see if I can't spot something right away. If you do send me a link, let me know the NPC and Quest name and any cell where the force greet should take place. :)


EDIT: If you haven't seen it, I fiished the http://www.gamesas.com/bgsforums/index.php?showtopic=1081309.
User avatar
Miguel
 
Posts: 3364
Joined: Sat Jul 14, 2007 9:32 am


Return to Fallout 3