Skip to content

Modding Non-joinable NPC Dialogue (Mini-Guide)

mashedtatersmashedtaters Member Posts: 2,266
edited May 2018 in General Modding
Hey, everyone, I'm brand new to modding, and I put this together as more of a place-holding reminder for myself rather than as a guide for any of you amazing modders that are a part of this community. However, if any newbies decide that this is useful information, then feel free to use it.

One of the things I always wanted to do was add more conversation to certain likeable characters in Icewind Dale. I've been wracking my brains trying to figure it all out and I finally got a minor understanding of a working method. NOTE! I'm not much of a modder (yet), so just because it all works doesn't mean that it's right (yet). I'd appreciate all you experienced modders to give me some direction and corrections as you see fit, or other general advice.

This is not a comprehensive guide. But, the first thing to do is download WeiDU. Make a copy of WeiDU itself and rename it SETUP-??????. (I'm going to use my prefix here, which is J3, and rename it SETUP-J3TEST).

Next, create a folder and name it the same name as those following SETUP-. In my case, it will be named J3TEST.



In that folder create a group of subfolders that will contain scripts, dialogues, bafs, etc. See this post here http://www.shsforums.net/topic/27927-organize-before-you-write/ for organizational tips, and look at other mods as to how they are organized.

But, I'm lazy today and will only create the BACKUP folder.

In my J3TEST folder, I will create a text document saved as All Files as SETUP_J3TEST.tp2. This is a list of instructions that will tell WeiDU what to create.

I will create another text document saved as All Files as J3TEST.d. This will contain the meat of the conversation edits for our non-joinable NPC.



First, I'm going to edit the tp2 file for WeiDU's instructions. For this, I will be keeping it to the bare minimum.

BACKUP ~J3TEST/BACKUP~ // required AUTHOR ~ME~ // email LANGUAGE ~ENGLISH~ ~ENGLISH~ //yes, it's required to write english twice. BEGIN ~J3TEST MOD~ // just the name of the mod COMPILE ~J3TEST/J3TEST.D~ // this is the command to compile the .D file from the shown folder into a .DLG file in the override folder

Then, I'm going to edit the J3TEST.d file with the following.

EXTEND_BOTTOM DOLDJED 1 // this extends a reply to the bottom of the dialogue file that belongs to old jed in Icewind Dale. We use EXTEND_BOTTOM because EXTEND_TOP changes the order of the replies, and that is discourteous to other modders. IF ~~ THEN REPLY ~This is a test of the emergency broadcast system.~ EXTERN DOLDJED J3TEST1 END APPEND DOLDJED // this adds another spoke line to the drunk's speaking script IF ~~ THEN BEGIN J3TEST1 SAY ~This has been a test of the emergency broadcast system.~ IF ~~ THEN GOTO J3TEST2 // this is now a command for dialogue added by this mini-mod END IF ~~ THEN BEGIN J3TEST2 // here we are in our internal dialogue SAY ~WE'RE STILL TESTING THIS, CAN'T YOU TELL?~ IF ~~ THEN REPLY ~YES, I CAN TELL~ GOTO J3TEST3 IF ~~ THEN REPLY ~WHY DON'T YOU JUST SHUT UP, OLD MAN?!~ GOTO J3LOOP1 END IF ~~ THEN J3LOOP1 // just a fun loop SAY ~NO, YOU SHUT UP!~ IF ~~ THEN REPLY ~I'LL SHUT UP WHEN I WANT TO!~ GOTO J3LOOP2 IF ~~ THEN REPLY ~WELL, if YOU say so!~ GOTO J3TEST2 //if you add one of these, don't forget to make a way out! END IF ~~ THEN J3LOOP2 //still just a fun line SAY ~YOU'LL DO WHAT I WANT!~ IF ~~ THEN REPLY ~JUST SHUT UP!~ GOTO J3LOOP1 END IF ~~ THEN BEGIN J3TEST3 SAY ~WELL, THAT ABOUT SUMS IT UP.~ COPY_TRANS DOLDJED 1 // puts the dialogue back to where it was for the next guy. END END

This can be expanded to be a bigger conversation.
(I know that you can use ++ instead of IF ~~ THEN, but for now I'm going to keep it like this for my own memory's sake. As I get more familiar with coding, I am sure I will move on to ++ as it is so much easier to type. But for now, I am still learning the basics.)

Comments

  • mashedtatersmashedtaters Member Posts: 2,266
    In order to find out what conversation you would like to edit, it is easiest to use an Infinity Engine Editor, like Near Infinity.
    Near infinity requires Java. So download and install Java. Then download near infinity and place it anywhere on your computer.
    Open up near infinity and open up the game file where the Chitin.key is kept.



    Once it has populated, open up the .DLG drop down window and navigate to the character you wish to change. Usually the NPCs name is hinted at in the ,DLG file. In this case, I scroll down to DOLDJED and open it up.



    Then I open up the tree and find the state I wish to reply to. In this case, it is state 1, "Not so good, matey..."



    The .d file created will be EXTENDed at the BOTTOM of the replies to state one, without affecting the existing order. Then the DOLDJED dialogue will be APPENDed, starting with SAY J3TEST1. Then, at the end, DOLDJED will be COPYed and TRANsitioned back to DOLDJED 1 ("Not so good, matey) and to its original order.
  • mashedtatersmashedtaters Member Posts: 2,266
    Please note that this information also applies to BG2 games. I'm just doing IWD for now.
Sign In or Register to comment.