[Back to Contents]

Wizard Creator


Getting Ready
Get a Screenshot
Start the Wizard Creator
Creating the Wizard
Adding Questions to the Wizard
Saving the Wizard

Getting Ready
  Of course, the first part of getting ready to create a wizard is to have a formula! If you have not read the "Making a Formula Ready to be a Wizard" section of the Advanced tutorial, please do so. A wizard is created from a formula, but to make a good wizard your formula must be setup using variables to allow the end-user to change settings of the formula. Without variables in the Initialization of a formula there is no customization within the wizard and the formula will simply spit out the exact same thing every time (which means it might as well just stay a formula).

  Your formula must be loaded up into the Formula Input window. If you have not loaded it, click on the menu Advanced then Formula Input to show the Formula Input window. On the Formula Input window, click the menu Formula then Open or just press Ctrl + O. Select your formula and click the Open button.

 

Get a Screenshot
  Before you start the Wizard Creator you should get a screenshot of your element using the default settings of the formula. You can get a screenshot from any application that you want (Elementary, Construction Kit, NoLimits Simulator or Editor). For this example, I made a screenshot of the element in Elementary. I turned off the Grid, Plot Points, Beziers and Entry Arrow before taking the screenshot.

  Now, this image is way too big. The wizard interface will only show the image at 120 x 90 pixels in size. So we need to shrink it down to size. By limiting the size of the image, it helps keep any downloads of the wizard very small. After softening up the image and resizing it, it looks like this:

 

Start the Wizard Creator
  Now let's start the Wizard Creator. It can be started by either clicking the menu Formula then Wizard Creator on the Formula Input window or by clicking the menu Advanced then Wizard Creator on the Main window. For this example, I am going to do a basic Corkscrew element. The formula is:

Initialization
radius = 5
stretch = 1
loops = 1
lc = loops * 2

Formula
x = sin[ lc * Pi * t ] * radius
y = radius - cos[ lc * Pi * t ] * radius
z = t * stretch * 2 * Pi * radius
b = -t * (pi * lc)

  When the Wizard Creator starts up, it might look a little confusing. So we'll take it step-by-step.

  The window is split into 3 main areas. In the upper-left are the variables. You'll notice that all 4 variables from the Initialization section of the formula are listed here. These are the variables that we can make Wizard Questions out of. In the upper-right is an area used for defining the Wizard Questions themselves. This is where you enter a short description and extended information of what the variable being set is used for in the formula. Here is also where you will set the default value, as well as set the minimum and maximum values. You'll notice 2 check-box's here also, they let you decide if the value entered can have a decimal point or if it can be equal to zero. We'll get into this more in a moment. The bottom area of the window is the actual configuration of the wizard itself. This includes the name of the wizard that will be displayed in the wizard selector as well as the thumbnail. It also shows the Wizard Questions that are being used by the wizard.

 

Creating the Wizard
  Let's start with this bottom area. Firstly, I want to add a name for my wizard since "Un-Named Wizard" really stinks. Since many different people might make a wizard, you should always start the wizard name with your own name. You can use your online nickname. And include the type of element the wizard will create. For this example, my wizard's name will be:
    Tia - Corkscrew

  It is also a good idea to set the name of your thumbnail image to the same as your wizard name. For this example, my thumbnail's filename is:
    Tia - Corkscrew.gif

  Now I want to go ahead and set my thumbnail. So just click the Set Thumbnail button, select your image file and click Open. In order for Elementary to show your wizard in the Wizard Picker, it must be in the same folder as the NoLimitsElementary.exe file.

  Now this bottom section of the window will look something like this:

 

