Quests | Quest Basics

Warning! Quest creation is not for the feint-hearted.

Type and Instances

Lets start with an example, in my quest I want a user to pick up a torch and turn it on. The simplest way to represent this (it's not the only way) is as one object 'Instance' and two object 'Types'. The object types are 'Torch (on)' and 'Torch (off)'. So in the quest tool I would create two object types and one instance. If I want there to be two torches exactly the same I just create another instance using the same types. The instance must be assigned a starting object type, in this case we will start with 'Torch (off)'. So when a user enters a map area, they will see a switched off torch. So how do they switch it on, well that's an 'action' see below. One final point, every user sees there OWN torch so they cannot be shared amoungst users, in a sense every users is in their own unique quest world. However objects can be shared (and bought and sold) between users but this is not presently supported in the quest tool.

Actions

Actions are how a user interacts with objects. An action's main purpose is to change an object instance from one type to another. To switch the torch on we need a 'switch on' action and to turn it off we need another 'switch off' action. We can represent this as a diagram.
In fact what you are looking at is an image from the quest tool which hopefully makes the concepts easily understood. The grey circle with the '1' represents instance '1'. This is joined to object type 'Torch (on)' indicating this is the starting object type for this instance. Then there are two actions linking the object types with arrows indicating which direction they act. An action can also provide a description or 'narrative' for that action, so when the user switches on the torch we could provide some text such as 'You fumble with the switch and the torch gives out dim beam of light'.
One way to think of actions is as the choices available to a player with an object type. So lets say I want the user to be able to break the torch, I simply need a new action type 'break' (and a new broken torch object type), but where do I put it? Which object type? Well I need to put it on both.
An action doesn't have to change an object type, as we'll see later actions can have other attributes assocatied with them so actions can therefore be attached to just one object type. Say we want the user to be able to examine the torch. We just add an 'examine' action that points back to the 'broken torch' object type.
In this case we added the 'examine' action to the broken torch object type so the narrative could read 'The torch bulb is broken'. But what if I want two object instances to interact, say a key and lock or hammer and nail, well we can include two instances in an action and change both or just one of the object types of the instances involved.
In this case we've added a new object type and instance called bulb, the action allows a user to 'use' a bulb on the torch to return it to the 'Torch (off)' type, where they can switch it on again. This isn't exactly what we want as the bulb has been put into the torch so we really want the bulb to dissappear. We can do this by adding an attribute to the action to make an instance dissappear but more of that later.

Map Location

Object instances are created for a particular user under two circumstances. Most commonly this is when a user enters a particular map square (say 20,30).
The other time is when an action affects an instance which isn't on the current square AND the square the instance would be created at hasn't been visited yet.
An example of this could be a secret door (on square 20,50) opened when a user presses a button on square (22,52). Once created objects can be picked up and carried by the user if they are portable but we'll come to that later.

Square Location and movement

Within a square objects can exist in several places, 'Outside' indicates that the object is visible when a player enters a square. An object can also exist within another object (like a passport in a safe). But that's not all, a user can move inside an object to (like a room) the 'Nowhere' location can be used for these types as will become clear. To allow players to move between objects (rooms) it needs another door,portal,teleportation device, rope, pit, slide etc with two locations, to allow movement between two locations. The diagram below illustates this.
This diagram is annotated with some red text to indicate the location of the objects. When the user arrives at the square they see only the 'Apple Shop' and 'Doorway' as they have an outside location. The 'Enter' action has an extra move parameter, although the details are not shown this parameter means the user will move from one location to another, in this case from 'Outside' to the 'Shop' object. This could be a one way door if desired. Within the shop the only objects visible are the doorway (again) and the box. A 'take out' action would automatically be provided for the box as it marked as a container (see later) and contains the apple. As you can see the shop object doesn't need a location hence it is marked as 'Nowhere', if it was marked as 'Outside' it would appear as an object when the user entered the square, it could be marked as inside the 'Apple Shop' but if we didn't have the 'Apple Shop' where would it go? Hence the 'Nowhere' option. Using these concepts there are all sorts of possibilites, mazes, houses, tunnels etc.

Hiding Objects

An instance can be hidden when it is created, in this way when a user enters a square, the object can be created but not seen so that a later action can reveal it. For instance let's imagine a user enters a square and finds a lamp. We create two objects a 'lamp' and a 'genie' but the genie is hidden. We add an action 'rub' to the lamp and with an action attribute of 'show object' (see later) we can make the 'genie' appear. (alternatively we could have changed the genie object type from one which is visible to one which isn't). You'll often find there is more than one way to acheive the same affect when designing quests.
The general plan when designing quests is to create all the objects you will need on a particular square when the user enters it but hide ones that will only be revealed by actions.

Object Cost

An object instance can be given an initial cost. When this is done the object receives an automatic 'buy' action. When the user buys it the amount is subtracted from the users money.

Weight, Volume and containers

Object Types have weight and volume. Assigning a weight of zero means an object type cannot be moved, objects have weight which limits the amount a user can carry. Small objects like coins would usually be given a weight and volume of one, whereas objects like a suitcase may have a volume of ten and weight of three, this is fairly arbitrary though. Object types can be marked as containers which allows things to be 'put in' and 'taken out', but an object can only be put into a container of greater volume (obviously). Notice that weight, volume and container are applied to object types not instances, this is done for a reason. It allows for instance an action to change an object type from one which is unmovable to one which is, or from a non-container to a container. This is especially useful for many objects like safes, fridges, suitcases where you may want an 'open' type and a 'closed' type and only the 'open' type is a container allowing the 'put in' and 'take out' actions. (Of course you could go further with a 'locked' and 'unlocked' type etc).

Action Attributes

Finally to complete the basics section we move onto attributes that can be added to actions. These provide extra features when a user carries out an action.
  • Show Instance - Make an object instance visible.
  • Hide Instance - Hide an object instance.
  • Change Instance Type - Change an instance to another type. This allows you to affect more objects than the standard one or two for an action.
  • Move - Used on doors etc, moves a user from the current location to the other location allowed by the door
  • Experience - When a user carries out this action their experience is increased by the specified amount.
  • Cash - When a user carries out this action their money is increased or reduced by the specified amount.