Jump to content

edit existing responses and their triggers for dialogs?


Recommended Posts

Is there a good way to edit existing dialogs via weidu beyond extending bottom while remaining compatible? Like adding alternatives of the same response with different triggers and actions. For example if I want to make it so that telling the mage in front of FAI that he's got the wrong guy works as it does normally when the PC has 15 or less CHA, but he buys it and buggers off peacefully if PC has 16+ CHA, how would I do that with weidu?

Link to comment

Right, so this is a simple example. Let's branch Tarnesh at the very first line, and he lets you go if you answer that you're just travelers and have 16+ charisma. First we need to make the existing reply conditional:

ADD_TRANS_TRIGGER tarnes 0 ~CheckStatLT(Player1,16,CHR)~ DO 0

This makes the existing transition only work if the PC has 15 or less charisma. You have to make the existing reply also check the same stat, or the PC will be presented with identical replies that do different things; the triggers must be mutually exclusive. Next, we add the same reply but conditioned on 16+ charisma:

EXTEND_BOTTOM tarnes 0
  IF ~CheckStatGT(Player1,15,CHR)~ THEN REPLY #17883 GOTO cd_new_tarnesh
END

Note that we can re-use the string (17883) and that we're sending it to a new line of dialogue for Tarnesh. Now we add that new line:

APPEND tarnes
  IF ~~ THEN BEGIN cd_new_tarnesh SAY ~Good day to you, then.~
    IF ~~ THEN DO ~EscapeArea()~ EXIT
  END
END

Tarnesh delivers a new line and then leaves. You can change the line or action to suit, but this is it in a nutshell.

Now, the one thing that kinda sucks here is that, depending on the PC's charisma, the order of the replies will be different. Since we're branching the first reply, you could EXTEND_TOP instead of EXTEND_BOTTOM, however this can cause conflicts with other mods if they try to alter this state such as BG1 NPC. While changing the reply order sucks, it's an acceptable tradeoff for compatibility.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...