Magsbot Class, Session 1
Saturday February 25, 2006 6pm VRT
Magine:
good afternoon everyone :)
PeLican: hi Magine
[Mags]: how's everyone?
Sylsea: Hi Magine
[Opie]: ok
Sylsea: still sleep *smiles*
Sylsea: Opie?? is that you?
[Opie]: aunt bea?
Sylsea: LOL
Magine: (to [Mags]) who all
[Mags]: I see PeLican, Guri Lady,
[Gardener], Sylsea, [Hervey], [Opie], Magine, Keshi, [Mags]...and of
[Mags]: course, Mags.
Magine: maybe we should step over to
the patio, it's a more pleasant atmosphere than the front gate here
Sylsea: ok
Magine: just follow the path back
past the tower
PeLican: sorry sylsea
Magine: let me, is everyone here
yet?
Sylsea: quite all right Pelican,
glad you made it back
Keshi: have no idea
where Chanes is
PeLican: hee..im a
moron..didnt see the VRT
PeLican: hi keshi
Keshi: jarvis
Sylsea: hi Keshi
Keshi: Ah hi
there is my bot
Sylsea: :-)
Keshi: hello Pelican
PeLican: hi
Magine: well i guess we can start
PeLican: :0
PeLican: :)
PeLican: rather
Magine: so, everyone have the
latest version installed?
Magine: (to [Opie]) version
[Opie]: Magsbot 6.8.16 - AW SDK
Build 41 - Bot Bone Build 14
PeLican: yes
Keshi: yep
Sylsea: yes
Magine: ok, cool
Magine: so today we are just
going to talk about basics, how to use the basic features
Magine: did anyone have any
problems installing? did you call create separate project folders?
Magine: *all
PeLican: yep
Keshi: the only
problem i have is it tends to not save the instance and settings
even if i save all
Sylsea: yes
Keshi: Javis stay
Magine: doesn't save the name,
location and so forth, keshi?
Keshi: no
Keshi: that is why i lost
him when i got here
Magine: look at the menu,
"File/Configuration/Auto Save configuration on close"
Keshi: it is checked
Magine: ok
Magine: is "File/save full paths"
checked? (usually should not be)(
Keshi: it is now
Magine: well uncheck it :D
Keshi: but shouldnot be
Keshi: is done
Magine: ok
Magine: also, click
"Connection/Set default for new instances..."
Keshi: and has
auto save on close for variables
Magine: good
Keshi: ok
Magine: the "Connection/Set
default for new instances..." is where you would put your name and ppw
Keshi: yes
Keshi: that is done
Magine: so with all that set,
then it should remember the name, world and location of the last
instance
Keshi: thank you
Draco.: what if you close mags
during a universe disconnect?
[Hervey]: test
Magine: well if the program
itself crashes then it obviously won't be able to save settings
Magine: which is why you would
click the "File/Save configuration" manually if you set things up the
way you want them
Draco.: that may have been what
happened to Keshi
Draco.: are so many of them
Magine: so many disconnections?
Draco.: yes... seems almost daily
at times
Magine: i've noticed that too,
but it seems to depend on the server too
Draco.: yes
Magine: sometimes i think my ISP
disconnects me daily to prevent me from running servers :P
Draco.: hehe
Keshi: heehee
Sylsea: hehe
Magine: anyway, i started to
say...under the Options/Connection menu you can see several options for
autostarting

Magine: Autoconnect means
when you start magsbot, it will start up an instance automatically
Magine: AutoEnter and AutoAppear
are usually always left on...they mean that the bot will automatically
enter the world that you specify on the Location panel,
Magine: and automatically appear
at the location specified
Magine: but if you want to run a
bot invisibly, you could uncheck the AutoAppear when you start the bot,
and then it will enter the world but be invisible
Magine: since it won't be at any
particular location
Magine: which would be useful for
chatbots or bots that monitor the world, things like that
Magine: do you all know what
global mode is, btw?
Sylsea: yes
PeLican: yes
Draco.: y
Magine: ok..so you see that is
selected on the start new instance dialog
Magine: now on the
Options/Connect menu there is another item, Restart on Disconnect
Magine: i've sort of changed how
recovery from disconnections works, lately
Magine: it used to be optional,
but now it's always automatic, however that are two methods to choose
from
Magine: if Restart on Disconnect
is UNchecked, the bots just try to recover as best they can by
re-logging in and re-entering the world, etc
Magine: but if Restart on
Disconnect is checked, then when a bot instance gets disconnected, it
will be destroyed and re-created entirely
Magine: which sometimes seems to
work better
Draco.: ohhhh
Magine: so it's probably the
better method
Draco.: but everything in queue
would be lost?
Magine: well not exactly, but
it's possible that the bot instance handle will change, so the messages
queued for that instance won't get to it
Magine: however there isn't
usually that much queued at one time
Magine: should i talk about how
message queueing works?
Sylsea: yes
Draco.: sure :)
PeLican: please
Magine: as you probably know, any
bot communicates with the universe and world servers though the
SDK...the software development kit that AWI provides
Magine: the messages from the
server are called "Events"
Magine: the bot periodically
requests messages from the server,
Magine: the messages signal
events happening in the world, like an avatar arrived or left, someone
said something in chat, somebody moved or gestured
Magine: everything that can occur
in a world, has a message
Magine: when the bot program
receives messages from the server, the SDK calls on functions called
"handlers" that the bot programmer puts in the program
Magine: a different handler
function for each type of message
Magine: now magsbot as it runs,
switches between a "wait phase" in which it gets messages from the
server
Magine: and a "process phase" in
which it responds to those messages
Magine: actually it responds
immediately when it receives the message, but the response initially is
just to put the message information into an "Event queue"
Magine: it waits until the
process phase to actually do anything about the message
Magine: then during the process
phase it will take messages from the queue and send them to the
behavior table, which is the part of magsbot that you can program
yourself to respond to messages
Magine: i hope this makes some
kind of sense to you all :)
PeLican: yes
Sylsea: yes, thanks
Draco.: yes... is quite amazing
that it all works
Keshi: yes was
very well stated i actually followed ot
Keshi: *it
Magine: to summarize, magsbot
gets messages from the server and puts them into a queue during "wait
phase", then takes messages from the queue and sends them to the
behavior table during "process phase"
Magine: these phases are very
short, under a second usually
Magine: you can adjust the timing
using some commands in magsbot
Magine: but we will get to that
later
Magine: do you all have the
monitor bar at the bottom of the magsbot window turned on?
Draco.: y
PeLican: yes
Magine: if not, press ctrl-M
Magine: that toggles it

