Author Topic: Z-Dialog assistance required  (Read 562 times)

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« on: February 06, 2012, 06:11:15 am »


               I am trying to figure out how to use Z-Dialog.  I have worked out how a basic conversation works (ie the lines of dialogue are the same each time) ... but now I want to work out how to make PC choices only show in certain circumstances (ie PC has something in their inventory).

My test scenario at the moment is a simple harvesting quest.  PC must bring various items to NPC and be rewarded with XP ... e.g. “bring me apples, pears or bananas and I will reward you”

What I currently have is this:


void Init()
      
if(GetElementCount(PAGE_FIVE, oPC) == 0)
{
   if(GetIsObjectValid(GetItemPossessedBy(oPC, "apple")))
      {
      AddStringElement("Apples", PAGE_FIVE, oPC);
      }
   if(GetIsObjectValid(GetItemPossessedBy(oPC, "pear")))
      {
      AddStringElement("Pears", PAGE_FIVE, oPC);
      }
   if(GetIsObjectValid(GetItemPossessedBy(oPC, "banana")))
      {
      AddStringElement("Bananas", PAGE_FIVE, oPC);
      }
   else
      {
      AddStringElement("I'm sorry, it looks like I don't have any.", PAGE_FIVE, oPC);
      }
}
 

void PageInit()

else if(page == "five")
{
   SetDlgPrompt("Excellent, show me what you have.");
   SetDlgResponseList(PAGE_FIVE, oPC);
 }

 
void HandleSelection()

else if(page == "five")
{
   if(selection == 0)//"Apples"
   {
      int nItem = GetNumItems(oPC, "apple");
      TakeNumItems(oPC, "apple", nItem);
      GiveXPToCreature(oPC, nItem);
      SetDlgPageString("five");
   }
   if(selection == 1)//"Pears"
   {
      int nItem = GetNumItems(oPC, "pear");
     TakeNumItems(oPC, "pear", nItem);
     GiveXPToCreature(oPC, nItem);
     SetDlgPageString("five");
   }
   if(selection == 2)//"Bananas"
   {
      int nItem = GetNumItems(oPC, "banana");
      TakeNumItems(oPC, "banana", nItem);
      GiveXPToCreature(oPC, nItem);
      SetDlgPageString("five");
   }
   else//"I'm sorry, it looks like I don't have any."
   {
      EndDlg();
   }
}

My problems are this:

1.  If the PC ends the conversation (either normally or aborts), changes their inventory,  and talks to the NPC again, the list does not update.

2.  The selections in the HandleSelection() section only work against the correct item if all 3 are in the list.  I don’t know how to assign them to a specific line.

3.  When the PC chooses an option, e.g. apples, the NPC takes all their apples and rewards them xp accordingly, but then I want the conversation to stay on PAGE_FIVE and be updated with the new available list.  (e.g. PC has apples, pears and bananas ... on page five chooses to give apples ... apples are taken and reward given ... page five now only shows pears and bananas etc.)

 

Questions:
a)   Does the Init() work the same as the “text appears when”/starting conditional nodes of normal conversations?
'B)'  Does the HandleSelection() work the same as the “action taken” nodes of normal conversations?

 The possibilities are endless ... if I can just figure this out !!

Thanks,

EDIT:  EEKKK ... lesson learned ... don't copy and paste from Word !!
               
               

               


                     Modifié par Tassie Wombat, 06 février 2012 - 06:21 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #1 on: February 06, 2012, 08:03:52 am »


               Well, this is close to an already existing thread, yet the latter is more focused around fixing a bug in the system. Anyway, here is the script template provided/recommended by the author, along with a few comments:

#include "zdlg_include_i"

const string PAGE1 = "main";
const string PAGE2 = "any_name";
object oPC = GetPcDlgSpeaker();

void Init() // This fires once, when the convo begins
{
   SetShowEndSelection(TRUE); // If you want and "End" option displayed 
}

