Join us in Outworldz at or follow us:

[Table of Contents]

Make a Breedable Pet Troubot Robot for Second Life

This is Part 3 - Making a breedable pet Troubot Robot for Second Life

Previous: Making a Home flag for a breedable pet in Second Life.

This photo shows the Troubot Robot standing. It is happy and well fed as it is shiny and glowing. In this article, you will assemble a similar Troubot Robot.

Troubot Robots are similar to other breedable animals on the grid. They can be bred for colors. They have two colors, with the initial generation Troubot Robot sporting colors of red, green and blue to start off with.


The head is a sphere. Make a prim, and change it to a sphere shape.

Set the color to blank, or white.

Change the sphere to have a Dimple of 0.35 and a hollow of 95%.


Make another sphere and make it slightly smaller than the helmet. Place it inside the helmet.

Update 8-15-2012: There is a second set of eyes that will work with a wider variety of pets in this article.

Now add the eye textures to the head inside the content tab. You must add all the textures that are in the folder "Robot\XS Robot\Eyes" in the script zip file.

They look like this example of 10;4;2;10.jpg, which is a 4 X 2 frame script. These numbers represent the number of frames across and up in each texture.

When combined with the proper script, they look like this:

You can add as few or as many as you want.

It is important that the textures be loaded in pairs. The names should not be changed.

Now add the xs_eye script and the xs_sleep script to the head. These plugins will animate the eyes every time you touch them. The xs_sleep script is a particle plug-in that will make Zzz's appear when the Troubot Robots are sleeping.

Add this texture for the Z's to the head prim where you put the eyes:

Once you have it and the scripts loaded, pull the head out and rotate it so that you can position the eyes to face front.

Test the eye effect by clicking the head. The eyes should change each time you click.


Make a cylinder prim and color it black. It should go well up into the head so that in later step we can animate the head to pop up higher.


Make a sphere. Set the Dimple B to 0.5.

Shift-copy the dimpled sphere, flip it over and slide it under the top. Leave a gap between them.

Color the top and bottom spheres blank, or white.

Glow Belt

Now make a cylinder prim and fit it between the two spheres. Make the cylinder prim tall enough to go well up inside the top and bottom halves. We will use this to make the belly band animate in a later step.

Color the belly band light blue, and add a decent glow to it. I used 0.1 for glow:

Arms and legs

You will need this sculpt to make the Troubot Robot arms and legs.

Save it to disk, upload it to Second Life, and add it to a sculpted prim:

Flip the texture to 'Inside Out'

You will end up with a sculpt you can use for arms and legs:

Now upload the texture for the arms and legs:

Upload the texture, and drag and drop it onto the arm/leg: Flip the texture Vertically to get it to fit.


Make the feet from this sculpt. Save it to hard disk, upload it, and apply it to a prim type = Sculpted:

Now save and upload this foot texture:

Apply the foot texture to the sculpted prim:

Assemble the Troubot Robot.

Now is the time to shift copy the arm/leg. Make two legs, two arms, and as many fingers as you want out of them, and put them into a standing position.

Later, you will be able to change these positions to sleeping, waving, and walking. For now we just want a normal standing pose.

What size do I make it?

You should make your Troubot Robot baby-sized. The Troubot Robot grows from baby size and becomes 10% larger and larger for 7 days. So it will be 200% larger when full sized.

Describing your Troubot Robot

You must change the description of certain prims. Not the name, the description!

Change the description of the prim that holds the eyes to 'eye'. The eyes will be able to turn black when sleeping if this prim is described as 'eye'.

You must also change description in the body prims and any other prims that will show the two breeding colors to represent two colors: color1 and color2.

I chose to make the top of the body color1 and the bottom color2. You may change the helmet, the arms, and legs and fingers if you wish. Any prim with the description 'color1' will take on one color; any prim with the description 'color2' will take on color 2 when the animals breed.

This is what it would look like with the top and bottom labeled color1 and color2 if the breeding resulted in Blue/Green

This is what it would look like under the same breed if more prims were described as color1 and color2

Linking your Troubot Robot

XS pets have an important root prim. The original Quail was set so that the root prim was very small and that's the way the scripts still work. These Troubot Robots have a plug in Animator that will animate them to walk, sleep, wave, and stand.on this root prim.

Create one last prim. Make it a type=box, a flat piece, and place it directly under your Troubot Robots feet:

Now select every prim, and select the base prim last, then press Ctrl+L to link them. You will know you have done this correctly when the root prim turns yellow:

Rotate the Troubot Robot.

The Troubot Robot is going to walk in the direction of the Red arrow in the above picture.

Edit the Troubot Robot, then carefully note the direction of the red arrow, and select 'edit linked part'. Press the shift key and click the base prim so that is is not selected. Now rotate the Troubot Robot to the right:

Naming Your Troubot Robot

This Troubot Robot must be named 'Troubot'. You can change the name in the globals, and you must set the name of the object to the same name as is located in the all the globals in al the scripts. There is a section on modifying your Robot coming up towards the end.

Add the flag to your Troubot Robot

Put a copy of the Home Flag inside the Troubot Robot. One of the menu options when people click their Troubot Robot is to get a copy of the Homing Flag.

Scripting Your Troubot Robot

Now add the following scripts into the Troubot Robot:

Be sure to change the string SECRET_PASSWORD = "top secret" to something else in ALL scripts. else!



Put all the scripts inside the Troubot Robot and compile them. They MUST be named correctly, or the Troubot Robot will die and delete all your scripts when xs_brain is loaded. They must be all running and have the correct names.

Update 8-15-2012: There is a new global switch in xs_brain that is now set to FALSE to bypass the security of having every script named and to have the correct count of them. This tripped up a lot of people. You can set this switch SECURE=TRUE to enable the original, more secure behaviour.

Add the brain script

Add the xs_brain script and compile it.

At this point, your contents should look like this:


There are many other sounds that can be loaded into the Troubot Robot. I wrote a optional custom plug-in script that is located in the Troubot Robot folder.

You can optionally add the script xs_sound_module to the Troubot Robot root prim. This module supports dozens of sounds. I have selected a few sounds that I like from the zip file and set them into the list inside the sound module.

Upload all sounds from the folder "XS Quail\Robot\XS Robot\Troubot\Robot Sounds", and add the sounds to the Troubot Robot root prim.

One simple rule

Don't take a copy to inventory of any Troubot Robot and then re-rez it. If you re-rez the Troubot Robot, it will die. Troubot Robots must be born from a nut and bolt 'egg', or they must be stored and born from a Cryo-crate.


Set the permissions on the scripts in your Troubot Robot to no modify. You should also set the outer-most permissions of the Troubot Robot to no mod so that people cannot put scripts inside your Troubot Robots to feed them. The pets MUST be Next Owner Copy.

Make a Copy

Now that you have assembled the Troubot Robot, set the scripts in it to NOT running and take a COPY of it into inventory. If you made a mistake, you will need to make changes on the copied one and you will be able to rez it, and start the scripts running again. If you re-rez a running Troubot Robot from inventory, it will delete the scripts and you must add them again.

In the next section, you will put it into an nut and bolt 'egg'.

The next lesson will teach you how to make an egg and from it, give birth to your first baby Troubot Robot!

Next - Part 4 - Making an Nut and Bolt Shaped Egg

Back to the Best Free Tools in Second Life and OpenSim.