Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008424opensim[REGION] Script Functionspublic2018-12-10 10:392018-12-10 15:52
Assigned To 
PlatformOperating SystemOperating System Version
Product Version0.9.0.1 
Target VersionFixed in Version 
Summary0008424: Allow NPCs to use NPC functions on themselves
DescriptionMany NPC controllers work by having scripted attachments on them, this creates the problem that those attachments can't access the osNPC* functions unless the creator is allowed to use those.

My proposal is to always allow NPCs to use the osNPC* functions (except osNpcCreate) on themselves.

This would also allow more possibilities in configuration.
i.e. if i give some person the permission to us osNPCCreate, but no other osNPC* function, he is able to create an NPC and control this one NPC via a scripted Attachment, but he is not able to control and mess with other peoples NPCs.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
Mono VersionNone
Attached Files

- Relationships

-  Notes
BillBlight (developer)
2018-12-10 10:53

If you enable all the NPC functions and create the NPC OWNED, others can't control them even if those functions are enabled, they only listen to their Owner ...

Unless that has changed.
unregi (reporter)
2018-12-10 12:08

Thank you Bill, i didn't know that. That makes half of my feature request obsolete. I should have looked into it more.

But i would still like to see it, because it would make it possible to build an NPC controller that's only the attachment and doesn't need some rezzed box.
Most well scripted NPCs i saw require an attachment (for llSensor and Listen to NearbyChat, because they can walk over the whole region and will get out of the range of the box) and a box (for osNPC* commands).

An example for necessary Controller <-> Attachment communication just because of sensor and listener ranges would be [^] and the NPCs for the SatyrFarm,

An example for an NPC script that stops working as soon as you walk out of the listen range of the box is the NPC Automator from the own opwnsimulator wiki [^]
BillBlight (developer)
2018-12-10 12:37

You can always use regionsay instead of just say ..
unregi (reporter)
2018-12-10 13:49

hrm... llSensor (which you need for a reliable list of objects around, conveniently sorted by destance) haas a range of 96m, saying in Nearby Chat has 20m and shoudting 100m.

If you have the script to control the NPC just in the box, you will always be limited to that small range for the most basic function like just saying a command "follow" on Nearby Chat, or say "sit" and get a list of nearby object and select where it should sit down.
If you have the script just in the Attachment you can't use the osNpc* functions.

If someone has a good script for controlling NPCs that is not limited to a small radius around a box, that does not require communication from an attachment to a box and that does not set all osNPC permissions to the whole ParcelGroup or even more, i will be thankful :)
BillBlight (developer)
2018-12-10 13:53

You realize you can change the max sensor distance in the ini right?
unregi (reporter)
2018-12-10 13:57

yes, i don't want every sensor in every script to get 2k objects
BillBlight (developer)
2018-12-10 13:58

hehe, well yeah there is that
djphil (reporter)
2018-12-10 15:52
edited on: 2018-12-10 16:03

@unregi: Let's not forget also that a sensor will only return the first 16 objects/avatars found, it's not just a distance limitation ...

SensorMaxRange = 96.0
SensorMaxResults = 16

- Issue History
Date Modified Username Field Change
2018-12-10 10:39 unregi New Issue
2018-12-10 10:53 BillBlight Note Added: 0033594
2018-12-10 12:08 unregi Note Added: 0033595
2018-12-10 12:37 BillBlight Note Added: 0033596
2018-12-10 13:49 unregi Note Added: 0033597
2018-12-10 13:53 BillBlight Note Added: 0033598
2018-12-10 13:57 unregi Note Added: 0033599
2018-12-10 13:58 BillBlight Note Added: 0033600
2018-12-10 15:52 djphil Note Added: 0033601
2018-12-10 16:02 djphil Note Edited: 0033601 View Revisions
2018-12-10 16:03 djphil Note Edited: 0033601 View Revisions

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker