I'm still learning all this myself, and having some interesting times with it
. I do know some stuff you can research in the examples, -- catching this in the documentation previous posters have directed you to, then going and looking at other folks' work is basically the only way to understand this stuff, anyways.
Some stuff:
scripts can trigger dialogs, and there are big scripts (baldur.bcs) and smaller scripts (_YNAHEIR.BCS, for example,since I have only been reading Tutu stuff). The RESPONSE #100 calls you want to put into these scripts, dependent on what you want. For example, if I want Dynaheir to walk over and talk to Player1 at a specific time, like if Edwin joins the party, I can say something in a .BAF file that will be compiled via tp2 and added into _YNAHEIR.BCS :
IF ~InParty("Edwin")
!StateCheck("Dynaheir",STATE_SLEEPING)
!StateCheck("Edwin",STATE_SLEEPING)
Global("EdwinFight","LOCALS",0)~ //this is actually assumed; anything not at an integer is at 0!
THEN
RESPONSE #100
SetGlobal("EdwinFight","LOCALS",1)
StartDialogNoSet(Player1)
END
and the result will be Dynaheir starting dialog with Player1. If the conditions are set in the dialog to match this (EdwinFight=1, plus any other conditions to make sure that that particular dialog fires instead of another one), then the responses to the dialog can increment the global, which then becomes a new condition in either a script (BAF) or dialog (D) file entry, i.e.:
"EdwinFight","GLOBAL",1 = conversation 1, change "GLOBAL" to 2
"EdwinFight","GLOBAL",2 = conversation 2, change to 3
"EdwinFight","GLOBAL",3 = script to trigger an event (like the above script, except #3), which sets to 4
"EdwinFight","GLOBAL",4 = conversation 3, which has
response 1, sets to 5
response 2, sets to 6
and begins to branch out ("If state 5, then conversation 4good, or If state 6, then conversation 4bad)
etc.
as for global vs locals, and how to "walk" the global/locals up a chain of dialogues without interference from banters and such, well, I'm still learning, too... and WEIGHT is way out of my league. Hope this helps you go back and revisit the tutorials, and look at some other folks mods for inspiration!