Projects » OSSL Racter Speech engine - For ActiveNPC Framework

RACTER is probably the BEST inworld chat module I have ever seen. It is very easy to configure. I have converted this chat system to OSSL so your NPCs can have speech capability. The instructions for using this are HERE. Simply make a prim, wear it on the nose, position and scale to your liking. Place a new script inside called Brain* and then 2 note cards "Brain_1" and "Brain_2". Paste the linked text into them. You can have as many Brain_ note-cards as you want and you can customize the chat to your liking. Use it to make chatty bartenders, rude towns-people, greeters and more; the possibilities are endless. BE SURE to READ THIS PAGE before using this software and you will go far.


Wear the completed object before making your NPC. When your NPCs are rezzed you will be able to talk to them when you are in range. Once the speech engine has loaded, the NPC will say "Ready" in local chat. You can define the frequency with which the NPC will respond to local chat and the range it will listen to for key words. Moreover, the NPC will only respond to REAL avatars so all of your NPCs can use this module without worry of bot-cross-talk. Your NPC will also ignore greeters or any other prim which uses channel 0 speech. I have included a second script you can place with your 'Brain.lsl' which will make the NPC silent or to allow them to speak again... Simply say "chaton" or "chatoff" to enable or disable the Brain script.


NOTE: This was originally designed to be a replacement to the speech module in the current ActiveNPC-SEP2017 Enhanced package. Rather than boxing it all up I decided to place this here to benefit anyone who wants to play with this. OSSL Racter does not require ActiveNPC to function. It should work with just about any NPC framework so long as you have the proper ossl extensions enabled in your /bin/config_include/osslEnable.ini


For those of you who would rather have RACTER in a prim, the code from the LSL WIKI linked above will work without issue on opensim grids.

*You can have another name like Alice or Bob - Script and note-cards should be named accordingly: Alice - Alice_1 - Alice_2 OR Bob - Bob_1 - Bob_2


Added by: Spax Orion
Last Update: 4 years ago
Project Category: NPC
👍 7 like

Code

File name Added By Last Updated Actions
Brain.lsl Spax Orion 2 years ago View
speech-toggle.lsl Spax Orion 4 years ago View


Comments

Hi
I managed to get it to work by commenting out the "Miss" lines on 160 and 165-168,
But the NPC seems to give you 2 answers every time you ask a question.
Any help would be great
like(0)
This is the same exact code as on the LSL-Wiki, it has been converted to OSSL, therefore you will need to be the land owner and ossl (osnpcsay, osisnpc) functions must be enabled. The NPC will respond twice if your activeNPC ..extension script has "osnpcsay" commands in there which it is responding to, those SHOULD be disabled if you want racter to handle that. Example, Active NPC will respond to 'help' and so will racter so you will need to change that line in your ..extension script so it is not triggered. You can also disable any other osnpcsay commands in there as needed.
like(0)
It doesn't Work. It comes up with an error relating to Miss Response.
like(0)
There is a typo. Change line 16 to "list MISS_RESPONSES ="
like(0)
I am using xengine on 09x to handle my script processing and it has been compiled with the mono option checked. I am unable to duplicate this issue using this code as presented.
like(0)
I know this is kinda out there, but do you have a trade script for an NPC? Example: give an npc a rose she gives coins.
like(0)
NPCs do not have inventory other than the attachments they are wearing as defined in their appearance cards. There is no OSSL code which will detect inventory changes on NPCs which would allow the triggering of a 'give' event.

A prim can be scripted to accept content from a user much like the inworld mailboxes of old in SL. On inventory change of the mailbox, it can be scripted to say 'thank you' or give the user inventory you have stored in the contents of the prim.

ActiveNPC does allow your NPCs to give items from the controller contents using actions you define in the ..extension script. This can be handy if you have bartenders or cocktail waitresses. Normally, the NPC would walk up to the guest and ask them to make a CHOICE from the available items they have to give. The active NPC page has more details on setting that up.
like(0)