Let's Populate the Merchant's Row

Discussion in 'The Temple of Elemental Evil' started by Gaear, Dec 10, 2012.

Remove all ads!
  1. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Thanks, I'll update that although it's useful to note the application of NPC flags here, which can be used to prevent NPCs from saying things over and over. The way it's laid out above, you could ask her about herself in perpetuity. ;)
     
  2. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    NPC Flags? Is there a read me somewhere on those?
     
  3. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    No, I don't think so, but they are used like any other flag, although the syntax is different. You could look at some of the other merchants - I think some of them have it. Look for code like

    Code:
    npc_set(1)
    which sets that NPC's flag #1. There are also checks for same.
     
  4. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    Thanks... I'll try to decipher it over the weekend. This week is turning into rather more than I expected at work.
     
  5. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    Is it something that looks like this?
    {3}{F:}{}{1}{}{0}{}

    The lines with {B:} look like they lead to bartering...
     
  6. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Sorry D, I meant to reply earlier ...

    The letter/colon code refers to internal routines that handle things like bartering and generic random multiple replies, like yes and no, said in a variety of ways. So yes, B: will invoke the bartering system, while having a PC say N: in a line will produce a selection from a list of replies in the negative - "No," "I think not," "Hardly," etc. I believe there is a list of what all these codes are somewhere in Ted's dialogue tutorial(s). They don't handle limiting NPC statements.

    Here is an example of that code from another vendor in Verbo:

    Code:
    {10}{G:}{G:}{}{}{}{}
    {11}{B:}{}{1}{}{0}{pc.barter(npc)}
    {12}{Why are the girls so shy?}{}{1}{not npc_get(npc,1)}{30}{npc_set(npc,1)}
    {13}{Where's everybody else?}{}{1}{not npc_get(npc,2)}{40}{npc_set(npc,2)}
    {14}{E:}{}{1}{}{0}{}
    In lines 12 and 13, the 'not npc_get)npc,x) code checks to see if the referenced flag x has been set, and will display the response if it hasn't ('not'), while the npc_set(npc,x) sets the referenced flag when the line is chosen.
     
  7. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    Ahh... thanks Gaear! This week is looking no better than last (I just got on to the site), so straightening out Veenah's dlg will probably have to wait until the weekend again.
     
  8. nyarlathotep

    nyarlathotep Merry Murder Maniac

    Joined:
    Feb 4, 2008
    Messages:
    355
    Likes Received:
    0
    The Lace & Hand:
    So, if they don't buy anything - I guess that means they only buy at half price? If that's the case, would it be possible to let them sell some magical gloves or boots?

    Sorry for the late entry... but as they say, better late then never? ;)
     
  9. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    The problem at the Lace & Hand is probably the same as at Veenah's Fashion. It seems the InvenSource file has to have the "buy_list_num,X" piece in both the store and the vendor. Veenah's fix is below (along with adding the long coats to her inventory for sale).

    {598}{Veenah: buy_list_num,4 100,6470 100,6319 gold,40 copper,21}
    {599}{Veenah's Fashion: buy_list_num,4 100,6147 100,6148 100,6149 100,6346 100,6218 100,6151 100,6150 100,6319 100,6344 100,6438 100,6235 100,6236 100,6342 100,6343}

    EDIT: Thanks to Gazra for the correct long coat numbers!
     
    Last edited: Jan 14, 2014
  10. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    Looks like Heather at Bear Essentials had the same problem. Here's her fix:

    {597}{Heather: buy_list_num,5 100,6045 100,6042 platinum,1 gold,11 silver,111}
     
Our Host!