Jump to content


Photo

Dialog help


  • Please log in to reply
2 replies to this topic

#1 JDH

JDH
  • Member
  • 15 posts

Posted 10 April 2005 - 08:26 AM

I've got a dialog that will be random and can recuring much like the NPC initated flirts,  and then I want a random interaction between NCPs depending on party make up. In the random interaction some of the NPC will have only 1 path of dialog others will have multible random paths. But ONLY 1 NCP to do the interaction at a time. This is what I have writen:

IF~~THEN BEGIN intterupt
SAY~(you are intterupted.)~
IF ~InParty("Jan")
See("Jan")
!StateCheck("Jan",STATE_SLEEPING)~ THEN EXTERN ~JAN25J~janintter1
IF ~InParty("Keldorn")
See("Keldorn")
!StateCheck("Keldorn",STATE_SLEEPING)~ THEN EXTERN ~KELDO25J~kelintter1
IF ~InParty("Anomen")
See("Anomen")
!StateCheck("Anomen",STATE_SLEEPING)~ THEN EXTERN ~ANOME25J~anomeintter1
IF ~RandomNum (2,2)
  InParty("Edwin")
See("Edwin")
!StateCheck("Edwin",STATE_SLEEPING)~ THEN EXTERN ~EDWIN25J~edwinintter1
IF ~RandomNum (2,2)
  InParty("Edwin")
See("Edwin")
!StateCheck("Edwin",STATE_SLEEPING)~ THEN EXTERN ~EDWIN25J~edwinintter2
IF~RandomNum (3,1)
  InParty("Viconia")
See("Viconia")
!StateCheck("Viconia",STATE_SLEEPING)~ THEN EXTERN ~VICON25J~vicintter3
IF ~RandomNum (3,2)
  InParty("Viconia")
See("Viconia")
!StateCheck("Viconia",STATE_SLEEPING)~ THEN EXTERN ~VICON25J~vicintter1
IF ~RandomNum (3,3)
  InParty("Viconia")
See("Viconia")
!StateCheck("Viconia",STATE_SLEEPING)~ THEN EXTERN ~VICON25J~vicintter2
IF ~InParty("Mazzy")
See("Mazzy")
!StateCheck("Mazzy",STATE_SLEEPING)~ THEN EXTERN ~MAZZY25J~mazintter1
IF ~InParty("Nalia")
See("Nalia")
!StateCheck("Nalia",STATE_SLEEPING)~ THEN EXTERN ~NALIA25J~naliaintter1
IF ~RandomNum (2,1)
  InParty("HaerDalis")
See("HaerDalis")
!StateCheck("HaerDalis",STATE_SLEEPING)~ THEN EXTERN ~HAERD25J~haedintter1
IF ~RandomNum (2,2)
  InParty("HaerDalis")
See("HaerDalis")
!StateCheck("HaerDalis",STATE_SLEEPING)~ THEN EXTERN ~HAERD25J~haedintter2
IF ~RandomNum (4,1)
  InParty("Minsc")
See("Minsc")
Global("Mintterrupt","GLOBAL",1)
!StateCheck("Minsc",STATE_SLEEPING)~ THEN EXTERN ~MINSC25J~minscintter1
IF ~RandomNum (4,2)
  InParty("Minsc")
See("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)~ THEN EXTERN ~MINSC25J~minscintter2
IF ~RandomNum (4,3)
  InParty("Minsc")
See("Minsc")
Global("Mintterrupt","GLOBAL",1)
!StateCheck("Minsc",STATE_SLEEPING)~ THEN EXTERN ~MINSC25J~minscintter3
IF ~RandomNum (4,4)
  InParty("Minsc")
See("Minsc")
Global("Mintterrupt","GLOBAL",1)
!StateCheck("Minsc",STATE_SLEEPING)~ THEN EXTERN ~MINSC25J~minscintter4
IF ~RandomNum (4,1)
  InParty("Jaheira")
See("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)~ THEN EXTERN ~JAHEI25J~jahintter1
IF ~RandomNum (4,2)
  InParty("Jaheira")
See("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)~ THEN EXTERN ~JAHEI25J~jahintter2
IF ~RandomNum (4,3)
  InParty("Jaheira")
See("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)~ THEN EXTERN ~JAHEI25J~jahintter1
IF ~RandomNum (4,4)
  InParty("Jaheira")
See("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)~ THEN EXTERN ~JAHEI25J~jahintter2
END


I have tested it , with several of the NPC's in my party that have the opportunity to interact but so far I have only had Jaheira do the interaction, I have run the dialog enough times that satisticaly if another NCP interaction could have fired it would have.  When I originaly wrote the dialog I had each one of the interactions as a random ie: RandomNum (20,1) but I would sometimes get "No valid reply" on my text screen when the dialog fired. IE: The RandomNum chosen by the game was let's say (20,2) which would have been Keldorn but he wasn't in the party. Will I have to write the dialog for every comination of party make up that the Party could be with those NCP's (Please say I don't cause there are a "Hale" of a lot of combinations of party make up with 10 NPC's involed.) :)

#2 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 10 April 2005 - 10:48 AM

I believe that the transitions evaluate from bottom up, so if Jaheira is in the party then you'll always get one from her (since hers are at the bottom of the block).

It might be better to split it into several blocks with different sets of conditions.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#3 JDH

JDH
  • Member
  • 15 posts

Posted 10 April 2005 - 11:28 AM

That's what I was afraid of. :(

at least 10 random blocks each with a differant NCP at the bottom, then working their way up in a differant order.

For every combination I'd need what 100 blocks to cover all 10 NPC's with each block having differant order. :o

I thunk I'll just do it in 5 random blocks and mix the order of the NPC ups let the dialog fall where it may ;)