void PageInit() // This fires right after HandleSelection()
{
   int nSel = GetDlgSelection();
   string page = GetDlgPageString();

   if(page == "" || page == PAGE1)
   {
      SetDlgPrompt("any prompt");
      SetDlgResponseList(PAGE1, oPC);
   }
   else if(page == PAGE2)
   {
       // Same concept as above
   }
}

void Clean() // This is important, it will delete the lists set on the PC speaker during convo
{
   DeleteList(PAGE1, oPC);
   DeleteList(PAGE2, oPC);
}

void HandleSelection() // This fires right after a selection is made
{
   int nSel = GetDlgSelection(); // The selection made by the player
   string page = GetDlgPageString(); // The page where the selection was made
   
   // This is used with the "End" selection(if set to true as in the Init() example above) 
   if(nSel == GetElementCount(page, oPC)-1) EndDlg();
   
   if(page == "" || page == PAGE1)
   {
        // DeleteList() would go here;
        // Prepare the next page to display here, adding elements
        // Send player to above prepared page
        SetDlgPageString();        
   }
   else if(page == PAGE2)
   {
       // same concept as above
   }
}

void main() // The main is used to wire convo events to the above functions
{
   switch(GetDlgEventType())
   {
       case DLG_INIT: Init(); break;
       case DLG_PAGE_INIT: PageInit(); break;
       case DLG_SELECTION: HandleSelection(); break;
       case DLG_ABORT:
       case DLG_END: Clean(); break;
   }
}

1. If the page does not update upon restarting the convo, it means that the Clean() function is not used or does not work properly, thus the lists stay on your toon, and since there is a check for this in your Init() example, nothing happens, wich means that your old page is displayed.

2. I would try 'else if' instead of simple 'if' statements in your HandleSelection() example(except for the first check and the else, of course).

3. To refresh your pages, simply set them in HandleSelection() too, not only in Init(). Init() should be used for "static" pages(i.e. wich do not change during convo), since it executes only once, thus you cannot refresh your list from there. It's useful for intro pages. So, in HandleSelection(), you should call DeleteList() with the proper parameters, then set your page elements, then send player to the desired page. This way, your pages will always be "refreshed".

For the way the system operates, Init() is called as soon as the convo begins. When a selection is made, HandleSelection() is called, followed by PageInit(). When the convo ends or aborts, the Clean() function is called.

Hopefully this can help, let me know if I forgot something.


Kato
               
               

               


                     Modifié par Kato_Yang, 06 février 2012 - 08:41 .
                     
                  


            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #2 on: February 06, 2012, 10:57:03 am »


               Thanks for the reply Kato ... I have been busily rewriting my script (in between parenting duties) and just got around to taking another look, only to discover you have updated your post !!

So far my rewriting has fixed most of the issues ... now I just need to tackle the tricky page with choices only appearing in the right conditions.

One thing more though, could you please explain the following line in more detail?  I am not 100% sure how to use it.
ReplaceIntElement(0, 1, PAGE1, oPC); // Store an int along with the previous string, a special feature

I will tackle the next part of the script and see how I go.

Thanks

Wombat
               
               

               


                     Modifié par Tassie Wombat, 06 février 2012 - 10:57 .
                     
                  


            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #3 on: February 06, 2012, 11:59:53 am »


               *bangs head against desk in frustration*

Okay I cannot figure out how to get a selection of choices to appear based on what is in the PC's inventory.

I want the PC to choose "I have some fruit for you" on page 4 ... this takes them to page 5 where it shows the following:

apples (only if in PC inventory)
pears (only if in PC inventory)
bananas (only if in PC inventory)
sorry, I don't have anything (only if PC has none of the above fruit)

I cannot get any of the choices to show up by placing them in HandleSelection().

I'll tackle this again after work tomorrow.

