Jump to content

Sim Prim Count


Rolig Loon
 Share

You are about to reply to a thread that has been inactive for 3999 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Here's another handy scripted tool for sim owners (or anyone who cares about such things).  If you want to know how many prims are on your sim and which parcels they're on, it's not as easy as it ought to be.  You have to open About Land for each parcel and keep a running total of parcel prim counts on a sheet of paper.  Now, this simple script does it for you.  Drop it in a prim and touch it.

//Sim Prim Scanner -- Rolig Loon -- July 2012 

// I find that a 0.5m white sphere makes a nice container for this scanner script,
// but anything will do. It's just that the particle glow looks nice on that
// sphere. Your choice.
list gPrclID; // List of unique parcel UUIDs integer gTotPrims; // Total prims detected float gX; // X coordinate of curren scan target float gY; // Y coordinate of current scan target string gObjName; // This scanner's name integer gNUM; // Sequence number of unique parcels scans default { state_entry() { llSetColor(<1.0,1.0,1.0>,ALL_SIDES); gPrclID = []; gTotPrims = 0; // Start scan in the SW corner of the sim gX = 4.0; gY = 4.0; } on_rez(integer start) { llSetPos(llGetPos() + <0.0,0.0,0.5>); llSetText("Touch to start scan",<1.0,1.0,0.0>,1.0); } touch_start(integer total_number) { llSetText("Scanning ....",<1.0,1.0,0.0>,1.0); // Cheesy visiual effects ........ llSetColor(<1.0,1.0,0.0>,ALL_SIDES); llParticleSystem([ PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE, 0), PSYS_PART_START_SCALE, <0.02, 0.02, FALSE>, PSYS_PART_END_SCALE, <3.0, 3.0, FALSE>, PSYS_PART_START_COLOR, <1.00,1.00,0.00>, PSYS_PART_END_COLOR, <1.00,1.00,0.00>, PSYS_PART_START_ALPHA, (float) .5, PSYS_PART_END_ALPHA, (float) 0.0, PSYS_SRC_BURST_PART_COUNT, (integer) 1, PSYS_SRC_BURST_RATE, (float) 0.05, PSYS_PART_MAX_AGE, (float) 0.75, PSYS_SRC_PATTERN, (integer) 1, PSYS_PART_FLAGS, (integer) ( 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_EMISSIVE_MASK | PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_TARGET_POS_MASK )]); gObjName = llGetObjectName(); gNUM = 0; llRegionSayTo(llGetOwner(),0,"Scan started on " + llGetRegionName()); llSetTimerEvent(0.1); } timer() { list parcel = llGetParcelDetails(<gX,gY,100.0>,[PARCEL_DETAILS_ID,PARCEL_DETAILS_NAME]); key temp = llList2Key(parcel,0); // The parcel's UUID string parcel_name = llList2String(parcel,1); // The parcel's name if (parcel_name == "") { parcel_name = "(no name)"; } if (!~llListFindList(gPrclID,[temp])) // Have we scanned this parcel before? If not ... { ++gNUM; llSetObjectName((string)gNUM); integer Count = llGetParcelPrimCount(<gX,gY,100>,PARCEL_COUNT_TOTAL,FALSE); gTotPrims += Count; llRegionSayTo(llGetOwner(),0, "/me "+ parcel_name + " @ <"+(string)gX+","+(string)gY+",Z> = " + (string)Count); gPrclID += [temp]; } if (gX < 256.0) // Increment X but don't let X go outside the sim borders { gX +=8.0; } if (gX > 256.0) // If it does, reset X and increment Y { gY += 8.0; gX = 4.0; } if (gY > 256.0) // Don't let Y go outside the sim boders. If it does, wrap up the scan .... { llSetObjectName(gObjName); llRegionSayTo(llGetOwner(),0,"Scan finished. Total Prims = " + (string)gTotPrims + " in " + (string)llGetListLength(gPrclID) + " parcels (not counting temp rez prims)."); llParticleSystem([]); llSetText("Touch to start scan",<1.0,1.0,0.0>,1.0); llResetScript(); } } }

 

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...

Either:

1. Open the Contents tab in Edit, click New Script, and cut&paste this script in place of the one that's generated automatically, or

2. Open you inventory, click the "+" button at the bottom and select "New Script".  Then open it and paste this script in.  Drag & drop the compiled script into the Contents tab of your prim.

It takes 4.38 sq m to support 1 prim, so 4.38 x 600 = 2628 Sq m.  That's more than the 2048 tier,  so if you're buying, anything up to 4096 sq m will cost you the same as 2628 sq m will.  Go for 4096 @ $25/month.  If you're renting on a private sim, you may be able to rent something less than 1/16 of a sim for a lower rate.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 4 months later...
  • 1 month later...

Thanks Roliig.  Really nice tool.  I made some small changes to get a list of parcels and their areas.

A tiny issue.  The region where I live has some 4 meter wide parcels.  Some people abandoned a 4 meter strip a land on the edge of the region for instance. I changed the starting location to of gX and gY to 3.0 to catch those.  Also changed the increments to 4.0 rather than 8.0.  Of course it's 4 times the churning so I'm not sure who would want to bother.

edit: I really don't know if the first square meter is 0,0 or 1,1 ... me runs off to take a look.

Link to comment
Share on other sites

Yeah, I have made a few minor enhancements to the one I use myself too.  Everyone has a different set of "special" conditions.  I figured that the generic version didn't need to churn quite as much as 4m at a pop.  If you're patient and don't mind a lot of dead time while it plods along, though, go for it.  I'm glad it works for you, Qwalyphi.

Link to comment
Share on other sites

  • 2 weeks later...
You are about to reply to a thread that has been inactive for 3999 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...