Jump to content


Photo

multiple npc interaction


  • Please log in to reply
6 replies to this topic

#1 Penna

Penna
  • Member
  • 16 posts

Posted 10 February 2011 - 09:34 AM

So I am planning on creating two joinable NPCs whose JoinParty dialogues start with crossbantering with the ruffians in the copper coronet. Is that done like a normal banter (i.e. with CHAIN and modifying the dlg files of everyone involved) or is there more? Also, does the bantering has to be in the JoinParty DLG file or in the Banter DLG file?

Edited by Penna, 10 February 2011 - 02:36 PM.


#2 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9200 posts

Posted 11 February 2011 - 01:41 AM

It is done with a normal CHAIN, yep, just like this:

CHAIN IF ~/*startingconditions*/~ THEN startdialogue MYNPC
~This is our joining dialogue.~
== MYNPC2 ~Sure is!~
== RUFF ~I'm a ruffian!~
== RUFF2 ~And so am I!~
== MYNPC ~Well I'm just thrilled to pieces for you, really, but we should be going.~
== RUFF2 ~Okay.~
EXIT

And it's with their initial dialogue file (not the J/B file).

#3 Penna

Penna
  • Member
  • 16 posts

Posted 11 February 2011 - 04:53 AM

startdialogue <- can I use any name?
MYNPC <- name of the join party d file?

Another thing. I want the NPC to adress the PC correctly with "lady" or "sir" just as the ruffian does with <PRO_GIRLBOY> or <PRO_HESHE> depending on the gender of the PC. How do I do that?

Edited by Penna, 11 February 2011 - 06:08 AM.


#4 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9200 posts

Posted 11 February 2011 - 02:29 PM

Yes, but it has to be unique within the file. You can't have two "dialoguename" labels, they have to be different.

Yep.

You can't do lady or sir, but you can do PRO_LADYLORD. Check out the full list of tokens here (look for tokens > BG2). The IESDP and the WeiDU readme are going to be your bibles, so always check them before checking elsewhere if you don't understand something. :)

#5 Penna

Penna
  • Member
  • 16 posts

Posted 11 February 2011 - 02:45 PM

Thx very much for your help :)

It would be easier if the search function would work but anyway. I'll check the IESDP :)

Thx again

penna

#6 Penna

Penna
  • Member
  • 16 posts

Posted 14 February 2011 - 03:24 AM

I've decompiled various original Bioware DLG files back into D and what I noticed was that none of them used the CHAIN command.

Instead they used IF ~~ THEN EXTERN ~DLGFILE~ linenumber
so it's a back and forth between the DLG files that are bantering with eachother. You can also see that in NearInfinity.

Is that something that happens through compiling / decompiling or is it just another way of bantering? Because Kulyoks Banter Tutorial as well as your approach only consist of modifying one dialogue file (i.e. the file of the NPC who starts the banter).

So for your example

CHAIN IF ~/*startingconditions*/~ THEN startdialogue MYNPC  <- actually isn't it the FILENAME first and then the label?
~This is our joining dialogue.~
== MYNPC2 ~Sure is!~
== RUFF ~I'm a ruffian!~
== RUFF2 ~And so am I!~
== MYNPC ~Well I'm just thrilled to pieces for you, really, but we should be going.~
== RUFF2 ~Okay.~
EXIT

this would mean I only have to write that part into the D file of the NPC who starts the convo, right? I don't have to decompile the original RUFFIAN.DLG into D and add the banterline ~I'm a ruffian!~ there, do I?

#7 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9200 posts

Posted 14 February 2011 - 03:45 AM

You're right, it should be THEN MYNPC startdialogue.

CHAIN is a shorthand way of coding that makes things easier when dealing with more than 2 NPCs at once. It compiles to what you see in decompiled DLG files--you can code like that, but for conversations such as these it becomes very tedious.

No, you don't. Try it, then look at the decompiled dialogue. You'll see what I mean.