Many packages let you adjust what they do without touching their code: which resource to gather, how long to wait, a list of names to answer. Those options are the package settings, and the buttons a package adds are its actions. Both are on the bot's Settings tab, and both come from the package the bot is set to play.
Open them
- On the bot's page, click Settings.
- Click Package settings, next to Bot configuration.
The section starts with the package the settings belong to, as name@version, and a Refresh button that reads them again, for example after you changed the bot's package from another tab.
Below come the cards, one for each package of the bot's script that declares at least one setting or action: the package the bot is set to play, and the packages it uses. A card's title shows the package name, its version and a count such as "3 setting(s) · 1 action(s)". The first card is open and the others are closed; click a title to open or close a card. The cards come in no fixed order, so the bot's own package isn't always the first one: check the names.
These are the settings of the package the bot is set to play, whether a script runs or not. You can change them while the bot is stopped: the script uses them at its next start.
The section can also show one of these instead:
| What you see | Why |
|---|---|
| No package selected, with "Settings come from the package a bot plays. Load one from the bot's quick actions, then come back." | The bot isn't set to any package. An inline script has no settings either. See Run a package. |
| "This behavior declares no settings and no actions." | Neither the package nor any package it uses has anything to set. |
| Couldn't read this package's settings, followed by a reason | Asterobot couldn't read the package: it was removed, it's incompatible with your Asterobot, one of its files has an error, or its files changed after it was installed from the marketplace. The text under the title is the exact error. See Package errors. |
The fields
Each field's label, description and default value come from the package. The kind of field depends on the type of the setting:
| Setting | Field |
|---|---|
| On or off | A switch. |
| One value from a fixed list | A dropdown with the choices the package offers. |
| Text | A text box, sometimes with an example in grey. |
| Whole number | A number box whose arrows move by 1. The package can set a minimum, a maximum, and a unit shown in the box, such as seconds. |
| Decimal number | A number box, with the same optional minimum, maximum and unit. |
| List | One row per item, numbered from 0, each with a button to remove it, and Add under the rows. An empty list says "Empty list." All the items have the same type: on or off, text, whole numbers or decimal numbers. |
| Map | One row per entry, with a Key box, the value and a button to remove it, and Add an entry under the rows. An empty map says "No entries." A row whose key is empty is left out. |
A few details save surprises. Clearing a number box doesn't store an empty value: the field keeps the last number you typed. The minimum and maximum only guide the arrows, and Asterobot checks them when you apply. A new list item starts off, empty or at 0, depending on its type.
Apply your changes
What you change stays in the page until you apply it, so a running script never sees a value you're still typing.
- Change one or more fields in a package's card. Not applied appears on the card's title.
- Click Apply, under the fields.
Asterobot checks every value against what the package declares, saves the card for this bot, and passes the new values to the running script if there is one, without restarting it. A notification confirms it with the package name, such as my-harvester settings applied. Whether the script acts on a change right away depends on how its author wrote it.
Reset puts the card back to its saved values. Apply and Reset stay greyed out while nothing has changed. Each card is applied on its own, and none of this goes through Save settings on Bot configuration.
When a value is refused, Couldn't apply the settings appears with the reason, and nothing from the card is saved:
| Reason, for example | What's wrong |
|---|---|
delay: 5 is below the minimum 10 |
The number is under the minimum the package set. |
delay: 900 is above the maximum 600 |
The number is over the maximum. |
count: want a whole number, got 2.5 |
A decimal number in a whole-number setting. |
package "my-harvester" declares no parameter "delay" |
The package changed while the page was open. Click Refresh and try again. |
Where settings are kept
Package settings are saved per bot, under the package's name. Another bot playing the same package has values of its own. A bot keeps its values when its script stops, when Asterobot restarts, and when you switch it to another version of the same package. When a newer version drops a setting or changes its type, the saved value no longer applies and the setting shows the package's default again.
A dependency's card holds that dependency's own settings. On one bot, every package that uses the same dependency shares those values.
Settings in the Add a bot dialog
When you pick a library package on the Behavior / Script tab of Add a bot, its settings appear right under the picker, under Settings, so the bot starts with your values. There's no Apply there and no actions, since the bot doesn't exist yet: Asterobot saves the values right after adding the bot, before connecting it. If that fails, Couldn't apply the settings appears with the package name. The bot is added anyway, with the package's defaults, and you can set the values again on its Settings tab.
Actions
A package's actions are buttons under Actions in its card, each with a lightning bolt. Hover one to read what it does.
An action runs inside the bot's script, so it only works while the bot plays one. Otherwise the buttons are greyed out, and hovering one says "The bot has to be playing a behavior before an action can run."
- Click the action. If it needs values from you, a dialog opens with the action's name as its title and one field per value, filled with the package's defaults every time it opens. Fill them in and click Run, or Cancel.
- Action started appears: the action has been handed to the script.
- When the script is done, a notification gives the action's name followed by finished, or by failed with the error. The name is the one the package uses in its code, which can differ from the button's label. A failure notice stays on screen until you close it.
A failed action doesn't stop the script: the bot keeps playing.
When an action can't be handed to the script at all, Couldn't start the action appears with the reason:
| Reason | What happened |
|---|---|
no behavior is running on this bot |
The script stopped before you clicked. |
the running behavior declares no action "<action>" on package "<package>" |
The script that runs isn't the one this page describes: an inline script, or a version that was running before you switched. Click Stop, then Play. |
| The value's name followed by a reason | A value from the dialog was refused, for the same reasons as settings. |
If you write packages, Declare settings, Read settings and Declare actions explain the other side.
Where to go next
- Update packages
- Bot settings, for the Bot configuration section of the same tab