Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to Have Natural NPC Conversations in BDO with NovelAI

Newbie Spellweaver
Joined
Jul 5, 2020
Messages
10
Reaction score
9
A brief tutorial and some tools that will allow you and other players to talk to NPCs in plain language on your BDO server using NovelAI.


  1. To start you'll need to make a account as that account will be used to generate the text for the NPCs.
  2. Download the chat server files and unzip the contents. Either follow the readme or continue below.
  3. Run the 'english_display_names.sql' file in your SQLite DB (makes the NPC names show up in English when speaking)
  4. Apply the patch file to your Archer server with the command 'git am novel_ai_chat.patch' (if you don't have git you can download it ) and build the gameserver './gradlew assemble' (or whatever you have setup for your environment)
  5. Update your config in 'Server/config.ini' with your NovelAI username and password.
  6. Open up the story you want to use as a base in NovelAI, click on the url and copy the id (https://novelai.net/stories?id=<your_story_meta_id>) into your 'config.ini' for 'your_story_meta_id'. This story will now be used to generate new responses.
  7. Run 'start_server.bat'.
  8. Run your server with the new gameserver, walk up to an NPC and send them a message!

Once this is running you'll be able to walk up to NPCs in the world and chat with them.



(sorry for the hard to read text, please open up the images fully and check the chat box for an example of a conversation)​

Notes
  • Each NPC has its own context and state so when you talk to one that information does not automatically transfer over to another NPC.
  • You can only talk to one NPC at a time and the server will select an NPC based on distance.
  • There's support for World -> NPC interaction with the 'only_add" message flag, you'll need to modify the code to use it but it'll let you add on to an NPCs memories/context without prompting a response from them.
  • Set the variable 'respond.distance = 400' in your 'chat.properties' to increase the distance from which NPCs will be able to hear you. This value can be tweaked as you see fit!
  • There's support for generating audio but nothing setup to actually play it by default.
  • The files 'sample_prompt.txt' and 'Black Desert (Thu Jun 23 2022).lorebook' are some really basic files you can use with NovelAI to get started. They'll give the NPCs a non-zero starting point (otherwise they'll say even more random stuff), but feel free to change, update, or use your own prompt. Its just there as a sample!
  • The source that I'm using is from here: https://forum.ragezone.com/f1000/release-archer-version-server-files-1198560/
  • This only works for NPCs that exist on the server. If there's an NPC that you want to talk to that this isn't working for you'll need to go into your db -> 'Character_Table' -> 'IsClientAI' set to '0'. The same change needs to be made in your 'datasheets.bexcel' file. Otherwise you'll get duplicate NPCs.

I just wanted to share this little project that I've been working on, please let me know if you run into any issues!

Changelog
  • June 24 - Autogenerates basic character attributes to serve as background info based on the NPC's data.
 
Last edited:
Back
Top