Jump to content

Iluvhorses

Member
  • Posts

    76
  • Joined

  • Last visited

    Never

Everything posted by Iluvhorses

  1. I'm having some dialog issues. The dialog was working fine for my two shops, then when I created dialog for a third person (no shop) it all went kablewy. Now I get an error message that makes no sense and none of the dialog works, so here's the code(with line #s) and the error message is below. Code: 1 // TOWN DIALOGUE SCRIPT 2 // Town 2: New Town 3 4 // This is the dialogue for this town. 5 // You can use states numbered from 1 to 99. 6 7 begintalkscript; 8 9 variables; 10 11 //***Jean*** 12 13 begintalknode 0; // this is the first node in the conversation 14 state = -1; // the dialogue state that makes this node available, left at -1 for states that start conversations 15 nextstate = 1; // what to change the dialogue state to when this node is selected 16 question = "Jean"; // For the first node in a conversation, the question is the name of the character 17 text1 = "You meet Jean. _What can I do for you, friend?_"; 18 19 begintalknode 1; 20 state = 1; 21 nextstate = 2; 22 question = "What do you sell here?"; 23 text1 = "_I sell bread fresh out of the oven, some greens, as well as some meat from my husband Sal next door. Have you met him yet?_"; 24 25 begintalknode 2; 26 state = 2; 27 nextstate = 3; 28 question = "I met Sal and he told me to come here and get some fresh bread"; 29 text1 = "_Good! I'm glad you did. He's a good man._"; 30 31 begintalknode 3; 32 state = 2; 33 nextstate = 3; 34 question = "No"; 35 text1 = "_Well then I suggest you do, He's a really good man and he has much more meat than I do here._"; 36 37 begintalknode 4; 38 state = 3; 39 nextstate = -1; 40 question = "Can I get some food please?"; 41 text1 = "You finish shopping."; 42 code = 43 begin_shop_mode("Jean's Bakery", "As well as bread, Jean also carries an ample supply of greens and meat",6,1,4); 44 break; 45 46 //***Sal*** 47 48 begintalknode 5; 49 state = -1; 50 nextstate = 4; 51 question = "Sal"; 52 text1 = "You meet Sal. _Welcome to my butcher shop! Here I sell the finest meat in town. I even have some bread from my wife Jean next door. Have you met her yet?_"; 53 54 begintalknode 6; 55 state = 4; 56 nextstate = 5; 57 question = "Yes and she told me to come here and get some meat."; 58 text1 = "_Good! I'm glad you got to meet her! She's great, isn't she?_"; 59 60 begintalknode 7; 61 state = 5; 62 nextstate = 6; 63 question = "Yes, she is."; 64 text1 = "He just smiles in approval. _So, would you like to have some meat?_"; 65 66 begintalknode 8; 67 state = 6; 68 nextstate = 7; 69 question = "Sure."; 70 text1 = "You finish shopping."; 71 text2 = "_Was there anything else I could help you with?_"; 72 code = 73 begin_shop_mode("Sal's Butcher Shop", "Sal has a wide variety of meats",7,1,4); 74 break; 75 76 begintalknode 9; 77 state = 4; 78 nextstate = 6; 79 question = "No I haven't."; 80 text1 = "_Well, you should, she's great! So, would you like to buy something?_"; 81 82 begintalknode 10; 83 state = 6; 84 nextstate = 7; 85 question = "No thanks."; 86 text1 = "_Was there anything else I could help you with?_"; 87 88 begintalknode 11; 89 state = 7; 90 nextstate = 8; 91 question = "Could you tell me where I can find the Mayor of this town?"; 92 text1 = "_Yes, her name is Jan and she is in the north end of town. She's always busy, but also has time to greet new travellers. She knows everything about this town so just ask her anything you need to know and she'll be able to help you._"; 93 94 begintalknode 12; 95 state = 8; 96 nextstate = -1; 97 question = "Ok, thanks!"; 98 text1 = "_No problem._"; 99 100 //***Mayor Jan***101 102 begintalknode 13;103 state = -1;104 nextstate = 9;105 question = "Mayor Jan";106 text1 = "Mayor Jan is sitting at her desk looking over some paperwork. When she sees you she stands up to greet you. _Greetings travelers! Is there anything I can help you with?_";107 108 begintalknode 14;109 state = 9;110 nextstate = 10;111 question = "What can you tell me about this town?;112 text1 = "_Well, this town is aptly named New Town because it was just created and established a week ago. In fact, some of our buildings aren't even finished yet! But they will be in time! Would you like to help us in building our town? I can't provide lodging for you yet, but perhaps in about a week we'll have a few rooms that you can sleep in. Until then you're welcome to make yourself at home in the empty building that's across the street._";113 114 begintalknode 15;115 state = 10;116 nextstate = 11;117 question = "Yes, I will help.";118 text1 = _Great!! Thank you! Go see the construction foreman in the little house at the southern end of town. He'll tell you what he wants you to do._";119 text2 = "_Again, I thank you._";120 121 begintalknode 16;122 state = 11;123 nextstate = -1;124 question = "You're welcome.";125 text1 = "Mayor Jan goes back to her paperwork with an added vigor and enthusiasm. She seems to be happy that you've decided to help with building the town.";126 127 begintalknode 17;128 state = 10;129 nextstate = -1;130 question = "Sorry, but we need to be moving on.";131 text1 = "Alright then. I thank you for your honesty. Please take advantage of our supplies that we have for sale, although they are a few, and I wish for you that your travels are successful. If you change your mind, we'll still be here._"; error message is: t2newtowndlg error: Unknown command _well in line 111. I don't understand why it says that, but cause I have the same thing as part of dialog for the butcher and it had worked fine before. Help??
  2. Kelandon - I got the wall thing figured out - I just used different walls And thanks for the tip on putting things inside of stuff. I thought that the contained/not contained meant that they were already contained somehow, like potions in a bottle. Thanks for trying to help, Jumpin' Salmon - but right now I'm trying to avoid confusion at all costs, so I'm just taking baby steps until I get this all figured out - but it was a really good tip, I'll have to keep it in mind for the future!
  3. Here it is fixed, and it works: Code: // Town 2: New Town// This is the special encounter script for this town.begintownscript;variables; int choice;body;beginstate INIT_STATE;// This state called whenever this town is entered. enable_add_chars(0); // Names must appear first. set_name(11,"Jean"); set_crime_tolerance(2);break;beginstate EXIT_STATE;// Always called when the town is left. message_dialog("You walk out of New Town, curious as to what adentures you can find!"," ");break;beginstate START_STATE;// This state is called every turn the party is in this town.break;beginstate 11; reset_dialog(); add_dialog_str(0, "You see a beggar holding out a tin cup to you. _Could you please spare a few coins so I can eat?_" 0); add_dialog_choice(0, "Yes I will. (Give him coins)"); add_dialog_choice(1, "Sorry, I don't have any myself."); add_dialog_choice(2, "Back off old man and leave me alone!"); choice = run_dialog(0); if (choice == 1) { if (coins_amount() == 0) { message_dialog("When he sees that you yourself don't have enough coins to give him, he looks rather ashamed of himself."," "); } else { change_coins(-10); message_dialog("He thanks you profusely and walks to the nearest bakery."," "); } } else if (choice == 2) { message_dialog("He sighs and sulks away."," "); end(); } else { message_dialog("He spits in your face and walks away, muttering about how young people only think of themselves these days."," "); } break; Thanks for the help guys! I've just finished creating dialog for two shops!! I think I'm getting a hang of this!! I doubt I'll have much time to work on it the next three weeks because of school, but I do have another question (surprise surprise). How do I make the outer walls of the city taller?? When my party is actually in the city, they look taller than the city walls! And, how can you put items inside things like crates, bookshelves, desks, etc....???
  4. Thank you, thank you, thank you, thank you, thank you, thank you!!! Ok, so anytime your going to use anything as a variable that's how you declare it? Ok, now I know. That was something else I was confused about. Like I said, bear with me - it's been a long time since I've done any sort of programming, and this is my first time with Avernumscript. Thanks again for the help guys!
  5. Code: // TOWN SCRIPT // Town 2: New Town // This is the special encounter script for this town. begintownscript; variables; choice = run_dialog(0); body; beginstate INIT_STATE; // This state is called whenever this town is entered. enable_add_char(0); set_crime_tolerance(2); break; beginstate EXIT_STATE; // Always called when the town is left. message_dialog("You walk out of New Town, curious as to what adventures you can find!"," "); break; begingstate START_STATE; // This state is called every turn the party is in this town. break; beginstate11; reset_dialog(); add_dialog_str(0, "You see a beggar holding out a tin cup to you. _Could you please spare a few coins so I can eat?_" 0); add_dialog_choice(0, "Yes I will. (Give him coins)"); add_dialog_choice(1, "Sorry, I don't have any myself."); add_dialog_choice(2, "Back off old man and leave me alone!"); choice = run_dialog(0); if (choice == 1) { change_coins(-10); message_dialog("He thanks you profusely and walks to the nearest bakery."," "); } else if (choice == 2) { message_dialog("He sighs and sulks away."," "); } else { message_dialog("He spits in your face and walks away, muttering about how young people only think of themselves these days."," "); } break; Anything??
  6. Ok, that helped a little - 1 slight problem. I got it to give me the correct response when I choose option three, however the choice = run_dialog(0); is not working. I keep getting an error message saying "Unknown command choice in line 39" (or whatever line it happens to be in). I tried declaring it in the variables sectiong, and where Thuryl put it in the code, but it still doesn't work. And without it the dialog box repeats when I choose the 2nd and 3rd options. BTW, about what Thuryl suggested about having a way to handle it if the player offers the money but has none - would I use another if statement for that??? (bear with me, guys, I'm new to this, you'll probably hear more from me on this forum than the other one!)
  7. Ok, this is my first time trying to create a BOA scenario. I don't have a story yet, but I'm just trying to get myself familiar with scripting and all that jazz until I do decide what I want to make a scenario about. Ok, the current problem I'm having is with a special encounter. I have a town and I have a beggar in this town. Here's the code: Code: beginstate11; reset_dialog(); add_dialog_str(0, "You see a beggar holding out a tin cup to you. _Could you please spare a few coins so I can eat?_" 0); add_dialog_choice(0, "Yes I will. (Give him coins)"); add_dialog_choice(1, "Sorry, I don't have any myself."); add_dialog_choice(2, "Back off old man and leave me alone!"); if (run_dialog(0) == TRUE) { change_coins(-10); message_dialog("He thanks you profusely and walks to the nearest bakery."," "); } else { message_dialog("He sighs and sulks away."," "); } else { message_dialog("He spits in your face and walks away, muttering about how young people only think of themselves these days."," "); }break; Ok, the problem I'm having is that when I play the scenario and I choose the third option, it gives the response "He sighs.." instead of "He spits...". I've tried figuring out what I should do differentely, and I've tried all of my resources (docs, westra's cookbook, Kelandon's page, plus looking at other scenarios). Any ideas??
×
×
  • Create New...