Introduction

TeuluBreedables use a simple API for its feed and floss using the rez-parameter to determine what settings to be applied on-rez.


There are two API systems that are supported by the floss and feed – the old (current) one and the new API which allows for more configurability.


This page deals only with the new API.


In this short article, We’ll explain the basics, so you can create your own auto-rezzers for feed and floss with the ability to have these settings already applied, with minimal user interaction.


The Rez-parameter

This is a parameter that is passed to every object rezzed in SecondLife by the rezzer (avatar or other object). it is an integer value, and can be retrieved by the rezzed object at any time.  TeuluBreedables feed and floss use a 4-digit rez parameter to pass settings into the them on-rez.  Rezzing by an avatar or with parameter 0 reverts to stored settings.

TeuluBreedables feed and floss use this parameter on-rez to determine settings. If 0, then the stored settings in that specific feed or floss are retained and used, otherwise:

The rez paramter format we use is a 4 digit number, between 1000 and 4000. Each digit represents an individual setting as follows:

1st digit: Mode

 1: Owner-only

 2: Group-only

 3: All

 2nd Digit:  Float text

 0: Off

1: On

3rd digit:    Style

0: Feed Bucket

1: Furb Bowl

2: Dog bowl

3: Cat bowl

4th digit: Design (Bucket-o-feed only)

0: Neutral

1: Blue

2: Pink

And that’s it. So if we were to rez a Bucket-o-feed with the parameter 1000, The bucket would be rezzed and switch to Owner-only access mode, Float text off, Bucket-o-feed style, with the neutral texture


If we wanted to rez it in group mode, float text on, as a pink dog bowl, we’d rez it with the parameter 2122

and so on.


Guide for scripters:


If you’re new to scripting, things can get confusing, especially if you’re creating an auto-rezzer that is compatible with multiple brands. So the following is only a guide, some of which will be useful for beginners and novices.

    1. Try to keep TeuluBreedables settings separate from other brand’s settings. this will keep confusion and script/rez-time issues to a minimum.

    1. Store your TeuluBreedables settings as 4 unique integer values corresponding to the values documented in this guide. This reduces the need for conversion routines to generate the final rez parameter. For the access-mode, if your starting value is 0, remember to add 1 to the value when generating the rez parameter.

    1. In the rez parameter, which is a 4-digit number, the first digit (access mode) must be 1 or higher, the remaining digits can be 0 if desired. This is because with integers, leading 0s are omitted, leading to an incompatible rez-parameter being generated.

    1. The 4 settings are required by both Floss and Feed, but the floss currently only supports 1 design (neutral). for floss, leave the 4th digit as 0. If we change this in a future update to the feed or floss, this guide will be updated accordingly.

    1. This is just an example of how to assemble the rez parameter – use the following equation: (mode * 1000) + (floatText * 100) + (style * 10) + design. Assuming you’ve stored the settings as described above, this will give you the 4-digit number required for rezzing. Obviously, you’ll need to replace the variable names with the names you’ve chosen to use for those variables in your script.

    1. Sensing for existing feed: When scanning inworld for feed that’s already rezzed out, to prevent problems from hackers, or creators using prims with similar names to our feed or floss, check the OBJECT_CREATOR value. You can get this information using the following function: llGetObjectDetails(object_id,[OBJECT_CREATOR]); this will return a list containing the UUID of the creator. If it doesn’t match the creator (Furbella Resident’s UUID) then its a fake, or not a valid TeuluBreedables product, and must be ignored.

We hope this guide helps you with creating your auto-rezzer.