Author Topic: Dialog Questions  (Read 850 times)

Offline Dark Raven

  • Bloody Cynical
  • Planewalker
  • *****
  • Posts: 1194
  • Gender: Female
  • Flesh is the law
    • Chosen of Mystra
Dialog Questions
« on: July 17, 2006, 08:26:41 PM »
I can't believe how rusty I am with modding. I am sure this is a simple question.

I am writing a quest for my npc. What triggers this quest is someone appears after a certain amount of time and engages the npc to do this quest. They get done talking than the npc asks <CHARNAME> that they must do this quest. How do I write it so once the convo with the quest starter is done that it goes to <CHARNAME>?


CHAIN IF WEIGHT #-1
~InParty("G#Alora")
See("G#Alora")
!StateCheck("G#Alora",STATE_SLEEPING)
Global("AloraCousin","LOCALS",0)~ THEN G#ALOCUS AloraQuest
~Cousin Alora? Is that really you!~ DO ~SetGlobal("AloraCousin","LOCALS",1) SetGlobal("AloraCousinQuest","GLOBAL",1)~
== G#ALORAJ ~Cousin Ellis? It is you ain't it? What are you doing here?~
== G#ALOCUS ~We must save your little brother post haste! He's been captured by evil orcs!.~
EXIT

Now I need to set it up so Alora goes and insist that <CHARNAME> must help her.

IF ~~Help
SAY ~<CHARNAME> we must save him! Please~
++ ~banter~ + no
++ ~banter~ + yes
END
Per me si va nella citta dolente.
Per me si va nell eterno dolore.
Per me si va tra la perduta gente...
Lasciate ogni speranza perduta che'entrate!

Chosen of Mystra home to many mods.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Dialog Questions
« Reply #1 on: July 17, 2006, 10:22:41 PM »
Are you saying that you just want the
~We must save your little brother post haste! He's been captured by evil orcs!.~
state to go to Alora saying
~<CHARNAME> we must save him! Please~
?

In that case, you'd do

CHAIN IF WEIGHT #-1
~InParty("G#Alora")
See("G#Alora")
!StateCheck("G#Alora",STATE_SLEEPING)
Global("AloraCousin","LOCALS",0)~ THEN G#ALOCUS AloraQuest
~Cousin Alora? Is that really you!~ DO ~SetGlobal("AloraCousin","LOCALS",1) SetGlobal("AloraCousinQuest","GLOBAL",1)~
== G#ALORAJ ~Cousin Ellis? It is you ain't it? What are you doing here?~
== G#ALOCUS ~We must save your little brother post haste! He's been captured by evil orcs!.~
END G#ALORAJ Help

But really, you don't even need the Help state at all, you can put all of this in the chain:

CHAIN IF WEIGHT #-1
~InParty("G#Alora")
See("G#Alora")
!StateCheck("G#Alora",STATE_SLEEPING)
Global("AloraCousin","LOCALS",0)~ THEN G#ALOCUS AloraQuest
~Cousin Alora? Is that really you!~ DO ~SetGlobal("AloraCousin","LOCALS",1) SetGlobal("AloraCousinQuest","GLOBAL",1)~
== G#ALORAJ ~Cousin Ellis? It is you ain't it? What are you doing here?~
== G#ALOCUS ~We must save your little brother post haste! He's been captured by evil orcs!.~
== G#ALORAJ ~<CHARNAME> we must save him! Please~
END
++ ~banter~ EXTERN G#ALORAJ no
++ ~banter~ EXTERN G#ALORAJ yes

Edit: I was mistaken originally in how I constructed the transition block in the CHAIN. When you do a transition block at the end of a CHAIN, "GOTO" is presumed to mean _within the DLG file that started the CHAIN_, not the last speaker. So we need to EXTERN G#ALORAJ instead of GOTO here, based on how you wrote the original state.
« Last Edit: July 21, 2006, 08:17:18 PM by jcompton »
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Blucher

  • Planewalker
  • *****
  • Posts: 44
Re: Dialog Questions
« Reply #2 on: July 21, 2006, 11:56:02 PM »
Man.  WeiDU scripts are looking weider than ever. :D

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Dialog Questions
« Reply #3 on: July 22, 2006, 12:28:49 AM »
Wait until you see WeiNGINE .d.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Dark Raven

  • Bloody Cynical
  • Planewalker
  • *****
  • Posts: 1194
  • Gender: Female
  • Flesh is the law
    • Chosen of Mystra
Re: Dialog Questions
« Reply #4 on: August 08, 2006, 05:11:32 PM »
Quote
CHAIN IF WEIGHT #-1
~InParty("G#Alora")
See("G#Alora")
!StateCheck("G#Alora",STATE_SLEEPING)
Global("AloraCousin","LOCALS",0)~ THEN G#ALOCUS AloraQuest
~Cousin Alora? Is that really you!~ DO ~SetGlobal("AloraCousin","LOCALS",1) SetGlobal("AloraCousinQuest","GLOBAL",1)~
== G#ALORAJ ~Cousin Ellis? It is you ain't it? What are you doing here?~
== G#ALOCUS ~We must save your little brother post haste! He's been captured by evil orcs!.~
== G#ALORAJ ~<CHARNAME> we must save him! Please~
END
++ ~banter~ EXTERN G#ALORAJ no
++ ~banter~ EXTERN G#ALORAJ yes

You can make replies outside of a Chain? Interesting. The Weidu Readme needs to be updated with new tutorials on some of these new "hidden" features.
Per me si va nella citta dolente.
Per me si va nell eterno dolore.
Per me si va tra la perduta gente...
Lasciate ogni speranza perduta che'entrate!

Chosen of Mystra home to many mods.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: