But if you're just starting with your idea of an NPC mod, this is going to be useful.

Why am I writing this? Because I think that coding in .d is a really, really tedious and ungrateful work, which is why I think that every beginning NPC/romance/quest writer should know how to do it. And because it's That Simple.

It is easy, it will save time for you, and, if you are creating your mod with a help of a coder(or via "How to do this?" threads in IE Modding Help/Modding Q&A/your own forum), for others, too.

And if you've got your whole romance or NPC coded in perfect .d, finding a coder will be much easier - most of the work is already done.

So,

Talks with the PC: lovetalks, friend talks and more.

Let's take an example talk and code it. It's a romantic talk with Valygar.

A beautiful night.- Indeed. (to v5b.1)- But not the most romantic setting, is it? (to v5b.1)- Take my hand, and let us walk together under the stars. (to v5b.1)- Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again... (to v5b.1)

(v5b.2)Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.- Valygar, I implore you: don't start about wizards. Not now. (to v5b.4)- Or maybe they are courting. Just like we are. (to v5b.5)- I wonder... (to v5b.last)

(v5b.3)(Valygar looks at you in amazement, then laughs.)Why indeed... (to v5b.last)

(v5b.4)Hmm? No, I was thinking of - never mind. (to v5b.last)

(v5b.5)We are not, <CHARNAME>. We are... (to v5b.last)

(v5b.last)You must be tired. Take my hand, and let's walk. Enough battles for today.Rule 1: Every line should start with a tilde (~) and end with a tilde(~).

This is the most important rule ever. If you ever get an error during the mod's installation, it's probably this one.

~A beautiful night.~- ~Indeed.~ (to v5b.1)- ~But not the most romantic setting, is it?~ (to v5b.1)- ~Take my hand, and let us walk together under the stars.~ (to v5b.1)- ~Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again...~ (to v5b.1)

(v5b.2)~Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.~- ~Valygar, I implore you: don't start about wizards. Not now.~ (to v5b.4)- ~Or maybe they are courting. Just like we are.~ (to v5b.5)- ~I wonder...~ (to v5b.last)

(v5b.3)~(Valygar looks at you in amazement, then laughs.)~~Why indeed...~ (to v5b.last)

(v5b.4)~Hmm? No, I was thinking of - never mind.~ (to v5b.last)

(v5b.5)~We are not, <CHARNAME>. We are...~ (to v5b.last)

(v5b.last)~You must be tired. Take my hand, and let's walk. Enough battles for today.~Rule 2: Every line NPC says should start with a SAY.If NPC says several lines, all NPC lines after the one starting with SAY should start with an equals sign (=).

SAY ~A beautiful night.~- ~Indeed.~ (to v5b.1)- ~But not the most romantic setting, is it?~ (to v5b.1)- ~Take my hand, and let us walk together under the stars.~ (to v5b.1)- ~Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again...~ (to v5b.1)

(v5b.2)SAY ~Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.~- ~Valygar, I implore you: don't start about wizards. Not now.~ (to v5b.4)- ~Or maybe they are courting. Just like we are.~ (to v5b.5)- ~I wonder...~ (to v5b.last)

(v5b.3)SAY ~(Valygar looks at you in amazement, then laughs.)~= ~Why indeed...~ (to v5b.last)

Note: if a line only works under a special condition(PC is an elf, for example), the form changes to + ~condition~ + ~Reply~ + NPC_answers_this_line, as in+ ~Race(Player1,ELF)~ + ~Reply~ + NPC_answers_this_line

Implementing this one should be easy, if a bit tedious. Coding in .d right from the beginning has its advantages...

SAY ~A beautiful night.~++ ~Indeed.~ + v5b.1++ ~But not the most romantic setting, is it?~ + v5b.1++ ~Take my hand, and let us walk together under the stars.~ + v5b.1++ ~Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again...~ + v5b.1

(v5b.2)SAY ~Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.~++ ~Valygar, I implore you: don't start about wizards. Not now.~ + v5b.4++ ~Or maybe they are courting. Just like we are.~ + v5b.5++ ~I wonder...~ + v5b.last

(v5b.3)SAY ~(Valygar looks at you in amazement, then laughs.)~= ~Why indeed...~ (to v5b.last)

(v5b.4)SAY ~Hmm? No, I was thinking of - never mind.~ (to v5b.last)

(v5b.5)SAY ~We are not, <CHARNAME>. We are...~ (to v5b.last)

(v5b.last)SAY ~You must be tired. Take my hand, and let's walk. Enough battles for today.~Rule 4: every block should have a unique name: IF ~~ block_name

"Unique" part is important, or you will get errors during the installation.

