DragonSpeak Theory


DragonSpeak is the scripting language that was created by the creator of Furcadia to allow players to bring life to their dreams. This text will explain what DragonSpeak actually is and help you understand the basics on how to use it.

Table Of Contents
A. Starting Up: The Technicalities
B. Dragonspeak and the Furcadian Server
C. DragonSpeak Lines
D. DragonSpeak Types
E. Closing Comments

A. Starting Up: The Technicalities

Before we go any further, there are a few very basic things that I want to address about the files that store the DragonSpeak information for your dreams.

Every dream that you create will have two files. These files are a .map file and a .ds file. The .map file stores the information about the floor, shape and wall objects that you place in your dream. The .ds file stores all the DragonSpeak information that will be used with that .map file. The .map and .ds files should always be stored in the same directory (also known as a folder) on your computer, and they should both be named the same thing (ex. MyHouse.map and MyHouse.ds).

Each .ds file has two lines of text that are absolutely required in order for your dream to load correctly. One of these lines occurs at the very top (beginning) of your .ds file, while the other appears at the very bottom (end) of your .ds file.

The following line must always be at the top of your .ds file:
DSPK V01.10 Furcadia

The following line must always be at the bottom of your .ds file:
*Endtriggers* 8888 *Endtriggers*

Picture of example DS

All DragonSpeak code will be contained within these two lines of text, as seen in the picture. What they mean, or do, isn't that important. Just know that they tell the Furcadian server where your DragonSpeak code begins and where it ends.

Having said that, let's move on to how the server interacts with your DragonSpeak.


B. DragonSpeak and the Furcadian Server

Here is a brief overview of how your the Furcadian server uses your DragonSpeak.

Everything you do in a dream triggers what we call an action (moving, picking up an object, using an object, using your phoenix flame, etc.). The server grabs this action and gives it to your DragonSpeak file.

Your DragonSpeak file then takes the action and starts from the top of the file, checking all of the blocks of DragonSpeak code that you put in there. If there is a match, then the DragonSpeak file triggers up that block of code.

Example: You walk around, and your DragonSpeak file has a piece of code that is triggered whenever somebody moves. The Dragonspeak code will activate whenever somebody moves in the dream.

The action doesn't stop there, however. The action continues to move down your DragonSpeak file until it reaches the end of it. Every time there is match, that matching block of DragonSpeak code is triggered. So in theory, if you move a single step, you could trigger over a hundred blocks of DragonSpeak code, supposing you had over a hundred different blocks of code that look for whenever somebody moves.

Now we know that: the Furcadian server sends these actions to our DragonSpeak file, our DragonSpeak file then tries to handle these actions, and actions can trigger more than one block of DragonSpeak code. Let's take a look at an individual line of DragonSpeak and the different ways that it can be represented.


C. DragonSpeak Lines

A line of DragonSpeak starts off with a pair of numbers that are contained within parenthesis and separated by a colon. An example of this is (0:1). For the sake of this guide, I'll call these line "headers". They are what tell the server how to use the numbers you will eventually input into the rest of the line (more on this later). You must always start a DragonSpeak line with a header, or you'll get an error when you try to use your dream.

Most DragonSpeak lines also have some bits of information that the creator of the dream must supply. These parts are generally denoted by the character #, but text and variable DS may vary slightly in this syntax. For example, "(0:7) When somebody moves into position (#,#)," is asking you for the X (first #) and Y (second #) of the position that you're waiting for someone to walk into. No DragonSpeak line should ever be left with any #'s; they must always be filled in with some sort of number that lets tells the server where it needs to look, or what type of object it needs to pay attention to.

On top of that, the Furcadian server only cares about the numbers and the information that you specify for each line yourself. That means that all the words that are on the line are there for your benefit - they tell you what the line represents, but are not needed. The following three examples are all correct and can all be used to represent the same line of DragonSpeak:

Example 1. (0:7) When somebody moves into position (10,10),
Example 2. (0:7) (10,10)
Example 3. 0:7 10 10

