DO NOT BUY THIS PRODUCT - IT IS FOR DEVELOPERS ONLY!

If you develop pose-spots, static or animated furniture with poses, or anything of the kind, then by deriving from this product you open up a whole exciting new world of possibilities!!

The DN AutoBubble allows you to make the avatar produce speech-bubbles automatically. What the avatar says can be anything you like -including triggers for other animations- and you can even make it say things at random!

The product itself is nothing but IMVU chair with a special Flash widget attached to it. So you can make pose-spots or furniture out of this product in exactly the same way you do with the ordinary chair - but the Flash widget gives you the power to add speech bubbles to your product. The speech bubbles can be anything from a single bubble that fires when the avatar goes to the node, to a long, cycling, randomised, timed, multi-threaded monologue that even includes trigger words!

To use AutoBubble you have to make a file with the text of the bubbles in it. This page describes how to do that. It is divided into 2 parts: Easy - for a single bubble - or a timed sequence of up to 15 seconds; and Advanced - for the hardcore who want to use advanced features =) This page contains tools to help you create, test and edit the speech bubbles with ease.

 

PART 1: EASY -

How to make a single bubble, or a short timed speech

Take a look at the tool below. It basically has a slider, a text box and a big ole save button. Move the slider to indicate when you want a bubble to be spoken, (i.e. how many seconds after the avatar goes to the node) and type in the words you'd like the avatar to say at that time. You can use trigger words too, and if you'd like to split a single bubble in two, type '\n' (without the quotes) which works like the Enter key. Write in as many speech bubbles as you like. When you are done, hit save =)

 

 

Save the 'bubbles.xml' file, and open up create mode to derive from this product.

Whether you are adding animations, meshes, textures or anything else, do everything exactly as you normally would. Next, you have to put the 'bubbles.xml' file into the same folder on your computer where all the other files are for this product. To open up the correct folder, simply click on the symbol in create mode that looks like a folder, and put the file in there:



Once you have added the file as as asset, you may need to update, save, close and reopen in create mode.

If at any point you want to update your bubbles.xml file in this product, simply replace the file in the folder.

Happy AutoBubbling!!!

 

PART 2: ADVANCED -

How to create code for advanced features

In this advanced section, you will find instructions and numerous examples on how to create the code that the Flash widget reads. It is divided into 8 'levels' that walk you through how to create the code by hand =)

BUBBLE TESTER

Since it is one enormous pain in the derriere to upload the product to test it in the client every time you make a little change, below is a little app that simulates exactly what bubbles you will get from what code. You can use it to test your output before uploading to the client. Feel free to copy and paste the examples in the left box and click 'Go'. Of course, it's much more fun to actually see it in the client - especially if you are using trigger words, but this tool should be helpful for debugging. You can also save your code directly from it into a file =)

 

 

LEVEL 1 - Getting it to say something

Either use the Bubble Tester tool above, or open notepad on your computer, and type (or cut'n'paste) the following:

<speech>
	<bubble>lol</bubble>
</speech>

This is the simplest sort of file possible. All your files must begin with <speech> and end with </speech>, and the words you want the avatar to say in a speech bubble must begin with <bubble> and end with </bubble>. These are called tags. Be careful to respect upper-case and lower-case in tags (in other words don't use capital letters unless they are used in this description). The indentation is just there to make it look pretty. Between the <bubble> tags and the </bubble> tags you can write whatever you want - this is where to write the words that you want the avatar to say!

If you have written this (or pasted it) in notepad, you need to save the file as 'bubbles.xml'. It's important that notepad not put its usual '.txt' on the end, so save the file by going to File->Save as, and then typing "bubbles.xml" with the quotes. Save the file. If you have pasted code into the Bubble Tester, you can save it directly to the correctly named file by clicking on 'Save bubbles.xml'.

Now you need to add the file to your product in the previewer. So derive from this product and add the bubbles.xml file as explained in the 'Easy' section, above. If all is well, you should see your avatar say 'lol' as soon as he or she goes to the pose node =)

 

LEVEL 2 - Saying more

How do you make the avatar say more? One simple way is to put a line-break somewhere in string of words to be spoken in the bubble. This breaks the bubble in two, and, as explained above, is done with "\n" (backslash n, without the quotes). So in the following example:

<speech>
	<bubble>lol\nI'm lovin' this pose!</bubble>
</speech>

two bubbles will appear. The first will say 'lol' (triggering the corresponding animation in the avatar) and the second bubble, appearing instantly after the first, will say 'I'm lovin' this pose!'

Though a quick line-break is often useful, as we shall see you can have much more control over your bubbles if you put them between separate pairs of bubble tags. The following gives exactly the same output in the client as the example above, the only difference is that 'lol' and 'I'm lovin' this pose' are each written between their own bubble tags.

<speech>
	<bubble>lol</bubble>
	<bubble>I'm lovin' this pose!</bubble>
</speech>

 

LEVEL 3 - Perfect timing

Now that you know how to get an automated 'lol' or two when the avatar sits down, you can move on to more elaborate, timed sequences. You can add more information about when you want the speech bubbles to appear by using what are called attributes inside the <bubble> tags. For instance, if you want the avatar to wait for 2 seconds before saying 'lol', then you place wait="2" inside the bubble tag, in the following way:

<speech>
	<bubble wait="2">lol</bubble>
</speech>
      

In this simple way you can create a timed series of bubbles:

<speech>
	<bubble>Somewhere...</bubble>
	<bubble wait="1">...Over the rainbow..</bubble>
	<bubble wait="2">Skies</bubble>
	<bubble wait="2.5">are</bubble>
	<bubble wait="3">bluuuuuuue</bubble>
</speech>
      

You now know enough to make the avatar recite an entire speech or song =) Note that the order that the bubbles are written inside your file is not important. You can write the first one last for all the computer cares. It is the 'wait' attribute that tells the client when to fire the speech bubble. If there is no wait attribute, the computer assumes a default value of 0. This is why in the examples given in Levels 1 and 2, above, the speech appears on the screen as soon as the avatar takes the pose, with no waiting time.

 

LEVEL 4 - Random timing

There are a few different ways to introduce randomness into the avatar's speech, so it doesn't always say the same thing. One way is to include a 'give-or-take' value in the wait attribute. This is done by putting a question mark after the wait value, followed by the give-or-take amount. So:

10?2 means '10 seconds give or take 2 seconds' i.e. 'anywhere between 8 and 12 seconds'

7.5?2.5 means '7 and a half seconds give or take 2 and a half seconds' i.e. 'anywhere between 5 and 10 seconds'

5?5 means '5 seconds give or take 5 seconds' i.e. 'anywhere between 0 and 10 seconds'.

The following code will make the avatar say the numbers 1 through to 5, spaced out randomly through a 5-second period:

<speech>
	<bubble wait="2.5?2.5">1</bubble>
	<bubble wait="2.5?2.5">2</bubble>
	<bubble wait="2.5?2.5">3</bubble>
	<bubble wait="2.5?2.5">4</bubble>
	<bubble wait="2.5?2.5">5</bubble>
</speech>

 

LEVEL 5 - Repetition

Just as 'wait' is an attribute you can use to tell the widget to activate the speech bubble at a certain time, so 'repeat' is another attribute that tells the computer how many times to repeat the bubble. The following will make the avatar say 'lol' 5 times in a row as soon as it assumes the pose:

<speech>
	<bubble repeat="5">lol</bubble>
</speech>

The repeat attribute can also have a 'give-or-take' value in the same way that the wait attribute does, so

<speech>
	<bubble repeat="3?2">lol</bubble>
</speech>

means 'repeat lol anywhere between 1 and 5 times'.

But no matter how many repeats you have, without any timing information they are just going to fire one-straight-after-the-other. To space them out, use another attribute: 'interval'. Consider the following:

<speech>
	<bubble wait="5" repeat="3" interval="1.5">lol</bubble>
</speech>

Three attributes are used: wait, repeat and interval. The above code means 'wait 5 seconds, then repeat lol three times at 1.5 second intervals'. Again, the interval attribute can have a give-or-take value too, so:

<speech>
	<bubble wait="5?5" repeat="3?2" interval="2.5?1.5">lol</bubble>
</speech>

means 'wait between 0 and 10 seconds, then repeat lol between 1 and 5 times at intervals of between 1 and 4 seconds.

If you do not have an 'interval' attribute, the program will use the 'wait' value by default. For example, in:

<speech>
	<bubble wait="5" repeat="4">lol</bubble>
</speech>

