Jump to content

20eyes

Member
  • Posts

    29
  • Joined

  • Last visited

    Never

Posts posted by 20eyes

  1. Did you read the section in the appendix on string manipulation? It's pretty self-explanatory. Basically the text buffer just gives you a way to do some really nifty things with string variables to customize text output.

     

    For instance, you could do something like this:

     

    Code:
    code =   if (species_in_party(3) == 1) { // If there's a slith in the player's party      while (get_species(char_number) != 3) { // Cycle through PC's to identify the slith        char_number = char_number + 1;      }      clear_buffer(); // Prep the buffer by emptying it out      append_string("Bob frowns at "); // Add this text into the buffer      append_char_name(char_number); // Tack the slith PC's name onto the end of the text above      append_string(". _And that includes you._"); // Add this text after the PC's name      get_buffer_text(char_addressed); // Assigns all the text we just made to variable char_addressed      message_dialog("_I don't deal with sliths._",char_addressed); // Displays the first text in a dialog, followed by the buffer text we just created   }break;
    So the final result is, if the player has a slith named Ssschah in his party, the text the player sees in the dialog will now read:

     

    "I don't deal with sliths." Bob frowns at Ssschah. "And that includes you."

     

    In this example, we've used the text buffer to "build" a custom chunk of text using a literal and a constant, which is something that would be impossible to do without the string manipulation calls and the text buffer.

  2. Yeah, been there done that, GIFTS. My original code still contains the remnants of a few failed add_string attempts that are very similar to your suggestion.

     

    message_dialog("blahblah",x), I believe, is the only call that can output buffer text *while in dialogue mode* (where x = the buffer text). If anyone knows any different, please correct me!

     

    At any rate, my script is humming along nicely now, so it's all good. Now my NPC's can recognize the species of every PC in the player's party and say nifty things like "Aldous, you're a pitiful excuse for a human" and "Trust me, I know a slith fart when I smell one. No more broccoli for you tonight, Ssschah."

     

    The fun never ends.

  3. Long scenarios can be fun, short scenarios can be fun, but long scenarios that *might* be fun if they weren't so damn long cannot. laugh

     

    It's probably not a good idea to bloat up a decent short scenario with tons of filler just for the sake of making it "bigger." Personally, I'd rather play 5 short, really cool scenarios than 1 sprawling but mediocre one.

  4. I have two questions:

     

    First, is there any way to use a string variable inside a dialogue as part of the "answer" text (text1, text2, etc.)?

     

    Specifically, I'm trying to have an NPC say something in reference to a member of the party who is a slith, and have the NPC use the character's name in the text. Here's what I'm trying (probably in vain) to do:

     

    variables;

     

    short char_number = 0;

    string char_addressed;

     

    Code:
    code =        if (species_in_party(3) == 1) {	   while (get_species(char_number) != 3) {	   char_number = char_number + 1;	   }	clear_buffer();	append_string("The mayor glances uneasily at ");	append_char_name(char_number);	append_string(". _No offense intended, of course._");	get_buffer_text(char_addressed);	print_str(char_addressed);   }break;
    Obviously this is goofy and not much use while in a dialogue, because print_str only outputs to the little text area beneath the play screen, and I get underscores instead of quote marks.

     

    My second question is related to the first, but far more stupid: How can I output a variable stored with the get_buffer_text call to a plain old dialogue box?

     

    Thanks for any guidance!

  5. Oh, I simply must have this shiny new toy. Great job, Isaac! I love you. I also love the person who ports this, they just don't know it yet.

     

    My love for Windows, on the other hand, is at an all-time low right now. And believe me, that's really saying something.

     

    Now if you'll excuse me, I need to go find myself a corner to sulk in for a while.

  6. Cool, I'm switching over to this from EditPad. Great little proggie. If the devs ever document custom scheme creation (like they say they're planning on doing at the site), I might even make a scheme for Avernumscript. I went ahead and downloaded the SDK and compiler in anticipation of this. laugh

     

    The C scheme is handy enough for now, though. Syntax highlighting rocks.

     

    Good find!

  7. Hooray! I was hoping someone would get around to doing something like this. Great time-saver!

     

    Any plans to make script builders like this one for the other custom objects? One for items would be just suuuuuper.

     

    Anyway, thanks for this!

  8. But you see, that's the beauty of erm... 'growing your own' so to speak. Illegal or not, nobody else has to know. laugh

     

    If by 'legal' you mean 'balanced,' then yeah. That spear could probably use a little nerfing.

     

    I'm working on a high level scenario that'll have a few nifty Slith goodies. I'm shooting for a release date of October 2007, so just hang in there. Sigh.

  9. Cool, that's what I figured. I'll just script it into the scenario to get around that problem.

     

    I wonder why BoA doesn't 'ship' with the keg anyhow? I know it's in at least one of the stock scenarios (DwtD I think). Wonder why it didn't make the cut for the core data script?

     

    I've looked through all the terrain sheets and can't find any other terrain features that slipped through the cracks like the poor keg seems to have... Are there any more?

  10. Yeah, I found the barrel by sheer accident. Sometimes I like to load the editor and start clicking on things at random, just to see if anything nifty happens. I think I've learned more by doing that than any amount of reading so far. laugh

     

    Thanks, Vahnatai Barge. The icons were right, but I had to point to the proper sheets. Also had to block move so my PC's couldn't climb all over it.

     

    Anyhoo, here's what I ended up plugging into my scenario's data script to get the keg up and running, if anyone else is interested:

     

    Code:
    //Add Kegbegindefineterrain 437;	te_name = "Keg";	te_which_sheet = 720;	te_which_icon = 6;	te_ed_which_sheet = 682;	te_ed_which_icon = 96;	te_full_move_block = 1;begindefineterrain 438;		te_which_icon = 7;	te_ed_which_icon = 97;
    I edited this post so my fellow newbies don't get any bright ideas and decide to start fooling around with corescendata like I did. As Thuryl points out below: Not a good idea. Heh.
×
×
  • Create New...