AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Getting list of compiled and active bots on multi bot server.
 
 

I was looking for a system variable that had this set.  I see there is a system variable that lists the currently active bot but nothing that lists out the available bots.

My use case is a video game with multiple NPC ( non-player characters ) serviced by chatscript.  I have a multiple bot chatscript server working and connecting with my video game, but don’t want to hard code the list of available characters to chat with all the time.  I want to be able to develop new characters in chatscript, reload the server to bring them online, and have my game detect the change and open them up for chatting.  ( currently there are no in game avatars for the npc’s that need to be developed along with the conversational aspect, so this kind of fluidity is desirable.  i.e. there are not game elements that need to be constructed for each new character )

With a system variable I could write a control topic to respond to a ‘bot list’ query, maybe even oob.  The overall chat system in game could periodically check for new bots using that command and update it’s list dynamically.

 

 
  [ # 1 ]

Given you are changing the script and reloading it, what is wrong with defining a concept with the list of bots you are supporting?

 

 
  [ # 2 ]

When you define bots via outputmacros, CS has NO idea they are bots. And those routines ONLY get executed when you name a bot to input. So CS has no real notion you have different bots. But your concept can do that easily

 

 
  [ # 3 ]

Thanks a lot Bruce, now that I think a bit more on it I get that CS has no internal notion of bots.  smile  I was confused by the %bot system variable, figured it indicated CS knew the concept of bots.  But upon further reflection I realize the bot construct is created by the control scripts, as far as chatscript is concerned it’s just another output macro. 

My use case arises from the fact that eventually I may be generating characters from higher lvl markup or via a character gen tool open to other users, but if I just have a topic that I update with generation that will work.

Your suggestion of using concepts intrigues me but I’m missing some basic understanding I think (read the manual, still confused).  I can imagine creating a bot who’s sole purpose is to give me information about the server and bots on the server, then simply asking that bot questions normally via my game chatscript client.  How would using concepts work?

 

 
  [ # 4 ]

Ah, you could build up a concept with ‘concept: ~bots MORE (thisbotsname)’ in each bot’s control script.


How would you print the list of bots out when queried then?  I couldn’t for the life of me figure that part out.

 

 
  [ # 5 ]

Bingo - Leave me to my own devices long enough I answer my own questions.  lol.

loop ()
    
{
     
^iterator(? member ~bots)
   

so basically you have each bot add itself to the concept in the control script using MORE and then have a responder that returns that concept as a list using the above code. 

....

$userprompt = ^"%user: >"
$botprompt = ^"Joe: "

tabledefaultbot (^name)
^
createfact(^name defaultbot defaultbot)
DATA:
joe

concept
:  ~bots MORE (Joe)

topic: ~control system ()

.... 

and

u: (-botlist
 
loop () # unload every resource on board
    
{
     
^iterator(? member ~bots)
   

Chatscript is too powerful Bruce, the main problem is figuring out how to do stuff, there is always a way hidden in there somewhere.

 

 
  login or register to react