How to add a basic Conversationalist NPC with dialogue

Discussion in 'Ink NPC Dialogue Composition' started by Anpu, Jan 1, 2021.

  1. Anpu

    Anpu Avatar

    Messages:
    7,944
    Likes Received:
    9,015
    Trophy Points:
    153
    Location:
    Hemut
    This will be a very easy to understand basic guide to add a Conversationalist NPC's with a custom script that you can now use in the game. This guide will just go over the very basics and explain these step by step. I only have a Windows PC and can only cover that type of computer at this time.

    1 - Craft or Purchase a Conversationalist NPC
    Currently you can craft 2 different Conversationalist NPC's from recipes from a NPC in the town of Xenos or purchase ones on the Crown Shop.
    Speak to Isabeau D'Anjou in the town of Xenos. She is a Housing Decorations Merchant that can be found in Xenos, upstairs from the bank. The recipes cost around 100 gold each and will require an Alchemy Skill of 70 to create them. These are the Conversationalist, Beggar Male 1 and the Conversationalist, Beggar Female 1.

    You will then also need a lot that you own or have access too, and enough NPC space on the lot. For example, even the free taxed no trade player owned town row lot deed you can get allows up to 2 NPC's on the lot! Just make sure first you do have 1 NPC slot available on the lot you are wanting to place this Conversationalist NPC.

    2 - Custom NPC Folder
    First, you will need to know where the Data Folder is for Shroud of the Avatar. Load up the game, and in the Chat Window type the command /datafolder and then press enter. A window will now open to the Data Folder that Shroud of the Avatar uses:

    [​IMG]

    If you do not see a directory here named Custom NPC you will need to create one:

    Right click anywhere on the screen and then select New > Folder option.
    This will create a new folder now on the screen highlighted in blue. Name the folder Custom NPC so it looks like this:

    [​IMG]

    You now have the directory the game will default to when looking for scripts for NPC's!

    We will now add a quick shortcut to find this Custom NPC folder very quickly! Left click and highlight the Custom NPC folder. Now right click on it and select the Pin to Quick Access option. You will now always see see this directory any time when using any programs or viewing folders!

    [​IMG]

    3 - A Basic NPC Script File
    Open the Notepad app for Windows, and leave that open as we will need it in a minute.
    I have provided a very basic NPC script that you can alter easily to fit for you. For this specific example, all of the keywords will go away one you speak about them on the Conversationalist. In the window below, copy all the text below and then right click on your mouse and select Copy.
    Code:
    Greetings! My name is NPCNAME and this is our place that I share with YOURNAME. I can answer any questions if you wish?
    ->start
    ==start
    *What do you do?
    ->A
    *Who is YOURNAME?
    ->B
    *Where am I?
    ->C
    *Can I help you with anything?
    ->D
    *Goodbye
    ->F
    ==A
    I help around here where I can and keep the place all tidy!
    ->start
    ==B
    YOURNAME? Why they are one of the most powerful Avatars in all of New Britannia! Well, at least they seem so to me.
    ->start
    ==C
    Why, this is the wonderful town of TOWNNAME you are in! Do feel free to look around the town.
    ->start
    ==D
    Oh I need no help at this time, but thank you. But I do recall hearing about a Seer in the town of Noreach, at the docks there, was looking for some help. Perhaps you could go speak and help them?
    +Noreach
    ->E
    +I have another question
    ->start
    ==E
    Noreach is a town located North in the Paladis Region.
    ->start
    ==F
    Fare Thee Well and good luck to you!
    ->END
    
    Go back to Notepad and select the Edit > Paste option to place all of this basic script there. Check and make sure you DID copy and paste all of the text correctly posted above.

    In this script above I used a number of words that are only placeholders in all capital letters. Change all these to fit your character:
    NPCNAME change to the name of this Conversationalist NPC's name.
    YOURNAME change this to your Avatars name.
    TOWNNAME change this to the town you are placing this Conversationalist NPC at.
    Here is what this script looks like for me:

    [​IMG]

    In Notepad, click the File and Save As option. At the left side of this window, under Quick access, select the Custom NPC directory. You will need to change one option:

    [​IMG]

    In the Save as type select the drop down box so it has the All Files (*.*) option.
    And in the File Name type NPCExample1.ink and then click the Save button.

    Now go back to the datafolder window and select the Custom NPC directory. At the top of the folder view is a View tab and several options. You will need to select the View tab, then have the option File name extensions option selected, if it isn't already:

    [​IMG]

    Now your Custom NPC directory should look like this:

    [​IMG]

    Just make sure that any conversation script you might want to use always has the .ink at the end of the name of the file!

    OK! Now pat yourself on the back! Grab a beverage refreshment of your choice and celebrate, because most all the hard work is over!!! :D

    4 - Adding the Custom Script to your Conversationalist NPC

    You now will need to load up the game and have any of the conversationalist NPC's you will be using in your players inventory. Right click on the Conversationalist NPC in your inventory and select the Edit Dialogue option. A new Window will appear. At the bottom of this window click the green Import Content button. The window will now look like this:

    [​IMG]

    Select the NPCExample1.ink file.

    Of note, see that number at the bottom left? This shows the count of how many characters are in your current custom NPC script. Every single character in a custom NPC script counts, even spaces! So do make sure to check that when you decide to play around with other custom NPC scripts!

    Of note, the craftable NPC's currently in the game have a limit of ONLY 2000 characters.

    The Crown store Conversationalist NPC's have a much higher limit.

    Now click the green Import button. The window will now display the code we just imported. Now click the red X at the top right of the window to close it.

    That's it! Your NPC now has a custom script attached to it!

    Now just place that Conversationalist NPC somewhere on a lot you own or have access to and wait a few moments for the character to load. And then speak to them.

    And that is it! Hopefully this was very easy to understand, for basically anyone to be able to add one to your own lot. Just let me know if I just didn't explain something very clearly!

    The script I provided is really basic, and does a easy example of some very basic options. Now feel free to now start editing that basic Custom NPC script and feel free to experiment! But on THAT, you will now be on your own......

    Give the Ink NPC Dialogue Composition forum a look for further examples (like Merrik's Conversationalist, A Tutorial) for some more basic information, or start your own thread!

    -----------------------------------------------------------------------------------------------------------------------------
    Information for this post was from Release 85, build 1329.
    All of the content in this post can be freely used or copied by anyone with my permission. Feel free to add this to any of your guides if you wish!
     
    Last edited: May 28, 2023
  2. Isabel Ayin

    Isabel Ayin Avatar

    Messages:
    648
    Likes Received:
    1,675
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Umbra
    A simple and very useful guide, thank you very much!
     
    Time Lord, Wilfred and Anpu like this.
  3. Koimiko

    Koimiko Avatar

    Messages:
    81
    Likes Received:
    173
    Trophy Points:
    8
    Gender:
    Female
    Location:
    Lightbringer Isle
    WOW thanks so much, you made it so simple
     
    Time Lord and Wilfred like this.
  4. majoria70

    majoria70 Avatar

    Messages:
    10,347
    Likes Received:
    24,869
    Trophy Points:
    153
    Gender:
    Female
    Location:
    United States
    Thank you Anpu. You did a great job explaining.
     
  5. Silberfarn

    Silberfarn Avatar

    Messages:
    79
    Likes Received:
    218
    Trophy Points:
    8
    Gender:
    Male
    Location:
    Germany
    Hello,
    (OsX 10.14.6, inky 0.12.0)
    for those of you wondering, why your scripts run in inky but not on the conversationalist:
    I followed the tutorial instructions of the inkle website and used the "*" tags for marking answer options and the square brackets [] for the answers themselves. I further had the answer path (->) on the same line as the answer. My dialogue looked something like

    Hello, how are you?
    *[I am fine, thanks] ->fine
    *[Actually, not so good.] ->bad

    While this works in the inky editor, it breaks in SOTA. I only ever see my answer option, not the other dialogue text.
    To make it work, I had to use "+" instead of "*", leave out the [] and put the answer paths into a new line:

    Hello, how are you?
    +I am fine, thanks
    ->fine
    +Actually, not so good.
    ->bad

    Hope this helps others debugging their dialogues.
    Cheers,
    Silberfarn
     
    Time Lord likes this.
  6. Duke Ezekiel Cooper

    Duke Ezekiel Cooper Avatar

    Messages:
    738
    Likes Received:
    1,772
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Blackrock Cove (Quel)
    @Anpu
    I've noticed with other characters that "don't" own the NPC Conversationalist, that when the owner isn't on the lot, the display name of the conversationalist doesn't appear above the head.
    Is there a syntax that should be put in the code to make the conversationalists name appear above their head even when the owner of the NPC isn't online or on the lot?

    Thanks,
    Zeke
     
  7. Anpu

    Anpu Avatar

    Messages:
    7,944
    Likes Received:
    9,015
    Trophy Points:
    153
    Location:
    Hemut
    That’s currently how they work. If the owner is not online. But I think they are always supposed to have a name showing?
     
  8. Duke Ezekiel Cooper

    Duke Ezekiel Cooper Avatar

    Messages:
    738
    Likes Received:
    1,772
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Blackrock Cove (Quel)
    Alright, I was just making sure... I been researching all evening trying to make the display name static in the code, but there it is.
    Thanks for the feedback.

    -Zeke
     
    Anpu likes this.
  9. Proudfoot Underhill

    Proudfoot Underhill Avatar

    Messages:
    64
    Likes Received:
    134
    Trophy Points:
    8
    Thanks! My Troll in Ironhall now tells a Poem! (not mine ofc. :D )
     
    Anpu likes this.
  10. Anpu

    Anpu Avatar

    Messages:
    7,944
    Likes Received:
    9,015
    Trophy Points:
    153
    Location:
    Hemut
    In this script I used a number of words in all capital letters. Change all these to fit your character:
    NPCNAME change to the name of this Conversationalist NPC's name.
    YOURNAME change this to your Avatars name.
    TOWNNAME change this to the town you are placing this Conversationalist NPC at.

    I'll assume this is what you mean?
     
  11. ConjurerDragon

    ConjurerDragon Avatar

    Messages:
    1,639
    Likes Received:
    977
    Trophy Points:
    125
    Gender:
    Male
    Location:
    Rhineland-Palatinate
    Oh, you mean you simply used placeholders. I thought that were variables which would read out the PC´s or the NPC´s name and would give out the real name in the conversation.
     
    Anpu likes this.
  12. Anpu

    Anpu Avatar

    Messages:
    7,944
    Likes Received:
    9,015
    Trophy Points:
    153
    Location:
    Hemut
    I changed the wording to this:
    In this script above I used a number of words that are only placeholders in all capital letters. Change all these to fit your character:
    NPCNAME change to the name of this Conversationalist NPC's name.
    YOURNAME change this to your Avatars name.
    TOWNNAME change this to the town you are placing this Conversationalist NPC at.

    Am I explaining that part correctly?
     
  13. SammiX

    SammiX Avatar

    Messages:
    9
    Likes Received:
    6
    Trophy Points:
    3
    Gender:
    Female
    Location:
    Germany
    Hello Anpu,
    Thank you for the great tutorial.
    With this I have also finally made it.:thumbs up:
     
    Anpu likes this.