I have a question related to the conversation triggers.
I would like that, whatever the character of the group starts a conversation, the character selected for the conversation is always that of the player.
I sometimes have strange problems, for example I enter a conversation trigger and the NPC addresses one of my companions, randomly, changing the whole meaning of what is said.
Has anyone ever had this problem?
Good evening to all !
Bonjour à tous !
J’aurais une question en rapport avec les déclencheurs de conversation.
Je voudrais que, quelque soit le personnage du groupe qui déclenche une conversation, le personnage sélectionné pour la conversation soit toujours celui du joueur.
J’ai parfois des problèmes étranges, par exemple j’entre dans un déclencheur de conversation et le PNJ s’adresse à l’un de mes compagnons, de façon aléatoire, et ça change tout le sens de ce qui est dit.
Quelqu’un a-t-il déjà eu ce problème?
Bonne soirée à tous !
“randomly”, are you sure? I had to fix several bugs in the latest modules I played because some variables were set on the character who, say, opened a chest and retrieved a plot item but when the same character tried to start a conversation with the quest-giver, the conversation always switched to the first PC (first in the sense the one selected before the module was loaded) because the conversation always used $PC as the speaker for the party.
In a conversation, the $var refer to:
$OBJECT_SELF = OBJECT_SELF
$OWNER = ConversationOwner()
$OWNED_CHAR = GetOwnedChar()
$PC = GetPCSpeaker()
$PC_SPEAKER = GetPCSpeaker()
$PC_LEADER = GetFactionLeader()
$PC_NEAREST = GetNearestPC()
$MODULE = GetModule()
$LASTSPEAKER = GetLastSpeaker()
Maybe there’s a mismatch between $PC, $PC_LEADER and $PC_NEAREST in the conversation the trigger launches?
that’s generally configured in the toolset, either in the Dialog’s properties: PartyChat=true/false
or in script – SetOwnersControlledCompanion()
and/or on the NPC-Speaker … “CanTalkToNonPlayerCharacters”
So it’s a builder/designer choice and not modifiable by players …
( am not sure if you’re fixing or playing )
I come back here, I noticed that in the base campaign of NWN 2 there was an interesting mechanic.
When a companion talks to an NPC, automatically the main character speaks (he pops up in place of its companion).
How do I introduce this mechanism into my own modules? In mine, it works like in Storm of Zehir, it’s the character who starts the conversation who gets involved in it. What I don’t want.
Thanks to all !
Hello hello !
Je reviens par ici, j’ai remarqué que dans la campagne de base il y avait une mécanique intéressante.
Quand un personnage du groupe parle à un NPC, automatiquement c’est le personnage principal qui parle.
Comment introduire cette mécanique dans mes propres modules? Dans les miens, cela fonctionne comme dans Storm of Zehir, c’est le personnage qui déclenche la conversation qui s’y retrouve impliqué. Ce que je ne veux pas.
Merci d’avance !
I believe you need to uncheck the “PartyChat” box in the conversation settings.
Il me semble qu’il suffit de décocher la case “PartyChat” dans le comportement du dialogue.
No no, in fact when you uncheck that box, it removes the speaker choice in conversation (like in Storm of Zehir).
It doesn’t change the fact that the companion is the speaker when he is selected and clicks on the NPC.
In all my modules I think it always works like that. If you start a conversation, the main character always ends up speaking to an NPC, even if you are controlling a companion. I don’t believe I’ve ever needed to “do” anything to make this happen. Looking at my conversations in the toolset most of them look like this under properties:
I think it’s always the nodes that controls the ones that are speaking. If you have a blue node it’s always the PC speaking, and with a red you can choose a companion or an NPC. I wouldn’t know how to get it to work like in SoZ, but I’ve never been interested in that kind of conversation so…
Maybe all this has to do with the function you’re using when starting a conversation perhaps? I usually use something like this for a trigger
AssignCommand(oNPC, ActionStartConversation(oPC, "conversationname", FALSE, FALSE, FALSE, FALSE));
or in other cases I use CreateIPSpeaker if I want to make sure the conversation will be firing.
Sorry, going back and reading what everyone else has said before here, it just confirms what I am saying, so my post was perhaps quite unnecessary, I guess.
When I started the create my campaign, that worked exactly like you say, Classic Campaign style, but I probably stole to much scripts from Storm of Zehir, I guess ! And I did not realise it soon enough with testing…
I will continue to check scripts and see if I can remove anything from SoZ and go back to previous rules.
Ah, could be, yes. Why don’t you post an example here of a conversation trigger that you’re using? I’m sure if we could see that both I and the others could be of even more help.
Here’s an example of one of my own conversation scripts (the whole idea behind this script is stolen from one of @travus excellent scripts) used in the module I’m working on now and my latest one that is currently beta tested. This kind of conversation trigger works every time, at least when I’ve tested it. And I use variations of this all the time. This is just a conversation between the PC and a companion. You could easily edit this to work for an NPC. But if you just click on an NPC with a conversation attached to it, it SHOULD always fall back to the PC talking.
const string sROSTER_COMPANION = "michael"; // note: this needs to be the *roster* string-id
object oPC1 = GetEnteringObject();
object oPC = GetFirstPC();
if (!GetIsPC(oPC1)) return;
if (GetIsInCombat(oPC1)) return;
if (!GetLocalInt(OBJECT_SELF, "Done"))
object oCompanion = GetObjectFromRosterName(sROSTER_COMPANION);
SetLocalInt(OBJECT_SELF, "Done", TRUE);
AssignCommand(oCompanion , ClearAllActions());
AssignCommand(oCompanion , ActionJumpToObject(oPC1));
SetCutsceneMode(oPC); // this needs to be cleared by the dialog's End/Abort dialog handlers.
AssignCommand(oCompanion, ActionStartConversation(oPC, "conversationname", FALSE, FALSE, FALSE, FALSE));
Excuse my enthusiasm, but I finally found the problem, and that was SO obvious.
I’m ashamed a little.
In the campaign editor, switch the lign “DLGPartySwap” to TRUE.
If FALSE, it’s democracy in your group and nobody wants that.
Thank you all very much for your time !