Time Needed : 30 minutes
So, presumably, you're feeling revitalised and unaffected by stress. You should have read Part 1 before getting here, and be prepared to wonder aloud, “Oh my God, what have I gotten myself into now?” when you see the code for your script. Please do not panic, flee the room, or worry about it in any way. You will be richly rewarded if you complete this section, bestowed with the joy of knowing you've completed it and now have a script you can call your own. Actually, give it a another name; “your own” isn't exactly a hip name for a script.
Right, so what do we need? Well, as mentioned in Part One you're going to need a text editor program. I use Notepad ++ which is free and does the job well, but use any you like, but not something like Word, just one that edits text only files.
Find your script file that you generated in part one of this guide.
Navigate on your computer to find the script file that we are now going to edit in our text editor. Found it? Good, let's move on to the next step.
Prepare to open the script file.
Right-clicking on a file in Windows now gives you the option to “open with,” and right-clicking on a file with Notepad ++ installed, gives you the option to “edit with notepad++.”
Alternatively, you may double-click the file and Windows will prompt you to select an application to open it with; in the list of options, find your text editor and click then check the “use default” checkbox.
You can also open your text editor to find and load the file. You'll be spoiled for choice, but if you've never seen code before, open it and be prepared to worry *unnecessarily*.
The Script code !
Now for some this will be a “what have I got myself into” moment, others may just take it in their stride, but one thing is for sure, code isn't pretty to look at, unless you're a bit strange. Just don't fret, and don't chicken out now.
Looking for the tweakers
As you read through the code, you'll notice lines that say “Uncomment to…” These are the ones we're interested in, but only the ones that control the variations in the flame for our tutorial.
When a line is prefixed with // JWildfire ignores it for these are just comment instructions; when those // are removed, JWildfire acts on whatever is after it.
So, in our screenshot, we see Variation 1, then a bunch of stuff, which we'll ignore for the time being. Then “(uncomment to play around)” That's exactly what we're going to do. So, while I've highlighted the fourth and sixth items here, they're just for show; we'll change some others as seen in the next step.
Uncommenting and brave steps
So, using your text editor, go to one of the // lines and delete the // characters only.
You'll notice that they're divided into two groups of three (random affine transforms) and three (random affine post transforms). Only change one set, that is, only change the ones below (random affine transforms) or below (random affine post transforms), but not both. So I've selected the top set and removed the comment markers //
Save your script
Once you've removed the comment markers you want, then save your script in your text editor. It should just save and overwrite what you had already and in the same location. So save away.
Scan and Run
JWildfire gets its list of scripts when it starts up, so even if you've saved your script, JWildfire won't know it's there just yet. It will be visible if you close the software and restart it. Fortunately, there is an easier way. There is a Scan button in the scripts section. Clicking the Scan button will rescan the scripts area for new or updated scripts. After that, you're ready to click Run, which will run your updated script with your changes. Go ahead and press the Run button.
Our new fractal
JWildfire now runs the lines in the script that had commands to randomise settings because we uncommented them. So the ones I uncommented controlled scale and position, and because they're randomised, our fractal now looks different, and the best part is, it will look different again every time you run the script because it's picking up random values from those areas. Isn't that cool ?
Ok, I'm sold , let me uncomment some more.
Returning to our script, let's uncomment something else on a different variation, in this case bubble. I'm just uncommenting its scale, so it's now random. After you've made your changes, return to step 6 and save your script, then scan and run it again.
Wow, now look at what is going on.
So now, each time we run the script, we get more and more random versions of our original flame; congratulations, you now have a cool script you can run again and again to get different results. If you want people to try it for themselves, make a zip of the script file and the description text. Edit the text file that goes along with your script file to show information back to whoever sees the script. Just don't change its name!
Am always happy to show and have new scripts for the community, so please feel free to send them to me via the website.
In the next episode, we’re going to dive deeper, and this is where you’ll see the most changes, and feel the most creative, but it can be a bit scary, but the worst that will happen is you’ll get an error, it’s not like you’re going to break anything, so relax!