Quick progress report, not that I imagine anybody is waiting with bated breath,lol.
The bot can load a costume file, compute its hash,and save the resulting <Costume> stanza as a costume.xml file. I'm on the fence about whether this is a value add or not, but it does mean the bot can easily implement a costume cache if that becomes a useful thing to do.
The bot defaults to "reasonable initial values" for costume, zone, etc...; things that will be made configurable at some point. At startup, it reads a copy of zone.cfg and creates a mapping of chat room names to map files.
It initially joins Atlas Park (heh) as a "reasonable default", along with Paragon Chat.
When it joins any room, it grabs the name of the room and compares it to its list of zones. If the room name matches one of them, then it:
- Joins the appropriate metadata room
- Initializes a new presence stanza for that room
- Copies the default costume record to an array of costumes by zone chat room (so, a dict in Pythonese or an associative array anywhere else)
- Set's the costume attribute and loads up the new presence stanza with the <pc> and <character> stanzas, then saves the completed presence stanza in another dict keyed on zone chatroom name
- Sends the presence
When it leaves a chat room that matches a zone name, it also leaves the metadata room and it deletes the associated presence and costume stanzas.
So far, so good
Next steps -
Initialize the starting point on a per zone basis. This is a bit sticky as far as "reasonable default" values go. I might have to visit all of the zones and build a database of "default" locations for each one. Once I have that, then I'll have another mapping similar to the costume and presence mappings that hold a location+orientation per zone. (Eventually all of these individual bits will be normalized into a single record but for now the individual bits are easier to work with.)
Once the bot knows where it is in any given zone, then we start broadcasting <U> stanzas. Motion is a stretch goal here, so that will come later. I'll have to experiment with the polling routines I've got easily available but I'm thinking to emulate Paragon Chat - Watch for a presence change, advertise location, wait a semi-random amount of time, then check again.
Finally, setup handlers for the costume and bio IQ stanzas and reply to them as triggered.
The result of all of this is that the bot won't be a single avatar. It will be an avatar in every zone it joins, capable of carrying on conversations with multiple people at the same time. How that works out from a performance standpoint remains to be seen. However, at a bare minimum, the bot becomes a kind of "NPC Dispatcher". Without needing to move at all, it could greet a player as NPC A in Atlas Park, then as NPC B in Perez Park, then as NPC C in Galaxy City, all the while tracking the progress of the player from A to B to C and back again, while having all three avatars appearing to be in the game at the same time.
Voila. Quest chain.
How to use that creatively within the current constraints of interaction is a different matter, but the basics will be there.
The bot could potentially communicate with a website that records the player's activities and keeps a kind of "quest scoreboard" with the player's achievements recorded for everyone to see. It's not "inf" but it's a cookie for completing a "mission".
Anyway, that's where I'm heading with this. Motion is obviously an important stretch goal but it's still a stretch goal and I'm happy to let Arcana lead the way on the stuff that is undoubtedly going to get mathy pretty quickly.
The interesting thing to me here is that the bot is not an avatar or an NPC; it's the brain behind a stable of NPC's. How big a stable is difficult to guess at this point. Once it can carry on a conversation with one person, we'll see how well it does with multiple simultaneous conversations.
***EDIT***
One of the associated goals is to build a database of "points of interest". That is, a database of zones and locations labeled and possibly with a description. The goal would be to command the bot "!teleport Icon" and have it move the avatar for the current zone (whatever "current zone" means) to the front step of the local Icon store. Likewise, "!teleport Icon Steel Canyon" would lookup the avatar in that zone, add one if none existed, and place it in the appropriate spot.