Adding Questions to the Wizard
  Let's move up to the top half of the window and start creating some wizard questions. Select a variable from the list on the left. You should select them in the order you want the questions presented to the end-user. Remember, that when you select a variable, the question, description, values and settings are for that variable! If you select "radius" and then type the question "Number of Loops?" the end-user will think they are entering the number of loops but the engine is placing the value in "radius".

  Once you have selected a variable, click the Add Variable button under the list. You'll notice that the right-hand side of the window will enable, allowing you to enter data. For our example, let's select the "radius" variable first. Remember the first word in this, "Brief Description." When entering this, be as brief and simple as possible. You will only get perhaps 64 to 96 characters to display on the Wizard Question window the end-users see. So be short, simple, to the point or basically... Brief! For radius, let's just make this value:
    Radius of Corkscrew

  Next is the detailed description. Even though you have much more space to work with here, you can not write a book. You still need to keep it short, but can give a bit more detail about how the variable will effect the element. You can probably get away with 160 to 256 characters here, but you should keep it simple. For this variable, let's just simply say what it will do:
    The radius determines the overall size (width and height) of the corkscrew.

  And now we will move on to the values that can be entered by the end-user. We also need to put in a default value for our variable. The default value we used in the formula for radius was 5. But we want the end-user to be able to adjust this to their needs. So let's give it a Minumum value of 1 and a Maximum value of 20. And go ahead and put in our default value of 5.

  Notice that by default the check-box Allow Decimal Values is checked. This means that the end-user can enter a value with a decimal point. So the end-user could enter a value of 7.5 if they wanted to.

  Next to this, you'll notice the check-box Allow Value of Zero is unchecked. In this example there is no way that the end-user could enter a value of zero because the minimum value is 1. This is a setting for when the minimum value is less than 0 and the maximum is greater than zero. For example, minimum is -5 and maximum is 5. Zero is clearly between those values, however, many calculations will fail with a 0 in them. With the default setting the end-user could enter a value from -5 to -0.000001 and from 0.000001 to 5 but could not enter a value of 0 (zero). If your formula can handle a 0, then go ahead and put a check in the check-box to allow the end-user to enter 0.

  At this point, the top half of the window should look similar to this:

  A quick double-check of all your settings and descriptions is a good idea. Notice at the very top of this area is a space labeled Internal Variable. This will display the variable that will be filled in by the answer to this question. So this is a good time to make sure you entered the correct question, description and values for this variable. Then click the Add to Wizard button. The top half of the window will disable again, and this question will be formatted to the wizard style and added to the wizard. You can see it listed on the bottom half of the window. It will look similar to this:

  Repeat these steps for the next variables you want to add to the formula. In this example, we don't want the end-user to be able to modify the "lc" variable. So we will not create a wizard question for it.

  Select the variable "stretch" and click Add Variable. Fill in the following information:
  Brief Description
    Stretch of the Corkscrew?

  Detailed Description
    The stretch determines the overall length of the corkscrew. Each value is approximately 30 meters.

  Minimum Value = 1
  Maximum Value = 10
  Default Value = 1
  Allow Decimal Values = YES
  Allow Value of Zero = NO

  Press the Add to Wizard button.

  Repeat for "loops" and enter the information:
  Brief Description
    Number of Corkscrews in a Row?

  Detailed Description
    The number of corkscrews in a row to build.

  Minimum Value = 1
  Maximum Value = 4
  Default Value = 1
  Allow Decimal Values = YES
  Allow Value of Zero = NO

  After adding this variable to the wizard, the bottom half of the window should be similar to this:

  Notice that we did not include the "lc" variable. This is because we do not want the end-user to be able to modify that variable from the wizard.

 

Saving the Wizard
  Click the Save Wizard button. You will be asked for a location and name to save the wizard. Almost always you will leave the folder alone and enter the same name you gave your wizard. In this example, I will enter in "Tia - Corkscrew" and click the Save button.

  Your wizard is now saved to the hard drive. You can test your wizard by clicking on the menu File then New Element Wizard from the main window. The Elementary Wizard window will show up. If your wizard is not showing up, then the file is not in the correct folder. Simply close this window by clicking the Cancel button, move or copy the .ewizard file into the NLEWizards folder, and start the Elementary Wizard again. The window will look similar to this: