User:Yumi Murakami/Weaver Spell Grid

One of the things I always wanted to make but never managed to was a magic wand, because I couldn't think of original things to put in it! This was an early experiment with something to go in it, but it became rather over the top, not least because it involves a HUD with 200 prims.

This HUD basically allows you to draw simple shapes on a grid. In order to use it, you'll need a fairly complex prim shape (too big to actually provide a script to build! If anyone knows of a good prim parameter extractor/dumper that works for huge objects let me know and I'll use it). Here's what it must include:

100 prims arranged in a 10x10 grid with each grid cell being 0.0033 units along each axis, and named as follows: an @ sign, followed by the coordinates of the cell in the grid as two numbers separated by a comma, and with 0,0 being the center. So the center prim would be named "@0,0", the top left would be named "@-5,-5", and so on.

16 prims used for color selection named t0, t1, t2, t3.. up to t15.

One prim called "CurrentColor" used for indicating the current color.

Some number of prims used to select the depth of angle when drawing curves. These should have a name starting with an "=" followed by the ratio of the curve. So there should usually be an =0 for straight lines, plus others with different values - up to you.

One prim called "button" which is used to start the generator.

50+ or more (depending on how complex you want it to be) prims named "nano" which are used for the actual drawing. THey can be bare plywood cubes and don't have to be in any particular position.

Pressing the "button" prim will cause the grid to spit out a list of "magic words" which can be used to recreate the object. Here's the scripts for the prim object you need to be able to rez objects in this way. This script goes in the root:

This also needs some number of "nano" prims, at least as many as were in the grid you used. This script goes in each nano (yes, I know that's awkward, but I wanted to do the decoding as fast as possible):