*puts brain on hiatus and goes to bed*
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #4 on: February 06, 2012, 03:40:49 pm »


               I haven't used Z-Dialog in quite some time, so I'm not ideally situated to give advice, but one thing you should be aware of is that the Vault version of Z-D had a couple bugs with its listing mechanism, which pspeed helped me to fix for my legendary level system. As I've been warning others, while pspeed said he planned to up those fixes to the vault, the 'last updated' date made me think he hadn't. Well, I got tired of issuing nebulous warnings of uncertain necessity, so I finally went ahead and ran a diff on the two scriptsets.

Lo and behold, it appears that 2 fixes made it in, lines he commented out in my version, which are omitted in his. There is, however, still a difference in the scripts. Since I know HGLL's work fine, I'll post it as a correction.

His SetDlgPageString function, on line 230 of zdlg_include_i.nss, looks like this:


void SetDlgPageString( string page )
{
    SetLocalString( GetPcDlgSpeaker(), DLG_PAGE_ID, page );
}

HGLL's version, looks like this:


void SetDlgPageString( string page )
{
    object oSpeaker = GetPcDlgSpeaker();
    SetLocalString( oSpeaker, DLG_PAGE_ID, page );
    DeleteLocalInt( oSpeaker, DLG_HAS_PREV );
    DeleteLocalInt( oSpeaker, DLG_HAS_NEXT );
    DeleteLocalInt( oSpeaker, DLG_START_ENTRY );
}

The new SetLocalString appears nowhere else in the diff, but the three DeleteLocalInts are involved in the other two fixes - they were commented out of the SetDlgResponseList function on line 201 and SetDlgPageInt function on line 244.

Here are all the mentions of DLG_PAGE_ID in the scriptset:

zdlg_include_i (30): const string DLG_PAGE_ID = "zdlgPageId";
zdlg_include_i (236):     SetLocalString( oSpeaker, DLG_PAGE_ID, page );
zdlg_include_i (246):     return( GetLocalString( GetPcDlgSpeaker(), DLG_PAGE_ID ) );
zdlg_include_i (253):     SetLocalInt( GetPcDlgSpeaker(), DLG_PAGE_ID, page );
zdlg_include_i (263):     return( GetLocalInt( GetPcDlgSpeaker(), DLG_PAGE_ID ) );
zdlg_include_i (420):     DeleteLocalInt( oSpeaker, DLG_PAGE_ID );
zdlg_include_i (421):     DeleteLocalString( oSpeaker, DLG_PAGE_ID );

It appears that the GetDlgPageString function will not work without that SetLocalString, since it's set nowhere else, and GetDlgPageStringfunction IS used in the HGLL scripts, so I'm gonna go ahead and call that a bug. To fix it, simply replace your version's SetDlgPageString with HGLL's.

Beyond that, if you want an example of how to do complex conversations with Z-Dialog, you can look at HGLL's scripts.

Funky
               
               

               


                     Modifié par FunkySwerve, 06 février 2012 - 03:43 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #5 on: February 06, 2012, 07:02:50 pm »


               

Tassie Wombat wrote...

One thing more though, could you please explain the following line in more detail?  I am not 100% sure how to use it.
ReplaceIntElement(0, 1, PAGE1, oPC); // Store an int along with the previous string, a special feature


Certainly, here is an example very close to your testing setup wich uses the above function, with a few comments:


#include "zdlg_include_i"
const string PAGE1 = "main";
const string PAGE2 = "fruits";
object oPC = GetPcDlgSpeaker();

void Init()
{
   AddStringElement("Yes", PAGE1, oPC);
   AddStringElement("I'll come back with some", PAGE1, oPC);
}

void PageInit()
{   
   string page = GetDlgPageString();
   if(page == "" || page == PAGE1)
   {
      SetDlgPrompt("Do you have some fruits to trade?");
      SetDlgResponseList(PAGE1, oPC);
   }
   else if(page == PAGE2) 
  { 
      SetDlgPrompt("Wich one(s) would you trade?");
      SetDlgResponseList(PAGE2, oPC);
  }
}

