Author Topic: How to alter in game dialogue choices  (Read 2018 times)

Xavioria

  • Guest
How to alter in game dialogue choices
« on: February 13, 2013, 09:41:33 PM »
HI THERE! I'm currently writing an NPC mod, and I must admit, I'm learning everything much quicker than I thought I would be able to.

I am, however, having a great deal of trouble with interjections.
They are quite simple to add to the game, and even simpler to write. The only issue is that when I want more than just an opinion, it becomes very difficult to figure out how to actually change the outcome of an already written in game dialogue and add some PC choices.

For instance:

During the Ender Sai conversation, I've added an interjection from my NPC, where she and Ender go through an entire dialogue together (This atually does work). However, from the dialogue shown, the PC can then say:
"The Iron Throne. Where can I find them?"
According to how the new conversation goes, I want the PC to say something closer to:
"I will worry about that later, please tell me where I can find the Iron Throne."

I do not know how to alter the existing PC interactions to include this choice and exclude the former, but ONLY under the circumstance for which my NPC is in the party.

Lastly, I'm also a bit lost on how to alter the state at which dialogue ends, for instance:
When Mulahey is at about 50 percent health, he begs for his life. My NPC however, "forces your hand" to where you shouldn't be able to respond, yet I can't change this, and my PC responds anyways.

Can anyone please help me out with these two small issues I'm having? I would be very grateful if anyone was willing and able to help out a new modder... Please and thank you for those kind enough to help. And for those that can't, I totally understand, time constraints can be a b*** lol

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 272
  • Gender: Male
Re: How to alter in game dialogue choices
« Reply #1 on: February 13, 2013, 11:33:50 PM »
I think ADD_TRANS_TRIGGER may be what you're looking for.  Its description explains how to do something similar.

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6233
  • Gender: Female
  • The perfect moment is now.
Re: How to alter in game dialogue choices
« Reply #2 on: February 13, 2013, 11:38:46 PM »
You may simply add your new dialogue choice via a simple ExtendBottom for Ender Sai, you know, just like with SARVOLO interjections in TOB:

EXTEND_BOTTOM SARVOLO 9 #2
+ ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanRomanceActive","GLOBAL",2)~ + @38 + O#XanVoloBio1
END

As for editing the old one, an ALTER_TRANS may help: CamDawg wrote a fine tutorial: http://www.weidu.org/~thebigg/README-WeiDU.html#ALTER_TRANS
Please note that ALTER_TRANS is a much more compatibility-friendly method than an ALTER_TRANS_TRIGGER, which would edit all replies in your transition.

With Mulahey, it's simpler than simple: add an INTERJECT with a DO ~ActionOverride("MulaheyDeathVariableIDon'tRememberIt",Kill(Myself))~


And it probably goes without saying, but
- technically, you may possibly interject into a critical path for another mod, making your mod incompatible.
- storywise, "forced" decisions may not appeal to some group of players, especially if there're a lot of them/they are in the main path of the game.



Xavioria

  • Guest
Re: How to alter in game dialogue choices
« Reply #3 on: February 14, 2013, 12:34:10 AM »
Thank you guys so much, I didn't expect to get such a hasty reply, but I'm more than happy with your help.

As per your advice, I will heed it, although you are right, I am aware (especially when it comes to NPC project) but I do promise that I'm not altering too much or forcing hands a bit too much (I do not mean to add spoilers but we all know that Mulahey reattacks you anyways ;))

Again, thank you Kulyok, loved Xan for BG2 by the way, was very artfully done.

Xavioria

  • Guest
Re: How to alter in game dialogue choices
« Reply #4 on: February 14, 2013, 11:24:31 AM »
Hi, it's me again, i've followed your post as for what to do with Mulahey, and although your help was much useful, it isn't exactly what I had in mind. I wanted to stop the PC from talking after my NPC spoke, to return to battle to kill Mulahey without any chance for the PC to let him surrender. I didn't want him to just die outright, although I suppose I was being confusing, I don't explain things right most of the time.

Another example would be the gaurds in the Iron Throne.

Let's say they approach and now you have to talk to them. BUT my NPC is there, so she'll interject and tell them to let me pass without having to fight them; How would I end the dialogue block right then and there?

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6233
  • Gender: Female
  • The perfect moment is now.
Re: How to alter in game dialogue choices
« Reply #5 on: February 14, 2013, 12:35:47 PM »
Then it should be just an INTERJECT without DO ~~, or, if Mulahey isn't hostile afterward, an INTERJECT with a DO ~Enemy()~ for Mulahey.

Example:

Mulahey state 100 "I yield, I yield! I just pissed my pants!"

