A question about scripting dialog entry points.

Discussion in 'Modding and Scripting Support' started by Peter Quincy, Jul 3, 2008.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. Peter Quincy

    Peter Quincy Member

    Messages:
    880
    Likes Received:
    0
    Joined:
    Dec 12, 2002
    I've been trying to set up a script so what a NPC says to the player as a greeting will be different depending on the quest state.

    I tried using-

    0. IF quest 1001 in global state 1 THEN dialog 1 ELSE goto line 2
    1.RETURN and SKIP Default.
    2. If quest 1001 in global state 2 THEN dialog 100 ELSE goto line 4
    4.RETURN and SKIP Default.
    etc...

    -but the dialog doesn't work. Am I misnumbering or is this simply not possible the way I'm doing it?
     
  2. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    What script editing tool are you using? I'm assuming here that you're paraphrasing scrmaker. If you aren't already, you should seriously switch to ScriptEd by DJ Unique.

    I'd be glad to help. Here's your example script for point 9 (Dialog), which you can cut and paste with scripted:

    ----------------

    description "Peter Quincy's check for quest state dialog"
    MAX_LINES_ALLOCATED 19

    0. IF PC Triggerer has quest 1001 in state 6
    THEN dialog 60
    ELSE goto line 2
    1. return and SKIP default
    2. IF PC Triggerer has quest 1001 in state 4
    THEN dialog 40
    ELSE goto line 4
    3. return and SKIP default
    4. IF PC Triggerer has quest 1001 in state 3
    THEN dialog 30
    ELSE goto line 6
    5. return and SKIP default
    6. IF PC Triggerer has quest 1001 in state 2
    THEN dialog 20
    ELSE goto line 8
    7. return and SKIP default
    8. IF PC Triggerer has quest 1001 in state 1
    THEN dialog 10
    ELSE dialog 0
    9. return and SKIP default

    --------------------------

    Here's your example dialog to go along with it:

    --------------------------

    //STARTING LINE: PC has quest 1001 in state 0
    {0}{Greetings. Would you like to hear about the quest I want you to do?}{Greetings. Would you like to hear about the quest I want you to do?}{}{}{}{}
    {1}{Sure.}{}{5}{}{5}{}
    {2}{Huh?}{}{-4}{}{5}{}
    {3}{E:}{}{1}{}{0}{}

    {5}{Here's the quest. My family is in danger from the dragon called team a! [Blah Blah etc.]}{Here's the quest. My family is in danger from the dragon called team a! [Blah Blah etc.]}{}{}{}{qu1001 1}
    {6}{I accept.}{}{5}{}{0}{qu1001 2}
    {7}{Uh... Okay!}{}{-4}{}{0}{qu1001 2}
    {8}{No way!}{}{5}{}{0}{}
    {9}{No! Nope! Not gonna do!}{}{-4}{}{0}{}

    //STARTING LINE: PC has quest 1001 in state 1 (mentioned)
    {10}{I strongly urge you to reconsider doing my quest.}{I strongly urge you to reconsider doing my quest.}{}{}{}{}
    {11}{Oh, all right, fine...}{}{5}{}{0}{qu1001 2}
    {12}{Huh? Uh... yeah, mebbe me do.}{}{-4}{}{0}{qu1001 2}
    {13}{E:}{}{1}{}{0}{}

    //STARTING LINE: PC has quest 1001 in state 2 (active)
    {20}{Thanks for helping me. Have you made any progress finding the dragon?}{Thanks for helping me. Have you made any progress finding the dragon?}{}{}{}{}
    {21}{N:}{}{1}{}{0}{}
    {22}{E:}{}{1}{}{0}{}

    //STARTING LINE: PC has quest 1001 in state 3 (completed)
    {30}{I heard the news from the other villagers. You have pledged your soul to the dragon to save my family from almost certain death! Thank you! Here's your absurdly useless reward!}{I heard the news from the other villagers. You have pledged your soul to the dragon to save my family from almost certain death! Thank you! Here's your absurdly useless reward!}{}{}{}{qu1001 4, $$5}
    {31}{You're welcome.}{}{5}{}{0}{}
    {32}{Any times, boss man!}{}{-4}{}{0}{}

    //STARTING LINE: PC has quest 1001 in state 4 (finished)
    {40}{I will forever be in your grattitude for saving my family. I am sorry that you had to pledge your soul to team a, but oh well. I did pay you, didn't I?}{I will forever be in your grattitude for saving my family. I am sorry that you had to pledge your soul to team a, but oh well. I did pay you, didn't I?}{}{}{}{}
    {41}{E:}{}{1}{}{0}{}

    //STARTING LINE: PC has quest 1001 in state 6 (botched)
    {60}{YOU KILLED MY FAMILY!? How could you do such an awful thing? I told you to kill the dragon so you could protect them! Now, time to die!}{YOU KILLED MY FAMILY!? How could you do such an awful thing? I told you to kill the dragon so you could protect them! Now, time to die!}{}{}{}{}
    {61}{I am sorry, but it was the only way the dragon would let me live...}{}{5}{}{}{co}
    {62}{Oh, uh, wait. ...who?}{}{-4}{}{}{co}


    --------------

    See if that works for you. Obviously, you'd want to make some changes, and this is just an example. Personally, I use a greeting line and have PC response lines below it for quest states, but checking for the quests first is a more involved way to do it. If it's something the quest giver should have heard about, then it's definitely a good idea to use the script and dialog to jump straight into it like that.

    There is rarely many real posts for advice in this section. I hope this has been helpful, but if not or if you have more questions, I'll still be here.
     
Our Host!