void Clean()
{
   DeleteList(PAGE1, oPC);
   DeleteList(PAGE2, oPC);
}

void HandleSelection()
{
   int nSel = GetDlgSelection();
   string page = GetDlgPageString();
   if(page == "" || page == PAGE1)
   {
      if(nSel == 0)
      {
         DeleteList(PAGE2, oPC);
         int nIndex = 0;
         if(GetIsObjectValid(GetItemPossessedBy(oPC, "apple")))
         {
            AddStringElement("Apples", PAGE2, oPC);
            ReplaceIntElement(nIndex++, 1, PAGE2, oPC);
         }
         if(GetIsObjectValid(GetItemPossessedBy(oPC, "pear")))
         {
            AddStringElement("Pears", PAGE2, oPC);
            ReplaceIntElement(nIndex++, 2, PAGE2, oPC);
         }
         if(GetIsObjectValid(GetItemPossessedBy(oPC, "banana")))
         {
            AddStringElement("Bananas", PAGE2, oPC);
            ReplaceIntElement(nIndex++, 3, PAGE2, oPC);
         }
         if(nIndex == 0) // The player has no fruits
         {
            AddStringElement("I'm sorry, it looks like I don't have any.", PAGE2, oPC);
            ReplaceIntElement(nIndex++, -1, PAGE2, oPC);
         }
         AddStringElement("Back", PAGE2, oPC);
         ReplaceIntElement(nIndex, -2, PAGE2, oPC);
         SetDlgPageString(PAGE2);
      }
      else EndDlg();
   }
   else if(page == PAGE2)
   {
      int nChoice = GetIntElement(nSel, PAGE2, oPC); // We retrieve the stored integer
      if(nChoice == -2) SetDlgPageString(PAGE1);
      else if(nChoice == -1) EndDlg();
      else
      {
          if(nChoice == 1) // The player selected apples
          {
             // any reaction to the choice
          }
          else if(nChoice == 2) // pears
          {
             // any reaction to the choice
          }
          else if(nChoice == 3) // bananas
          {
             // any reaction to the choice
          }
          // Jump to any page or end dialog          
      }
   }
}

void main()
{
   switch(GetDlgEventType())
   {
      case DLG_INIT: Init(); break;
      case DLG_PAGE_INIT: PageInit(); break;
      case DLG_SELECTION: HandleSelection(); break;
      case DLG_ABORT:
      case DLG_END: Clean(); break;
   }
}


So, ReplaceIntElement() and the other Replace* functions allow you to store an additional value with your string element. In this example, we don't know in advance if the player has some fruits at all or wich ones if he does, thus we cannot retrieve the player's choice by assuming that selection 0 will be apples, since selection 0 might as well be pears(or anything else) if the player does not have any apples. Retrieving the integer stored with the element cannot fail, however. There are other uses for the concept, like retrieving the property chosen for upgrade within a smith convo etc... Note that it would also be possible to retrieve the text of the selection with GetDlgResponse(), I guess it's a matter of situation and/or taste.

EDIT: As Funky mentioned, the version packaged with HGLL is the one to use, I should probably have mentioned this right from the start.


Kato  
               
               

               


                     Modifié par Kato_Yang, 06 février 2012 - 08:06 .
                     
                  


            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #6 on: February 06, 2012, 09:17:49 pm »


               

Kato wrote ...
Well, this is close to an already existing thread, yet the latter is more focused around fixing a bug in the system. Anyway, here is the script template provided/recommended by the author, along with a few comments:


I did read through this thread before posting, but got confused/lost with all the talk of bugs!!  So unfortunately I missed the nicely commented template you posted.

Funky wrote ...
Beyond that, if you want an example of how to do complex conversations with Z-Dialog, you can look at HGLL's scripts.


After downloading Z-Dialog from the Vault I discovered I already had it in my module ... and it is HGLL version '<img'> ... but have fixed it in the demo module now too (which is the one I am learning this in).  I got as far as I have with a combination of the demo scripts and your HGLL ones.

