Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Nov 2017
T
stranger
OP Offline
stranger
T
Joined: Nov 2017
Hi guys.

I'm trying to understand how to start a dialog (once it's created with the editor) when a player enters a trigger of a character.
And once the dialogue is launched, I also look for how a battle can start if a player does not choose the right answer, or that his perception is not good enough.
Finally, do you know the script for the search of the bag of the player after a crime or the loot of an object not allowed by a pnj (guardian for exemple)?

Thank you in advance for your answers !

Joined: Oct 2017
Location: United Kingdom
journeyman
Offline
journeyman
Joined: Oct 2017
Location: United Kingdom
To start a dialog when player enters a trigger you could use this in a story script:

Code
IF
CharacterEnteredTrigger(_Player,_EventTriggerName)
THEN
SelectAndStartDialog(_Player,_NPCName);

Or
Code
Proc_StartDialog(0,"DialogName",_NPCName,_Player);


To a start combat if a player choses wrong answer you could do (after you set the flag in a dialog node)

Code
IF
DialogEnded("DialogName", _)
AND
DB_IsPlayer(_Player)
AND
ObjectGetFlag(_Player, "FlagName", 1)
THEN
SetFaction(_NPCNAME,"Evil NPC");

Joined: Nov 2017
T
stranger
OP Offline
stranger
T
Joined: Nov 2017
Thank you for this quick answer ! however it is obligatorily in a story this script not in an addon?

Last edited by Tyreliande; 12/11/17 10:26 PM.
Joined: Oct 2017
Location: United Kingdom
journeyman
Offline
journeyman
Joined: Oct 2017
Location: United Kingdom
Not sure what ya mean. For these scripts use the "story editor" in the editor. Can do this in an add-on project or in a standalone adventure project.

https://docs.larian.game/Story_editor

E.g. open the story editor, go to the "Start" category on the left, click "Add sub item", type a name for your goal, then you can put your scripts in the KB section (mostly). Then File > "Generate Definitions, Build and Reload".

Joined: Nov 2017
T
stranger
OP Offline
stranger
T
Joined: Nov 2017
ok, you answered my question correctly. I opened a standalone adventure project. Thanks again for all this very useful information!

Joined: Nov 2017
T
stranger
OP Offline
stranger
T
Joined: Nov 2017
One man i follow on youtube makes a video for this scipt.
I would like to share it : https://youtu.be/IbPmuXBm8Xg

Joined: Nov 2017
T
stranger
OP Offline
stranger
T
Joined: Nov 2017
I try to create a dialogue with a node persuasion. When I start the dialogue, the divinity engine sends this message: This is not valid! I do not see where it does not fit. Then when I try the dialogue, the persuation fails systematically whereas it is to settle in easy, why?


[Linked Image]

Joined: Oct 2017
Location: NH, USA
R
apprentice
Offline
apprentice
R
Joined: Oct 2017
Location: NH, USA
Sorry, my French isn't what it used to be. However, there is a line connecting the left-side of the Question Asking if he has food and water to the right side of the failed persuasion answer. This line is not valid, and is why it is complaining. If I interpret this correctly, you want to have the option of no show up with the yes option (the end node). To do that, simply move the end connected to the "Asking for water and food" FROM the node's left side TO the node's right side.

Automatic persuasion fail says either the dummy you are testing with has garbage for stats, or maybe you didn't finish setting up the persuasion check. The math behind persuasion checks is non-intuitive: Here's the math.

You have difficulty settings, Each test produces a number I'm going to call P, by P = a + b, where a is a number dependent on your difficulty settings, and b is an offset, determined by the level of the speaker. Whether you pass or not depends on your persuasion level and this P, I'll explain in a bit.

I forget the ranges for b, but levels 1-3 force b=1. A can be always, easy, normal, hard, or impossible, which correspond respectively to (-infinity), -1, 0, 1, (infinity).

Example, level 3 scrub calls you a name, and you want to intimidate with a STR persuasion check. He is a scrub, so lets call it an easy check. That makes P = -1 + 1 = 0.

You outright fail persuasion if your persuasion level is less than P, and outright succeed if your persuasion level is greater than P. The interesting part is when your persuasion level is equal to P, in which case you only succeed in the persuasion if the character's STAT associated with the persuasion is higher than the NPC you are comparing against.

Last edited by RestingLichFace; 19/11/17 03:03 PM.

Projects: Tomb of Horrors: Tomb of Horrors
Joined: Nov 2017
T
stranger
OP Offline
stranger
T
Joined: Nov 2017
Ok thx for this good explain ! I have another question now. How i can add a dialog for a race for example (dwarf, elfe, humain) or keyword (noble, soldier, etc) ? When i try, all of my player can see all choices, even if the player does not belong to the category. When i add a question i see option rules, but i don't know how set it. (sorry for my bad english again)

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
You have to add flag checks to the question nodes. Those flag checks should check for the appropriate TAGs (SOLDIER, ELF, ...). The "[DWARF]" etc at the start of a text line does not influence any checking, it's just there to give the player information about the fact that this node is specific for DWARFs.


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