Jump to content

Quistess Alpha

Resident
  • Posts

    3,878
  • Joined

  • Last visited

Everything posted by Quistess Alpha

  1. Devil's advocate argument: If I know or expect something's going to be free tomorrow, I'm probably not going to buy it today. If I buy an expensive thing today and tomorrow it's free forever, with no warning, I might be a bit upset because that's not exactly fair. If there's a sufficient abundance of high-quality free things floating around, who's going to want to buy new things that are expensive? There's a decent argument to be had that giving away too much free stuff hurts people who want to sell things, and disincentivizes them from making anything at all. IMO, As a broad policy, it's not in the SL community or LL's interests to give out tons of free stuff. In moderation though, freebies are awesome; no ice-cream ever is sad. ice-cream for every meal will make you sick.
  2. If you have a notecard open, you can press ctrl-f to search for text inside of it. If you have a lot of notecards and you want to, for example, pick out which ones have the word "shakespear" in them, that's not possible. You would need to store all the notecards in some sort of external-to-SL database and perhaps use tools in SL to access the database in-world. If you don't have too many notecards, and you manually associate each one with a set of tags, (Ex. "Fiction" "Non-fiction" "Science"), or a classification system like Dewey Decimal, you might be able to make something work with only in-world scripting tools.
  3. I wasn't sure whether to make a new topic for this, but it's basically just applied rotation stuff so I'll dump it here. sun_position_user returns azimuth and elevation values to plug into the environment editor (you'll have to do the math to convert a real day of the year into my fantasy 360 day calendar ) sun_position_environment returns a rotation you can plug into llSetAgentEnvironment float gFrequency = 2.0; // 2.0 seems about the fastest it will allow float gLatitude = 50.0; // degrees from equator. integer gTime=-1; integer gDay; vector sun_position_user(float latitude, float day, float time) { // day ranges from [0-360); day 0 is september equinox, 90 winter solstice, 270 summer solstice // latitude in degrees from equator // time in hours; exactly 24 hours per day. (sun rises at 6.0 on the equinox, sets at 18.0) // return is <azimuth, elevation, 0>. (in degrees) latitude*= DEG_TO_RAD; vector axis = <0, llCos(latitude), llSin(latitude)>; //vector sun = <0, -axis.z, axis.y> + axis*(llSin(day*DEG_TO_RAD)*0.3987); vector sun = <0, axis.z, -axis.y> * llAxisAngle2Rot(<-1,0,0>,0.4101524*llSin(day*DEG_TO_RAD)) * llAxisAngle2Rot(axis,TWO_PI*-time/24.0); // .4101524 is the tilt of the earth's axis in radians. // sun now represents the position of the sun which we want to convert to az, elevation. vector ret = RAD_TO_DEG*<llAtan2(sun.y,sun.x),llAtan2(sun.z,llVecMag(<sun.x,sun.y,0>)),0>; if(ret.x<0) ret.x+=360.0; return ret; } rotation sun_position_environment(float latitude, float day, float time) { latitude*= DEG_TO_RAD; vector axis = <0, llCos(latitude), llSin(latitude)>; //llOwnerSay("Axis:"+(string)axis); vector sun = <0, axis.z, -axis.y> * llAxisAngle2Rot(<-1,0,0>,0.4101524*llSin(day*DEG_TO_RAD)) * llAxisAngle2Rot(axis,TWO_PI*-time/24.0); //llOwnerSay("Sun:"+(string)sun+":"+(string)time); return uVectorRoll2Rot(sun,0.0); } rotation uVectorRoll2Rot(vector v,float r) { return YPR2Rot(<llAtan2(v.y,v.x),-llAtan2(v.z,llVecMag(<v.x,v.y,0>)),r>); } rotation YPR2Rot(vector v) // Yaw Pitch Roll { return <llSin(v.z/2),0,0,llCos(v.z/2)> * <0,llSin(v.y/2),0,llCos(v.y/2)> * <0,0,llSin(v.x/2),llCos(v.x/2)> ; } default { state_entry() { llSetTimerEvent(gFrequency); llOwnerSay("Script start."); } timer() { ++gTime; if(gTime==24) { gTime=0; ++gDay; } list agents = llGetAgentList(AGENT_LIST_PARCEL,[]); integer i = llGetListLength(agents); while(~--i) { llRequestExperiencePermissions(llList2Key(agents,i),""); } } experience_permissions(key ID) { llSetAgentEnvironment(ID,gFrequency*0.95,[SKY_SUN,sun_position_environment(gLatitude,gDay,gTime),1.0,<0.1,0.1,0.1>]); // Update does not happen if the receiving viewer is in the middle of an environment change, so env. change speed must be faster than update frequency. //llOwnerSay((string)sun_position_user(gLatitude,gDay,gTime)); } experience_permissions_denied(key ID, integer reason) { llOwnerSay(llGetExperienceErrorMessage(reason)); } }
  4. with scripted changes, you can target agents who are within some boundary and who have accepted an experience. That seems sane enough to me?
  5. Agreed. mildly off-topic, but I would want any 'advanced gag standard' to end with text passed through the object. Wouldn't it be possible to just have something like "@gagspeak_finalchannel:20=n" or some-such, (where 0 is disallowed as a valid channel) and by-convention expect a user's collar/relay to implement the final output? while I'm badly theory-crafting something you've probably thought through much more than I have. . . "@gagspeak_..." : when any of these restrictions are in place, no user generated chat or emotes go to channel 0 nor @redirchat nor @rediremote channels. "@gagspeak_replace:search,replace,priority=add" : all substrings matching 'search' in user-speech (including quoted strings in emotes) get replaced with 'replace'. searches are done alphabetically and by length of string and are non-recursive. search/replace done in multiple passes for each priority. "@gagspeak_replaceword:search,replace=add" : all words (substrings surrounded by punctuation and or end/start of word) matching search replaced with replace. "@gagspeak_finalchannel:channel=add" : the garbled text produced by gagspeak_... restrictions output on this channel, the viewer only sends the output to the object which issued this restriction last (breaks RLV convention but. . .)
  6. If you have a set of sky settings, you can add a script like this and your settings (named in alphabetical order you want them to play) to an object on the parcel. The script needs to be compiled to an experience and the experience needs to be enabled on the land where it's running. float gFrequency = 5.0; // seconds between environment changes integer gIndexSky; string gEnv; default { state_entry() { llSetTimerEvent(gFrequency); } timer() { gIndexSky=(gIndexSky+1)%llGetInventoryNumber(INVENTORY_SETTING); gEnv = llGetInventoryName(INVENTORY_SETTING,gIndexSky); list agents = llGetAgentList(AGENT_LIST_PARCEL,[]); integer i = llGetListLength(agents); while(~--i) { llRequestExperiencePermissions(llList2Key(agents,i),""); } } experience_permissions(key ID) { llReplaceAgentEnvironment(ID,gFrequency,gEnv); //llOwnerSay("Debug: set env for "+(string)ID); } } Getting the sun/moon positions to line up in a pleasing way is actually quite tricky though. I didn't manage anything presentable while fooling around.
  7. While I'm thinking on it, the main cases where RLV devices don't work nicely together are gags(speech modification) and exceptions. Gags don't work nicely together because they operate in parallel rather than in series, and in order to put them in series, they would need to all conform to some common protocol which nobody has developed nor adopted widely. Exceptions are a bit less serious. If device A issues "@sendim=n" device B can 'get around it' by issuing "@sendim:<UUID>=add". this 'workaround' is blocked by '_sec' versions of relevant restrictions.
  8. possible, but for something that rapid, it would be easier to just send environment updates via script.
  9. Can look a bit funky depending on your tastes. One might consider padding the list to a multiple of 3 first: list pad = ["-","-","-"]; buttons += llDeleteSubList(pad, -llGetListLength(buttons)%3, -1);
  10. "Global behavior" is the default for all commands ending in =n (or =add which is a synonym) unless it's easier on the brain to think of it as limited to the object (Ex. @detach prevents detaching the object which called the command, which is arguably global because no other object can make you able to detach the object which called @detach=n ) RLV keeps track of the restricting object along with the restriction. If my heavy shoes and my heavy shirt both issue "@fly=n" I won't be able to fly unless they both release the restriction. If your object gets redirected through a relay however, all bets are off and it's implementation dependent. The DEM relay is good up to 5 independent objects, but some relays can only keep track of one thing restricting them at a time. If you're doing anything with RLV, you should become familiar with the RLV->'RLV Status...' window.
  11. I dunno, I refuse to give some random organization on the web a cellphone number, so I can't get an access key.
  12. Since the original post was over a year ago, is this still 'urgent'? (I'm not actually interested so not messaging the OP in-world)
  13. I'm pretty sure I tried that; it did not. that stops bash which it is debugging, but not the viewer which was spawned as a different process.
  14. on linux the viewer gets run through a bash script. and I'm not familiar enough with gdb to figure out how to tell it to run a program with specific arguments. Running GDB directly on the executable (descriptively named "do-not-directly-run-kokua") just gives an error about shared libraries not being found (because it wasn't run through the bash script which tells it where to find the libraries) rand 'gdb bash' and changed 'run' to 'run path/to/file' and that worked, tried it again incidentally with the SL radio on this time, after loading the non-extant file, the viewer displayed a static image (didn't react to input) for a minute as the music continued, at which point I would have halted it with gdb but didn't know how, then a minute later my window manager crashed bringing gdb + everytrhing else with it.
  15. Exactly, and if you asked it what would happen if you broke a mirror before they went in and hackily patched it, it would say you'll have 7 years of bad luck. https://www.youtube.com/watch?v=w65p_IIp6JY
  16. Yeah, if you're mixing non-SL images with SL ones, I could see that being useful, as long as you know the resolution of all the non-SL images and can figure out a general formula for the vertical texture offset and scaling. or perhaps alternating showing an image with displaying some other kind of media (allowing the back image to remain a "you do not have media enabled" texture). Tangentially relevant: it would only be able to receive clicks on that face if ctrl+clicked in a not-firestorm viewer (or firestorm with an obscure option enabled) or if the image was displayed through a simple page hosted on the prim via the image tag and a link.
  17. If you only want the image on the face of a prim, set the url of the media directly to the image URL, set the media scaling to 256x192, vertical texture scale to .75 and vertical offset to .875 (easier to do via build menu than via script). But at that point, you might as well just set the face as a regular texture.
  18. sort of, the 0 means there are no items directly in the folder "#RLV/Restraints/Leather Cuffs" the 2 means that in some of the sub folders, (specifically the 'arms' subfolder in this example) there are items that are worn, but there also exist items in some of the sub folders which are not worn. if everything in the folder (including children) is worn, you'd get 30, 03, or 33, if nothing is worn you might get 10, 01 or 11 (ETA: or 00); any other combination implies there exist things in the folder or its children that are not worn. which possibility depends on the structure of the folder. If reading the whole string helps: |02 -> 0:There are no wearables contained in the folder directly, 2: but there are some wearables in child folders and some of them but not all are worn. Arms|30 -> 3:There are wearables in the Arms subfolder and they are all worn; 0: there are no wearables in sub folders of the arms folder Legs|10 -> 1:There are wearables in the Legs sub-folder and none of them are worn, 0: there are no wearables in sub folders of the Legs folder
  19. It's possible, but the web interface textures get retrieved as a funky lowish resolution of 256x192. The relevant (X)HTML is "<img src=\"http://secondlife.com/app/image/"+(string)UUID+"/1\"/>" for example https://picture-service.secondlife.com/b2d5eb75-b4bf-7763-28dc-d46a03f8e992/256x192.jpg (for the curious, it seems plugging any other resolution into the above redirect URL does not work.)
  20. That's a bit of a beast of an example to unpack, in summary, if you only care about attachments which exist directly in the specific folder you're interested in, check the 1-index character of the response, or the lesser of the 1-index and 2-index characters* if you're also interested in attachments in the sub-folders of the folder you're interested in. An important caveat is that some RLV folder functions don't work "correctly" on inventory links. I'd do some tests if that's relevant to your application. * actually thinking it through carefully, converting the 2-digits into a single digit for the whole folder is a bit involved: listen(...) { if(2222==chan) { integer wornFolder = (integer)llGetSubString(text,1); integer wornRecursive = (integer)llGetSubString(text,2); integer wornWhole = wornFolder*wornRecursive; if(wornWhole) { if(wornWhole==1) { //wornWhole=1; }else if(wornWhole==9) { wornWhole=3; }else { wornWhole=2; } }else { wornWhole = wornFolder+wornRecursive; } // wornWhole now represents 0: no items in the folder, 1: none worn, 2: some worn, 3: all worn } } if my logic cells work this morning.
  21. You can also 'force-sit' someone who has accepted your experience, while on land with your experience enabled. llSitOnLink()
  22. Teleporting and sitting on something are the only ones I know of that wouldn't be affected by 'locked controls'. Camera focusing can also lead to turning without control input. I'm fairly certain the viewer's autonav functionality (which is bad and hopefully nobody uses seriously) goes through the same control system as regular movement input.
  23. True, but you'd have to ask yourself whether expanding only "odd" characters by a factor of three is better or worse than expanding every character by a factor of 4/3 (and even especially special characters by more than that). for sake of argument, assuming spaces are the only special character. My back of the envolope says EscapeURL might be more efficient for strings with where 'special characters' are 1/8 or fewer of all the characters, base64 would be better if you have shorter words on average than that. You could also do a combined approach where you escapeURL the string, then use the parse/dump trick to replace all the escaped spaces with actual spaces. If you have fewer than 8 'bad characters' and you don't care about accurately recovering them, str = llDumpList2String(llParseStringKeepNulls(str, ["[","other bad chars"], []), " ");
×
×
  • Create New...