Kato, thanks for the explanation and example ... my coffee deprived brain can almost make sense of it.  I was working from the demo scripts and the HGLL scripts ... I think I just needed an example more complex than one yet simpler than the other to get the brain working right!!

*looks at the clock*  late for work !!

*runs out the door repeating mantra ... "must not look at scripts before work"*

Thank you,
Wombat
               
               

               
            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #7 on: February 07, 2012, 03:31:17 am »


               *does a little happy dance*

Thank you Kato, it works perfectly!!  I have made myself a template with lots of comments and now can get to work converting all my quests into zdlg scripts instead.

Now if only there was a simple way to turn dlg files into a simple text file to copy and paste !!  Ah well, I guess I can't have everything!!

Thank you again,
one very happy Wombat '<img'>

(and yes, a dancing wombat is a hilarious sight to see !!)
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #8 on: February 07, 2012, 03:57:54 am »


               lol.   How about just using a sinple text editor.   Sure there will be a bunch of stuff in there that you can not read.  But all of the text in the conversation will still be test that you can just copy and paste.  A lot of then little squares in the midle of the test should be simple carraige returns.
               
               

               
            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #9 on: February 07, 2012, 04:36:38 am »


               

Lightfoot8 wrote...

lol.   How about just using a sinple text editor.   Sure there will be a bunch of stuff in there that you can not read.  But all of the text in the conversation will still be test that you can just copy and paste.  A lot of then little squares in the midle of the test should be simple carraige returns.


*pokes nose out of wombat burrow*

But how do I get it to the text editor?  I did try simply changing the file extension from .dlg to .txt but ended up with an unreadable page.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #10 on: February 07, 2012, 05:00:21 am »


               The following Moneo script will dump all the conversation text into a text file for you - just change the mod name to your mod's name in the script:


%mod = 'Path of Ascension CEP Legends.mod';
$count = 0;
for (%mod['*.dlg']) {
    $count++;
  $subcount = 0;
  for (/{'EntryList'}) {
      $subcount++;
      print $count, "    NPC    ", $subcount, "    ", /~/Text,    "    ", "\\n";     
  }
  $subcount = 0;
    for (/{'ReplyList'}) {
      $subcount++;
      print $count, "    Player    ", $subcount, "    ", /~/Text,    "    ", "\\n";    
    } 
}


It marks convo number, npc vs player, and absolute line numbers - more sophisticated linkups would take more time than I'm willing to spend.



For instructions on how to set up and use Moneo, see this sticky:

Click Me!


Funky
               
               

               


                     Modifié par FunkySwerve, 07 février 2012 - 05:04 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #11 on: February 07, 2012, 05:07:05 am »


               Sample convo dumps (first 4 convos in mod):

1   NPC   1   This strange fountain has many small, smooth, dull black stones resting in its waters.   
1   NPC   2   The fountain flashes bightly, searing white hot light burning into your brain......   
1   Player   1   Leave.   
1   Player   2   Place a Rainbow Stone in the fountain.   
1   Player   3   *Cover my eyes*   
2   NPC   1   This strange fountain has many small, smooth, dull black stones resting in its waters.   
2   NPC   2   The fountain flashes bightly, searing white hot light burning into your brain......   
2   Player   1   Leave.   
2   Player   2   Place a Rainbow Stone in the fountain.   
2   Player   3   *Cover my eyes*   
3   NPC   1   CEP   
3   Player   1   CEP sucks....   
3   Player   2   Love The CEP!   
4   NPC   1   This portal swirls with primal chaos; flaring lights and mad whispers echo from it in endless procession.   
4   Player   1   Do not enter the portal.   
4   Player   2   Use the Dimensional Stabilizer to stabilize the portal.   
4   Player   3   Return to the abyssal depths beneath Ascension.   
4   Player   4   Follow the path opened by the use of the Dimensional Stabilizer from the Firstforged Eidolon to the hidden heart of Shuzantuhal deep in the Far Realm.   
4   Player   5   Take the portal to the Far Realm.   

