TheBardmen 3 Posted November 20, 2021 I am making custom scripts and using this as a base, and I've been told "G_Banter" absolutely matters: //:: k_hbanter1 /* Checks conditions for banter 6 (Canderous and Bastila) */ //:: Created By: //:: Copyright (c) 2002 Bioware Corp. #include "k_inc_debug" int StartingConditional() { int iResult; iResult = GetGlobalBoolean("G_Banter6")==FALSE && IsNPCPartyMember(NPC_CANDEROUS)==TRUE && IsNPCPartyMember(NPC_BASTILA)==TRUE; return iResult; } Problem is I have no idea wtf G_Banter is and where to find it. Using KOTOR tool, I checked parts in RIF and BIF and can't find "g_banter". I need to make new custom g_banters for 12, 13, and 14. After that I have no problems editing the main k_hbanter12, and the k_banttrigger. Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted November 20, 2021 As the script says, it's a global boolean. Or technically 11 booleans. The globals are defined in globalcat.2da. The banters are fired by triggers in various modules. They should all use the same global trigger template, k_bant_trig.utt which uses the global script k_bant_trig as its OnEnter. Since 11 cases already exist for vanilla banters, you'd need to add new globals and new conditions for your added banters. Quote Share this post Link to post Share on other sites
TheBardmen 3 Posted November 20, 2021 (edited) Alright, thanks, my man! @DarthParametric Is making a global boolean difficult? This is all brand new to me, I'm not good with coding. Edited November 20, 2021 by TheBardmen Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted November 20, 2021 Creating new globals is as simple as adding them to the end of the 2DA. It will require starting a new game for them to work though. Adding extra custom conditions to trigger your banters will require editing the k_bant_trig script. I'm not sure how many total triggers are in the game, so keep in mind that adding additional banters means potentially reducing the likelihood of seeing vanilla banters, since each trigger will only fire once (unless you change the TALKED_TO local boolean checking/setting in k_bant_trig). Quote Share this post Link to post Share on other sites
TheBardmen 3 Posted November 20, 2021 If I just copy and paste someone else's trigger and replace the NPC's involved in the k_bant_trig script, and add the global booleans, would that be enough? Or does each trigger in very specific areas. If they only trigger after certain events, I don't really see the problem, each one has a distance of 10.0, except for the first one, which is 8.0. Some of this is a bit confusing, I've been getting by so far by copying and pasting scripts and changing very small things. I'm working on my "Recruit Deadeye Duncan" mod, and am adding the convos, I have him talking to Carth, Mission, and HK-47 as banter. He is the one who starts all the voiceless conversations. Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted November 20, 2021 Since you can't actually add new companions, just replace the vanilla ones, I assume he's using either Jolee, Juhani, Zaalbar, or HK's slot? As such he will potentially incorrectly trigger certain vanilla banters because the script only checks the character slot is active in the party, not what the tag of the actual NPC is. You'll probably need to add a tag check to prevent the appropriate vanilla banters accidentally firing, if there are any. And, likewise, also add a tag check to only trigger your new ones correctly. I haven't looked at the DLG or the associated scripts (I gather that's what the starting conditional script in the first post is), but I assume it is setting the appropriate global to true once a given scene has started, so you'll need to replicate that behaviour as well for your added DLG nodes. Quote Share this post Link to post Share on other sites
TheBardmen 3 Posted November 20, 2021 1 minute ago, DarthParametric said: Since you can't actually add new companions, just replace the vanilla ones, I assume he's using either Jolee, Juhani, Zaalbar, or HK's slot? As such he will potentially incorrectly trigger certain vanilla banters because the script only checks the character slot is active in the party, not what the tag of the actual NPC is. You'll probably need to add a tag check to prevent the appropriate vanilla banters accidentally firing, if there are any. And, likewise, also add a tag check to only trigger your new ones correctly. I haven't looked at the DLG or the associated scripts (I gather that's what the starting conditional script in the first post is), but I assume it is setting the appropriate global to true once a given scene has started, so you'll need to replicate that behaviour as well for your added DLG nodes. Actually no, he's replacing a party member that doesn't HAVE any banter, which is the problem, lol. He replaces T3-M4, as, imo, he's the most expendable party member. He doesn't have much dialogue, he has no banter, he's only relevant to the story for one quest, and tbh he's kind of a garbage party member outside of being cute. I want him to fit into the game so flawlessly that besides the issue of being voiceless, he's just like any other party member, I don't want to have to remove too much or replace anything that revolves around another character. I am replacing some dialogue involving the leviathan so it allows you to send Duncan in as opposed to T3, removing any and all T3 beeps and boops sound-wise, and replacing all dialogue that refers to him in the story, and also certain dialogue that triggers involving HK and speaking to Iziz, etc. T3 is still in the game, and you can ask about them, but you can't recruit them. But yeah, I'm essentially trying to create brand new custom banter from scratch and trying to put into the game without any issues for a character slot that didn't have any banter in the first place. Quote Share this post Link to post Share on other sites
AmanoJyaku 183 Posted November 20, 2021 2 hours ago, TheBardmen said: He replaces T3-M4, as, imo, he's the most expendable party member. He doesn't have much dialogue, he has no banter, he's only relevant to the story for one quest, and tbh he's kind of a garbage party member outside of being cute. All of this is true, but you're still dead to me. 😋 2 Quote Share this post Link to post Share on other sites
TheBardmen 3 Posted November 20, 2021 38 minutes ago, AmanoJyaku said: All of this is true, but you're still dead to me. 😋 lmao! I mean I do love T3, but he simply doesn't bring much to the table in terms of KOTOR 1, still love him though. 1 Quote Share this post Link to post Share on other sites
TheBardmen 3 Posted November 21, 2021 @DarthParametric Sorry to bug you, got any advice on this, since he isn't replacing a party member that actually has any banter dialog? Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted November 22, 2021 Leaving aside the fact that I thought the entire point was to add new banter, not replace the existing ones, how do you expect me to know what's wrong when you haven't even said what you have done and provided the scripts, DLG, etc.? Quote Share this post Link to post Share on other sites
TheBardmen 3 Posted November 22, 2021 12 hours ago, DarthParametric said: Leaving aside the fact that I thought the entire point was to add new banter, not replace the existing ones, how do you expect me to know what's wrong when you haven't even said what you have done and provided the scripts, DLG, etc.? Oh there's nothing WRONG persay, I haven't even tested this "banter", nothing wrong with the scripts or the DLC, I even know how to edit the k_bant_trig script. My entire thing is adding new banter, the problem is I'm using T4-M4, who has no banter already in the game, and you said if I had replaced another party member with him, just to replace their boolean and k_bant_script section with his. Problem is, what I'm trying to do, is make a NEW boolean and a new k_bant_trig section that replaces nothing. Just adding, not replacing. I am just worried what happens if I copy and paste another character's k_bant_trig part and try to edit it from there, that there will be issues. Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted November 22, 2021 There shouldn't be any issues as long as you don't just duplicate it but edit it appropriately. For example: //Check for banter 12 if (!GetGlobalBoolean("G_Banter12") && IsNPCPartyMember(NPC_T3_M4) && IsNPCPartyMember(INSERT_NPC_ID_HERE) && GetDistanceBetween(GetPartyMemberByIndex(0), GetPartyMemberByIndex(1)) <= 5.0 && GetDistanceBetween(GetPartyMemberByIndex(0), GetPartyMemberByIndex(2)) <= 5.0 && GetDistanceBetween(GetPartyMemberByIndex(1), GetPartyMemberByIndex(2)) <= 5.0) { AssignCommand(GetPartyMemberByIndex(0),ClearAllActions()); AssignCommand(GetPartyMemberByIndex(1),ClearAllActions()); AssignCommand(GetPartyMemberByIndex(2),ClearAllActions()); UT_SetTalkedToBooleanFlag(OBJECT_SELF); ActionStartConversation(GetFirstPC(),"Banter"); } Insert it below case 11. You'll see there's a gap above the last three closing braces: ActionStartConversation(GetFirstPC(),"Banter"); } // INSERT NEW ENTRY HERE } } } Just make sure the boolean name matches whatever you choose for your added ones. For the DLG, you'll need a new starting conditional. The vanilla ones also have a second script to set the global to true, but you can just roll that directly into the starting conditional, like so: int StartingConditional() { if (!GetGlobalBoolean("G_Banter12") && IsNPCPartyMember(NPC_T3_M4) && IsNPCPartyMember(INSERT_NPC_ID_HERE)) { SetGlobalBoolean("G_Banter12", TRUE); return TRUE; } else { return FALSE; } } Quote Share this post Link to post Share on other sites