Change font size
It is currently Tue May 26, 2020 12:23 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 2   [ 17 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: Copying an object to my inventory via scripting
PostPosted: Tue Mar 13, 2012 3:51 pm 

Joined: Tue Mar 13, 2012 3:47 pm
Posts: 9
Hi,

The current scripting language does not allow me to copy an object obj to my inventory or to another object's inventory. (One assumes that obj is not in any other object's inventory or in its own.) Why this kind of restriction? It should be easy to enhance OpenSim to make this possible, and there is surely a need for this functionality. Are there restrictions to the enhancements to OpenSim that are allowed due to agreements with Linden Labs? Thanks.

Basically, I'd like a function such as llGiveToInventory(destKey, sourceKey); via a copy operation. This is possible using manual labor in all clients. That implies there is a way via scripting, although closed (for some reason) to the user.

Gordon


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Wed Mar 14, 2012 1:47 pm 
Site Admin

Joined: Sun Jul 04, 2010 8:20 pm
Posts: 493
I really see no point in this. There is already llGiveInventory that sends contents of an object.
http://wiki.secondlife.com/wiki/LlGiveInventory

If you want to send rezzed objects to someone's inventory, just include a copy of the object inside itself otherwise how would you include, for example, credits, instructions, licensing, etc with an object?

If you just want to share objects with people set them so anyone can copy.

dan


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Wed Mar 14, 2012 3:26 pm 

Joined: Tue Mar 13, 2012 3:47 pm
Posts: 9
Hi,

Thanks for the response. Let me explain why there is a point. llGiveInventory does not do the job.

I have a building with 500 objects. These objects contain no scripts. I would now like to package these 500 objects (all contained within a 50 meter radius of the origin). This is not possible via scripting, for reasons only known to LindenLabs, and obviously not known to anybody on this site. But there is a reason.

How are these packaged? One can use a builder script that requires that all the objects be sent to inventory (by hand), and then moved into a base object.

So what happens when I change a few objects in my building, or move a few objects around? I must go through the entire process again. Obviously nobody seems bothered by this, which implies either that I am missing something, or people do not make changes, or people have lots of time on their hand (which I doubt).

Again, llGiveInventory() is not appropriate. This function allows me to take an object from my prim inventory and send it elsewhere, but does not allow me to take the object itself (which is what I want). Of course, I could modify (if I had the time), OpenSim itself, but I was wondering first, whether there was an intrinsic reason why the functionality does not exist.

On a related issue, why is it not possible to tell and avatar to sit from a script? Surely, anything that can be done via menus using the client should be possible via scripting. The fact that it is not implies there is an important reason, one that is not written about in the blogs.

Generally the users decide what is important or not. If straightforward functions are made available, there is less of a need for turnarounds. If there are design decisions that prevent a function from being implemented, then that should be stated. Note that Second Life exists since 2003, and I am sure there are many developers. On a side note, I'd be interested in knowing why the desired functionality is not in OpenSim, which is Open Source. Are they bound to not going much beyond what LindenLabs offers?

Thanks,

Gordon


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Wed Mar 14, 2012 7:58 pm 
OSG Elite
User avatar

Joined: Sat Nov 06, 2010 10:19 am
Posts: 1047
Location: Czech Republic
I belive it IS technically possible to make such a OSSL function. Only problem is find a dev who will be motivated enough to do it...

Bo


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Thu Mar 15, 2012 6:32 am 
OSG Elite
User avatar

