Basic quest writing help

Post » Mon Nov 28, 2011 9:23 am

I'm using the Tutorial Dialogue mod to help me write this simple quest but I'm stuck on a few things.

(All items involved in quest have unique IDs)

Vigdis is gutting a wolf. Next to her is a bucket with bile and feces in it. She asks you to empty it outside for her and bring her back one of the clean buckets that are outside. And for reward, she'll sell you pair of gloves for two gold. If you don't have two gold, she'll just give the gloves to you for free.

http://img191.imageshack.us/img191/6060/greeting1l.jpg
http://img543.imageshack.us/img543/6411/response1.jpg
http://img97.imageshack.us/img97/9364/response2.jpg
http://img443.imageshack.us/img443/5030/response3.jpg
http://img94.imageshack.us/img94/9246/response4.jpg
http://img267.imageshack.us/img267/1961/response5.jpg

After she asks me to empty the bucket and I click on her again, she just says "Back again? What do you need?" which is what I have her say if Talked_to_PC = 1.
Am I supposed to set up a journal entry here? I don't like using journal entries. I'd rather avoid using journal entries if I can.
I also need to set up a response where after removing the clean bucket, she then adds the two gloves to player and two gold is removed from player. And/or she adds the two gloves to player and says, "No money? That's fine. I know what it's like to be poor and cold. Take them any ways."

Please help me out somebody. I'm new to quest writing and I'm sure this quest is probably easy to make for experienced writers. Thanks!
User avatar
Nims
 
Posts: 3352
Joined: Thu Jun 07, 2007 3:29 pm

Post » Sun Nov 27, 2011 9:49 pm

First of all, don't count on Talked_to_PC for anything fiddly like quests. It's really only suitable for generic greetings "Welcome stranger" vs. "Hello again" kind of stuff. The flag is not even remembered reliably (IIRC it resets if the PC doesn't visit the NPC's cell a few days.)

So basically your choices are journal, local variable, or global variable. If no other NPCs are involved, a local variable would probably be the best choice. Note that if they don't have a script now, you can give them a script that does nothing but declare a variable. Like so:
begin WarmClothesNPCScript    short QuestStatusend

User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Mon Nov 28, 2011 5:52 am

Returning with clean bucket: like most counting functions, item result is always >= 0
I also need to set up a response where after removing the clean bucket, she then adds the two gloves to player and two gold is removed from player. And/or she adds the two gloves to player and says, "No money? That's fine. I know what it's like to be poor and cold. Take them any ways.
I'd try something like this
condition:
item TES_bucket_clean > 0
item gold_001 >= 2

result:
player->removeitem "gold_001" 2
player->removeitem "TES_bucket_clean" 1
Additem "TES_bucket_clean" 1
Additem "gold_001" 2
player->additem "left_glove_id" 1
player->additem "right_glove_id" 1

It is a little confusing at first because conditions refer to player inventory, while additem/removeitem refer to NPC by default

I will leave the other one as exercise
User avatar
Taylor Tifany
 
Posts: 3555
Joined: Sun Jun 25, 2006 7:22 am

Post » Mon Nov 28, 2011 3:09 am

Thanks guys. I added this script to TES_Vigdis:

Begin TES_WarmClothesNPC	Short QuestStatus	Short NoLoreEnd TES_WarmClothesNPC


I don't know what a Short does, though. What exactly does it do? Will it allow the quest to function without reverting to using the journal?



I revised it a bit, Abot, after giving the circumstances of the quest a bit more thought. Below is all the dialogue I want her to say.


"Oh, I didn't realize I left the door unlocked. I wasn't planning on opening shop today. Are you in need of warm clothing, %PCRace?" <-Should only appear once the very first time you click on her. So I used Function_Talked_to_PC=0 If Player clicks on her thereafter, initiate this dialogue: "What, %PCRace? Can you not see I'm working? Buy something or leave." and ModDisposition -1. I used Function_Talked_to_PC=1 with Result ModDisposition -1 of course.
The "In need of warm clothing" topic should still be there.


