Making your own NPC / dialog is pretty simple. Here’s a quick and dirty way, though it requires decent knowledge of how the tools work.
This is done off the top of my head, however, so certain names might be wrong. I’ll come back after work to fill in the missing details and do corrections
Step 1: Acquire some NPC templates.
All NPCs require at least three things (at least from what I’ve been able to accomplish with them): a
physical description package, a
dialog package, and the
actual dialog. The best way to get these is to simply copy them from the resources provided in game.
Find an NPC that you want your new one to look like. Import their physical description (found somewhere in resources/creatures/npc/~) into your own database. Next, import just about any working dialog package (found in resources/dialog/). I, personally, took one from the /speaking/ subcategory, which gave me the templates filled in for audio options as well.
Since you are making a completely new NPC, you will have to rename these files (otherwise they will overload existing NPCs). You might want to move both files into someplace more useful as well.
Step 2: Write that script.
Open up the modstring file and add in some new lines of text / information. Something like:
Code:
New_NPC_Name=Bob
New_NPC_Default=Hi.
New_NPC_Assorted=Hello again.
New_NPC_Irritation=Stop talking to me, please.
Step 3: Edit the Dialog
This is the most complicated part, all the information in the dialog package needs to be linked to the modstring file and only then can you link the dialog package into the physical descriptor package itself.
Open up your dialog package and peruse the categories. Of relevance are the entries along the lines of “DialogDefaultTag†and whatnot. They should point to some random resource from the original NPC. Delete the information there and insert in one of the lines you wrote from the modstring file. In this case, I would point the tag to “New_NPC_Defaultâ€.
Repeat this for the assorted text and then for the irritation text. Also be sure to remove the audio information, otherwise you will get strange things playing as your NPC speaks.
Step 4: Connect NPC and dialog
Open up the physical description package and find the "DefaultDialogTag" category. Point the entry to your new dialog and boom! you have a fully working NPC with custom text.
Step 5: Name the NPC
Go to the character description tag in the ‘character variables’ category. Change the description to the string of the name you specified in the modstring file. In this case “New_NPC_Nameâ€.
You’re done! Build your database (super important) and open the world editor. Your new npc should be available for placement now.