Now, I personally wouldn't suggest using anything other than the top example unless you're very good at DragonSpeak and you're trying to save space. The other two examples make for a smaller DragonSpeak file, and won't take up as much space when you're editing, but they're a lot harder to understand what they mean.

That's it for the DragonSpeak lines. Just remember that the header of the line always needs to be connected with a colon, but the parenthesis are optional. The rest of the line only needs to have the numbers, or variable names, that the header requires. The rest of the "extra" text can be deleted if you like, though I only suggest it if you're an advanced DragonSpeak user. Let's next look at the five different types of DragonSpeak lines.


D. DragonSpeak Types

DragonSpeak is created by using five different types of script. Each type has a different first number in the headers of their lines. For instance, all "Cause" headers start with a 0, while all "Effect" headers start with a 5. The numbers also represent the order in which you'll generally place the lines of code. For instance, it wouldn't make sense to place an "Effect" before you place the "Condition" that is supposed to be true before the "Effect" takes place. We'll dive deeper into that idea on the next page, but first let's go over what each of the five types of scripts are.

Causes will be the first line of any block of DragonSpeak code. Without a Cause, you can't have an Effect. Makes sense, doesn't it? Causes can be anything from moving into a certain postion or picking up an object, to something a bit more advanced like having a timer go off every certain number of seconds. All Cause headers start with the number 0, and they're the first group of DragonSpeak lines you'll see in any of the DragonSpeak editor you use.

Conditions, if you have any, will always follow directly after the Cause. Conditions are the things that need to be true before the Effect will take place. For instance, you can have the Cause be "Whenever someone moves" but you only want the DragonSpeak Effect to take place if they're moving NW, so you add the condition, "And the triggering furre is facing NW". There are a wide variety of Conditions that can be utilized for an even wider variety of uses. All Condition headers start with the number 1, and they'll usually be listed directly under the list of Causes in any of the DragonSpeak editor you use.

Areas are the next type of DragonSpeak line on our list, and they deal with the Area in which the Effect will take place. Areas must be placed after the Cause and all Conditions, but before the Effect that you want the Area to be associated with. If you have multiple Effects that will take place off of a single Cause, then any Areas that you put in to the code will only affect the next Effect. Areas can be anything from a set rectangle or diamond area, to a specific position on the map, even to set number of steps in different directions from where you're standing. All Area headers start with the number 3, and they'll be the next to be listed on any DragonSpeak editor that you use.

Filters are probably the least commonly used of the DragonSpeak scripts. Filters decide where in the Area you want the Effect to occur. Say you want your Effect to take place inside this diamond Area, but only where the floor is type 2. Filters can help you achieve this. Filters, unlike Areas, remain even after the Effect that they were placed in front of. That means that if you place a Filter in front of your first Effect, unless you clear it afterwards with the "Clear all filtering" DragonSpeak line, it'll affect all the rest of the Effects that will occur as a result of that single Cause. All Filter headers start with the number 4, and they'll be listed after Areas in any DragonSpeak editor that you use.

Effects are the fifth and final type to look at. Effects are the lines that will change something about the dream that you're in. The change can be a new object being placed down, a change in some floor tiles, or even a MIDI being played. You can have as many Effects for a single Cause as you like, which is handy, because it saves DragonSpeak lines. All Effect headers start with the number 5, and they should always be the last of the scripts listed on any of the DragonSpeak editor that you use.


E. Closing Comments

Now that we have created a foundation of DragonSpeak knowledge, we will be able to build upon it in the following pages. The next page in this guide will deal with the basics on combining the different DragonSpeak lines together to form the blocks of code that will actually create neat effects for your dream.


Contact Us

Do you have a question that you couldn't find the answer to? Is there a tutorial that you'd like to see added to the MKb? If so, drop us an e-mail. The MKb is created for the Furcadian public, so in order to be effective, we need to know what information you want it to contain. If e-mail links don't work for you, just send us an e-mail at masons@furcadia.com. We look forward to hearing from you.

This page, subsequent pages and all content therein, unless otherwise stated is copyright Dragon's Eye Productions. Site maintained by The Beekin Scribes.