Change font size
It is currently Wed Jun 19, 2013 10:38 pm

Forum rules


Image



Post a new topicPost a reply Page 2 of 3   [ 23 posts ]
Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: NPC Suggestion
PostPosted: Mon Jun 18, 2012 12:08 pm 

Joined: Thu Jun 07, 2012 4:44 pm
Posts: 6
Hi all.

I have part of osNPCTouch done already, needs tidying and packaging up as an OSSL function.

I had spotted Grab and DeGrab but missed the GrabUpdate so have to add that too, hopefully have it ready to submit for consideration before the weekend.

Talun


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Mon Jun 18, 2012 1:03 pm 
Furious Typer

Joined: Mon Apr 25, 2011 6:48 pm
Posts: 70
Talun,

This is great news!

Thanks for taking up the task and time to make this happen.

Please post back when you have a packaged product, ready for consideration. I'll gladly conduct some tests.

Shad MOrdre


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Sun Jun 24, 2012 4:19 pm 

Joined: Thu Jun 07, 2012 4:44 pm
Posts: 6
Hi again all

I have it done, i got a little lost through a misunderstanding of llPassTouches and its effects but that is now fixed.

One thing that bothers me now is the amount that I have done, seems to be a lot. I need to have a look through it to see if I have over done it before submitting it on a mantis.

All looking good though, I was just a bit slower than I first thought.


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Mon Jun 25, 2012 11:49 am 
Furious Typer

Joined: Fri Dec 12, 2008 9:47 am
Posts: 247
Hi

With NPCs now beeing able to touch objects, the need to add NPCs to llDetectedType is necessary and should also be available in lsl and not only ossl functions. I can think of many scripts were people could use NPCs for abuse when the region hasnt enough restrictions and a detection via llDetectedType would be helpfull (especialy for systems maintained by 3rd party without region controlls)... This issue should however be discussed with the devs, as NPCs actualy dont exist in lsl^^.

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Mon Jun 25, 2012 12:58 pm 

Joined: Thu Jun 07, 2012 4:44 pm
Posts: 6
Hi Michelle.

I can see two ways of doing this currently:-

1. osIsNpc(key npc)

2. llSensor. for llSensor you have to use sensor type NPC for them to show up in the list (I am ready to be corrected but that is what it looks like the code is doing)so a plain sensor for that avatar by key should not see them, though that would also apply to a normal avatar outside sensor range.

Perhaps, since osIsNPC is down as ThreatLevel.None all restrictions on it could be lifted, so that it works even if OSSL is not enabled.


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Mon Jun 25, 2012 2:43 pm 
Furious Typer

Joined: Fri Dec 12, 2008 9:47 am
Posts: 247
Right Talun, in the sensor event NPCs are excluded, which strictly speaking means that osNPCTouch can only trigger a ossl event and not the lsl touch events. The alternative is, that we make a lsl exeption, add the NPC to llDetectedType, and allow NPC in touch, sensor and collision events in lsl.

The option using oslsNPC only works if the function is enabled, otherwise we will get script errors. I hate to say it, but that means lots of additional support for scriptdevelopers. One will constantly get people with little/no OS/scripting knowledge complaining about script errors. On regions were NPC are enabled but the oslsNPC disabled, we cant filter the NPCs. In the end you need to develope and maintain 2 scripts and hope that the people use the right script on the right region.

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Tue Jun 26, 2012 4:32 am 

Joined: Thu Jun 07, 2012 4:44 pm
Posts: 6
Hi

Now submited on a Mantis http://opensimulator.org/mantis/view.php?id=6063

This will fire events exactly as if the touch had been done by a real client and will work on any prim in the region that has a script to make the object touchable. Fuller description on the mantis.

Since getting some sort of indication of what type of client is involved and or availabilty of OSSL functions adds many complications, both in the code and acceptabilty for adding to trunk are both required for much more than touch I have not tried to include anything for them in the patch.


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Wed Jun 27, 2012 12:49 pm 

Joined: Thu Jun 07, 2012 4:44 pm
Posts: 6
Michelle..

It does seem that up to now NPCs are being treated as people, they are scripted objects!

