Jump to content

Looking for 2 scripts and a bit of advise please!


iCade
 Share

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

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

Recommended Posts

Good day everyone, first off please excuse me for maybe requesting something I should have found on my own, but my search kung-fu isn't up to par and while I did find some scripts coming close they weren't exactly what I was hoping for!

I am looking for 2 scripts:

1) Pose Menu script. I have the furniture, I have the poses, now I would like to make both work together. I did find some of them, but they were rezzing poseballs. I am not using couple animations (yet), just single poses, so I would love a scipt that doesn't rez poseballs. You simply sit on the chair, and by clicking on it a menu pops up letting you choose an animation. I am looking for a script that uses as little resources as possible!

2) I am looking for a simple texture change menu for furniture to change fabrics in a seat from a linen texture, to wool, to wicker and so on. I would like this to come with a menu, the one I found cycled through the textures without giving a menu. Pre-caching would be nice unless it takes up a lot of resources?

I would like to create low prim furniture and decoration that use as little KB size as possible. Any information on how to keep the KB size as low as possible would be madly appreciated.

For example, I have couches with lovely poses that use about 640KB...yet I have seen couches that have less poses but use a mindboggling 2000KB+. My question, how can I prevent this?

Thank you kindly for reading this, I will continue my search in the marketplace and libraries, if I do find what I am looking for on my own I will edit this post to save anyone the trouble of answering. Have a great East Monday!

Link to comment
Share on other sites

Thank you kindly Dilbert, but I'd love to have a menu pop up so people don't have to cycle through poses. My animations thankfully are full perm, so I can re-name them to describe what they do "Laid Back" "Knee Up" and so on. It's such a pet peeve of mine to have animations in furniture and they have such unrelated names you have no idea what the animation will do until you click on it xD

Link to comment
Share on other sites

Yes, that is what I am looking for! A pose menu that let's you have sub menu's so it's all neat and orderly and people will know which animations to go for! I am prowling the script part of the catalog right now though continuing to find poseballs scripts. I have several pieces of furniture that you simply have to sit on, click on it and then choose a button from the animation menu that pops up, juuuust gotta find it! *rolls up sleeves, gets lots of coffee and cookies and continues prowling the marketplace*

Link to comment
Share on other sites

The most popular pose-menu system in SL is probably MLP, which uses poseballs.  A lot of people write it off as 'the sex-bed script' because that's how it's usually encountered but it is only the animation and menu names that make it so, you can use it for anything.

However, you said you didn't want poseballs, which leads to the better system nPose: http://wiki.secondlife.com/wiki/User:Nandana_Singh/nPose It's free and widely-used so well tested.  It's also more flexible than MLP in a number of ways.

The texture changer is an easy script but does depend a litlle on which prims/faces you're retexturing, unless it's just the whole object. Try http://wiki.secondlife.com/wiki/Texture_Menu_Management

But what's with measuring objects by memory-size?  Script-memory I can understand but objects have always been measured by prim-count or the newer 'land impact'.  Have LL changed it all again?  I've missed all this - how do you find out how much memory an object requires?

Link to comment
Share on other sites

Wow, thanks Peter, will look into those two!

And I right click on an object and click script info in the pie menu, it's the same as using the script info in the about land screen only that you can't use the latter to check the KB size of future purchases.

A lot of my friends do not have high end machines so I investigated. I usually purchased things by prim count, if I can get a 5 prim couch instead of a 20 prim couch I'll choose the former. However landscaping and decorating like that had my land look great...but my friends lagged so heavily.

Then I checked out the script info tab in the about land menu and saw that half the furniture I used had a ridiculous script count reaching up to 6000KB used for a single item. In comparison, a breedable Meeroo takes up 400KB.

Now when I purchase furniture that has any sort of script in it I always check the KB size the scripts use up, not just how many scripts are in there but how much resources the use.

Lo and behold with that tactic my friends can now freely frolick through my half sim with only minor lag. Though some still have to watch WHERE they go such as my meeroo cave where 16 meeroo (@400 KB script size each) reside. It will lag them as it's a big end script size compiled into a 10x10 cave. But everywhere else they're fine! It's  a massive improvement from them being unable to even MOVE to them only experiencing minor lag.

 

