Jump to content

[BG2:ToB] - IsGabber() trigger


Recommended Posts

Judging by the in-game application, I've come to think that the IsGabber() trigger is actually used to determine whether the creature in question is the active speaker or not (indicated by the "Dialog Mode" icon on the portrait). This can be useful for assigning specific responses to NPCs based on who they are talking to. Here's an example from KYLIE1.DLG

 

IF WEIGHT #1 ~Global("JanKylie","LOCALS",1)
IsGabber("Jan")~ THEN BEGIN 23 // from:
 SAY #61031 /* ~A good <DAYNIGHTALL> to you, cousin.  Here... have a turnip.~ */
 IF ~~ THEN EXIT
END

 

As you can see, this line will only fire if Jan is the one talking to Kylie. Similarly, it is possible to prevent certain interjections from firing if the party member in question is the active speaker. In the next example, it doesn't make much sense for Yoshimo to make his Thieves' Cant remark if he is the one speaking to the NPC in question. A simple !IsGabber("Yoshimo") check will prevent that:

 

CHAIN BMTHIEF RR#THFCNT
@1007 // Hmm...   (she studies you quizzically for a moment)
== YOSHJ IF ~!IsGabber("Yoshimo") InParty("Yoshimo") InMyArea("Yoshimo") !StateCheck("Yoshimo",CD_STATE_NOTVALID)~ THEN @1543 // Ahh, Thieves' Cant - the art of innuendo! Although the accent is somewhat off by Athkatlan standards, I believe that she understood the meaning behind your words, <GABBER>.
== MINSCJ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN @1544 // Eh, what kind of crazy talk is that? <GABBER> sounds like a mad gibberling with all those twisted words! See how Boo scratches his little head in confusion?
== KORGANJ IF ~InParty("Korgan") InMyArea("Korgan") !StateCheck("Korgan",CD_STATE_NOTVALID)~ THEN @1545 // Ach, ye're making me head spin with that doublespeak jabber of yers <GABBER>. Just get it over wit' already an' see if the girl be havin' some decent weapons fer us!
END
IF ~~ THEN GOTO a7

 

I'm not sure whether this is widely known or not, but I thought it might come in handy when planning interjections.

Link to comment

Possibly, but how common is it for players to select party members to talk to non-joinable NPCs? I suppose it's different with NPCs that use INITDLG.bcs, like Anomen, and start talking to the closest character to them, but most of the time, it's probably Player1 doing the talking.

 

Which is a shame, because fun things happen, sometimes, when you let your NPCs talk to non-joinable NPCs.

Link to comment

Yeah. It's more common to use some combination of Name("scriptName",LastTalkedToBy()) !InPartySlot(LastTalkedToBy(),0) to detect if you're talking to a particular PC (who's not in the protagonist slot, acting as the party leader), though.

 

You can also SetGabber(), but I have no idea why you'd ever really need to.

Link to comment

I can't speak for mods, but in the default game, you're not really missing anything.

 

I think there was something strange with InPartySlot() where it was returning the join order (so Player1 was always Slot 0) instead of the interface order or something, but I really don't remember.

Link to comment

Judging from the date on this, I assume this hasn't made it in the published IESDP yet. IsGabber() really does what InteractingWith() advertises ("Returns true if the active CRE is interacting in dialogue with the specified object.").

 

InteractingWith() on the other hand seems to be used exclusively for banters between one NPC and another. The examples I turned up are all from BG1 (e.g. bdynah.dlg and bedwin.dlg). InteractingWith(Player1) will not return true if the CRE is speaking to player 1, though IsGabber(Player1) will.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...