I am still trying to find out how detected type is arrived at for the touch events. It currently returns AGENT (1) since that is the only possible source of touches (until now). This is probably quite changeable, I can think of no reason why any script to date would check it since it cannot be anything else.

In other events however eg collision returning a new value would probably break existing content that is expecting 1 for an agent and anything else to be an object so I would be very wary of changing those.

I have come up with a few other suggestions though in addition:-

1. Allow osIsNpc(key) without error even if OSSL is turned off, it. (an easy change)

2. Add to llGetEnv(string name) something like "npcs_allowed" to return a boolean. This would allow a script to detect the possibility of NPCs in a region so that the script could just refuse to function when NPCs may be around. (another easy change)

3. Add to llGetObjectDetails options to determine if an avatar is an NPC and the creating scripts owner key. The boolean is easy but the creator details are not recorded anywhere currently.

4. Probably many more

General possibilities to bring them more in to line with objects

1. Add to the profile a note that it is an NPC and who the owner of the creating script is. similar to 3 above, That it is an NPC is probably easy, the creator as in 3 above.

2. Currently eject at parcel and estate level does nothing, I think this should probably remove (delete) an NPC and at minimum (but oddly more work to do) send them back to their rez point in the sim. I favour delete. Delete is likely relatively easy

3. Create should only do so if you would be able to rez a prim on that spot

4. Probably many more :)

What does anybody think?


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Wed Jun 27, 2012 1:48 pm 
Furious Typer

Joined: Fri Dec 12, 2008 9:47 am
Posts: 247
Well, i did test the osNPCTouch, and llDetectedType returned an agent. There is also a Consotant for NPC implemented which sofar only was used by llSensor.

Removing the error in osIsNpc(key) makes things even worse, because then nowone would notice that the script is going to messup everything. llGetEnv would help stop the script from running, but not help to find a solution were one can differ between agents and avatars.

When creating a highly complex system, one has to think of the worst user case: Housewife that barly managed to get the region running with some swearing helpers that desided to never ever help some noob install a region again..... or someone renting a Region with no access to any software settings or region support. In both cases 1 script has to do the job without causing any additional work for support nowmatter what setting were made in the region and it should be 1:1 compatible to SL to prevent additional script development.

I did however post a patch on mantis were NPCs are implemented in llDetectedType. That should do the job with a minimal amount of lsl changes. We will see if the devs acceppt these small changes. The implementation will not break any exsiting or new NPC function and still solve the issue.

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: NPC Suggestion
PostPosted: Thu Jun 28, 2012 1:56 am 
Furious Typer

Joined: Mon Apr 25, 2011 6:48 pm
Posts: 70
Hello,

I can't help but weigh in here.

When OSSL functions are disabled, which they are by default, NPCs are not possible. One has to not only enable OS functions, but to also enable NPCs elsewhere in opensim.ini. Region owners have to enable these options, or scripts that create and use NPCs cannot run. Also, region owners can disable scripts and even specify who can and cannot run scripts. This essentially places the owner of any region as the final say about NPCs. Why is any of the rest of this necessary?

I don't see a situation where someone would enable NPCs and then feel abused by them. Whether a region owner creates owned or non-owned NPCs, or even enables NPCs, is a personal choice, and the region owner does need to accept responsibility for that. On the rare chance that a region owner creates NPCs with the express purpose of "griefing" someone, formal complaints can be made about that region. In the scenario of a total noob who has to control over thier region, this is a nonissue.

NPCs before version 0.7.4.1, are detected as agents, and there is no switch to osCreateNpc to set whether they can be detected with a sensor. They are detected, but cannot touch anything. In versions since 0.7.4.2, osIsNpc is available, and so script writers have that available. But the ultimate decision rests with any given region owner, who should at the very least, understand what scripts they run or allow to be ran on their regions. And again, if they have not enabled NPCs for their region, this is all a moot issue. Making such changes as recommended is not necessary IMHO.

Forgive if I'm not seeing something, but as a script developer, I cannot see the scenario's presented.

Shad MOrdre


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


Who is online

Users browsing this forum: No registered users and 0 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:  


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