Release v1.45.0 - Bot tokens

The main feature of this release has required a lot of effort to implement, but few will see the immediate use for it. But it is a necessary step forward. Let’s welcome bot tokens! :robot:

Features

Bot tokens

(Only available for supporter and pioneer accounts)

Bot tokens are random text strings that can be issued for any of your characters. These tokens are then used as authentication when connecting to the API with a script to control the character.

To issue a bot token, go to Character Settings (click the cog-icon for the character on the Character Select page). A new section, Bot token, lets you issue, delete, and copy (to clipboard) tokens:

image

Once a token is issued, it can be used as authentication towards the API:

Authentication and say example using node.js
import ResClient from 'resclient';

// ResClient is used to connect to the server's Resgate based API.
// The mucklet test server can be used for bot development.
let client = new ResClient('wss://api.test.mucklet.com');

// Configure client to authenticate using the issued bot token
client.setOnConnect(client => client.authenticate('auth', 'authenticateBot', {
	token: 'OMUGQPU5A5JX3OUPO74TIE2UJO5H7BOU',
}));

// Connect to the API to:
//   1) get the bot model
//   2) control the bot character
//   3) wake up the character
//   4) say "Hello" to the room
//   5) sleep and release control of the character
client.call('core', 'getBot')
	.then(bot => bot.call('controlChar'))
	.then(char => char.call('wakeup')
		.then(() => char.call('say', { msg: "Hello!" }))
		.then(() => char.call('release'))
	);

Note

The above example is simplified, untested, and doesn’t handle any errors.

For more information on scripting bots, see the Bot scripting guide.

Creating a bot token for a character will not change the character in any way. It can still be played as any ordinary character. However, while the character is controlled by a bot script, it will get a blue name in the Awake and In room lists:

awake-bot

And it will have the active status set to Bot in the About character dialog:

about-bot

Once controlled, a player may manually put a bot to sleep using the Sleep button in the Character Select page:
sleep-bot

Some additional notes about bots:

  • Bots are not subject to command flooding errors
  • Bots cannot access any player-level information (eg. account info, notes, watch list, mail, etc.)
  • Bots cannot execute player-level commands (eg. createChar, deleteChar, etc.)
  • Bot access will be instantly revoked on token deletion
  • Characters cannot be controlled by a bot script and a player simultaneously

Github issue #41 - Bot tokens

Improvements

Scrollable About Character dialog

The content of the About character dialog (opened by clicking a character in the Awake list) has been made scrollable. Previously, long About descriptions, and a large amount of tags would not be shown well on smaller screens. But now, the About info and the tags will all be part of a single scrollable content section.

GitHub issue #28 - Overflowing dialogs not scrollable
GitHub issue #29 - Show all About in About Character dialog
GitHub issue #42 - SimpleBar for Dialog

Help supporter topic

(Only available for supporter accounts)
The supporter role now has a working help topic. See:

help supporter

GitHub issue #39 - Help supporter topic

No object characters rule

A new rules has been added to the help rules topic:

No object characters
Characters representing objects or props without personality are not allowed. Bot scripts are exempted from this rule.

Object characters tends to dampen roleplay, and has often been used to listen in on rooms without contributing to them. But it is still allowed to use bot scripts to create interactive objects such a jukebox that can play music, or a jail cell camera that records what goes on in the room, replaying it in a different monitoring room.

GitHub issue #45 - No object characters rule

Fixes

Deleted characters in Watch list
Deleted characters did not dissappear from the Watch list. This has been fixed (again).
Thanks to @Scarlet_Himari for reporting the bug in this topic!
GitHub issue #33 - Deleted characters in Watch list

Administration

Copy ID menu item (moderators)
Moderators can copy character IDs from chat logs and reports. This is to simplify moderation when dealing with characters using strange letters in their name, or characters prone to changing their names.
copy_id_chat_log copy_id_reports
GitHub issue #34 - Moderator: Copy char ID

Undelete character (admins)
Admins now has a dialog allowing them to undelete characters, and optionally to rename them, and to transfer them to a new room and a new user account.
GitHub issue #35 - Admin: Undelete character

1 Like