Author Topic: Banter Coding  (Read 4703 times)

0 Members and 1 Guest are viewing this topic.

Offline Moongaze

  • Level 3
  • ***
  • Posts: 1349
  • Karma: +0/-0
    • View Profile
Banter Coding
« on: April 24, 2005, 07:01:07 AM »
Just a little question about banters.

Say that I want Alcander and Aerie to banter. Aerie starts the banter. Do I check for InParty("Aerie"), InParty("Alcander"), or both?

Currently I have all of the banters in Alcanders B-file (Banter file) set to check the presence of the *other* NPC he banters with. I wonder if this is correct. Say that Aerie starts the banter and I only set a check for Aerie being present in the party, as I have now, would it mess things up?

Offline Meira

  • Newbie
  • *
  • Posts: 94
  • Karma: +0/-0
  • Gender: Female
    • View Profile
    • Amber's home
Banter Coding
« Reply #1 on: April 24, 2005, 07:09:11 AM »
If Aerie starts the banter you check if Alcander is in the party and that Aerie sees him. Aerie already has to be there to start the banter, right? :)

If you haven't already, check out the banter tutorial. I found it very helpful.

http://forums.pocketplane.net/index.php?topic=61.0

Offline Zyraen

  • Level 2
  • **
  • Posts: 818
  • Karma: +0/-0
    • MSN Messenger - zyraen@hotmail.com
    • View Profile
Banter Coding
« Reply #2 on: April 24, 2005, 07:12:12 AM »
You only need to check for Alcander if Aerie starts. And vice versa.

However, if you have a series of banters running, where say Aerie starts the 1st banter, Alcander starts the 2nd and 3rd banter, and Aerie starts the 4th, there's no harm putting both checks in ALL of the Banters. This just makes it easier so you can use the same condition checks for all the Banters, without having to keep checking who talks and then deleting the relevant trigger.
SoAVer
Love between a Law Enforcer and a Fugitive - can such a thing even happen?
SoA Release - Overview / Download Links

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, XP caps and redistribution, and more.

Offline Moongaze

  • Level 3
  • ***
  • Posts: 1349
  • Karma: +0/-0
    • View Profile
Banter Coding
« Reply #3 on: April 24, 2005, 07:12:18 AM »
Thank you. :)

Offline teak

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Banter Coding
« Reply #4 on: April 24, 2005, 01:53:13 PM »
I would just like to point out that there's actually a better check for banters.

I got this from weidu guru SConrad, who constructed it after a discussion with scriptor extraordinarie SimDing0 and the busiest modder on the planet, Andyr. I think the tp2 ninja CamDawg was involved, too.

CHAIN IF
~InParty("Aerie")
Range("Aerie",30)
!StateCheck("Aerie",STATE_STUNNED)
!StateCheck("Aerie",STATE_SILENCED)
Global("global","LOCALS",0)~
THEN blabla...

Why, you ask? Well, IVFPD is broken, See(*O:Object) doesn't work if the character is currently invisible due to hide in shadows or the spell invisibility. And, of course, it's always good to check for stunning and silencing. Sleeping isn't really needed.
I PWN.

Offline Moongaze

  • Level 3
  • ***
  • Posts: 1349
  • Karma: +0/-0
    • View Profile
Banter Coding
« Reply #5 on: April 24, 2005, 02:52:26 PM »
Would "Detect" help better than "See" or "Range"? Ahh well, thanks anyway.

Offline teak

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Banter Coding
« Reply #6 on: April 24, 2005, 03:06:33 PM »
Quote from: "Moongaze"
Would "Detect" help better than "See" or "Range"? Ahh well, thanks anyway.

No, Detect(O:Object*) would be almost the same as See(O:Object*).

You are welcome.
I PWN.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
Banter Coding
« Reply #7 on: April 24, 2005, 03:55:12 PM »
Detect will allow the game to fire the banter even if the Object is hidden in shadows or invisible, a thing particularly useful if one of the party members has, say, the Staff of the Magi equipped.  See will not do this.


Sillara
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.

Offline Qualidor

  • Level 1
  • *
  • Posts: 440
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Banter Coding
« Reply #8 on: April 24, 2005, 06:35:12 PM »
This, ladies and gentlemen, is why I will NEVER be able to code a mod, even if I write one.  :oops:  :oops:  :oops:

Offline Zyraen

  • Level 2
  • **
  • Posts: 818
  • Karma: +0/-0
    • MSN Messenger - zyraen@hotmail.com
    • View Profile
Banter Coding
« Reply #9 on: April 24, 2005, 08:33:37 PM »
I usually don't like my NPCs missing out on interjections, so my favourite set of checks are the following

InParty("xxx") InMyArea("xxx")

Basically there's no range and no check for seeing or anything. As long as the NPC is in the same area, the thing can happen.

InParty is not enough as say, if A is in Cromwell's forge and B is in the Docks and they both are in your party, sometimes certain dialogues that either A or B has with another in such a case have an early exit. InMyArea check prevents that from happening (so the banter would only happen if they were both in Cromwell's forge or if they were both in the Docks)
SoAVer
Love between a Law Enforcer and a Fugitive - can such a thing even happen?
SoA Release - Overview / Download Links

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, XP caps and redistribution, and more.

Offline teak

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Banter Coding
« Reply #10 on: April 25, 2005, 04:08:19 AM »
Quote from: "Zyraen"
I usually don't like my NPCs missing out on interjections, so my favourite set of checks are the following

InParty("xxx") InMyArea("xxx")

Basically there's no range and no check for seeing or anything. As long as the NPC is in the same area, the thing can happen.

InParty is not enough as say, if A is in Cromwell's forge and B is in the Docks and they both are in your party, sometimes certain dialogues that either A or B has with another in such a case have an early exit. InMyArea check prevents that from happening (so the banter would only happen if they were both in Cromwell's forge or if they were both in the Docks)

I wouldn't advise that. This way, the person could be standing just about anywhere in the area (think upper left corner of Waukeen's), and interject to a conversation he would have no chance to hear (think lower right corner of the same area).

Detect(O*Object) is better, in this case.
I PWN.