#5 is a beast, but I'll post it - moderately less useful given the size....

5    NPC    1    You shall die for invading my realm!   
5    NPC    2    By what right do you invade my domain?   
5    NPC    3    Welcome to Elysium, servants of the Light. It is well that you have come, for the greatest hosts of the Abyss even now have breached the Empyrean Wards and prepare to attack the Fortress of the Sun. My forces lay scattered before the might of the demons, and it will take all my efforts to bind the power of the Wand. You must defend me, and their assault will be relentless.   
5    NPC    4    You must defend me while I deal with the Wand!   
5    NPC    5    You have done well indeed to fight off the forces of the Abyss. The power of the Wand of Orcus has been bound for a time. And for you, noble champions, I have a reward. You may now depart through this portal.   
5    NPC    6    Indeed. And this will not be the last time. The battle against the powers of evil is endless.   
5    NPC    7    Impressive that you fought your way here, mortal. You have ambition, to come so far and risk so much, and ambition I can respect. Let us make a pact, you and I. If you help me to recover the missing pieces of my wand, I will grant you such powers as you cannot imagine, powers to match your ambition, and more. What say you, fleshling? Only a demon lord can repair the wand, and it belongs with its master. Do we have a deal?   
5    NPC    8    Ah, fleshling, you return. Yet you do not have the other pieces of my wand. You risk disappointing me, mortal.   
5    NPC    9    AHHH Fleshling, you have done well! I can sense my wand's power in your presence. Quickly, give me the pieces, and I will make it whole, and use it to fulfill our pact.   
5    NPC    10    Oh, it has been, flesh-thing. And now I will reward your ambitions. First, though, we'll need to rid you of that stinking meat. The dead are so much more pliant, you see. Quah-Nomag, to me!   
5    NPC    11    Foolisssh sssoftssskins to venture here. Yet you look on me without your ssskinsss aquiver - perhapsss you are already mad? No matter...I have a proposssition for you. I ssseek the other pieces of thissss Wand <StartAction>[he raises a Wand fragment aloft]</Start>. Bring them to me, and not only with I ssspare your your flesssh the touch of my stingers, I will reward you greatly. Consssider the rissskssss of it falling into another demon lordsss clutchesss - they will usssse it to wage their war on the heavenss, but I ssseek only to reclaim my rightful throne and throw down thessse filthy tanar'ri. And ssssuch rewardsss I can offer! Powersss beyond even the tanar'ri lords, sssoftskin, for I know the ancient waysss of power, and can inssstuct you. What ssssay you, sssoftskin? Would you be friend, or food?   
5    NPC    12    Sssoftskin! You return without the Wand? Tarry not long, or I will find more sssavory usssess for your flesssh.   
5    NPC    13    Sssoftskin! You fulfill our bargain! I am mosssst impressssed. Passs me the piecesss, that I might mend the Wand.   
5    NPC    14    Your arrogance is amusssing, ssssoftskin, if missssplaced. Now you will face the might of an Obyrith lord! Miska! Time to serve your master, pet!   
5    NPC    15    Such courage to venture into my demesne, mortals! I find myself unable to hide my most sincere admiration for your talents. Perhaps we might reach an accord? For you see, I seek to reforge the wand that Orcus lost, and have already obtained a piece - you see? <StartAction>[He holds aloft a fragment of the Wand of Orcus]</Start> The other great lords do as well, but you cannot trust their motives. I, on the other hand, am known for my fondness of your kind - you have heard of Iggwilv, I trust? None of them understand you mortals as I do, or carry such a warm spot for their endless struggles. Help me to find the other pieces of the Wand, and I will help you as I helped her, schooling you in the lost secrets of the arcane, the secrets of the multiverse itself! The others are fools who will only betray you, but I know your worth, mortals. Help me, and you help yourselves! What say you?   
5    NPC    16    You return! But without all the pieces of the Wand! Our plans have not come to ruin, I trust, my friend?   
5    NPC    17    Oh well done mortals! I sense the pieces of the Wand on you! Give them to me, and let our pact be fulfilled!    
5    NPC    18    And now it is time for your just desserts, my friends. Verin, to my side!   
5    NPC    19    <StartAction>[(The right head speaks) The intruders! Rend their flesh!</Start>(The left head speaks) No! Patience, Herthradiah, I have an idea. <StartAction>[*Menacing snarls*]</Start> Tiny mortals, the Prince of Demons is merciful. We will spare you our wrath, despite your trasngressions... <StartAction>[They defile our realm!]</Start>...and make you an offer instead. Bring us the pieces of that moldering goat Orcus's wand, and we will reward you richly. <StartAction>[Reward?! They stand before us and still breathe! What other boon would you offer?]</Start> Quiet! We are the most powerful of the demon lords, as you are doubtless aware, mortal. We can offer you more power than the rest combined! You think you are mighty now? You are as nothing to what you could be, with our favor! Help me appease my more savage half, and master the Abyssal realm, by bringing me the pieces of Orcus's Wand. Do so, and I will grant you the power to rule your own plane unchallenged. A fair bargain, yes?   
5    NPC    20    Ah, the mortals return, but without the Wand's pieces? What is this? <StartAction>[I told you we should've mangled their wretched bones!]</Start> Speak quickly, mortal, or I will not restrain my wroth!   
5    NPC    21    <StartAction>[The Wand! They have the pieces. Yesssss.]</Start> I sense them too! Quickly, mortals, give them to us, and claim your reward!   
5    NPC    22    <StartAction>[Now we kill them, Aameul!]</Start> Yes, brother, you see how your patience is rewarded? Let us strike! <StartAction>[NNNNGRRRRRAAAAAAAAWRRR!]</Start> Arendagrost! Time to feed!   
5    Player    1    <StartAction>(Defend yourself)</Start>   
5    Player    2    <StartAction>(Defend yourself)</Start>   
5    Player    3    We must prepare. Give us a moment.   
5    Player    4    We are ready.   
5    Player    5    <StartAction>(Defend Pelor)</Start>   
5    Player    6    At last. It has been exhausting.   
5    Player    7    Goodbye.   
5    Player    8    I'd best take a moment to consider this. Pardon me.   
5    Player    9    Do you take me for a fool, to bargain with a demon? Die, cow!   
5    Player    10    Yes, our ambitions in this matter coincide. I will recover the other pieces of your wand and bring them to you, if you will share your power with me.   
5    Player    11    Pardon me, I did not mean to intrude, I need a moment to confer with my colleagues.   
5    Player    12    I have reconsidered the wisdom of allying myself with cattle. Time to die one last time, haybreath.   
5    Player    13    Pardon, your fiendishness. Our plan proceeds apace. I need but for you to send me on way once more, and I shall soon return with all the other pieces of the wand.   
5    Player    14    Of course, great one, but excuse me a moment - I need to make sure I have all the pieces, so as not to waste your time.   
5    Player    15    What, so you can use it on me? I don't think so, manurebreath.   
5    Player    16    Very well. This better have been worth it.   
5    Player    17    Your pardon, oh chitinous one, I must discuss this with my fellow softskins.   
5    Player    18    Hah! Some giant bug wants to parley - attack!   
5    Player    19    Very well, great Obox-ob, I will help you in this endeavor.   
5    Player    20    I apologise for bothering you, great one. Allow me a moment to confer with my fellow softskins.   
5    Player    21    I have reconsidered. I'm curious to discover what noise you'll make when I squash you with my boot.   
5    Player    22    Your pardons, oh Prince. If you but hasten me on my path, I will soon see our bargain fulfilled.   
5    Player    23    Please excuse our intrusion, great fiend - I need a moment to ensure that everything is in order.   
5    Player    24    I think I'll keep it myself, thanks. Time for you to visit that giant dungheap in the sky, bugbrains.   
5    Player    25    I have fulfilled my end of the bargain. Now it is time for you to fulfill yours.   
5    Player    26    Your pardon, eminence. I must confer with my allies on this matter.   
5    Player    27    Your tongue slithers like the serpents in your gardens, fiend! Time to die!   
5    Player    28    Your words are wise, oh prince. We have a deal.   
5    Player    29    Your pardon, your grace. I merely sought reassurance that you still possessed your own piece, as I trust not the machinations of the other demon lords. I see all is well, however, and so will take my leave of you.   
5    Player    30    I know your mind, fiend, and the betrayal that lurks within. You will pay for the treachery you plan!   
5    Player    31    Indeed not. Please teleport me from here, milord, and I will see our plans to fruition.   
5    Player    32    A moment, milord - I'm not sure we have all the pieces. Allow me to check - I'll be back in a moment.   
5    Player    33    So you can wield it against me? I don't think so, snakebreath.   
5    Player    34    Here you are...Prince.    
5    Player    35    A thousand pardons, great one. I need a moment to discuss your gracious offer with my followers.   
5    Player    36    Strike a bargain with two babbling baboons? I think not.   
5    Player    37    I accept your proposal great Prince, as you knew I must. Who could stand in the path of such might?   
5    Player    38    You mean these are not the pieces you sought? Please excuse my transgressions, great one - I will return with the proper parts immediately.   
5    Player    39    Has anyone ever told you you've got monkey heads?   
5    Player    40    Profound apologies, great one. Please, hasten my path from here, and I will bring you the pieces of the Wand with all due haste.   
5    Player    41    Not to dispute you, great Prince, but one of the pieces is still missing. Excuse me, and I'll bring it as quickly as my puny limbs allow.   
5    Player    42    Keep your tentacles to yourself, monkeyboy. The Wand is mine!   
5    Player    43    Please excuse my tardiness, great Prince. Here are the pieces.   
               
               

               


                     Modifié par FunkySwerve, 07 février 2012 - 05:08 .
                     
                  


            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #12 on: February 07, 2012, 05:50:49 am »


               

