Jump to content

How to make an Interjection


Recommended Posts

I'm sure many modders out there would like to know how to code interjections (things that NPCs say during conversations the PC has with other NPCs aka the NPCs' "two cents") so I made a little tutorial here!

 

PART ONE: Making your custom NPC have interjections

 

 

1) Open up your main mod folder...ex: John-which is the name of the folder I used that contains my NPC.

 

2) Open up your text editor and create a dialogue (.D) file called K#JohnJ.d Type: BEGIN K#JOHNJ at the top.

 

3) I hope you have Infinity Explorer. Let's open that up and go to dialogues. Find NALIA. If you click on her opening line "Is anyone willing to hear my plea...." and look down, you will see it says PHRASE 45.

 

4) In your new J file (J is for joined) we're going to use what's called INTERJECT_COPY_TRANS, which allows us to make John interject, in this case, he'll make a comment when Nalia approaches the PC.

 

So...this is how we would type it.

 

INTERJECT_COPY_TRANS NALIA 45 johncommentnaliajoin

== K#JohnJ IF ~InParty("K#John") InMyArea("K#John")~ THEN

~Hey, look, a rich girl!.~

END

 

"johncommentnaliajoin" is just the name of the interjection

 

InMyArea is just what it says....K#John is (remember?) our Script Name/Death Variable/DV (get used to calling it DV)

 

Save this and in your TP2, under where the dialogue is compiled, type:

 

COMPILE ~John\K#JohnJ.d~

 

And Save it...then reinstall the mod.

 

NOTE: You can do this with any dialogue phrase, as long as your NPC will be in the party.

 

PART TWO- Adding interjections to a Bioware NPC

 

1) Make a text file....name it whatever NPC you are doing ex: NALIAJ.d or ANOMENJ.d, etc.

 

2) Type whatever interjection you want. Here is mine for Nalia when Anomen approached the PC

 

BEGIN NALIAJ

 

INTERJECT_COPY_TRANS ANOMEN 0 naliacommentanomenmeet1

== NALIAJ IF ~InParty("Nalia") InMyArea("Nalia")~ THEN

~Um...is that helmet hurting your brain?~

END

 

Save it.

 

3) Create a folder called Nalia Add-on or whatever. In it make another folder called backup.

 

4) Make a copy of WeiDU.exe and rename it Setup-NaliaAddOn.exe

 

5) Make a TP2 file called Setup-NaliaAddOn and type the following:

 

BACKUP ~Nalia Add-on\backup~

AUTHOR ~theacefes (bohdi2185@msn.com)~

BEGIN ~Nalia Add-on~

 

COMPILE ~Nalia Add-on\NALIAJ.d~

 

It's real short I know, but it works, and can totally be expanded.

 

I hope this was easy enough to understand. Have fun um...interjecting!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...