Magine: the blue light
indicates that magsbot is in wait phase, getting messages
Magine: and the yellow light
indicates that it is processing messages
Magine: if you double-click
on the monitor bar where it says "events/actions" it will show you some
extra information
Sylsea: ahh
PeLican: cool
Magine: you should see 4 more
blinky lights :D and blue and red numbers
Magine: the blue number is the
wait time in milliseconds, the red number is the processing time also
in ms
Magine: there are also some
numbers in black (or maybe only one showing right now)
Magine: that show how many events
are in the event queue
Magine: (the number on top)
PeLican: next to the
"blinky lights"?
Sylsea: I see a 0 next to the
blue one
Magine: and though it probably
doesn't show right now, there is also a number on the bottom that shows
the number of actions in the action queue,which is something different
PeLican: k
Draco.: are two, one in
parenthesis
Magine: right, that 0 means there
are no events in the queue (they are processed so quickly you might
only see it flicker unless the bot is very busy)
Magine: the action queue is a
separate queue that you can send actions to using magsbot commands
Magine: the black numbers on the
bottom show the number of items in the action queue
Magine: just to show you what it
looks like, do this: press F5 and type the following in the window that
appears:
Magine: for i 1 10 { ENQUEUE { qwait
1000; report $str[@i] }}
Magine: that will put some items
into the action queue
PeLican: interesting
Magine: the first number on the
monitor bar at the very bottom to the right of the action queue
progress bar is the number of items,
Magine: and the second number (in
parentheses) is the number of action queues, since there can actually
be several of them
Sylsea: ok
Magine: but anyway....i think we
are getting ahead of ourselves here with non-basic stuff,heheh
Magine: i may be scaring some of
you :D
Sylsea: haha
PeLican: hehe
Magine: let me get back to the
menus and what they do
Draco.: nooo.. this is too cool
Draco.: hehe
Magine: (i know drac but that is
for a later session, heheh)
Sylsea: before you jump back
Magine: i'll try to skip past the
obvious stuff here
Sylsea: let me verify what I saw
after I did that action string
Magine: sure, sylsea, go ahead
Sylsea: I got 1 through 10, a
number on each line
Magine: yes
Sylsea: ok
Sylsea: thanks
Magine: that command i had you
type in, put 10 items in the action queue, and each item was the
command REPORT $str[@i], which simply printed out the value of the
variable @i as a string
Magine: and the QWAIT 1000 made
the queue pause for 1000 ms (i second) between printing each line
Sylsea: ahhh
Keshi: i got no change
but sometime it might work
Magine: keshi, nothing happened
when you typed that in?
Keshi: yep
Magine: you pressed F5 and got
the edit window, right?
Keshi: yes
Keshi: and then ok
Magine: and you typed exactly (or
cut and pasted)
Magine: for i 1 10 { ENQUEUE {
qwait 1000; report $str[@i] }}
Magine: and hit ok...and no
result at all?
Magine: hello?
Keshi: yes ans i did again
Keshi: first cut and
paste then typed it
Magine: and still nothing
happened??
Keshi: no
Draco.: *pokes her bot*
Magine: how about everyone else?
anything?
PeLican: im ok
Draco.: good here
PeLican: is she clicking in
the mags windowfirst for it to get focus before she hits F5?
Magine: keshi, did you see
anything happen on the monitor bar? the Actions progress bar didn't
change? no numbers?
Magine: (to PeLican) she couldn't
type in it without it getting the focus....
Keshi: it all stayed
the same is really odd
Keshi: just the one 0
no change
Magine: at least you did see the
stuff you typed appear in the edit window as you typed it, right?
Keshi: in the F5
window
Magine: yes
Keshi: yes
Magine: well maybe we can figure
it out after class, it's very strange but i don't want to hold up
everything else to debug right now
Keshi: yes lets go on
Magine: let's talk about the
items in the View menu
Magine: the first one displays
the global variables list
Magine: you can also just press
ctrl-f3 for that