IF ~~ v5bSAY ~A beautiful night.~++ ~Indeed.~ + v5b.1++ ~But not the most romantic setting, is it?~ + v5b.1++ ~Take my hand, and let us walk together under the stars.~ + v5b.1++ ~Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again...~ + v5b.1

IF ~~ v5b.2SAY ~Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.~++ ~Valygar, I implore you: don't start about wizards. Not now.~ + v5b.4++ ~Or maybe they are courting. Just like we are.~ + v5b.5++ ~I wonder...~ + v5b.last

IF ~~ v5b.3SAY ~(Valygar looks at you in amazement, then laughs.)~= ~Why indeed...~ (to v5b.last)

IF ~~ v5b.4SAY ~Hmm? No, I was thinking of - never mind.~ (to v5b.last)

IF ~~ v5b.5SAY ~We are not, <CHARNAME>. We are...~ (to v5b.last)

IF ~~ v5b.lastSAY ~You must be tired. Take my hand, and let's walk. Enough battles for today.~Rule 5: every block without PC replies should have either an ending, or an order to move to the next NPC line right under the NPC line. An ending: IF ~~ EXITAn order to move to the next NPC line: IF ~~ + name_of_the_next_NPC_line

IF ~~ v5bSAY ~A beautiful night.~++ ~Indeed.~ + v5b.1++ ~But not the most romantic setting, is it?~ + v5b.1++ ~Take my hand, and let us walk together under the stars.~ + v5b.1++ ~Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again...~ + v5b.1

IF ~~ v5b.2SAY ~Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.~++ ~Valygar, I implore you: don't start about wizards. Not now.~ + v5b.4++ ~Or maybe they are courting. Just like we are.~ + v5b.5++ ~I wonder...~ + v5b.last

IF ~~ v5b.3SAY ~(Valygar looks at you in amazement, then laughs.)~= ~Why indeed...~IF ~~ + v5b.last

IF ~~ v5b.4SAY ~Hmm? No, I was thinking of - never mind.~IF ~~ + v5b.last

IF ~~ v5b.5SAY ~We are not, <CHARNAME>. We are...~IF ~~ + v5b.last

IF ~~ v5b.lastSAY ~You must be tired. Take my hand, and let's walk. Enough battles for today.~IF ~~ EXITRule 6, final: Every block, with replies or without, should have an END.

IF ~~ v5bSAY ~A beautiful night.~++ ~Indeed.~ + v5b.1++ ~But not the most romantic setting, is it?~ + v5b.1++ ~Take my hand, and let us walk together under the stars.~ + v5b.1++ ~Uh-huh. And a very quiet one. Damn, now I have to wipe my weapon again...~ + v5b.1END

IF ~~ v5b.2SAY ~Owls are clever birds. It may be carrying messages... look, another one! A wizard must be living nearby.~++ ~Valygar, I implore you: don't start about wizards. Not now.~ + v5b.4++ ~Or maybe they are courting. Just like we are.~ + v5b.5++ ~I wonder...~ + v5b.lastEND

IF ~~ v5b.3SAY ~(Valygar looks at you in amazement, then laughs.)~= ~Why indeed...~IF ~~ + v5b.lastEND

IF ~~ v5b.4SAY ~Hmm? No, I was thinking of - never mind.~IF ~~ + v5b.lastEND

Note that there is still one thing to do - setting the conditions for this lovetalk. To understand that, you'll have to read more on scripting in .baf, and how scripts work. If you want, you can start with:

Rule 1: Every line should start with a tilde (~) and end with a tilde(~).Rule 2: Every line NPC says should start with a SAY.If NPC says several lines, all NPC lines after the one starting with SAY should start with an equals sign (=).Rule 3: PC replies should look this way: ++ ~Reply~ + NPC_answers_this_lineRule 4: every block should have a unique name: IF ~~ block_nameRule 5: every block without PC replies should have either an ending, or an order to move to the next NPC line right under the NPC line. An ending: IF ~~ EXITAn order to move to the next NPC line: IF ~~ + name_of_the_next_NPC_lineRule 6, final: Every block, with replies or without, should have an END.

(And, yes, when I saw Weidu readme and some of the more advanced tutorials for the first time, I panicked, too, especially after I saw the "Don't panic!" note. My first piece of .d code for Branwen romance was created via taking constant peeks at jastey's work - Ajantis romance, in that case. Do not be afraid to borrow code - just bring in your own ideas.)

Interesting how you write all the dialogue and then convert each line to code. I always make a code template and then paste my dialogue into it . . . same effect, just interesting how you do yours . . .

Topic split, and it's another good moment to remind everyone that it's NOT a good idea to PM tutorial authors, as some (or, to be honest, most) of them are no longer active. Use Modding Q&A forum instead.