Switch to first PC for dialogs?

Hi all,

Just a query, but does anyone know of a way to have my main PC, be the instigator of conversations, even when a companion is selected and being used at the time, to trigger a conversation?
-I’m sure there’s a simple solution, but googling it comes up empty.

Is it just me, or is google kinda useless these days?! (rhetorical question)

1 Like

Leave the first line blank then it jumps to the PC.

I never use Google, it’s not allowed on my computer and it’s not useless at all. It’s working very well and it’s doing exactly what it was designed to do. Ask yourself one question if we can have all these things for free how come the owners are billionaires and what is the product that is being sold ?

@tfunke - I use that all the time. (in all my modules it aways switches to the PC being the one that speaks in the party) It’s a campaign setting, I believe. I’ll take a look in the toolset and see if I can find it.

Does that always work? Hmmm, don’t think so but…

@tfunke - EDIT: I think I found it. Open the Campaign Editor and set, under Behaviour, DLGPartySwap to TRUE. There might be a way to do this if you don’t use Campaign Mode, but in that case, I don’t know how you do it.


DLG party swap being true must be the default because I just checked my campaign settings on one of my mods and that’s what it is but I’ve never changed it. So maybe that’s why I never had an issue with getting the PC to talk first. You could also put one . on the first line if you wanted and it’ll be so fast you won’t see it change.

1 Like

Ok, but if you have DLGPartySwap set to FALSE, I bet it would revert to the companion you are controlling at the moment, being the one that talks. But maybe it is as you say, that the game by default has the DLGPartySwap set to TRUE. I know @Lance_Botelle has this set to FALSE, but that’s because he does modules with multiplayer co-op.

What I’m not sure of is: If you don’t use Campaign Mode, will it always revert back to the player character or the selected companion. My first two modules (maybe the third one too, I don’t remember) is made in Module Mode, but I don’t think I ever tested if it reverts back to the player character, mainly because I almost always control that character when running around.

1 Like

Thanks again guys, quick response, always appreciated.
Yeah @Tsongo: I think I actually switched it to false about 2 weeks ago, thinking it did the opposite of what it does haha… and yes, those cheeky billionaires. Got to shift those overton windows somehow.

Thanks Andgalf, legend.


Hmm just checked now and the DLG party swap was set to true, so maybe I didn’t switch it afterall.
I’ll try it with false setting and then also try Tsongo’s suggestion of leaving first line blank. I’ll report back my findings

No luck with either of those two methods.
Seems if I transition with one PC, when I enter the next area that starts straightaway with a conversation, it all looks fine in the cutscene, but if you read the dialog box afterwards, it looks confusing, because I have companions talking during the cutscene and in the dialog box it says- Companions name: (then my PC’s name in brackets) then what they said.

Anyway, I have DLG party swap set to true and leaving a blank line in the dialog doesn’t seem to work either. Other potential solutions welcomed

No luck with either of those two methods.
Seems if I transition with companion, when I enter the next area that starts straightaway with a conversation, it all looks fine in the cutscene, but if you read the dialog box afterwards, it looks confusing, because I have companions talking during the cutscene and in the dialog box it says- Companions name: (then my PC’s name in brackets) then what they said. (I also have that dialog starting from a conversation with a placeable, so maybe that’s a factor).

Anyway, I have DLG party swap set to true and leaving a blank line in the dialog doesn’t seem to work either. Other potential solutions welcomed

on each creature there’s a true/false setting: Can Talk To Non-Player Owned Creatures?

but not sure how that interacts with the Campaign setting …

Legit great suggestion KevL_s!
I was certain that would work, because placeables also have that same setting. Sadly though, it still does the same thing.

The plot thickens…

In other situations I have seen this happen when doing stuff with my companions, but I don’t know if it has happened with dialogues. Really strange. But I don’t check the chat window that often, to be honest, so maybe this happens in my own case too. I think I’ll check on my end and see if this is a thing for me too, just that I have never noticed it. Be back in a few minutes.

EDIT: Tried with entering a trigger that starts a conversation but everything looks fine and switches back to my PC.

@tfunke - What kind of script are you using that starts the conversation? I use custom scripts for the most part so maybe it could have something to do with that?

