[Opensim-users] [Scripting] Scanning regions for scripts

Thomas Ringate tringate at gmail.com
Sat Dec 12 16:57:56 UTC 2015


Jeff,

What is the environment your tool was written for?

I am on OSgrid and tried to use your script and can not make it do anything 
other than give me the message "Region Sanctuary not found".

My region name is "Sanctuary" and it's database is "OS-Sanctuary-Home"

I have edited db_access.php to have the necessary values for the database 
access.

I tried several different changes to this function, but they all return the 
same message when running the tool.

function DatabaseForRegion($region) {
//        return 'opensim';
        return 'OS-Sanctuary-Home';
//        $serverPort = $region['serverHttpPort'];
//        return sprintf ("sim%02d", $serverPort-9000);
    }

I did see a reference to "robust" in the database access so tried using just 
the region database name there, but I suspect that is a table reference.

$query  = "SELECT * FROM robust.regions WHERE regionName='$region';";

Your instructions do not say what environment this tool is for.

Looks like a very nice tool to track down horrible scripts, can it be used 
on OSgrid?

Tom



-----Original Message----- 
From: Jeff Kelley
Sent: Saturday, December 12, 2015 7:31 AM
To: opensim-users at opensimulator.org
Subject: [Opensim-users] [Scripting] Scanning regions for scripts

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
Opensim-users at opensimulator.org
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users 



More information about the Opensim-users mailing list