New to recent beta versions of Zelda Classic (the 2.5 betas, not sure since which build) is scripting, in the form of ZScript. This offers an unparalleled amount of flexibility as new effects, items and monsters are possible. Don't get me wrong; it's not easy to use. But, it's been designed in such a way as to let those who know, create, and those that don't, copy and paste. This tutorial will show you how to import someone else's script into your quest.
Most people should provide their scripts like this:
I myself wrote this script, to simulate a sign post from other Zelda games. I pulled it from the Script Library, specifically the Sign Post script.
The first thing you need to do is create a file for your scripts. A non-obvious fact is that all the scripts you use in your game must, textually, reside in the same file. While a pain, if you like organizing things like I do, it is also good, as you can look at all your scripts at once.
So, fire up good 'ol Notepad, and start typing:
"Woah, hang on! That isn't even in the script!" I can hear you screaming! But, not to worry. This is a standard definition that must appear exactly once at the top of every script file, no more, no less, no other place. So, script authors (should) leave it out of their script postings, so as not to confuse other people who might use two or more scripts. Which is why we're adding it here.
So, add it here, and then go File->Save As... Navigate to your Zelda Classic folder, and type: "myscript.z" (including the quotes). You can change the name to anything you want, but it must have the ".z" extension. The quotes are to avoid confusing Notepad, which will happily save it as "myscript.z.txt" if you're not careful, which is wrong.
Now, you can add the script to the file. Copy and paste everything from the example, and paste it somewhere underneath the "import" line. Then, go to File->Save. If you ever want to add more scripts, just paste them underneath this one, and it should be fine.
Now that you have a script file, you can import it into ZQuest, the editor. (If you don't, there's no point doing anything, as the script won't work. Duh.)
Go to Tools->Scripts->Compile ZScript... A little window will appear:
Hit Import, and a file selector will appear. Choose your script file, and hit OK.
Now, you'll notice that the "buffer" (whatever that is) has grown. Specifically, it's grown to the size of your script file! The buffer is where ZQuest stores the script data before it compiles it (which we're about to do).
Next, hit the Compile! button. ZQuest will then translate all the mysterious texts in the script into something it, and the computer in general, can read. If all goes well, you'll get a screen that looks a lot like this:
But, if the script has an error in it (computers are real Nazis when it comes to spelling and grammar), it'll look like this: (Complain to whoever wrote the script)
At this point, I'll assume that it went ok. After you "-- PRESS A KEY --", a new window will appear. This is where we assign numbers to our scripts, so that they can be set to various things:
Go ahead, indulge yourself. Click on the script in the right column, and click on any empty slot in the left column. Then, hit the little "<<" button in the middle. The script will magically jump over to the left!
Then, hit OK. A little confirmation window will pop up, in which you can hit OK again. The last thing to do is to save your quest (I assume you know how to do that).
Now, it's in our game, but it still won't work. Why? Because the game doesn't know where to run it! We have to set it to run somewhere.
As we're using the sign post script, we're going to need a graphic of a sign post. So, fire up the tile editor, and make one! Then, make a combo out of it. This is what I came up with (I'm sure anyone else can do better):
Place it on your map somewhere. That's where your sign is going to be. We're going to place the script on top of it. But! Scripts are positioned in pixels, not tiles, and further, you have to type them in, instead of dragging and dropping. I know, I know, but I didn't design it.
So, to get the exact position of our sign, use the "Screen Item" too, and click on the sign. It will then tell you the position of the location (If you plan on actually using an item on screen, you can then put the item back):
So, in my example, the sign is at (144,48). That is, 144 pixels from the left, and 48 from the top. Now we can create our script.
Go to Data->Freeform Combos. Freeform combos (henceforth FFCs) are combos that you can place anywhere on a screen, with pixel perfect placement. They are also the method you use to place scripts.
Each screen has 32 FFCs, and you can do whatever you want with them. For our purposes, however, we only need the first one. So, make sure "1" is selected, and hit Edit.
As you can see, an FFC has a lot of properties you can edit. It has a whole host of movement options, 99% of which are beyond the scope of this tutorial. The only ones we care about are the X and Y "Pos" (position). So, input the position you gathered two screen shots ago.
Note that you can erase the decimal places. While you can place them in increments of up to 1/10,000 th of a pixel, why would you?
Anyway, next thing is to assign a combo to it. You do that by clicking on the Combo box towards the top. Then, you want to choose an entirely transparent combo. For our purposes, #49 looks good.
Next thing we need to do here is assign the script to it. You remember which slot you gave the script, right? Good. Because, now we need to give that slot to this FFC. Pick it in the "Script" drop-down:
Now, we're just about done. But, we still need to assign arguments to the script. If you look at the Sign Post script page, you'll see that it lists the parameters of the script (well, parameter). In this case, the only argument is the number of the string to display. So, let's set that up.
Click on the Arguments tab, and you'll see 8 "D_" boxes. These are the arguments that are passed to the script. By default, they're all 0, but you can change them.
So, punch in the number of the string into the first box, and- what? Oh, right, we need to create the string first. Well, I'll let you do that, and we'll meet back here. Be sure to remember the number of the string!
Ok, going back to the Arguments window, punch in the number of the string you just created:
Now, hit Ok a few times, so you're back at the main editor screen. Save again, and now it's time to try it out! Make sure you've set up the DMap and the green square, and fire up ZC! (Note that you activate the sign by going up to it, and pressing A)