My Enter-Trigger-Start-Talking scripts look mostly something like this:

object oNankun = GetObjectByTag("nankun");
object oPC1 = GetFirstPC();

    AssignCommand(oNankun , ActionStartConversation(oPC1, "c_sm_partytalk", FALSE, FALSE, TRUE, FALSE));

Maybe it’s different if you use the default speak triggers? Maybe those triggers cause the behaviour you’re talking about?

I might try playing around with the conversation trigger as an alternative, if no solution comes about, because I had forgotten so many things with the toolset, as it’s been a few years since i played with it.

So the script… lol, I got chatgpt to help me make it, because I had forgotten about lilacs script generator when I started the campaign. The script is as follows: (using a placeable, a variable to make sure the conversation only happens the one time. The script goes in the area_on_enter (again, i realize with hindsight this is inefficient).

// On Enter Area Script

// Modify this function to check if the object is a roster member.
// This function should return TRUE if the object is a roster member and FALSE otherwise.
int IsRosterMember(object oPC)
    // Implement your roster membership check logic here.
    // You might use the GetIsRosterMember() function or any other custom logic.
    // Return TRUE if oPC is a roster member, and FALSE otherwise.
    return FALSE;

void StartConversationWithNPC(object oPC, object oNPC)
    // Set the conversation object associated with the NPC.
    SetLocalObject(oNPC, "convo_kotshqent", oNPC);

    // Start the conversation with the PC.
    AssignCommand(oPC, ActionStartConversation(oNPC, "convo_kotshqent"));

void main()
    object oPC = GetEnteringObject();

    // Check if the object entering the area is the PC.
    if(GetObjectType(oPC) == OBJECT_TYPE_CREATURE && GetIsPC(oPC))
        // Check if the entering PC is a roster member OR if it's the PC themselves.
        if(IsRosterMember(oPC) || GetIsPC(oPC))
            // Get the nearby NPC object.
            object oNPC = GetNearestObjectByTag("plc_stradeway_conv", oPC);

            // Check if a nearby NPC exists.
            if(oNPC != OBJECT_INVALID && GetIsObjectValid(oNPC))
                // Check if the conversation has not been started before.
                if(!GetLocalInt(oNPC, "INTRO_CONV_TWSTART"))
                    // Mark the conversation as started.
                    SetLocalInt(oNPC, "INTRO_CONV_TWSTART", TRUE);

                    // Start the conversation.
                    StartConversationWithNPC(oPC, oNPC);

EDIT: Ok, so I can’t script at all, but I can see now there is reference in the script to “roster members”, not sure why.

I would maybe try switching AssignCommand(oPC, ActionStartConversation(oNPC, "convo_kotshqent")); to AssignCommand(oNPC, ActionStartConversation(oPC, "convo_kotshqent"));

See if that solves anything, that the NPC is the one that starts the conversation so that the NPC is the conversation owner.

No luck sadly.
What is weird, is that when I began making my campaign, I was using the builder module for BGTSCC and for whatever reason, this wasn’t an issue then. It’s only since I have ditched their builder module and switched to mostly default scripts, I guess. Does that help at all?

In case it is relevant, here is a custom “ga_join” script I use to get companions to join me.


void main(string sNPC_Tag){

        object oNPC = GetObjectByTag(sNPC_Tag);
        string rosterName=sNPC_Tag+"_roster"; //or what ever you want, but keep it in mind when removing the NPC, or calling it back


            int iNPC = GetGlobalInt("RosterMember");
            if (iNPC ==0) {
                iNPC = 2 ;
                iNPC = iNPC +1 ;
 // additional command line if you want to set the new guy XP
        int xp= GetXP(GetFirstPC(TRUE))*2/3;
        if (GetXP(GetObjectFromRosterName(rosterName))< xp){



I don’t think that has anything to do with it, but…Well, here’s the script I’m using to add companions:

Adds a Companion NPC and sets their XP equal to the PC's if they
are below. This script merges four scripts together so that you
don't have to setup all four script calls in a conversation.

This script also has a convention: the RosterName is the same as
the creature's TAG, resref, etc. They should all be named
the same.
#include "ginc_param_const"
#include "ginc_debug"
#include "ginc_misc"

void main(string sCompanionTag)
//FROM: ga_roster_add_object
//Adds a NPC to the global roster of NPCs available to be added to
//a player's party. Roster Name is a 10-character name used to
//reference that NPC in other Roster related functions.
//The NPC will be left in the game world, but will now exist
//in the roster as well.

object oCompanion = GetObjectByTag(sCompanionTag);
int bResult = AddRosterMemberByCharacter(sCompanionTag, oCompanion);

//FROM: ga_roster_selectable
SetIsRosterMemberSelectable(sCompanionTag, 1);

//FROM: ga_roster_party_add
object oPC = GetFirstPC();
AddRosterMemberToParty(sCompanionTag, oPC);

	// Make the companion visible on the Roster GUI
	SetIsRosterMemberCampaignNPC(sCompanionTag, 0);
	// Just in case we forgot to set this, when we add a
	// companion to our party, we've met them. 
	SetLocalInt(oPC, "met_" + sCompanionTag, TRUE);

int nXP = GetPCAverageXP();
SetXP(oCompanion, nXP);
1 Like

It could be that there are some default scripts they changed? Look among your scripts and see if there are default scripts that are overwritten by the BGTSCC. It has happened to me when I have downloaded prefab areas.

To me, it seems like a lot of weird things could happen if you just use another builder’s work and make a module from there. So many possibilities about what they have done with their module that you don’t know or have control over…This is why I’m nowadays quite reluctant to use other’s scripts right off since I feel I need to understand what’s happening to be in control. Things can get pretty complicated pretty fast in NWN2 if you’re not careful.

This script is for starting a conversation when you enter an area that will only fire once and depends on whether a journal condition has been met. Blank the first line or put a dot or even get a companion to say something irrelevant like " well at least we made it this far" then it will jump to the PC on the next line.

// script by andgalf and travus in collaboration to save my conversation 20/11/20
void StartConversation()

object oComp = GetObjectByTag("companion tag");
object oPC = GetFirstPC();

AssignCommand(oComp, ActionStartConversation(oPC, "conversation tag", FALSE, FALSE, FALSE, FALSE));


void main()
	object oPC = GetEnteringObject();
	if (!GetIsPC(oPC)) return;	

	string sConvo = "conversation tag"; 
	int nQuest = GetJournalEntry("journal tag", GetFirstPC());
	if (!GetLocalInt(OBJECT_SELF, "StepOneDone") && nQuest == number of journal entry to be at)
		SetLocalInt(OBJECT_SELF, "StepOneDone", TRUE);
		DelayCommand(0.2, StartConversation());



IIRC, You get the double naming when a player is playing a companion and you start the conversation with something else when using the start conversation function a certain way.

Eg interparty chat when player is already possessing another PC.

I have seen it happen, and as @andgalf alluded to, it’s a normal behaviour. It is basically saying the responders name (the companion being played) via the player’s Main PC.

EDIT: OK, here is a condition that does the sort of thing you mean… In this example, the player is playing a companion Adaur Harbor, which is denoted as the player by their Main PC (AABULLY) being added in parenthesis. In this case, the player while playing Adaur is speaking to another companion called Agrippa Tenfold. The reason we have the Main PC name included is because in a MP game, this can differ.

NB: In a MP game, another player may have been initiating the conversation with another companion, which all players can see. This means it is helpful to see which player (via their Main PC name) is doing the actual responses for the companion they are controlling.

As @andgalf said, I have DLGPartySwap set to FALSE via a campaign setting. Therefore, companions can and do start the conversation unless I have other code altering this default arrangement. I cannot comment what the default behaviour is when played from a module that does not have campaign settings associated with it.

I imagine this issue will most likely only be present when the builder has a PC speak with another PC in the same party.

So very true! I was getting a little frustrated earlier today, as it feels like everything that was previously working, has undone itself for no reason haha. I’m over exaggerating, but seriously, the amount of times something random just stops working, because of a tiny little change I made.
Got to be on the ball.

Thanks everyone for the assisting.
@Lance_Botelle Yeah for sure, just present when I have PC’s talking to other PC’s and the PC’s are speaking from a red dialog node (NPC).

@Tsongo @andgalf : appreciate the scripts. No question they will be better than what chatgpt spewed out to me, so I’ll stealthfully use them.