Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/virtualw/public_html/Resources/Hosted/Resource.php on line 9
Adding Immersion in Activeworlds: Simple NPCs without Bots
Not a member yet? Register for full benefits!

Username
Password
Adding Immersion in Activeworlds: Simple NPCs without Bots

Silence of the Lands

One of the problems with wandering through a massive persistent world that can be many hundreds of square miles across, is the silence of it. After a while, no matter how beautiful the landscape, how awe-inspiring the view, the sheer bleakness of it all is going to get to you. If you are wandering alone, and have seen no other human participants, then it all starts to feel like dressing for "apocalypse now".

In order for a world to truly come alive, or at least stave off the feelings of isolation, you need to see other signs of life within the environment. Other people or animals going about their daily life, or at least seeming to go about their daily life. Fundamentally, its not about reality, its about the illusion of reality; creating the feel of something being real. After that, if you find out it is real it is a wonderful bonus, but if you don't find that, you are still left with the illusion, and that illusion is enough to stave off loneliness.

Even in a smaller world, maybe a half dozen square miles in total, if you are part of a community of only say, a dozen individuals who are there regularly; as is the case for the majority of Activeworlds private worlds, then you need something to 'fill in the gaps' between meetings with friends, and give purpose to your visits whilst others are not around.

Bots are one potential answer. Crude AI agents, or complex scripting programs, Activeworlds bot programs bolt onto the world, and allow additional interactions. They are given an avatar, and interact with you and others within the world. Only one problem: Each citizen (paid subscriber) of Activeworlds is allowed a limit of three bots total, unless they pay a considerable additional sum for privileges for an additional three for a year. With twelve people sharing a community, that is only thirty-six additional interactive NPCs (non-player characters). This includes store clerks, mundane jobs, gossips, animals, insects, fish, and of course the control bots that manage the world's weather and backup systems.

Clearly, it is just not enough.

Whilst there are more advanced bot systems using complex multi-threading in development at this time to overcome this limitation, there is another way: we can add a basic feeling of thronging crowds to a location without use of bots at all.

Create seq

The powers that be in Activeworlds recently added a new command to the list of build scripts - commands that can be put on any object. That addition was create seq. This allows an avatar to be placed in world, and a sequence command to be placed upon it. The avatar will then play that sequence file, moving the correct joints and limbs, exactly as a human user would do, until they are told to stop, or given a different sequence to play.

create seq sequence [name] [time] [loop]
The create seq command is undocumented in Activeworlds, but despite this, works quite happily. As it is undocumented, optional arguments were discovered through trial and error, It is possible there are more than three optionals, however, most possibilities have been tried and discounted at this time.

sequence

Sequence is the only mandatory variable. It consists of the file name without extension, of the sequence you would like performed. Any movement sequence that can work on any player controlled avatar can also be set for any mindless avatar positioned in the world. It does not have to be a sequence that avatar is normally equipped with either.

During testing, a particularly butch male warrior avatar in full battle regalia, was given the sexywalk sequence belonging to a tavern dancer girl. Much hilarity ensued.

name

The optional name variable, which takes the form of name=*, allows the create seq command to apply to another object other than itself, one which has been set with 'create name *'. This allows the otherwise mindless avatar to change sequences, perhaps becoming more interested in a potential customer as they sterp closer (and activate a hidden bump command) and agitated if they leave (also hitting another hidden bump command).

time

The optional variable time, works a little differently to most Activeworlds time variables. In the seq command, the maximum size of time is 1. A time of 1, means to play the entire sequence file through. On the other hand, a time of 0.5 means only the first half of the file will be player, and the avatar will return to normal afterwards. A time of 0.1 means only 10% will be played, and so on.

Time values greater than 1 will be ignored.

It would make more sense to have this capacity to play only a fraction of a sequence file if there was some way of adding in an optional offset from the start of the file - to only play a piece in the middle, for example. There may be an optional variable for that. However, extensive testing of possible aliases for such a command, turned up empty.

It is worth noting that the loop variable will not work if the time variable is present.

loop

The optional variable loop, does exactly what it suggests. It causes the sequence file to loop over and over again, creating continuous walking, swimming, arguing, dancing, or whatever else was intended, until another command overrides it.

It is worth noting that the loop variable will not work if the time variable is present.

Putting it into the world

Now that we have the basics down, to create a simple demonstration simple illusionary NPC, simply load the avatar file as a normal object.

If you are unsure how to do this, refer to your avatar.dat file. This contains the file names of each of the avatars for the world. Please note an avatar may be present without being in this file, or you may have an incomplete file.

Taken from a generic avatars data file, we find entries that look like this.

avatar
name=Chow-Lee
geometry=avm_nat_lee.rwx
autowalk
beginimp
walk=qwalkf2
wait=qblink
endwait=qendwait

endimp
beginexp
Turn_Around=g_turn
Wave=qwave
Jump=qjump
Spin=qspin
Yes=qyes
Egyptian=qegyptian
Karate=qfightm
Kick=qfightf

endexp
endavatar

See the line 'geometry='? The letters after this, are the file name of the avatar to call it up as a model.

So putting avm_nat_lee as the model name in the build box should work. If not, ../avatars/ avm_nat_lee will. (Neither will work if this particular avatar is not in your world, so choose one the world does have).

The second option being used if the hosting server is not set up to look in both /models and /avatars by default. If it is not, either contact your host, or just use the second method.

There are other lines above that are italicised. These are sequence files. They tell the avatar what sequence file to call up for what button press on a human controlled avatar. For our purposes, they are a great way to find out what sequences are available in the world to use.

Conclusions

This is a very basic way to infuse life into a world. There are other methods, beyond the scope of this article, for adding increased interactivity. However, even the sight of other 'people' moving around, doing things, conversing with one another, takes away much of the loneliness, the emptiness of the world.

Even a simple market scene with two avatars - an angry vendor and an apologetic customer, standing over a smashed vase laying on the floor, or a boat skipper who waves to you if you get too close to the boat, adds so much to the character of a world.

*Note: for something like the skipper, you would require an invisible, solid off disk, moving with the boat, set to 'bump seq qwave name= skipper', so it triggered as you passed through it. The skipper avatar would have 'create name skipper' on it, to complete the effect.

Staff Comments

 


.
Untitled Document .