![]() |
The Black Wyrm's Lair Terms of Use |
![]() ![]() ![]() ![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Forum Member Posts: 1366 Joined: 22-August 04 From: Germany ![]() |
Hi everyone,
I have somehow troubles to get a working script for banters between my mod-NPC and the ingame NPCs. Before I start scanning through the existing mod-NPCs (in the hope to identify the banter-triggering script), how is your banter script? Could you post it here for me? ![]() Thanks! EDIT: I'm asking for BGII, btw. This post has been edited by jastey: Nov 22 2004, 08:32 AM |
|
|
![]()
Post
#2
|
|
Forum Member Posts: 28 Joined: 22-July 04 ![]() |
QUOTE(jastey @ Nov 5 2004, 02:03 PM) Before I start scanning through the existing mod-NPCs (in the hope to identify the banter-triggering script), how is your banter script? Could you post it here for me? ![]() Well, no, that's actually what you should be doing first. That, and reading Blue's banter tutorial: http://forums.pocketplane.net/index.php?topic=61.0 Banters are governed by the DLGs listed in INTERDIA.2DA. There is a mechanism in the game which starts banters every so often. It is not fully understood how often or exactly when it runs, but the upshot is that it calls a DLG from INTERDIA, as though you had issued an Interact() scripting command. When this "banter timer" fires, or Interact() is called on a DLG, it looks for a valid state trigger in that DLG. Which is why state triggers for banters tend to be of the sort that say "Do I see someone else I want to talk to here? And have we done this banter before?" Running Infinity Explorer on the Bxxxx series of DLGs, and looking at a mod such as the Banter Pack, should line this up pretty well for you. This post has been edited by jcompton: Nov 5 2004, 06:38 PM -------------------- "[I]t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
|
|
|
![]()
Post
#3
|
|
Forum Member Posts: 1366 Joined: 22-August 04 From: Germany ![]() |
QUOTE(jcompton @ Nov 5 2004, 07:37 PM) that's actually what you should be doing first. Agreed. I had a look at Solaufein's and Kelsey's banter scripts (well, for Kelsey I'm not too sure, I think I looked at something else (it's the Banter Accelerator script, increasing the frequency of interparty banter both from Kelsey and other NPCs, but I didn't understand what's going on there.)) After reading your post I have the impression I didn't succeed in making clear what I'm looking for. I don't need any BXXX examples or any tips on how to write (and code) banters. What I'm looking for is exactly the "Do I see someone else I want to talk to here? And have we done this banter before?" as a script for my mod NPC. I thought someone might have a ready script he/she could post here, as most of the mod NPCs have banters with the BioWare NPCs. QUOTE There is a mechanism in the game which starts banters every so often. It is not fully understood how often or exactly when it runs, but the upshot is that it calls a DLG from INTERDIA, as though you had issued an Interact() scripting command. I have again the impression I didn't understand someting right here. This is for the NPC-NPC banters. But what if I want my mod-NPC to have banters with the BioWare NPCs? Is this covered here, too? So I'm actually only looking for the "Do I see someone else I want to talk to here? And have we done this banter before?" trigger in my Bxxxx-dialogue, and don't need an extra script to call the banters? When this "banter timer" fires, or Interact() is called on a DLG, it looks for a valid state trigger in that DLG. Which is why state triggers for banters tend to be of the sort that say "Do I see someone else I want to talk to here? And have we done this banter before?" ![]() |
|
|
![]()
Post
#4
|
|
Forum Member Posts: 28 Joined: 22-July 04 ![]() |
QUOTE(jastey @ Nov 5 2004, 07:57 PM) Agreed. I had a look at Solaufein's and Kelsey's banter scripts (well, for Kelsey I'm not too sure, I think I looked at something else (it's the Banter Accelerator script, increasing the frequency of interparty banter both from Kelsey and other NPCs, but I didn't understand what's going on there.)) Solaufein is actually a terrible example, Wes uses a very non-standard approach with Solaufein which involves hacking ALL of Solaufein's dialogue into one DLG file, because he didn't really grok the use of the B, J, and P DLG files. (They were somewhat poorly documented at the time, and he DID craft functioning workarounds, but it's not a model to be followed.) Kelsey is a somewhat better example, but you'd do even better to look at an NPC with more refined and modern coding. Ghareth seems to be the new reference example. The banter accelerator is very simple. It runs a timer. When the timer expires, it randomly picks one of the party members and tells them to Interact(). That calls their B DLG. The timer resets and runs anew. Repeat. QUOTE After reading your post I have the impression I didn't succeed in making clear what I'm looking for. I don't need any BXXX examples or any tips on how to write (and code) banters. What I'm looking for is exactly the "Do I see someone else I want to talk to here? And have we done this banter before?" as a script for my mod NPC. I thought someone might have a ready script he/she could post here, as most of the mod NPCs have banters with the BioWare NPCs. You're still not making it clear what you want, or at least, you're asking the wrong question. As long as your mod NPC's DLG appears properly formatted in INTERDIA, and your state triggers are properly formatted (see hundreds of in-game examples or mod banters for examples), you need no scripting. QUOTE So I'm actually only looking for the "Do I see someone else I want to talk to here? And have we done this banter before?" trigger in my Bxxxx-dialogue, and don't need an extra script to call the banters? ![]() Yes. Now, of course, if it's not intended to be an "anytime" banter, then you would in fact employ scripting, like if you want to "start a banter as soon as we've given the acorns back" or "start a banter as soon as we have Lady Galvena's Medallion", then you would write a code snippet and employ Interact(). But for regular old anytime banters, you just put the DLG in INTERDIA, write up your banters, and away it goes. -------------------- "[I]t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
|
|
|
![]()
Post
#5
|
|
Forum Member Posts: 1366 Joined: 22-August 04 From: Germany ![]() |
QUOTE But for regular old anytime banters, you just put the DLG in INTERDIA, write up your banters, and away it goes. NOW it's clear! And I thought I had to code a NPC banter calling script... and was searching through the NPC mods but couldn't find any.. ![]() Thank you, jcompton! ![]() QUOTE Solaufein is actually a terrible example I'm beginning to realize that... (not using xxxD is another example) Still it's a great mod, of course. ![]() What I didn't understand in the Banter accelerating script is the "ActionOverride(Player2,Interact(Player2))", which, I presume, does not mean that Player2 should talk to himself, so I don't understand how this starts an NPC-NPC banter with the "correct" two NPCs. This post has been edited by jastey: Nov 7 2004, 12:12 AM |
|
|
![]()
Post
#6
|
|
Forum Member Posts: 28 Joined: 22-July 04 ![]() |
QUOTE(jastey @ Nov 7 2004, 12:03 AM) What I didn't understand in the Banter accelerating script is the "ActionOverride(Player2,Interact(Player2))", which, I presume, does not mean that Player2 should talk to himself, so I don't understand how this starts an NPC-NPC banter with the "correct" two NPCs. Get ready for another mind-blowing shock: The value inside the parenthesis has almost NOTHING to do with anything. It does NOT govern the actual banter that gets run. ANY time a DLG is called in the Infinity Engine, it simply runs the first state trigger it finds, in weighting order, that is a true statement. The value in parenthesis does two things: 1. Dictates whose name appears in the scrollback as saying the REPLY lines 2. (in the case of Dialogue() ) Dictates who the NPC will walk up to before talking. I made the banter accelerator target the NPC doing the talking because it seemed fairly reasonable. Player1 might have been better since most REPLY options are going to typically belong to the protagonist, but eh. This post has been edited by jcompton: Nov 7 2004, 05:04 PM -------------------- "[I]t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
|
|
|
![]()
Post
#7
|
|
Forum Member Posts: 1366 Joined: 22-August 04 From: Germany ![]() |
QUOTE The value in parenthesis does two things: That's what I don't understand: Doesn't that mean that "ActionOverride(Player2,Interact(Player2))" makes Player2 do all the talking? With the portrait of player2 for every text?
1. Dictates whose name appears in the scrollback as saying the REPLY lines |
|
|
![]()
Post
#8
|
|
Forum Member Posts: 28 Joined: 22-July 04 ![]() |
QUOTE(jastey @ Nov 7 2004, 07:05 PM) QUOTE The value in parenthesis does two things: That's what I don't understand: Doesn't that mean that "ActionOverride(Player2,Interact(Player2))" makes Player2 do all the talking? With the portrait of player2 for every text? 1. Dictates whose name appears in the scrollback as saying the REPLY lines No. It ONLY. ONLY. ONLY. affects REPLY lines. Those things that appear and say 1. This is a good reply. 2. This is an evil reply. etc. It means that in the scrollback, the words "This is a good reply" will be assigned to whomever is inside the parenthesis. Look at it this way: do you really think I'd ship that code and have received no massive glaring bug reports over the past two years if it meant that you'd only see one participant talk during a banter? -------------------- "[I]t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
|
|
|
![]()
Post
#9
|
|
Forum Member Posts: 1366 Joined: 22-August 04 From: Germany ![]() |
QUOTE Look at it this way: do you really think I'd ship that code and have received no massive glaring bug reports over the past two years if it meant that you'd only see one participant talk during a banter? ...Er, good point. See, I *know* the code works, yet my problem was that I didn't understand why. I nearly did, now. One more question: I don't understand the meaning of the sentence: "It means that in the scrollback, the words "This is a good reply" will be assigned to whomever is inside the parenthesis." What does this mean for a NPC-NPC banter with included Player1 answers? The answers always appear under the character dialogue string it is assigned to, so what would be the consequences if the above mentioned code is used to call such a dialogue?
|
|
|
![]()
Post
#10
|
|
Forum Member Posts: 28 Joined: 22-July 04 ![]() |
QUOTE(jastey @ Nov 7 2004, 09:37 PM) ...Er, good point. See, I *know* the code works, yet my problem was that I didn't understand why. I nearly did, now. One more question: I don't understand the meaning of the sentence: "It means that in the scrollback, the words "This is a good reply" will be assigned to whomever is inside the parenthesis." What does this mean for a NPC-NPC banter with included Player1 answers? The answers always appear under the character dialogue string it is assigned to, so what would be the consequences if the above mentioned code is used to call such a dialogue? It means that, when in doubt, it's probably "best", as in, most visually appealing and sensible, to use Player1 unless you have a compelling reason not to do so. In the banter accelerator code, if we have a hypothetical banter that Mazzy starts with Nalia, and the PC has reply lines in there, the result would be that the reply lines would appear to be coming from Mazzy. Note that this ONLY EVER MATTERS when reading the scrollback. If I'm not feeling lazy, someday perhaps I'll change it, now that we've had this long discussion about it. This post has been edited by jcompton: Nov 7 2004, 09:50 PM -------------------- "[I]t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
|
|
|
![]()
Post
#11
|
|
Forum Member Posts: 1366 Joined: 22-August 04 From: Germany ![]() |
And now, finally, I understood what "scrollback" means. Sorry, language problem.
Thanks very much for the explanations! QUOTE someday perhaps I'll change it I already hear someone asking "why does this work as NPC-NPC banter if Player1 is addressed?" ![]() |
|
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 23rd June 2025 - 06:49 PM |