(If Player clicks on the topic In need of warm clothing, show this dialogue below)
"That's right. I made all the clothes you see here. I'm busy right now gutting this cub but how about I make you a deal. Empty that bucket outside for me and I'll sell you a new snow wolf fur shirt at almost no cost... say, two septims?"
answer 1: Okay.
"Thanks, %PCRace. Just dump it behind my house and bring back to me a clean one. There should be a couple outside."
answer 2: Not interested.
"Suit yourself, %PCRace." (If this option is selected, I want In Need of Warm Clothing topic to be removed thereafter.

If Option 1 is picked:
player->additem "TES_bucket" 1
player->additem "TES_feces" 1
player->additem "TES_bile" 1
Remove topic "In need of warm clothing"
But, these three objects are also placed on the floor so I need the ones on the floor to be disabled when they are added to player's inventory. I don't know how to do that.


(If Player clicks on NPC with TES_bucket still in possession after accepting quest)
"That's the same bucket, %PCRace. What's the matter with you? Bring one of the clean ones." ModDisposition -2

(If Player clicks on NPC with TES_bucket_clean in possession after accepting quest)
[Vigdis examines the bucket and smells it] "Thanks, %PCRace. Here, sewn just last Tirdas. Feel the fur. Soft, isn't it? It'll keep you warm even in the Moesring Mountains. Two septims and it's yours." Player->RemoveItem "TES_bucket_clean" 1
(Just curious, what would happen if Player had both TES_bucket and TES_bucket_clean in inventory? Would the game engine identify both and CTD?)

Options
1. Pay Vigdis two gold for the wolf skin shirt.
"Now if you don't mind, I need to get back to work."
Player->RemoveItem "gold_001" 2
Player->AddItem "TES_shirt" 1
If Player doesn't have two gold when you click this first option, she'll say "No money? No shirt. Two septims is but a pittance, %PCRace. Off with you now." ModDisposition -3
And after this, it'll revert to the "What, %PCRace? Can you not see I'm working? Buy something or leave." and ModDisposition -1


2. Decline her offer.
"Foolish %PCRace. You should never turn down a good offer. Off with you now." ModDisposition -3

Clicking on her again after that will just initiate the "What, %PCRace? Can you not see I'm working? Buy something or leave." ModDisposition -1
User avatar
Mariana
 
Posts: 3426
Joined: Mon Jun 12, 2006 9:39 pm

Post » Sun Nov 27, 2011 7:04 pm

Short declares a short variable, (that means it stores whole numbers between -32798 and 32767). There's also Long for bigger numbers, and Float for numbers with a decimal place. Anyway, that doens't accomplish anything on its own, it just makes a the storage space.

Now you can do something like this: Instead of relying on Talked to PC (which like I said, isn't too dependable) set the condition to [Local][QuestStatus][=][0]. Then in the Result box, put "set QuestStatus to 1". That way she won't say it again. Then after they accept the job, you probably want to set it to 2, or something like that, and if they refuse it, maybe -1. You can then check for those in dialog instead of using a journal. There is no "RemoveTopic" command, but what you can do is make sure that she has no valid responses to that topic when QuestStatus is -1, and the topic will disappear, though I think it may stay visible until you ask her about something else.
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Mon Nov 28, 2011 1:05 am

So the very first dialogue sentence she says should look like this?
http://img444.imageshack.us/img444/485/49991227.jpg
User avatar
Unstoppable Judge
 
Posts: 3337
Joined: Sat Jul 29, 2006 11:22 pm

Post » Mon Nov 28, 2011 12:14 am

No... that should be entered in the "function/variable" section. I was using []s to represent the separate dropdown boxes, but that probably just made it more confusing. The result box simply say "set QuestStatus to 1".
User avatar
Czar Kahchi
 
Posts: 3306
Joined: Mon Jul 30, 2007 11:56 am

Post » Mon Nov 28, 2011 4:07 am

No... that should be entered in the "function/variable" section. I was using []s to represent the separate dropdown boxes, but that probably just made it more confusing. The result box simply say "set QuestStatus to 1".
I thought you said to leave function/variable section alone? http://img64.imageshack.us/img64/2479/dialogue1.jpg is what I have in the very first line of dialogue for her when you first click on her.

And she has this script attached to her:
Begin TES_WarmClothesNPC	Short QuestStatus	Short NoLoreEnd TES_WarmClothesNPC



In-game screenshots:

http://img210.imageshack.us/img210/8691/screenshot7s.jpg
http://img832.imageshack.us/img832/1829/screenshot8aw.jpg
http://img823.imageshack.us/img823/6888/screenshot9ee.jpg
http://img705.imageshack.us/img705/3267/screenshot10at.jpg. <-Notice that the topic "in need of warm clothing" is still there. I want that to be removed forever thereafter. And she shouldn't say that same line. If the "TES_bucket" is still in player's inventory, or if Player doesn't have any of the quest bucket IDs in his inventory or a vanilla bucket, she should say "What's the matter with you, %PCRace? Bring me one of the clean buckets!"

Would it be easier if I used journal entries instead? I was thinking that after accepting her quest, nothing is added to Player's inventory, but instead, Player picks up the three items on the floor that are next to her and takes them outside and retrieves the "TES_bucket_clean" from outside behind the house. And if you click on her after accepting her quest without leaving the dialogue screen, she'll say "Have you emptied that bucket yet?"
Yes, I think that will be much easier. You accept her quest and the computer says "Your journal has been updated". And if you click on the "in need of warm clothing" topic again, she will say "Have you emptied that bucket yet?" until you have brought her a clean one.
Ah, now I'm starting to see why Bethesda invented the journal entry system.

Here are a list of journal entries I've made so far.
http://img64.imageshack.us/img64/8669/journalp.jpg

Will you or somebody help me piece this together?
User avatar
Kitana Lucas
 
Posts: 3421
Joined: Sat Aug 12, 2006 1:24 pm


Return to III - Morrowind