Magine: numeric variables
have
names beginning with @ and strings have names beginning with $
Magine: i assume you all know
what i mean by strings?
PeLican: yes
Sylsea: yes
Magine: not sure if that
programming term has become common knowledge to non-programmers but i
assume so :D
Draco.: y
Magine: we will get to the use of
those variables in another session when we get to programming
Magine: however as a practical
example,
Magine: let me show you the
command to add yourself as a controller for your bot
Magine: that's necessary to have
the bot respond to your chat commands
Keshi: giggles
Magine: hopefull this will work
for keshi too :) you press F5 and type
Magine: enlist control
<yourname>
Keshi: i have control
9 times that is what happened
Magine: like
Magine: enlist control magine
Keshi: the window was not
cleared from that
Magine: if your name has any
spaces, then use quotes like
Magine: enlist control "guri lady"
Magine: and then click ok
Magine: everyone done that?
PeLican: yeah
Sylsea: yes
Magine: you will see if you still
have the variables list window open, that a variable was added withthe
name $control:1 and the value = your name
Magine: keshi, did that work for
you this time?
Sylsea: yes, I see my name there
Magine: ok cool
Magine: let's try something here
for fun....
Keshi: Magine the
problem is that i had the enlist control in the F5 window
when did the other command so now i have 9 instances
of contrl variables for Keshi
Sylsea: however, interestingly,
the chat box has disappeard
Magine: chat box has disappeared?
:O
Sylsea: on the chat tab
PeLican: *steps back
Sylsea: the window is gone
Magine: well first off maybe i
should have said, you need to first delete the other stuff you typed in
the edit window before
Magine: sorry i forgot that
Keshi: Well all
things work now
Magine: whatever is in the edit
window will execute when you click the Ok
Magine: but you have 10 $control
list entries all saying Keshi? :D
Keshi: yes
Keshi: lol
Magine: you can just delete all
but the first one, by selecting them in the variables window and
clicking Delete (one at a time)
Keshi: 9 actually
Sylsea: oh nm magine, I must have
unchecked chat by accident, hitting stuff
Draco.: quick question about
control?
Magine: sure
Draco.: if you want one bot to
control another with chat commands, do you need the botname or only the
persons name whose privs the bot uses?
Magine: the botname
Draco.: ooooohh... ok.. ty
Magine: which could be dangerous
since several bots can have the same name
Sylsea: but the other person can
protect their bot from being controlled?
PeLican: hmm
Magine: so if you want to have a
bot respond to another bot, you would use a different method
Magine: your bot will only
respond to chat commands if the name of the person giving the commands
is in the control list
Sylsea: gotcha
Magine: if everyone has added
themselves as controllers of their bots, say in chat:
Magine: /do say "Hello! My name
is "+$botname
[Mags]: Your wish is my command!
[Mags]: Hello! My name is Mags
[Gardener]: Your wish is my
command!
[Gardener]: Hello! My name is
Gardener
PeLican: /do say "Hello! My
name is "+$botname
[Opie]: Hello! My name is Opie
Keshi: /do say "Hello! My
name is "+$botname
[Jarvis]: Hello! My name is Jarvis
Magine: each person's bot will
respond to theircommand
[Hervey]: Hello, My name is Hervey
Keshi: /do say "Good to
Meet all of you says "+$botname
[Jarvis]: Good to Meet all of you
says Jarvis
Magine: about the variables
window, btw...you don't want to leave it open all the time,
particularly if your bot is real busy, since it will slow things down
[Hervey]: /do say "Hello! My name
is "+$botname
PeLican: ahhh..wont respond
to itself/
Magine: the /do command, btw,
will cause the bot to perform any action in the magsbot command language
Magine: even multiple actions
Sylsea: /do say "Hello! My name
is "+$botname
[Hervey]: Hello! My name is Hervey
Sylsea: was in the wrong chat window
haha
[Jarvis]: Hello! My name is Jarvis
Magine: /do gesture
2;gesture 0;say "whoo hoo!"
[Gardener]: Your wish is my
command!
[Gardener]: whoo hoo!
[Mags]: Your wish is my command!
[Mags]: whoo hoo!
PeLican: /do gesture
2;gesture 0;say "whoo hoo!"
[Opie]: whoo hoo!
Sylsea: /do gesture 2;gesture
0;say "woo hoo!
Magine: mags come
[Mags]: Be right there.
PeLican: /do gesture
2;gesture 0;say "whoo hoo!"
[Opie]: whoo hoo!
Keshi: /do gesture
2;gesture 0;say "whoo hoo!
[Jarvis]: whoo hoo!
Sylsea: /do gesture 2;gesture
0;say "woo hoo!"
[Hervey]: woo hoo!
Magine: mags look sylsea
Magine: you can find a list of
chat commands in the help
Keshi: Jarvis stay
PeLican: Opie look Magine
Keshi: Jarvis look
Draco.
Sylsea: hervey look magine
Magine: here's the list of chat
commands: http://www.turtleflight.com/mbh/mh_quick.htm#control
Sylsea: allriiiight
Keshi: Jarvis look Hervey
Magine: and you can add your own
commands by programming them into the behavior table, which we will get
to in a later session
Magine: to issue a command,
either use your bot's name as the first word of the chat, or put a
slash in front of the command, or whisper it to your bot
Sylsea: ok
Keshi: Jarvis come
Magine: some commands require
that the bot has CT privs
Magine: like the commands to warp
someone to you, etc.
Magine: another item on the View
menu shows you the avatar tracking window
Magine: or you can open that with
ctrl-K too
Magine: that window is
shared by all the bot instances in the same copy of magsbot, and shows
the location of anyone the bots can see
Magine: you can also get that
same information in a magsbot program using the @avz, @avx etc.
functions
Magine: does everyone see the av
tracking window?
Sylsea: but if a bot is invisible
it can't be tracked, right
Magine: sylsea, yes
PeLican: yes
Draco.: y
Magine: there is no way to detect
a bot that has not appeared at any location in the world
Magine: at least that i know of
Magine: maybe some world server
hack could :P
Sylsea: haha
Magine: anyway, for av tracking
to work, you need to have a few things turned on
Keshi: And by
same copy you meant same version mags
Magine: nope, keshi, i meant like
if you had two magsbot programs running at once on your computer
Keshi: ok
Magine: so for av tracking to
work, you should have "Options/Track nearby avatars" checked
PeLican: got it
Magine: and if you also want the
bots to be able to detect when people enter or leave zones,
Magine: you would also have
"Options/Check avatar zone" checked
PeLican: k
Magine: by zones in this case i
am referring to zones that magsbot uses, not zones like the ones in AW
4.1
Draco.: ohh... that reminds me,
can a bot tell what zone IT is in?
Magine: hm, well it could at
least by checking if it's own coords are within a zone
Magine: see http://www.turtleflight.com/mbh/mh_actions.htm#zones
Draco.: yes.. but not with the
regular zone commands?
Magine: and http://www.turtleflight.com/mbh/mh_awfuncs.htm#zones
Magine: and http://www.turtleflight.com/mbh/mh_zones.htm
:D
Magine: but that's programming
stuff we can save for another session
Draco.: ok I hush, hehe
Magine: when we get into
programming, we will also see how you can set each bot instance to
ignore movement that is beyond a certain distance,
Magine: and to discard some
movement events if the bot is getting flooded
Magine: you see, everytime anyone
move or turns or gestures, the bot receives a message from the world
server
Magine: which if you have a lot
of people moving around, can become quite a load on the bot,
particularly a global bot that can see everyone in a world
Magine: so it becomes useful to
filter some of those events
Magine: you can see some debug
information about that on the extra part of the monitor bar
Magine: which i didn't mention
earlier, but you can see where it shows memory being used by the
program (the first number on the right of the status bar that appears
above the monitor bar,when you double-click on Events/Actions)
Magine: it also shows how many
events have been discarded due to flooding, or movement events that
have been filtered, and the bot's detect range (-1 = no limit)
Magine: you all see what i'm
referring to there?
PeLican: yes
Sylsea: yes
Keshi: yes
Magine: the other stuff,
especially on the far right, are mostly for debugging purposes so don't
worry about them right now
Magine: except Recovering shows
how many instances are recovering from a disconnection, when that
happens
Draco.: what causes new instances
to be created during drecovery sometimes?
Magine: if
Options/Connection/Restart on Disconnect is checked, then instances
that disconnect will always be destroyed and restarted
Magine: if that is unchecked,
then instances that disconnect will try to reconnect normally, but
sometimes if you have a lot of instances running, they can get jumbled
up when they all try to reconnect
Draco.: sometimes will be 10 or
more of them when only had 1 originally
Magine: so usually you would
leave Restart on Disconnect checked
Magine: you mean new instances
are added??
Draco.: yes
Magine: have you seen that in
this version of magsbot? or only in earlier versions?
Draco.: not always, but every
once in awhile
Draco.: earlier
Draco.: remember Keshi?
Magine: there were few
versions that didn't do so well, since i've been trying to improve the
disconnect recovery thing, and changing things
Keshi: yep
Draco.: ahh.. ok, we just blame
AW ;)
Magine: i think 6.8.16 is pretty
sound
Magine: especially with Restart
on Disconnect checked
Magine: guess i should do more
alpha testing before i let these go :P
Draco.: is impossible to test
everything
Sylsea: true Draco
Magine: it's kind of hard to test
disconnects since you can't simulate them exactly as they occur
Sylsea: some things just have to
wait for real user use under various circumstances
Keshi: we are thankful for
all that does work stable and know often if it is not
stable youare wokring to better it
Sylsea: yes
Magine: thanks for that :)
Magine: well we've already spent
a couple of hours here today, and didn't really cover as much as i had
hoped.....is there anything basic that anyone would still like me to
mention?
Sylsea: you might clear up a
rumor sort of haha
Magine: ok, shoot
Sylsea: or verify it as fact
Sylsea: that the magsbot can read
whispers?
Magine: nope, no bot can read
whispers
Sylsea: ok thanks
Keshi: oh maybe
some don't know how to dock the bot in the
system tray ?
Magine: to read whispers you
would have to hack the world server somehow, not sure if it could be
done or not
Magine: Window/System Tray menu
item, or just Ctrl-R
Sylsea: anything you want us to
specifically do exercises on for next week that you had hoped to cover
today?
Magine: well just go over the
menu items one by one and see how they work, and if there are any
questions remember to bring them up :)
Sylsea: okies
Magine: also chat commands
Sylsea: k
PeLican: k
PeLican: thanks Magine
Magine: but i think those are
fairly well covered in the help
Draco.: yes thanks!!!
Magine: next time we will go over
some of the buttons on the Actions panel
Sylsea: sounds good
Magine: and basic surveying and
building
Sylsea: excellent
Keshi: oh good
Draco.: hear that Chanes?
Magine: did chanes make it here
today?
Magine: or are you talking to the
log? :)
Keshi: no to the log
Draco.: the log, hee hee
Sylsea: ...am I surrounded by
Arcadians? :-)
PeLican: not I
Keshi: I gave
him a little world he can play bot in
so if he finds the red button he cna do it there LOL
Magine: lol
Sylsea: smart haha
Draco.: yea... he did some no nos
Draco.: lol
Magine: be careful of the
DELETEALLOBJECTS command :D
Draco.: can you spell backup
Magine: one reason not to give
bot privs to anyone you don't trust
Sylsea: side question for you
when class is done
Magine: (to Sylsea) ok
Sylsea: exactly
PeLican: true
Magine: anything else befoire we
adjourn?
Draco.: yes.. have a wonderful
day!
Sylsea: :-)
Magine: thanks :)
Magine: you too, everyone
Keshi: thanks :D
PeLican: thanks
Sylsea: Enjoy the day all, and
thanks Magine
Magine: bye all
Draco.: bye
Magine: see ya next time