skybreeze Draegonne Posted April 27, 2011 Posted April 27, 2011 Exactly what is script over loading and are there limits to the numbers as per say a sim and or an avatar,and it unintentional over loading a TOS violation?
Rolig Loon Posted April 27, 2011 Posted April 27, 2011 I'm not sure just what you mean by "script overloading" but I can guess. You mean "How many scripts can I have on my avatar (in clothes, hair, HUDs ....) before I get in trouble with someone?" There's really no good answer. A good guideline, perhaps, is that you will do best with fewer than 50 scripts, for a total of something like 2 MB of memory. If you stay under those limits, you probably won't have much trouble with teleporting and most sim owners won't give you any grief. When there are too many people carrying a lot of scripts into a sim, especially Mono-compiled scripts, a sim's servers will start to slow down under the load. Several people bringing Mono-compiled scripts into the sim at once can make the sim stall for a few seconds, too, which is why we experience that "rubber band" effect sometimes. That's why people are getting concerned. There's absolutely nothing magic about those numbers, though. There are no SL-wide rules of any kind, and there's no way you're going to violate TOS by having even 100 times that many scripts. All that's going to happen is that you'll start having really bad lag and people are going to start saying nasty things to you.
Void Singer Posted April 27, 2011 Posted April 27, 2011 Rolig Loon wrote: [...] There are no SL-wide rules of any kind, and there's no way you're going to violate TOS by having even 100 times that many scripts. [...] sort of... someone *could* report a person with excessive scripts as "Disturbing the peace > [unfair use of region resources | excessive scripted objects]", but I don't know that anyone has ever actually gotten warned for that by LL for reports on things they are wearing
PeterCanessa Oh Posted April 27, 2011 Posted April 27, 2011 That's at the moment. Script limits are coming, we just don't know when and at what level yet. LL have said they'll be setting them "high" so they only catch the sim-busters but we have no figures for what low, medium or high usage looks like. Rolig's figures are a sort of consensus amongst residents but LL initially suggested that script-use overall was 1,000 per avatar! That includes all the scripts in doors, vehicles, listeners, titlers. vendors, etc, not worn on the avatars. Script limits will be applied per-avatar (attachments) and per-parcel (similar to existing prim-limits)
Void Singer Posted April 27, 2011 Posted April 27, 2011 we've been told at some office hours that average usage (as tested by certain Lindens) was as low as 1Mib, and as high as 3Mib... of course they may be looking at the more optimal mono numbers that we lowly residents can't see. my own spot checks were showing as much as 6-8Mib on average (with spikes into the 20-30MiB range not unusual)
Jenni Darkwatch Posted April 27, 2011 Posted April 27, 2011 As an aside to what others already said, it also highly depends on what area you're at. A lot of RP sims use HUDs, often very badly written ones, which shoot memory use and script count per avi through the roof. Then there's nonhuman avis. I won't mention names, but a few very well known makers of animal avis have utterly ridiculous script counts and mem use over 10MB per avi. The average seems to be around 4 or 5 MB per avi. Another example: My favorite avi had, out of the box, around 110ish scripts using up around 8MB. Thankfully the creator made all scripts fullperm, so I went to town with it. Result: down to 29 scripts and 1MB, and I'm not even done yet. SL requires a programming culture that simply doesn't exist anywhere else anymore. Scripters should(!) be aware of the ressources they use... open listeners, timers, memory use, the damned mono bug which currently seems to mandate old-style LSL compile for anything attached to an avi... the list goes on for a while. Script limits should be a wakeup call, though I'm afraid the limits will be so high that even people with resize/recolor scripts in every single prim they wear won't be affected by it, hence the "limits" won't be anything more than a token effort. On the other hand, LL has given us the tools to pretty much police script use ourselves. Just boot people who don't meet your limits off your land.
JCampbell32 Posted April 28, 2011 Posted April 28, 2011 Jenni Darkwatch, You seem to be very knowledgeable with scripting, I appologize if this is not the right place to ask, but here's my problem: We are using SL for school. We all have to place our assignments in one area for the instructor to look at and interact with. With 30 students creating prims that listen for interaction and say "Hello" you can imagine what is happening. One goes off, they all go off! It creates a huge lag, then crashes. This is new to me, and to my classmates and professor. My question is, is there a quick line of code that we can add to or edit that would listen only for avatars and not to adjacent or other scripts in prims? Something quick and easy I could submitt to the professor as an option that we all include in our assignments to stop setting the "Sandbox" ablaze with 30 objects all saying "Hello" and crashing the site and never stop chattering? Surely there must be something to limit a script interaction to just going off when an avatar talks, rather than every object out there, something easy for us newbies that admit to not having a clue as to what we're doing but trying! Jay
Rolig Loon Posted April 28, 2011 Posted April 28, 2011 Every script that listens must have a llListen function somewhere. It serves as a filter, telling the scripted object which channel to listen on, what object or avatar to listen to (by name or by key), and what specific message to listen for. In many cases, the filter is left fairly wide open, other than specifying the channel. You can easily specify that it should listen to only only person. In your scripts, simply replace whatever the llListen function already looks like with llListen(channel_number,"",llGetOwner(),""); where channel_number is the integer that is already being used as the channel_number. In other words, just make the third parameter in parentheses llGetOwner(). That way, the script will only respond to things that are said by whoever owns it. You can take a further step toward sanity by specifying a channel other than channel 0, which is the open public chat channel. Something like 35, or 57, or whatever. Even better if every student chooses a different number. Then the scripts will all be listening on different channels. If the selected channel is, say 42, you'd just say "/42 Hello!" (without the quotes) to send the Hello message to the script. Take a look at http://wiki.secondlife.com/wiki/LlListen if this isn't clear enough. 1
Jenni Darkwatch Posted April 28, 2011 Posted April 28, 2011 @JCampbell: Rolig and Void are both lightyears ahead of me in scripting as are quite a few other residents. Roligs answer would have been my suggestion too. If you _do_ need to teach script-to-script interaction, here's a little tidbit that might help (the ownerOf function in particular): // Little helper function to get the owner key of any object (by object key)key ownerOf(key object) { return llList2Key(llGetObjectDetails(object, [OBJECT_OWNER]), 0);}default { state_entry() { llListen(0,"",NULL_KEY,""); // Warning: Listening to channel 0 like that is not a good idea } listen(integer iChan, string sSender, key kSender, string sMessage) { // Basic check to make sure we're getting chat from an object that belongs to us, not from some stranger if(ownerOf(kSender)==llGetOwner()) { // Do something here llSay(0,sSender+" belongs to the same owner as me and said: "+sMessage); } }} This script could, obviously, be written to consume less ressources by ditching the function and streamlining the check, but it's IMO easier to read as is. I wrote it from memory, so it might not compile due to typos. If there is a better way to do this (aside from obvious optimization) I'd be happy to learn 1
Rolig Loon Posted April 28, 2011 Posted April 28, 2011 Yup. That's another good choice. It will filter in the listen event instead of in the llListen handle. It works just as well and is more appropriate in settings where it's not the owner, but something owned by the owner that is speaking, as Jenni says. A bit shorter ...... if(llGetOwnerKey(kSender) == llGetOwner()) //Same as if(ownerOf(kSender == llGetOwner()) 1
Jenni Darkwatch Posted April 28, 2011 Posted April 28, 2011 See, that's why there's the experts I keep missing functions in that sea of oddly named LSL builtins /me prefers your solution. 1
Void Singer Posted April 28, 2011 Posted April 28, 2011 got nothing to add codewise, but a small meta suggestion: when asking questions in scripting forum it's usually better to start your own thread unless it directly related to the OP... sometime a person who might be able to offer advice will miss posts in unrelated threads because they may have skiped the thread because it wasn't something they knew about or were concerned with, or they may have stopped reading a thread that looked as if it'd run it's course... you can often get faster answers that way. it also makes it easier for the next person to find the same information if they have a similar question.
JCampbell32 Posted April 28, 2011 Posted April 28, 2011 Rolig Loon, Jenni Darkwatch et all, Thank you very much for your help. I think it would be a bit much for me to explain this to the 30 plus students in my course, not including the other classes. It could get ugly, messy and confusing implementing that. Most of us are doing good just to edit the default script! I do understand your answer though and sincerely thank you for the Help!!! I've given it some thought along with the great input here. I think the easiest remedy is to have each fellow classmate keep their code under the touch_start event. In this manner we could elimiate the "chatter" and "overloading" that has been happening. If I am correct, nothing will happen until an object is touched. Once again, thank you very very much! You have been very nice and polite. I really appreciate it! Respectfully, Jay
JCampbell32 Posted April 28, 2011 Posted April 28, 2011 Void Singer, Sorry if I didn't follow things correctly. I saw the recent activity, felt it was similar to overloading, and found the answers here posted by others unintimidating. The people here seemed genuine rather than some out there who are just waiting to "pounce" on the unknowing and fill themselves with pride at the expense of others. Selfishly I may have taken advantage of the courteous atmosphere and current responses here. I don't know how to move the thread, in the future I will start my own. Hopefully the wolves don't rush in to fast to tell me to search through 40 other threads somewhere else before kind hearted souls lend a helping hand. I should however appologize to skybreeze though for hijacking the thread. Sorry about that, I did not quite think of that. Thank you, Jay
PeterCanessa Oh Posted April 28, 2011 Posted April 28, 2011 JCampbell32 wrote: The people here seemed genuine rather than some out there who are just waiting to "pounce" on the unknowing and fill themselves with pride at the expense of others. You'll find the content-creation forums a sea of tranquility in general - we are here to help each other create 'things', not drama :-)
Rolig Loon Posted April 28, 2011 Posted April 28, 2011 JCampbell32 wrote: I've given it some thought along with the great input here. I think the easiest remedy is to have each fellow classmate keep their code under the touch_start event. In this manner we could elimiate the "chatter" and "overloading" that has been happening. If I am correct, nothing will happen until an object is touched. As a retired educator, my advice would be to spend the time to teach the students to write scripts that work and play well together. If you hope that you can avoid chaos by praying that nobody touches a prim by mistake, you're likely to be disappointed. It's very hard to build without touching. It's worth your sanity to explain how listening works. :smileywink:
Void Singer Posted April 28, 2011 Posted April 28, 2011 no wolves, and no worries. we residents can't separate posts out of threads, so there's nothing to do this time. it's just for future reference --||-
skybreeze Draegonne Posted April 28, 2011 Author Posted April 28, 2011 Thank you all that responded and gve thoughful ideas and suggestions, I am new to scripting as well so even though the thread was hijacked I have learned a great deal.. Goog Luck to Campbell and the fellow students. However this brings up another needed suggestion for me as well..Is there a way or tool to count the number of scripts in a given parcel of land, not the whole sim, and not per object rezzed, but total count, somewhat like is used on the viewers. i seldom use the new ones, because of bandwidth usage but use snowglobe and sl 1.23 viewers.. any ideas? thank you
Rolig Loon Posted April 28, 2011 Posted April 28, 2011 I believe that the Firestorm viewer, which is still in alpha release, has that functionality under About Land. I can't get in world at the moment to verify that.
skybreeze Draegonne Posted April 29, 2011 Author Posted April 29, 2011 yes firestorm does a parcel memory, so that works, thank you Rolig Loon,smiles
Recommended Posts
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