Edit: It's typo day :(

Link to comment
Share on other sites

Oh right, good, you're only talking about script memory.  I thought there was a whole new system of accounting going on. Anyway, script memory ...

'Old' script-systems needed a script in every single prim of the build if they were resizing, recolouring, animating them etc..  Typically the worst-behaved type of object was hair simply because it had so many prims.  A 300-prim hair with 300 scripts just for one-of resizing is a menace.  That's no longer necessary for almost any operation because http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParamsFast lets you do almost anything to everything from a single script.

Then there are all the 'not really a scripter' scripters who know how to combine several scripts with different functionality but not how to edit them to consolidate them into a single script.  They're the sort whose objects contain a whole list of scripts, each of which does one little function.  There's no new functionality to get around that - just getting a better scripter.

Every single script used to have and require 16KB under the older 'virtual machine' LSO.  When LL introduced Mono scripts were allowed 64KB but also required that much.  A lot of people didn't know the difference and would make their scripts Mono even when they didn't need the capacity, so taking-up four times as much as they needed.

Until comparatively recently consolidating scripts into one and choosing between LSO or Mono was about all scripters could do to minimise memory.  Our newest tool, http://wiki.secondlife.com/wiki/LlSetMemoryLimit, let's us set the memory used by a Mono script as low as 4k (I think).  So now we can make more efficient scripts and limit the amount of memory they use.

Link to comment
Share on other sites

