Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Could someone link me to a tutorial that explains how to make dialogue work? I was following the 'Divinity Engine Toolkit Tutorial Video Series' and got stuck on the Scripting Quests 1 video found here: (http://www.youtube.com/watch?v=6CNcQz7j5KY). I'm not the only one having issues, judging from the comments. I attached dialogue to the NPC but it won't fire. Any ideas?

I'm also looking for a tutorial that explains how to customize NPCs appearance and class. Thanks for any info. smile

Last edited by JecklynHyde; 20/10/14 02:08 AM.
Joined: Sep 2014
A
stranger
Offline
stranger
A
Joined: Sep 2014
If you make a character global, the default dialog system doesn't work automatically, you need to implement it yourself. Don't worry, it is very simple. Go into the story editor and create a new goal, called start or something. In the INIT, write something like this.

Code
PartyMembers(CHARACTER_Player1);
PartyMembers(CHARACTER_Player2);


PartyMembers is just property that is true or false for the character, you can call it whatever you want (unless something is already called that or a PROC has the same name).

Now, make a new goal, call it Global_Dialog or something. In the KB section add this code.

Code
// Party member speaking to NPC
// ---------------------------------------------------------------------------------
IF DialogStartRequested(_Char, _Player)
AND NOT PartyMembers(_Char)
AND PartyMembers(_Player)
AND CharacterIsDead(_Char,0)
THEN StartDefaultDialog(_Char, _Player);


This will make so when you click on a character for dialog, it will check if the dialog is between a player and a npc and whether or not you are trying to talk to a dead guy. If you are not trying to talk to a dead guy, it will start the default dialog that you define using the side menu when selecting a character.

Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Thanks for the help Anders!

Unfortunately I received two errors after inputting the first code: object 'CHARACTER_Player1" is not defined. Any idea what caused the error?

Joined: Sep 2014
A
stranger
Offline
stranger
A
Joined: Sep 2014
Well, you need to have your main characters global and give them an appropiate name in the "characters" menu (icon is a little stick man). I usually call the main characters Player1 and Player2, but you can choose whatever you want. Just replace CHARACTER_Player1 and CHARACTER_Player2 with CHARACTER_"Your player 1 object name" and CHARACTER_"Your player 2 object name".

Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
That solved the errors problem, but I also had to uncheck "Global" from the NPC properties to make the dialogue fire because I don't have all the main module scripts in my StoryEditor. This guy's tutorial seems to work for custom module dialogue: http://www.youtube.com/watch?v=uXnbwL5ATu0

Is there an easy way to import the main module codes into my custom game?


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5