FunkySwerve wrote...

The following Moneo script will dump all the conversation text into a text file for you - just change the mod name to your mod's name in the script:


%mod = 'Path of Ascension CEP Legends.mod';
$count = 0;
for (%mod['*.dlg']) {
    $count++;
  $subcount = 0;
  for (/{'EntryList'}) {
      $subcount++;
      print $count, "    NPC    ", $subcount, "    ", /~/Text,    "    ", "n";     
  }
  $subcount = 0;
    for (/{'ReplyList'}) {
      $subcount++;
      print $count, "    Player    ", $subcount, "    ", /~/Text,    "    ", "n";    
    } 
}


It marks convo number, npc vs player, and absolute line numbers - more sophisticated linkups would take more time than I'm willing to spend.

For instructions on how to set up and use Moneo, see this sticky:
Click Me!


Funky


I keep getting the following error message:
Syntax error at - line 1 pos 7.

I have started from scratch several times and still get the same error.

*puzzled wombat*
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #13 on: February 07, 2012, 06:22:14 am »


               You should copy and paste it straight from my post. Likely the problem is that your continued the print command on a new line - letoscript/moneo care about blank space, unlike nwscript. Also, you changed the newlines to simple 'n's - you're going to wind up with one long-ass paragraph. '<img'>

Funky
               
               

               
            

Legacy_Tassie Wombat

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Z-Dialog assistance required
« Reply #14 on: February 07, 2012, 06:32:44 am »


               

FunkySwerve wrote...

You should copy and paste it straight from my post. Likely the problem is that your continued the print command on a new line - letoscript/moneo care about blank space, unlike nwscript. Also, you changed the newlines to simple 'n's - you're going to wind up with one long-ass paragraph. '<img'>

Funky


I did just copy and paste, but will try again.