Philip P. Ide

Author, programmer, science enthusiast, half-wit.
Life is sweet. Have you tasted it lately?

User Tools

Site Tools


blog:opensim:cortex_ai:guildwrangler

Actors Guild Wrangler

Actors Guild Wranger

Until such time as OpenSimulator (vanilla version) allows NPCs to choose which group tag they use (Zeta Worlds has done this), then it is necessary to use multiple controllers in a single region, so the NPCs can be set to different groups.

Yuk, creating a group for each tag you want, when a single group can create as many tags as you like. Hmmm.

Each actor, though, may have friends and acquaintances that are handled by a different controller. In order to facilitate voiced conversations between actors, it is necessary for the 'listener' object of one actor to send messages to the listener of another actor in order to puppet them. Yup, NPCs puppeteering other NPCs. Whatever next!

The only object that knows the UUID of a particular actor's listener (apart from the listener itself) is the controller that manages that actor.

Finding a solution

One way to do this is to have the controllers listen on a channel and allow an NPC (or rather, their listener) to request the UUID for the listener of a particular actor. The controller managing that actor will respond, all the other controllers will ignore the request.

The problem with this is that the controllers can get busy, and handling information requests that in all likelihood are not intended for them is just adding to that workload unnecessarily.

I opted for a simple solution, in the form of the computer you can see in the image at the top of the article. This is the Actors Guild Wrangler. When a controller has spawned an actor and has determined the UUID of its listener, it will, naturally enough, record that information for its own use. However, as it does this it also sends a message on the AGW input channel. This is the only object listening on that channel, and it only accepts three types of request:

  1. set - record the UUID for a listener and associate it with an actor
  2. unset - discard an actor record, called when an actor is despawned
  3. req - return the UUID associated with a named actor

A req message response is sent direct to the requesting listener via a dataserver event.

In the lower left corner of the computer screen you'll see a number. This identifies how many actors the AGW is currently wrangling.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

Discussion

Enter your comment:
C᠎ M E Y G
 
blog/opensim/cortex_ai/guildwrangler.txt · Last modified: by Phil Ide

Except where otherwise noted, content on this wiki is licensed under the following license: Copyright © Phil Ide
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki