Neighbor restrictions
The neighbor restrictions of a citizen, tourist, or bot may limit the events an avatar receives to those originating from a certain subset of users within a world.
Events governed by neighbor restrictions
The following SDK events are limited by neighbor restrictions:
- AW_EVENT_AVATAR_ADD
- AW_EVENT_AVATAR_CHANGE
- AW_EVENT_AVATAR_CLICK
- AW_EVENT_AVATAR_DELETE
- AW_EVENT_CHAT (1)
- AW_EVENT_OBJECT_CLICK
- AW_EVENT_OBJECT_BUMP
- AW_EVENT_OBJECT_SELECT
- AW_EVENT_ENTITY_ADD
- AW_EVENT_ENTITY_CHANGE
- AW_EVENT_ENTITY_DELETE
- AW_EVENT_ENTITY_RIDER_ADD
- AW_EVENT_ENTITY_RIDER_CHANGE
- AW_EVENT_ENTITY_RIDER_DELETE
(1) Whispers received by this event are handled differently than public chat and are still restricted in global mode.
Visible range
The visible range of a citizen, tourist, or bot is the furthest extent at which events can received for actions taken by other avatars. Activeworlds users commonly refer to this concept as the hearing range or chat range of an avatar, because whether chat is heard by an avatar is determined, in part, by whether the two avatars are within each other's visible ranges. By default, this range is a 400 by 400 by 400 meter cube centered on the avatar, although the option can be customized to be any size, depending on the world.
It is possible to change the volume of this cube by adding neighbor_range=<centimeters> to the [misc] section in the worlds.ini file of a world server. The default value of the attribute is 20000, corresponding to the number of centimeters for one half of one edge of the cube.
Chat limits
When many avatars are present within visible range, events received by those avatars are further limited. By default, when there are more than 50 avatars present within range, the world server will stop sending AW_EVENT_CHAT events for any avatar further away than the 50 closest. However, chat events from a public speaker within visible range will be received regardless of whether the public speaker is within the 50 closest avatars.
The only event affected by this limit is AW_EVENT_CHAT. AW_EVENT_AVATAR_ADD, AW_EVENT_AVATAR_CHANGE, and AW_EVENT_AVATAR_DELETE are received as normal, provided the avatar in question is within visible range.
Similar to the visible range, it is possible to change this limit by adding neighbor_limit=<avatars> to the [misc] section in the worlds.ini file of a world server. The default value, of course, is 50 avatars as the limit. If there are more than 50 avatars within hearing range of the bot, chat events for only the 50 closest will be triggered, unless the chat originates from a public speaker. It is possible to change this 50-avatar limit by adding neighbor_limit=<avatars> to the [misc] section in the worlds.ini file of a world server.
Whispering and the Activeworlds browser
The Activeworlds browser handles these restrictions by removing restricted names from the whisper list, and causing the avatar to disappear from view. Both users of the browser and bots may not issue whispers to anyone outside the visible range or outside the set number of closest avatars. However, public speakers may be whispered to even if they are located outside the limited number of closest avatars, provided they are within the visible range of the user or bot.
Whispering is one exception to events a bot can receive while in global mode. In order to receive whispers, unlike all other events, a global mode bot must call aw_state_change, and be subject to the non-global mode restrictions like any other avatar.
How to change the Neighbor Range and Limit
The world server can be modified to allow shorter or larger neighbor range. All worlds hosted by this world server are affected. It is possible to define in section [misc] neighbor_range=20000 (in centimeters, e.g. for 200 meters range). Another settings worth to mention in this context is [misc] neighbor_limit=50, allows you to change the simultanious visible neighbor avatars within the given range.
Global mode
Bots in global mode will receive events governed by neighbor restrictions regardless of where a user is located within a world. These bots are not restricted by avatars' location, whether any user or the bot is a public speaker, or by the number of avatars in the world. Furthermore, if a bot calls aw_state_change in addition to entering a world in global mode, events are not duplicated even if avatars are in close proximity to the bot's physical location.