add_bot_chat - ryzom/ryzomcore GitHub Wiki


title: Add Bot Chat description: Add an entry to the NPC botchat menu published: true date: 2026-03-14T00:00:00.000Z tags: editor: markdown dateCreated: 2023-03-16T22:21:19.803Z

addBotChat

The addBotChat native AI script function adds an entry to the botchat (contextual interaction) menu of every bot in the group. The entry format follows the same syntax as the bot_chat_parameters property in World Editor primitives.

After adding entries, the updated chat profile is automatically sent to EGS to sync with connected clients.

Syntax

()addBotChat(entry: s)

Arguments

  • entry (string): A botchat entry string. The format depends on the type of entry being added.

Entry Formats

The entry string is parsed by the same system that handles bot_chat_parameters in World Editor. Common formats:

Format Description
shop:CATEGORY_NAME Add a shop with the specified category (defined in shop_category.cfg)
item:sheet_id quality [price] Add a specific item for sale
mission:MISSION_NAME Add a mission offering
web:MENU_TEXT url Add a web page link
menu:MENU_ID RESPONSE_ID Add an informational menu entry with a text response

The menu and web text identifiers reference translation phrase IDs defined in the leveldesign translation files.

Example

// Add a shop to the NPC
()addBotChat("shop:FYROS_WEAPON");

// Add a web link
()addBotChat("web:MENU_RING_ENTRY ring_access_point=1");

// Add an informational menu entry
()addBotChat("menu:MENU_WHOAMI WHOAMI_GUARD");

Notes

  • Entries are added to all bots in the group.
  • If a bot doesn't have a chat profile yet, one is created automatically.
  • Call clearBotChat first if you want to replace the existing entries rather than append to them.
  • The chat profile update is sent to EGS immediately after adding the entry.

See also

  • clearBotChat - Remove all botchat entries
  • setUrl - Set a URL action on the NPC (alternative to web: entries)
  • talkTo - Add a Ring-style talk interaction

Source: ryzom/server/src/ai_service/nf_grp_npc.cpp (addBotChat_s_)

⚠️ **GitHub.com Fallback** ⚠️