INTERJECT MULAHEYDIALOGUE 100 MODDINGPREFIXUNIQUEVARIABLEMULAHEY22
== BG1NPC IF ~InParty(") InMyArea(") !StateCheck(",CD_STATE_NOTVALID)~ THEN ~Myahaha, I interject here!~
// possibly some dialogue between NPC and Mulahey, and finally
DO ~ActionOverride("Mulaheyvar",Enemy())~ // it's late, so am not sure about where you place DO ~~ in INTERJECT's, but probably here
EXIT

Or, better yet,

INTERJECT MULAHEYDIALOGUE 100 MODDINGPREFIXUNIQUEVARIABLEMULAHEY22
== BG1NPC IF ~InParty(") InMyArea(") !StateCheck(",CD_STATE_NOTVALID)~ THEN ~Myahaha, I interject here! No surrender, no retreat!~
END
COPY_TRANS MULAHEYDIALOGUE 200

Where Mulahey's state 200 is from the original game: "You won't accept my surrender? Your heart is of the deepest black!"

Xavioria

  • Guest
Re: How to alter in game dialogue choices
« Reply #6 on: February 14, 2013, 06:36:05 PM »
I'll be completely honest, this isn't working, and at this point "COPY_TRANS" Isn't being recognized by Weidu. Also, if it were to work, wouldn't the COPY_TRANS have to go before the END function?

I think I just need to see where it's done by another modder and maybe I can look and substitute. I think we're hitting the right marks though, and that I'm really close to figuring this out lol.

Again, thank you for your speedy and helpful replies. Granted it's still not working, you've still been helpful, and for that I thank you :)

I'm a patient person though, so I'm not irritated :) One day, I shall have this figured out, and all will be well!

OH, and question, can you use COPY_TRANS in interjections, or would it be instead INTERJECT_COPY_TRANS?

Xavioria

  • Guest
Re: How to alter in game dialogue choices
« Reply #7 on: February 14, 2013, 07:05:24 PM »
Sorry for the constant double posting... but I had an idea.

This is exactly what I want to happen in game:

- Mulahey get's to 50 percent health
- Mulahey says: "I yield, I yield. Show mercy!" (I'm paraphrasing sorry)
- MyNPC says: "Oh no you don't! You're not getting away that easy!"
- Mulahey says: "You will not accept my surrender? You're heart is of the darkest black!"
- Banter ends, and fighting recommenses.

Right now, what happens is this:

- Mulahey gets to 50 percent health
- Mulahey says: "I yield"
- MyNPC says: "Oh no you don't!"
- Mulahey says: "You will not accept"
- THEN PC HAS THE CHANCE to say either: "I accept'
     OR
- "NO BEAST you die today"

- Mulahey answers and fighting commences

OKAY SO. where my PC has the chance to give Mulahey his life shouldn't happen. I've written in my interjection dialogue file this:

INTERJECT_COPY_TRANS MULAHE 3 rl#margmulahe1
== RL#MARGJ IF ~InParty("RL#MARG") InMyArea("RL#MARG")~ THEN
~Oh no you don't! You're not going anywhere!~
END

Right now it works fine, but I get the second situation, instead of the very much desired first situation. How would you rewrite or augment this state to make it become the first situation where the PC does not get the chance to let Mulahey go?

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6233
  • Gender: Female
  • The perfect moment is now.
Re: How to alter in game dialogue choices
« Reply #8 on: February 14, 2013, 11:18:59 PM »
First of all, like I wrote before, you need an INTERJECT, not a I_C_T(INTERJECT_COPY_TRANS). Naturally you'll be getting PC's replies: you're returning to the same dialogue state afterwards.

Naaah, you need an INTERJECT, and you need go to a different state afterwards:

INTERJECT MULAHE 3 rl#margmulahe1
== RL#MARGJ IF ~InParty("RL#MARG") InMyArea("RL#MARG")~ THEN
~Oh no you don't! You're not going anywhere!~
END MULAHE 999 // instead of 999, please write the dialogue state where Mulahey says "Your heart is of the deepest black" and continues fighting.

I'm not sure about the last line, but that's what Weidu.org Readme says - it's made of tutorials, by the way, and is a great read.

Xavioria

  • Guest
Re: How to alter in game dialogue choices
« Reply #9 on: February 16, 2013, 06:28:27 PM »
KK I finally got it to work. I guess I was trying to do one thing and have this infinite result, and I finally understand everything you've been saying. I do apologeize, Kulyok, I don't think I was fully reading everything that you've been putting up.

Changed it to INTERJECT, granted I don't want to screw with other mods, but this is going to be one in only three places where I actually do this (The other two being very small and obscure areas) and therefore, I won't interefere with the interjections of other mods and NPCs.

AGAIN, thank you four million times for your help and advice. Also, I decided to actually read the whole first half of the weirdu documentation instead of just jump around to it. You are right, it is a great read and helps me understand the modding language alot more

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: