Dialogue mod: Burne's puzzles

Discussion in 'General Modification' started by zhuge, Jul 7, 2004.

Remove all ads!
  1. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    Ok first off... a few rants. The dialogue window in ToEE has some pretty severe limitations that makes it difficult to write responses of any length:

    1)The dialogue box of the NPC is only 4 lines long. Yes, it's fixed. You can write 5 lines but it'll be placed on the border of the text box. Any longer and it will completely overflow the text box and make the screen look really cluttered and very unprofessional.

    2)For PC responses, you are limited to 5 selectable responses in the PC dialogue box. This is even more rigidly fixed than the NPC dialogue box as additional responses will simply not appear. Write your longest response last. A PC response longer than 2 lines will overflow into the next response and you'll see a bunch of really ugly superimposed text.

    They really should have made scrolling text boxes for these and it completely amazes me why this was not done.


    Ok, this is my first dialogue mod (as in new content) so I'm not sure if I've gotten everything right but I've tested it few times and it seem to function fairly well. I probably still need to make some cosmetic rearrangements due to the aforementioned limitations of the dialogue box.

    What does it do - it introduces a new quest, 2 puzzles, some background of Greyhawk for flavor and I get to play around with some functions to see if they work. It also gives an added option of obtaining a Fireball scroll without needing to hire a Wizard or to have someone with the Scribe Scroll feat in your party.

    I really need feedback here. So please download and post corrections/comments/criticism.

    If everything goes well and players like it, we can even include a corrected, modified version in a future update.
     

    Attached Files:

  2. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    There are 4 files here:
    00004burne.dlg
    00262burne_apprentice.dlg
    gamequestlog.mes
    gamequest.mes

    00004burne.dlg and 00262burne_apprentice.dlg should be put in the data/dlg folder
    gamequestlog.mes should be put in the data/mes folder
    gamequest.mes should be put in the data/rules folder


    MODIFIED DETAILS:

    In gamequestlog.mes
    for // Quest Titles 000 - 199, add:
    {61} {Burne's puzzles}

    for // Quest Descriptions 200 - 399, add:
    {261} {Burne has posed a few puzzles for you to solve}


    In gamequest.mes delete: (these were somehow inserted into this file in an earlier version of the mod pack without any corresponding actual quest in the dlg files)
    {61}{20}
    {62}{20}
    {63}{20}
    {64}{20}
    {65}{20}
    {66}{20}
    {67}{20}
    {68}{20}
    {69}{20}

    add:
    {61}{5}


    In 00262burne_apprentice.dlg add:
    {33}{Do you still remember how many people you greeted at the Greyhawk conclave last year?}{}{8}{game.quests[61].state == qs_accepted}{150}{}

    {150}{That's an odd question. Ahh... Burne must have posed this question to you in the form of a puzzle. I don't think he would approve of it if I told you the answer. I believe he wants you to enravel the puzzle by logic.}{That's an odd question. Ahh... Burne must have posed this question to you in the form of a puzzle. I don't think he would approve of it if I told you the answer. I believe he wants you to enravel the puzzle by logic.}{}{150}{}{}
    {151}{Surely it would not hurt to help me win your master's favour. After all, I work in the service of Hommlet and I could also put in a good word for you when a suitable opportunity arises.}{}{8}{pc.skill_level_get(npc,skill_diplomacy) >= 10 and game.party[0].reputation_has( 15 )}{160}{}
    {152}{Can't the rules be bent a little?}{}{8}{}{170}{}
    {160}{I really don't know if I should... Oh, very well, I think I made 5 greetings if I'm not mistaken. Just don't tell Burne that I said so.}{I really don't know if I should... Oh, very well, I think I made 5 greetings if I'm not mistaken. Just don't tell Burne that I said so.}{}{150}{}{}
    {161}{Thank you and don't worry, my lips are sealed. I will take my leave now and leave you to your studies}{}{8}{}{0}{}
    {170}{I'm afraid not. Please let me get back to my duties}{I'm afraid not. Please let me get back to my duties}{}{170}{}{}
    {171}{E:}{}{1}{}{0}{}



    In 00004burne.dlg
    replace:
    {115}{E:}{}{1}{}{0}{}
    {136}{E:}{}{1}{}{0}{}

    with:
    {115}{Bunny tell more story?}{}{-7}{}{530}{}
    {116}{E:}{}{1}{}{0}{}
    {136}{Do you have any other interesting tales to tell?}{}{8}{game.quests[61].state == qs_unknown or game.quests[61].state == qs_mentioned}{520}{}
    {137}{I am ready to answer that second puzzle now but could you repeat it once more so that I'm sure I've understood it correctly.}{}{13}{game.quests[61].state == qs_accepted}{730}{}
    {138}{I have been unable to find a Fireball scroll. As an accomplished mage, surely you could help us in this matter. After all, you appear quite earnest in having the skull destroyed.}{}{8}{game.global_flags[195] == 1 and game.global_flags[359] == 0 and (game.quests[61].state == qs_unknown or game.quests[61].state == qs_botched)}{540}{}
    {139}{E:}{}{1}{}{0}{}
     
  3. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    add:
    {520}{[peers at you] It has been some time since I have had a battle of wits with anyone. If you feel up to the challenge, I could relate to you a few interesting tales but I will pose a question at the end of the tale. Answer correctly and I will scribe a magical scroll that will help you in your adventures. Answer wrongly and you will donate a few gold pieces to aid in the construction of our castle.}{[peers at you] It has been some time since I have had a battle of wits with anyone. If you feel up to the challenge, I could relate to you a few interesting tales but I will pose a question at the end of the tale. Answer correctly and I will scribe a magical scroll that will help you in your adventures. Answer wrongly and you will donate a few gold pieces to aid in the construction of our castle.}{}{510}{}{game.quests[61].state = qs_mentioned}
    {521}{I'm not interested in your puzzles}{}{1}{}{0}{}
    {522}{Perhaps another party member will answer your challenge.}{}{1}{}{0}{}
    {523}{I accept your challenge.}{}{1}{}{600}{game.quests[61].state = qs_accepted}
    {530}{[smirks] Perhaps. But I would rather relate them to someone whom I could at least hold a proper conversation with.}{[smirks] Perhaps. But I would rather relate them to someone whom I could at least hold a proper conversation with.}{}{510}{}{}
    {531}{K:}{}{1}{}{100}{}
    {532}{E:}{}{1}{}{0}{}
    {540}{[casts you a disapproving look] I suppose I could scribe one for you but I'll need some recompense for my services. Ordinarily a scroll of such potency would be worth at least 375 gold pieces. However since these are dire circumstances, I am prepared to accept 300 gold to make the scroll. Alternatively, if you could impress me that you are worthy enough to receive it by answering a few simple questions, I will scribe the scroll for you gratis}{[casts you a disapproving look] I suppose I could scribe one for you but I'll need some recompense for my services. Ordinarily a scroll of such potency would be worth at least 375 gold pieces. However since these are dire circumstances, I am prepared to accept 300 gold to make the scroll. Alternatively, if you could impress me that you are worthy enough to receive it by answering a few simple questions, I will scribe the scroll for you gratis}{}{540}{}{game.quests[61].state = qs_mentioned}
    {541}{I will pay for the scroll}{}{1}{pc.money_get() >= 30000}{550}{pc.money_adj(-30000); create_item_in_inventory( 9171, pc )}
    {542}{I will answer your questions}{}{1}{game.quests[61].state != qs_botched}{600}{game.quests[61].state = qs_accepted}
    {543}{Never mind, I will find the scroll myself}{}{1}{}{0}{}
    {550}{Thank you. To save you some time, I'll give you a Fireball scroll that I scribed some time ago.}{Thank you. To save you some time, I'll give you a Fireball scroll that I scribed some time ago.}{}{550}{}{}
    {552}{K:}{}{1}{}{100}{}
    {553}{E:}{}{1}{}{0}{}
    {600}{We were recently visited by 3 of Rufus's friends, all of them Knights of the Hart from Furyondy. Competent logicians too I must say and you don't see too many in these times who have some measure of wits to match their brawn. They regaled us with portents of ill tidings from the northlands, their desperate search attempts to find their lost prince and also a rather amusing tale of a meeting with their House Master Grishnir.}{We were recently visited by 3 of Rufus's friends, all of them Knights of the Hart from Furyondy. Competent logicians too I must say and you don't see too many in these times who have some measure of wits to match their brawn. They regaled us with portents of ill tidings from the northlands, their desperate search attempts to find their lost prince and also a rather amusing tale of a meeting with their House Master Grishnir.}{}{600}{}{}
    {601}{Yes.}{}{1}{}{610}{}
    {610}{They had just returned from a skirmish at the edges of Vesve Forest with northern marauding forces. The Knights aided the elves and local militia bravely and repulsed the invaders but lost their steeds. Upon return to Furyondy, they asked for new war steeds but were brusquely told by the stablemaster that there was a recent marked shortage of good steeds and would have to ask the House Master for permission.}{They had just returned from a skirmish at the edges of Vesve Forest with northern marauding forces. It appeared that recent raids had become more organized and daring. The Knights aided the elves and local militia bravely and repulsed the invaders but lost their steeds. Upon return to Furyondy, they asked for new war steeds but were brusquely told by the stablemaster that there was a recent marked shortage of good steeds and would have to ask the House Master for permission.}{}{610}{}{}
    {611}{And what happened then?}{}{1}{}{620}{}
    {620}{In the Meeting Hall, the House Master Grishnir flatly rejected their requests, saying that they should have exercised more caution. The knights firmly stated that they lost their steeds in battle when rendering a service to the local populace in repelling invaders and deserved to have new mounts. Grishnir, a miserly leader who did not want to seem overly harsh, motioned for a page to bring them to the room of banners, where he said the scales of Fate would judge them.}{In the Meeting Hall, the House Master Grishnir flatly rejected their requests, saying that they should have exercised more caution. The knights firmly stated that they lost their steeds in battle when rendering a service to the local populace in repelling invaders and deserved to have new mounts}{}{}{}{}
    {621}{Continue.}{}{1}{}{630}{}
    {630}{Thinking that some chance of getting back their steeds was better than none, the knights reluctantly agreed to this. A page brought them to another room with 3 white banners and 2 black banners. He then asked the knights to line up in a straight row, blindfolded them and then randomly strapped a banner to their backs. Before the knights opened their blindfolds, the page removed the remaining 2 banners from the room.}{Thinking that some chance of getting back their steeds was better than none, the knights reluctantly agreed to this. A page brought them to another room with 3 white banners and 2 black banners. He then asked the knights to line up in a straight row, blindfolded them and then randomly strapped a banner to their backs. Before the knights opened their blindfolds, the page removed the remaining 2 banners from the room.}{}{630}{}{}
    {631}{Did the page also check the blindfolds?}{}{1}{}{640}{}
    {640}{To make sure none of the knights knew what banner they had strapped to their backs, the page asked Arashnar who stood at the back whether he knew his own banner's colour. Arashnar could see the banners of his two friends but couldn't see his own. Pausing slightly, he answered that he wasn't sure. Satisfied, the page then asked Tyrius who stood in the middle whether he knew what colour his own banner was. Tyrius could only see Dlimir's banner and also stated that he wasn't sure.}{To make sure none of the knights knew what banner they had strapped to their backs, the page asked Arashnar who stood at the back whether he knew his own banner's colour. Arashnar could see the banners of his two friends but couldn't see his own. Pausing slightly, he answered that he wasn't sure. Satisfied, the page then asked Tyrius who stood in the middle whether he knew what colour his own banner was. Tyrius could only see Dlimir's banner and also stated that he wasn't sure.}{}{640}{}{}
    {641}{Could the knights have lied then?}{}{1}{}{650}{}
    {650}{Being honorable knights they were of course beholden to tell the truth. Since even the 2 knights who could see some banners could not figure out what theirs were, the page believed it impossible for Dlimir to be able to do so, as he could not see a single one. Without questioning Dlimir, the page brought him to Grishnir and left the Meeting Hall.}{Being honorable knights they were of course beholden to tell the truth. Since even the 2 knights who could see some banners could not figure out what theirs were, the page believed it impossible for Dlimir to be able to do so, as he could not see a single one. Without questioning Dlimir, the page brought him to Grishnir and left the Meeting Hall.}{}{650}{}{}
    {651}{And what did Grishnir do?}{}{1}{}{660}{}
    {660}{Dlimir asked what was required of him in order to get the steeds and Grishnir replied that he could either withdraw from answering or state what colour his banner was. If he answered correctly he would get the steeds but if he gave the wrong answer, the knights would be assigned to additional heavier duties. What do you think Dlimir told the House Master then?}{Dlimir asked what was required of him in order to get the steeds and Grishnir replied that he could either withdraw from answering or state what colour his banner was. If he answered correctly he would get the steeds but if he gave the wrong answer, the knights would be assigned to additional heavier duties. What do you think Dlimir told the House Master then?}{}{660}{}{}
    {661}{Dlimir said that he carried a white banner.}{}{1}{}{670}{}
    {662}{Dlimir answered that he carried a black banner.}{}{1}{}{680}{}
    {663}{Dlimir explained that it was impossible to be sure under the circumstances and declined to answer.}{}{1}{}{690}{}
    {664}{I don't know what Dlimir would have said.}{}{1}{}{700}{}
    {665}{Could you relate that scenario in the room of banners again?}{}{1}{}{630}{}
     
  4. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    add:
    {670}{Correct, but why do you think he was so certain?}{Correct, but why do you think he was so certain?}{}{670}{}{}
    {671}{Uhm... there were 3 white banners and only 2 black ones... it would be likely that his was white...}{}{1}{}{720}{}
    {672}{If Arashnar saw that Tyrius and Dlimir had black banners, he would be able to know that his is white (since there are only two black banners). The fact that he did not know his banner color means that he either saw one black banner and one white banner, or two white banners. Tyrius realized this. He knew that he and Dlimir could not both have black banners. Therefore, if he saw Dlimir wore a black banner, he would immediately know that his was white. Since he didn't know the color of his banner, he must have seen a white banner on Dlimir. Dlimir, realizing this, deduced that his banner is white.}{}{13}{}{710}{}
    {680}{No, I'm afraid that's incorrect. You will now deliver to me the small donation that we agreed upon.}{No, I'm afraid that's incorrect. You will now deliver to me the small donation that we agreed upon.}{}{680}{}{game.quests[61].state = qs_botched}
    {681}{How much would that be?}{}{1}{}{820}{}
    {690}{Ah, but Dlimir was sure of the colour of the banner he carried. Perhaps if you think the scenario over, you may arrive at another conclusion. You will now deliver to me the small donation that we agreed upon.}{Ah, but Dlimir was sure of the colour of the banner he carried. Perhaps if you think the scenario over, you may arrive at another conclusion. You will now deliver to me the small donation that we agreed upon.}{}{690}{}{game.quests[61].state = qs_botched}
    {691}{How much would that be?}{}{1}{}{820}{}
    {700}{[chuckles] Well perhaps you will have better luck in your adventures. You will now deliver to me the small donation that we agreed upon.}{[chuckles] Well perhaps you will have better luck in your adventures. You will now deliver to me the small donation that we agreed upon.}{}{700}{}{game.quests[61].state = qs_botched}
    {701}{How much would that be?}{}{1}{}{820}{}
    {710}{Well done. Grishnir, forced to keep his word, awarded the knights the new steeds and the 3 knights continued on their adventures merrily. I have rarely had guests who would indulge me in my own little puzzles so you must humour me by listening to a second tale.}{Well done. Grishnir, forced to keep his word, awarded the knights the new steeds and the 3 knights continued on their adventures merrily. I have rarely had guests who would indulge me in my own little puzzles so you must humour me by listening to a second tale.}{}{710}{}{}
    {711}{I hope this is all worth it. The stories are intriguing but for now I would really rather be out exploring.}{}{1}{}{730}{}
    {712}{Very well.}{}{1}{}{730}{}
    {720}{Ah, so you merely guessed but were not sure. But I feel magnanimous today, so here's a small gift for your efforts}{Ah, so you merely guessed but were not sure. But I feel magnanimous today, so here's a small gift for your efforts}{}{720}{}{game.quests[61].state = qs_botched;}
    {721}{E:}{}{1}{}{0}{}
    {730}{An annual conclave of mages is frequently held at Greyhawk's University of Magical Arts, just before the Desportium of Magic, to organize matters and exchange ideas. It is usually attended by representatives from Verbobonc, Dyvers and the surrounding lands but last year's affair was rather quiet. I brought Pishella along as well and it seems all of the other 5 mages who were present also brought their apprentices for exposure, so there were a dozen of us altogether that day.}{An annual conclave of mages is frequently held at Greyhawk's University of Magical Arts, just before the Desportium of Magic, to organize matters and exchange ideas. It is usually attended by representatives from Verbobonc, Dyvers and the surrounding lands but last year's affair was rather quiet. I brought Pishella along as well and it seems all of the other 5 mages who were present also brought their apprentices for exposure, so there were a dozen of us altogether that day.}{}{730}{}{}
    {731}{Go on.}{}{1}{}{740}{}
    {740}{We greeted each other warmly and quickly settled down to discussion. After we had finished, out of curiosity I asked everyone (including Pishella) how many they had greeted. Of course it is common courtesy that anyone greeted would return the greeting and obviously no mage would greet his/her own apprentice. To my surprise, no one made the same number of greetings. My question is how many people did Pishella greet?}{We greeted each other warmly and quickly settled down to discussion. After we had finished, out of curiosity I asked everyone (including Pishella) how many they had greeted. Of course it is common courtesy that anyone greeted would return the greeting and obviously no mage would greet his/her own apprentice. To my surprise, no one made the same number of greetings. My question is how many people did Pishella greet?}{}{740}{}{}
    {741}{I don't think there is an answer to this.}{}{1}{}{780}{}
    {742}{I'm not sure, could you give some time to think about it}{}{1}{}{790}{}
    {743}{I think the answer lies between 1 and 5}{}{1}{}{750}{}
    {744}{I think the answer lies between 6 and 10}{}{1}{}{760}{}
    {745}{I think the answer is 11}{}{1}{}{770}{}
    {750}{And what is the exact answer?}{And what is the exact answer?}{}{750}{}{}
    {751}{One}{}{1}{}{770}{}
    {752}{Two}{}{1}{}{770}{}
    {753}{Three}{}{1}{}{770}{}
    {754}{Four}{}{1}{}{770}{}
    {755}{Five}{}{1}{}{800}{}
    {760}{And what is the exact answer?}{And what is the exact answer?}{}{760}{}{}
    {761}{Six}{}{1}{}{770}{}
    {762}{Seven}{}{1}{}{770}{}
    {763}{Eight}{}{1}{}{770}{}
    {764}{Nine}{}{1}{}{770}{}
    {765}{Ten}{}{1}{}{770}{}
    {770}{No, that's not the right answer I'm afraid. Perhaps you will fare better in other matters. But you did answer my first question correctly and therefore deserve at least some gift for your efforts. Take this scroll. It will prove useful in many combat situations.}{No, that's not the right answer I'm afraid. Perhaps you will fare better in other matters. But you did answer my first question correctly and therefore deserve at least some gift for your efforts. Take this scroll. It will prove useful in many combat situations.}{}{770}{}{game.quests[61].state = qs_botched}
    {771}{K:}{}{1}{}{100}{}
    {772}{E:}{}{1}{}{0}{}
    {780}{There is an answer to it but perhaps you will fare better in other matters. But you did answer my first question correctly and therefore deserve at least some gift for your efforts. Take this scroll. It will prove useful in many combat situations.}{There is an answer to it but perhaps you will fare better in other matters. But you did answer my first question correctly and therefore deserve at least some gift for your efforts. Take this scroll. It will prove useful in many combat situations.}{}{780}{}{game.quests[61].state = qs_botched}
    {781}{K:}{}{1}{}{100}{}
    {782}{E:}{}{1}{}{0}{}
    {790}{Very well but do not take too long.}{Very well but do not take too long.}{}{790}{}{}
    {791}{E:}{}{1}{}{0}{}
    {800}{Yes, but how did you arrive at that conclusion, pray tell.}{Yes, but how did you arrive at that conclusion, pray tell.}{}{800}{}{}
    {801}{There are 12 conclave members comprising of 6 mage-apprentice pairs. You asked 11 people and all gave different answers. This could happen only if someone did not greet anyone at all, someone made 1 greeting, another made 2 and so on till the person who made the maximum of 10 greetings. The person who gave 10 greetings obviously greeted everyone except his own companion, so the person who did not greet anyone must be the companion of the person who gave 10 greetings, since everyone else exchanged greetings with him. Similarly, the person who gave 9 greetings would have a companion who only exchanged 1 greeting and so on. Therefore we would have pairs with 8 and 2 greetings, 7 and 3 greetings, 6 and 4 greetings and 5 and 5 greetings respectively. However since nobody made the same number of greetings, the pair who made 5 and 5 greetings must have been you and Pishella (the only one you didn't ask the question was yourself). Therefore, Pishella exchanged 5 greetings with the others.}{}{1}{}{810}{game.quests[61].state = qs_completed}
    {810}{[eyes you with a growing sense of respect] Excellent! As a token of my appreciation for your deductive skills, I have with me 2 recently scribed scrolls which I believe will be of good use in your travels.}{[eyes you with a growing sense of respect] Excellent! As a token of my appreciation for your deductive skills, I have with me 2 recently scribed scrolls which I believe will be of good use in your travels.}{}{810}{}{create_item_in_inventory( 9196, pc ); create_item_in_inventory( 9171, pc )}
    {811}{Thanks for the scrolls}{}{1}{}{100}{}
    {812}{E:}{}{1}{}{0}{}
    {820}{I will take 20 gold pieces which should be a trifling sum for an adventurer such as yourself}{I will take 20 gold pieces which should be a trifling sum for an adventurer such as yourself}{}{820}{}{}
    {821}{Very well, here are your 20 gold pieces.}{}{1}{pc.money_get() >= 2000}{830}{pc.money_adj(-2000)}
    {822}{I don't have enough gold.}{}{1}{}{840}{}
    {830}{Thanks for the donation. May you fare well in your travels.}{Thanks for the donation. May you fare well in your travels.}{}{830}{}{}
    {831}{E:}{}{1}{}{0}{}
    {840}{That's most unfortunate, though I find it rather hard to believe. But it is not in my nature to strip someone of his last coins or possessions. So begone then.}{That's most unfortunate, though I find it rather hard to believe. But it is not in my nature to strip someone of her last coins or possessions. So begone then.}{}{840}{}{npc.reaction_adj( pc,-10)}
    {841}{E:}{}{1}{}{0}{}
     
    Last edited: Jul 8, 2004
  5. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    Line 801 too long. Overflows dialogue box and rest of response is not seen. Correction done. File reuploaded below as version 1.1

    I am still waiting for feedback. Doesn't seem to be much interest so far. }:(
     

    Attached Files:

    Last edited: Jul 8, 2004
  6. Morpheus

    Morpheus Mindflayer Veteran

    Joined:
    Nov 11, 2003
    Messages:
    539
    Likes Received:
    1
    This looks very interesting. You certainly seem to have put a lot of work into it, zhuge. I applaud your efforts! I'm very busy with RL stuff so I haven't had a chance to try it in the game yet, but I certainly will.

    The list of stuff I have to translate for the German version of the Co8 patch just grows and grows ... ;)
     
Our Host!