there is no interval attribute, so the wait value is used as the interval. This then means 'wait 5 seconds, then repeat lol 4 times with 5 second intervals between them'. Note that if you set repeat to 0 it means 'say it zero times' (i.e. 'don't say it'), and if you set repeat to -1, that means 'repeat for ever'.

 

LEVEL 6 - Going solo

For more complex speech patterns, an extremely useful attribute is 'solo', which makes any other repeated bubbles you've got going on just shut up. In other words, say you have one bubble repeating the word 'hello' every 5 seconds for ever. When a bubble with the solo="true" is spoken, the repeating 'hello' bubble will stop repeating. An example should make this clearer. Consider the following:

<speech>
	<bubble  repeat="-1" interval="5">He loves me!</bubble>
	<bubble wait="2.5" repeat="-1" inverval="5">He loves me not.</bubble>
</speech>

This will repeat 'He loves me!', 'He loves me not.' for ever. To remind you how it works:

The 'He loves me' line has 'repeat="-1" interval="5"'. The value of the wait attribute is 0 by default, so this means 'Start straight away, repeating "He loves me!" for ever every 5 seconds'.

The 'He loves me not' line has 'wait="2.5" repeat="-1" interval="5"'. This means 'Wait 2 and a half seconds, then repeat "He love me not" for ever' every 5 seconds.

Played together, the two lines have the effect of making the avatar speak every 2.5 seconds, alternatively saying 'He loves me!' and 'He loves me not.'

This will go on for ever unless we stop it at some point, which is where the 'solo' attribute is useful. Let us add one line to the above file. Look at the third bubble tag below:

<speech>
	<bubble  repeat="-1" interval="5">He loves me!</bubble>
	<bubble wait="2.5" repeat="-1" inverval="5">He loves me not.</bubble>
	<bubble wait="20?5" solo="true">Arrrgh! I can't decide!!</bubble>
</speech>

The new line we have added means 'wait anywhere between 15 and 25 seconds, then say "Arrrgh! I can't decide!!", and stop all the repeats in their tracks.'Arrrgh! I can't decide!!' will be the last words spoken.

 

LEVEL 7 - Picking a bubble at random

So far we have see two tags: speech, which surround the whole file, and bubble, which surrounds each set of words. You can use a third sort of tag, which is couldBe (note the capitalization) for setting out different options of what the avatar might say. This tag goes inside the bubble tag, as follows:

<speech>
	<bubble>
		<couldBe>Yes!</couldBe>
		<couldBe>No!</couldBe>
	</bubble>
</speech>

Here, instead of directly placing the words to be spoken inside the bubble tags, we have placed a couple of 'couldBe's. The program will randomly select which one to use. So half the time, in assuming the pose spot, the avatar will say 'Yes!' and half the time the avatar will say 'No!'. There is no limit to the number of couldBe's:

<speech>
	<bubble wait="8?2">
		<couldBe>Cool pose!</couldBe>
		<couldBe>I need a stretch!</couldBe>
		<couldBe>I can't keep this up for much longer!</couldBe>
		<couldBe>Gosh! I think I've done myself a mischief!</couldBe>
	</bubble>
</speech>

Here, there are 4 possible things the avatar might say after 6 to 10 seconds (look at the 'wait' attribute in the bubble tag). They are all equally probable, so there is a 25% chance of saying any of them.

You can change the relative probability of each couldBe using a new attribute: prob. Only ever used inside couldBe tags, prob works likes this:

The widget adds up all the values of the prob attributes in a set of couldBe's (if there is none specified, a value of 1 is assumed by default). Call that value the total. Then for any couldBe to be selected the probability is its prob value divided by the total.

Examples will help:

<speech>
	<bubble>
		<couldBe prob="7">Yes!</couldBe>
		<couldBe prob="2">No!</couldBe>
		<couldBe prob="1">Maybe</couldBe>
	</bubble>
</speech>

The sum of all the prob values (7+2+1) is 10, so this means 7 times out of 10 it will say 'Yes!', 2 times out of 10 it will say 'No!' and there's 1 chance in 10 that it will say 'Maybe'. It doesn't matter what the prob's add up to - only the relevant proportions are important, but feel free to make it all add up to, say 1, or 100, if that is clearer.

Don't take this die to Vegas - it's loaded!:

<speech>
	<bubble>
		<couldBe>You threw a 1</couldBe>
		<couldBe>You threw a 2</couldBe>
		<couldBe>You threw a 3</couldBe>
		<couldBe>You threw a 4</couldBe>
		<couldBe>You threw a 5</couldBe>
		<couldBe prob="2">yay\nYou threw a 6</couldBe>
	</bubble>
</speech>

If you do not specify a prob value it is 1 by default, so this die will fall on a 6 two times out of a total of 7 (about 29% of the time) instead of the usual 1 time out of 6 (about 17%).

Finally, go back to the 'He loves me' example, and make it pick the end result at random:

<speech>
	<bubble repeat="-1" interval="5">He loves me!</bubble>
	<bubble wait="2.5" repeat="-1" interval="5">He loves me not.</bubble>
	<bubble wait="20?5" solo="true">
		<couldBe>OMG! He truly loves he!!!</couldBe>
		<couldBe>Oh - he's a jerk anyway.</couldBe>
	</bubble>
</speech>

 

LEVEL 8 - Going with the flow

The final attributes that the program recognises are id, onComplete and dormant. These three together give you advanced control over the sequence of bubbles, by allowing you to specify which bubbles to call after a given bubble has been 'spoken'.

For you to call a bubble, it obviously has to have a name of some sort to identify it. This is the 'id'.

To actually call one bubble from another, use the 'onComplete' attribute. The value you set for this attribute should be a comma-separated list of id's of all the bubbles you want to call next. The onComplete attribute is the only attribute other than prob that can appear in a couldBe.

The dormant attribute, when set to 'true', tells the widget not to play the speech bubble at the beginning of the animation when the avatar first assumes the pose, but rather to wait until the bubble is specifically called by name from an onComplete. This attribute can only have the values 'true' and 'false'.

Consider this example:

<speech>
	<bubble onComplete="whatYouNeed" wait="1" repeat="4?2" interval="5?2">All you need is...erm...</bubble>
	<bubble id="whatYouNeed" dormant="true" wait="2">
		<couldBe prob="1">Love!</couldBe>
		<couldBe prob="3" onComplete="getItRight, holdOn">Money.</couldBe>
	</bubble>
	<bubble id="holdOn" dormant="true" wait="2" repeat="-1" interval="0.5">Wait!</bubble>
	<bubble id="getItRight" dormant="true" wait="8?3" solo="true">All you need is Love!!</bubble>
</speech>

Here, all the bubbles are set to dormant="true" except for the first one, which is the only one initially played. This has the avatar saying 'All you need is...erm...' a few times over, as if thinking. Once the repeats (between 2 and 6) have finished, the onComplete attribute tells the widget to look for a bubble whose id is'whatYouNeed'. It turns out that the bubble in question contains two couldBe's, and there's one chance out of four the avatar will say 'Love!', and three chances out of four it will say 'Money!'.

If it says 'Love' the process ends, but if it says 'Money', the onComplete attribute tells the widget to play two bubbles called 'getItRight' and 'holdOn'. The 'holdOn' bubble waits 2 seconds before firing, then keeps repeating 'Wait!' every half a second. It would go on for ever (since repeat="-1") but the getItRight bubble has also been stacked to play, and will appear after about 8 seconds (give or take 3). Since this getItRight bubble has the solo attribute set to true, when it is spoken all other repetitions are cancelled, and this speech bubble is the last one that appears on the screen.

 

This concludes the outline of the three kinds of tags used and their attributes. The attributes are summarised below for quick reference, together with their default values:

wait="0?0" -determines the time in seconds until the bubble is 'spoken'.

repeat="1?0" -determines the number of times the bubble is repeated.

interval (by default same as wait) -determines the interval between repetitions.

solo="false" -determines whether all other repetitions and sequences should be stopped.

dormant="false" -determines whether the bubble should be played when the avatar first goes to the pose node.

onComplete (no default) -determines which bubble(s) should be played next. Can appear in couldBe tags.

id (no default) -determines the name of the bubble, so it can be called from an onComplete attribute in another bubble.

prob="1" -determines the probability of a couldBe element being selected. The value is the numerator, and the denominator is the sum of all the numerators in the couldBe tags contained in the parent bubble. It can only appear in couldBe tags.

 

Many thanks for considering deriving from this product, and good luck!!