Scripters know how to code with economy in mind. One of their techniques is to control all child prims from a unique central script. The average user don't. He duplicates scripts blindly, some of them dating from the dark ages where 'a script in every prim' was common practice.

I'm building a nice candle. I drop the "flame script" in each of two flame prims. Plus a "smoke script" in the base. Now, I clone my candle 8 times to get a nice chandelier. Tadam! 24 scripts. Uninformed users do terrible things.

Another thing to know is that most properties-setting scripts are useless if the effect is not to change over time. Particles, texture animation, target omega, hover text, sit target, sound loops are persistent properties. The script may be deleted once it has done its job.

So, the 24 scripts in your chandelier are totally useless, unless if you want to switch it on and off, then 1 script is enough. In the end, we see regions with hundreds of useless scripts eating your RAM for nothing. How many "hover text" lurking in these freebies boxes?

Have you ever tried to cleanup such a messy region? That's a daunting task. The viewer beacon don't show scripts in child prims. Top Scripts is helpless. As is the console.

It's time to dive into the database. This PHP script will nicely list all the scripts in a region, showing root coordinates, link number, link name, script name, and a link to the asset. Like this:

http://www.pescadoo.net/tmp/scripts.png

We guess that this Station Tesla thing is poorly scripted. Loging in the region and typing gtp 122 225 38, I can now replace 10 llSetTextureAnim by one unique llSetLinkTextureAnim in the root prim. Same for llLinkParticleSystem and, of course, the ubiquitous llSetLinkPrimitiveParams. We miss a llLinkTargetOmega, though.

Get your regions slim and fast. Happy script safari!

https://github.com/jeff-kelley/opensim-utils


-- Jeff



_______________________________________________
Opensim-users mailing list
[email protected]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users

Reply via email to