I will try the two scripts you suggested, even though they already boggle my mind :( Maybe I should hire a scripter who can highlight in the scripts what I would need to change from product to product (menu names for example). I would just love to build, texture and work on the sales aspect, thinking of learning how to script only for the poses and texture change makes me cringe.

I know I know, not cool, I realise that myself just...*points at the script* that's frigging scary the first time you look at it D:

Link to comment
Share on other sites

Here is a simple 1 script system no sub menues but simple and lean

 

// Animation Player v1.0 - Newgate Ludd // ------------------------------------ // Written in responce to a posting on the Forums by Artemis Winthorpe // string  notecardName = "Contents List"; // Notecard containing list of animations integer lineCounter;                    // Line number within the notecard key     dataRequestID;                  // Data request ID integer CHANNEL = 42;                   // Channel on which Dialog listens list    MENU;                           // Menu text for each Anim list    ANIMS;                          // Actual Animation name integer maxAnims;                       // Number of Animations laoded integer first;                          // First entry to be displayed on Dialog integer pagesize = 8;                   // Number of Items per Dialog list    choices;                        // Current Dialog Choices integer Listening = 0;                  // Listen handle string animation_name;                  // Name of current animation string new_animation_name;              // Name of next animation. key avatar;                             // Key of the avatar who's sitting on me integer i;                              // General Purpose // -------------------------- UpdateListen(key id) {     CancelListen();     Listening = llListen(CHANNEL,"",id,"");     llSetTimerEvent(20); } // -------------------------- CancelListen() {     if(Listening > 0) llListenRemove(Listening);     Listening = 0;     llSetTimerEvent(0); } // -------------------------- ShowMenu() {     choices = [];     if(avatar == llGetOwner())         choices += ["*RELOAD*"];                // Now add the items     //len = llGetListLength( MENU );     if(first > 0)         choices += "Prev";     if(maxAnims > (first + pagesize))     {         choices += "Next";     }            for(i = 0;i < pagesize;i++)     {         string strname = llList2String(MENU,(i+first));         if( llStringLength(strname) > 0)         {             choices += strname;         }     }    // finally show the dialog     llDialog(avatar, "Which anim would you like to play?", choices, CHANNEL);     UpdateListen(avatar); } // -------------------------- // Set the next animation available as the active one PlayAnimation(integer number) {     // Get the name of the animation     new_animation_name = llList2String(ANIMS,number);     // Get the key of the avatar on the stand (or if none is present)     avatar = llAvatarOnSitTarget();            if (avatar != NULL_KEY) // Is avatar is still posing, if so then..     {         llStopAnimation(animation_name); // Stop current animation         llStartAnimation(new_animation_name); // Start next animation     }     // Set the new animation name as the current     animation_name = new_animation_name; } // -------------------------- default {     state_entry() { state ReadNoteCard; }     on_rez(integer num) { llResetScript(); } } // -------------------------- state Running {     state_entry()     {         llSitTarget(<0.,0.,0.1>,<0,0,0,90>);        animation_name = "sit";         maxAnims = llGetListLength(MENU);         llSay(0,llGetScriptName() + " Loaded - " + (string)maxAnims + " Avaliable.");     }             on_rez(integer num) { llResetScript(); } 	touch_start(integer total_number)     {         key id = llDetectedKey(0);         // We only want the Avatar currently sat to be able to change pose         if(avatar == id) ShowMenu();     } 	    listen(integer channel, string name, key id, string message)     {         CancelListen();         // verify dialog choice         // present main menu on request to go back                                       if("*RELOAD*" == message)         {             llResetScript();         }         else if("Prev" == message)         {             first -= pagesize;             ShowMenu();         }         else if("Next" == message)         {             first += pagesize;             ShowMenu();         }         else         {             integer index = llListFindList(MENU, [message]);             if(index != -1)             {                 PlayAnimation(index);             }         }     }                timer()     {         CancelListen();     }           changed(integer change)     {         // Test for a changed inventory         if (change & CHANGED_INVENTORY)         {             llResetScript();         }                     // The object's sit target has been triggered         if (change & CHANGED_LINK) // Test for a changed link         {             avatar = llAvatarOnSitTarget();             if(avatar != NULL_KEY) // Is that changed link an avatar?             {                 llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);             }             else             {                 if (llGetPermissionsKey() != NULL_KEY)                 {                     llStopAnimation(animation_name);                 }             }         }     }             run_time_permissions(integer perm)     {         if (perm & PERMISSION_TRIGGER_ANIMATION)         {             llStopAnimation("sit");             llStartAnimation(animation_name);             first = 0;             ShowMenu();         }     } } // -------------------------- state ReadNoteCard {     on_rez(integer num) { llResetScript(); }            state_entry()     {         MENU = [];         ANIMS = [];         lineCounter = 0;                   integer itemtype = llGetInventoryType(notecardName);         if(INVENTORY_NOTECARD  == itemtype)         {             dataRequestID = llGetNotecardLine(notecardName, lineCounter);             llSetTimerEvent(10);         }         else         {             llOwnerSay("Error - Contents list notecard missing!");             state Running;         }     }     dataserver(key queryid, string data)     {         //Check to make sure this is the request we are making.         //Remember that when data comes back from the dataserver,         //it goes to *all* scripts in your prim.         //So you have to make sure this is the data you want, and         //not data coming from some other script.         if (dataRequestID)         {             llSetTimerEvent(0);             //If we haven't reached the end of the file             if (data != EOF)             {                 dataRequestID = llGetNotecardLine(notecardName, lineCounter);                 llSetTimerEvent(10);                 lineCounter += 1;                 // Each line is of the form                 // Name,Animation                 if(llGetSubString(data, 0,0) != ";")                 {                     list ldata = llParseString2List(data, [","], [""]);                     string name = llList2String(ldata, 0);                     string anim = llList2String(ldata, 1);                     integer itemtype = llGetInventoryType(anim);                     if(INVENTORY_ANIMATION  == itemtype)                     {                         MENU = (MENU = []) + MENU + name;                         ANIMS = (ANIMS = []) + ANIMS + anim;                     }                     else                     {                         llOwnerSay("Error - " + name + " (" + anim  + ") Not an Animation.");                     }                 }             }             else             {                 llSetTimerEvent(0);                 state Running;             }         }     }            timer()     {         // The notecard read failed so abort         llSetTimerEvent(0);         llOwnerSay("Error reading Data.Aborting.");         state Running;     }       }

 Include a notecard named "Contents List' and use the structure below for listing the animations

; Name,anim
Menu Item1,animation name
Menu Item2,animation name
Menu Item,animation name

Link to comment
Share on other sites

Hehe - you asked for the scripts :-)  "Using" the scripts is a different game.  Really though, it's just a matter of writing the relevant notecard information ... once you find out how to do that you're winning.

@ Dilbert - what's simple about that, apart from the fact that it doesn't do much?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4415 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...