Free animation overrider tuned for OpenSim

AOs — Animation Over-riders — are popular scripted items in Second Life and OpenSim that replace the built-in system animations for walking, running, sitting, and other basic motions, but they usually bog down servers.

I have written a drop-in replacement script that uses a feature of OpenSim to make these items much more gentle on the servers. It is free, based on an old script given out under the GNU General Public License. The more people who upgrade to this, the better everyone’s experience will be at crowded events.

The older AOs are HUDs — Heads Up Displays — that you wear on your viewer. They override all the default animations that make your avatar walk, stand, sit and fidget. For a very basic introduction to AOs, listen to what Torley Linden has to say about them in the video below.

But there is an ugly dark secret in these AO scripts: There is no way in Second Life for a script to get notified when it is time to change animations. To solve this, AO scripts poll the system over and over and over. It is like having your little sister in the back seat saying, “Are we there yet? Are we there yet?” All day long.

Your little sister may be annoying but what this means in OpenSim is your server is being asked “Are we sitting yet?” all day long, hundreds of times a minute. This puts a huge load on your server, using up CPU cycles and lagging the region. Imagine there are 30 copies of your little sister in the back seat, each shouting “Are we sitting yet?” ten times a second. This is what your poor overworked server is dealing with.

The correct solution to this problem is for everyone to learn to use the AO built into their viewer instead of wearing a scripted one.

Watch the video below to learn how.

Unfortunately people get used to the tools they have, so many people continue to use the old fashioned wearable AOs that bog down the servers.

In 2009, the developers of OpenSimulator added an improvement that should have solved the lag problem of scripted AOs. They added a new event, Changed_Animation, that is sent to scripts whenever the server changes the avatar’s animation. This only works on OpenSim and not in Second Life. Now a new AO can be written that doesn’t need to poll.

But unfortunately, people continue to use 13-year-old scripts from Second Life. In a survey of a dozen or so AOs available for free around the metaverse, all the ones I found used the same free open source Zhao script from 2007 — that even includes many for sale in the Kitely Market. This script is actually very well written, it just suffers from the limitations that Second Life never fixed and OpenSim fixed after Zhao was written.

This script is given away free under the GNU General Public License. I took a copy of Zhao and modified it to work well under OpenSim by using the new event. In the spirit of GNU and open-source software I am giving away this new version. If you have an AO that you like, you can get a copy of my script, replace the one in your AO, then it will work exactly as before — except it will be gentle on the servers.

I named my version of the script Khaos. K for Kayaker and the S on the end because I like pronouncing it like “chaos.”

Here is a web page that has links to a bunch of places around the metaverse where you can get free copies of Khaos. I set out just the script in a box, popular ready-to-wear male and female AOs already upgraded. Included on the web page are instructions, pictures and a video showing how to upgrade your existing AOs several different ways.

You can use my script in animation products that you sell, following the guidelines of the GNU General Public License. Take copies of the ones I’m setting out, give them away to your friends and set them out for free at all your events.

Will this help? I worry that it will not. In another 13 years, I fear we will still find people showing up with a 26-year-old Zhao script bogging down our servers.

Unless, of course, we are all running on quantum computers embedded in the ice on Pluto.

So I took a radical step and wrote a patch to OpenSim that detects scripts that act like bad AOs and disables them. If you have the ability to build your own OpenSim executables from the sources, my patch is available at the web site above.

Latest posts by Mike Higgins (see all)