API or best practice to create an NPC?

Hi all, I am new to gather town. I am trying to create an office space for our company in which there will be an NPC “mascot” that people could talk to.
The NPC should:

  • have its own avatar
  • be able to make http post requests to remote server (our company’s server) to fetch conversation responses.

Is there any APIs to support that? Or given the current APIs how do I hack around?

1 Like

Welcome to the forums! I can try and outline a few answers to your question:

  1. NPCs: Currently, NPCs come in 2 ‘flavors’, (1) an API generated player with no A/V connection or (2) an object with an NPC image which contains some interaction. Both of these options allow you to set the NPC to look like any other player.

  2. Conversations: This is probably where things will get tricky. Currently, there is no way to have an NPC ‘speak’. You may have seen the subtitles the NPCs had in the Escape the Island game, but that is restricted to that game only. Additionally, even if the subtitle feature worked, changes to the subtitles would impact all users equally, meaning every user interacting with the NPC would see the responses from everyone else’s questions. This would get very confusing.

I would suggest you look into the second type of NPC, the object dressed up as an avatar. You could embed a website into the ‘avatar’, and have that direct to a chatbot style interface. Because this external website would be accessed via iframe, each user would have their own instance of it, avoiding the cross-talk issue mentioned above. You would have to design and host the website yourself, or find a provider external to Gather, but it also would not require the API to keep up and running, just some Web Dev.

Obviously, this is just one solution. There is a chat feature in Gather that could try and be harnessed, but that gets a little complex since they deprecated Global Chat.

3 Likes

Thanks Bill!
I will look into the “object dressed up as an avatar” route! :slight_smile:

@hush curious if you got any updates on this?

Hi @emre and @hush,

we have made a bunch of speaking NPCs (see www.komponent.works/nugget), We can make bots use the chat so you can speak with them via text, but we can also give them a voice and let them respond in human like voice.
During my experiments I allowed Nugget to do various things via API in Gather, basically anything a admin could do, Nugget could do that too on demand. But also things outside Gather.
Nugget does currently have GPT4 and DALLE as its default skills. But as we connected it to a Zapier-like tool, it could do almost anything.

We can bring Nugget to your Space and teach and train it on your custom data. shoot me a DM if this is from interest for you and you want a quote.

If you like to learn more about how you can do this yourself, Im happy to have a coaching session with you where I teach you about all the things you need to know in making this.

Have a good time!

1 Like

I was working on a project that required an NPC, so I built one using the ‘object dressed up as an avatar’ strategy. I’ve made the code on public on Github - hopefully it’s helpful!

https://github.com/willstenzel/gather-npc

If you need assistance setting it up, feel free to reach out.

2 Likes