How to trigger a hidden topic?

Post » Wed Jul 21, 2010 11:02 am

Here is what I am trying to do:

NPC dialogue topic 1: give me caps or go away
player response 1: ok (pay caps, reveal diaologue 2)
player response 2: nah

NPC dialogue topc 2: blah blah blah

What I want is for diaologue topic 1 to be repeatable until player response 1, and then removed from future dialogues with the NPC. After player response 1, I want dialogue topic 2 to be repeatable.

I've been looking into Leo Stalh's Megaton dialogue, which uses getquestvariable to get/set the condition for triggering a hidden topic. The problem is that I can't find the script or where the variable is stored, so I don't know how this is really accomplished. Any ideas?
User avatar
Chase McAbee
 
Posts: 3315
Joined: Sat Sep 08, 2007 5:59 am

Post » Tue Jul 20, 2010 10:17 pm

If you can find the quest Leo Stalh's Megaton dialogue uses, open it and under first tab "Quest Data", it should have the script is uses there. GetQuestVariable seems to be just like GetScriptVariable, except it's pointing to a quest's script.

if GetQuestVariable LeoStalhMegatonDialogue.SomeVar1 == 0, dialogue topic 1.
on player response 1, result script: set LeoStalhMegatonDialogue.SomeVar1 to 1 ;(dialogue topic 1 is now false)

if GetQuestVariable LeoStalhMegatonDialogue.SomeVar1 == 1, dialogue topic 2.

Quest LeoStalhMegatonDialogue using script:
scn LeoStalhMegatonDialogueSCRIPT
short SomeVar1
User avatar
Hussnein Amin
 
Posts: 3557
Joined: Sun Aug 05, 2007 2:15 am

Post » Wed Jul 21, 2010 2:30 am

So Dialogue 1, info 1 has two choices. When the second choice is selcted, either set a variable or a quest stage in the results script for the second choice response. Use the value of the variable or quest stage as a condition for dialogue 1. Dialogue 1 then has two infos. The first uses conditions that the variable from option 2 has not been picked yet and info 2 uses a condition that was set when option 2 was chosen. So in this case your dialogue 2 is really the second info for dialogue 1.
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am

Post » Wed Jul 21, 2010 2:15 am

[edit]

Nevermind, I got it working now. Thanks to you both!
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Wed Jul 21, 2010 1:14 am

Oh, snag, how do I detect if the player has sufficient amount of caps? I tried GetItemCount cap001 (amount) but that didn't work...I suppose you carry 100 cap items in their inventory...
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Wed Jul 21, 2010 11:16 am

Did you use 'On Target'?
User avatar
Lexy Dick
 
Posts: 3459
Joined: Mon Feb 12, 2007 12:15 pm

Post » Wed Jul 21, 2010 2:54 am

Yea that should work... make sure, like Talkie said, you use it on target.
User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Wed Jul 21, 2010 4:41 am

I use the http://cs.elderscrolls.com/constwiki/index.php/GetGold function for that. IMHO, I think its more reliable.
User avatar
Laura Wilson
 
Posts: 3445
Joined: Thu Oct 05, 2006 3:57 pm

Post » Wed Jul 21, 2010 3:29 am

Ah ok, on Target worked. Thanks TTT.

Out of curiosity, why do you prefer GetGold WillieSea?
User avatar
Maya Maya
 
Posts: 3511
Joined: Wed Jul 05, 2006 7:35 pm

Post » Wed Jul 21, 2010 11:22 am

If I may answer for WillieSea - Some have reported that Getitemcount Caps001 does not always return the correct amount while getgold will. I, however have never had this happen during my use of it.
User avatar
Ben sutton
 
Posts: 3427
Joined: Sun Jun 10, 2007 4:01 am


Return to Fallout 3