Joined: Sat Jun 14, 2008 12:28 am
Posts: 381
Location: Australia
I am trying to clarify exactly what you are trying to do, it is true that the current functionality is a result of the SL functionality plus innovations by the OS devs, so as Bo mentioned, any further innovations will be done by these devs, if you have abilities in coding maybe you could join the dev team and bring about the required innovations, because every innovation needs to be thought up (which you may believe you have done) introduced, tested and included in core, and the dev team probably already have a list of priorities that they are currently working on.
In the meantime we find workarounds for functions that are lacking.
You have a building with 500 objects and you want to be able to package this for distribution??
You mentioned yourself that this is possible via a builder script, the fact that each item must be taken into inventory and then moved to base object is just part of the process,
{L_QUOTE}:
This is not possible via scripting, for reasons only known to LindenLabs, and obviously not known to anybody on this site. But there is a reason.
and yet it is possible, you just said it is, its just a lot of work, but I dont see how you can say its not possible.

{L_QUOTE}:
So what happens when I change a few objects in my building, or move a few objects around?
why cant you just replace the few objects that have been changed into the base object? each item has its own positioning (component) script, so long as it has the right name (the name that it was originally saved as) then maybe it will still work (I've not tried it, but it would be my first port of call) I wouldnt think you need to redo the entire 500 items.

{L_QUOTE}:
llGiveInventory() is not appropriate. This function allows me to take an object from my prim inventory and send it elsewhere, but does not allow me to take the object itself (which is what I want).
could you give an example of what you want to do please, I am not sure I understand your needs, because to me llGiveInventory enables an object to give its contents to you, is this not what you want?
{L_QUOTE}:
why is it not possible to tell and avatar to sit from a script?
again please forgive me for not understanding your needs here, "tell an avatar to sit" seems like you need a chat bot to say "sit here!" so I must be missing something, maybe we can find a workaround if we can clarify your needs
Regards
Cam


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Thu Mar 15, 2012 6:37 am 
Site Admin

Joined: Sun Jul 04, 2010 8:20 pm
Posts: 493
Gordon,
I have boxed up 1000's of unlinked objects by simply selecting everything and take a copy, as a coalesced object, the position of objects in relation to each other is retained and works pretty well.

dan


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Thu Mar 15, 2012 3:18 pm 

Joined: Tue Mar 13, 2012 3:47 pm
Posts: 9
Hi to all who responded (I appreciate it). I'll answer all your questions and make some additional comments.

To Bo:
I am a coder, so I could help with OpenSim development. You are implying that there are no restrictions to what can be added to OpenSim? If somebody is willing to get OpenSim compiled on Ubuntu (or Redhat), I'll be happy to at least take a look.

First function I want is:

teleport(vector dest)

without the need for sit/unsit, etc, which are all kludges (perhaps to prevent people from whizzing all over the place).

To Dan Banner
My object is 150 meters in diameter and I had already tried selecting everything (I use the coolVlViewer, which allows me to import meshes from Blender). It did not work. But see disadvantages below.

To Cam
I understand that there are many more requests than developers, which is why I was not asking for any development. If I am desperate, I'll do my own, once somebody helps me compile OpenSim on my system. Yes, I can package a building with 500 objects with the builder script, so it is possible. But it is not possible to do so by simply selecting all 500 objects, pressing a button, and have all those objects become the inventory of a prim, called "package", which itself could be rezzed from my script. Or is it possible?

Regarding replacing objects. Say I have 20 objects with the same name (which happens frequently) and I take copy them into the Avatar's inventory. Now I modify a few of these objects, perhaps move them around. I need to replace them in the inventory, but now several objects are in the inventory multiple times, and it is not possible to know which objects to remove from the inventory (they might not be adjacent to each other). Keep in mind that I might be making changes over several days. Of course, if I make sure that all objects have a different name, then that might not be an issue, and if it were not possible to have two objects with the same name in the inventory, the chance for error would be reduced. So yes, I do not need to redo all 500 items, but the chance of error if I modified 5-10 objects would be high. I am not inclined to make a change to one object, move it to inventory, remove the previous object (I would not know its location in the list anyway), etc.

Regarding llGiveInventory(). I have an object called "A". This object has an inventory. I would like my script to send object "A" to the avatar's inventory. That is NOT possible. It is only possible to send one of the objects from the inventory of "A" to the inventory of the avatar.

Regarding having an avatar dit from a script.
I guess I do not know what a chat bot is. Could you please clarify?
Here is what I would like:

Given a prim, called "A", and a script called "Ascript" which is running, I'd like for the script to force the avatar to sit on prim "A" without the user entering anything in the chat window. If it is possible, I would love to see an example script (I have searched and read a lot on the subject).

Again, thanks for all the help,

Best regards,

Gordon


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Thu Mar 15, 2012 3:39 pm 
OSG Elite
User avatar

Joined: Wed Mar 11, 2009 3:57 pm
Posts: 444
I suggest you have a look at this page: http://opensimulator.org/wiki/OSSL_Implemented

osTeleportAgent & osTeleportOwner have been around a long time and do not require sits or anything (see any Stargate or BlamGate, they are not just for HG). Linden Labs is only just starting to catch up.

Scripted devices can give inventory items from their contents singly or in groups, to an avatar even into a specified folder(s). Look @ http://wiki.secondlife.com/wiki/LlGiveInventoryList This can use a list of items that you want to give and you can spec the folder to put it.

Scripted Device / Object accessing ANY Avatars direct inventory will likely never happen as that would be a massive security breach and the potential for use & abuse is outweighed by practical considerations. RLV does have some abilities extending things but still quite limited for obvious reasons.

Cool Viewer holds to LL spec of max 255 items per linked object, and limited coalesced items. Coalesced items had been quite problematic in OpenSim till recently and do work correctly now. Hippo, Singularity, Astra and I believe Imprudence can handle more than 255 objects in linkset (I have a few with over 1500 prims) and the 32m limit does not apply (although I am pretty sure that was also corrected in LL V3 base code due to mesh & 64m prims).

Every viewer (although easier on new V3 ones) has the ability to pick up an item off the region and "replace" the previously existing item within your avatar inventory, it varies a bit with different viewers, so I suggest you find the way it works for your viewer of choice.

Hope it helps.

_________________
No further support of any kind, for any of my materials. Use as/is whereis.
PLEASE UNSTICKY Any Stickied Posting by myself.


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Thu Mar 15, 2012 3:48 pm 

Joined: Tue Mar 13, 2012 3:47 pm
Posts: 9
Hi WhiteStar,

It helps. I will take a look.
Regarding coalescing: I am not sure how good coalescion works with very large objects. I have had problems. Of course, I have my own OpenSim Server so can change any parameters I want to.

Let me ask a simple question:

Can I via scripting only, make an avatar sit on a particular prim?
Can I via scripting, make the avatar rotate by 90 degrees?

I have the impression that the only running scripts are associated with prims, and the avatar is not considered as a prim. If it were, the avatar would have an inventory as do objects, with could contain *running* scripts, and I do not get the impression that it does. All scripts in an avatar's inventory are passive.

I have some work to do.

Any one of you an actual developer?

Gordon



WhiteStar Magic {L_WROTE}:
I suggest you have a look at this page: http://opensimulator.org/wiki/OSSL_Implemented

osTeleportAgent & osTeleportOwner have been around a long time and do not require sits or anything (see any Stargate or BlamGate, they are not just for HG). Linden Labs is only just starting to catch up.

Scripted devices can give inventory items from their contents singly or in groups, to an avatar even into a specified folder(s). Look @ http://wiki.secondlife.com/wiki/LlGiveInventoryList This can use a list of items that you want to give and you can spec the folder to put it.

Scripted Device / Object accessing ANY Avatars direct inventory will likely never happen as that would be a massive security breach and the potential for use & abuse is outweighed by practical considerations. RLV does have some abilities extending things but still quite limited for obvious reasons.

Cool Viewer holds to LL spec of max 255 items per linked object, and limited coalesced items. Coalesced items had been quite problematic in OpenSim till recently and do work correctly now. Hippo, Singularity, Astra and I believe Imprudence can handle more than 255 objects in linkset (I have a few with over 1500 prims) and the 32m limit does not apply (although I am pretty sure that was also corrected in LL V3 base code due to mesh & 64m prims).

Every viewer (although easier on new V3 ones) has the ability to pick up an item off the region and "replace" the previously existing item within your avatar inventory, it varies a bit with different viewers, so I suggest you find the way it works for your viewer of choice.

Hope it helps.


Top
 Profile  
 
 Post subject: Re: Copying an object to my inventory via scripting
PostPosted: Thu Mar 15, 2012 4:39 pm 
OSG Elite
User avatar

Joined: Wed Mar 11, 2009 3:57 pm
Posts: 444
Gordon Erlebacher {L_WROTE}:
Hi WhiteStar,

It helps. I will take a look.
Regarding coalescing: I am not sure how good coalescion works with very large objects. I have had problems. Of course, I have my own OpenSim Server so can change any parameters I want to.

Let me ask a simple question:

Can I via scripting only, make an avatar sit on a particular prim?
Can I via scripting, make the avatar rotate by 90 degrees?

I have the impression that the only running scripts are associated with prims, and the avatar is not considered as a prim. If it were, the avatar would have an inventory as do objects, with could contain *running* scripts, and I do not get the impression that it does. All scripts in an avatar's inventory are passive.

I have some work to do.

Any one of you an actual developer?

Gordon


Further references for your perusal:
http://opensimulator.org/wiki/LSL_Status/Functions which lists the LSL functions as deployed in OpenSim (do note that some which are implemented and work properly are still identified as requiring verification)

http://wiki.secondlife.com/wiki/LlLinkSitTarget Allows you to seat an avatar on another prim within a linkset.

Coalesced objects can be tricky and there is certain quirks & foibles related to viewers and their handling of the objects. In this area it's very easy to discover how viewers can & do diverge. Stock LL viewers have many more limitations that ones designed to be OpenSim friendly. Imprudence, Singularity/Astra, Hippo (too old to really use) have more OpenSim friendliness than the other TPV Viewers. Cool Viewer falls into a more friendly but not quite all the way viewer. The rest of the TPV's are mixed, some do support some limited OpenSim capabilities they fall into the last of the sorta friendly categories after which of course is the Stock LL viewers which have nothing for OpenSim at all. Viewers with special "trickery & dickery" allowing them to do special things unique to themselves should generally be avoided as they more often than not create side effect issues which are extremely hard to track down and fix and sometimes cause issues with severe ramifications.

Avatar Rotation via sit or attach is quite possible and is done frequently with many different things.

You are correct that Avatar's do not run scripts within their inventories, they are simply stored inactive and for good reason (imagine an avatar with 1000 different script in their inventory, all running, can you say ugly mess ?) BUT... of course there are but's.... If the avatar is wearing a scripted object such as a flight-assist, hugger or a HUD then the scripts within that scripted object / device do operate and can interact with the external world (objects in that same region as the avatar). An avatar is never classed or considered as an "object" with one exception, if the avatar sits on a prim, then it is identified as a link to that item and therefore can accept certain data from the linkset and be managed (with limits) by the scripts within that linkset.

RLV is an extension used for Restrained Love functionality. That can be used in numerous ways from Bondage Sex facilitation to system interaction, RLV can perform many things with avatar, avatar inventory (forcing clothing to be worn etc) but it does require permissions and config. I cannot offer further advise on RLV as I do not use it or code for that form of facility at all. More info on RLV @ http://wiki.secondlife.com/wiki/LSL_Pro ... nedLoveAPI but do google it as there is a lot of stuff written on RLV.

Enjoy & Have Fun.

_________________
No further support of any kind, for any of my materials. Use as/is whereis.
PLEASE UNSTICKY Any Stickied Posting by myself.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 17 posts ]
Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net