Quest Editor

From Blender2crystal

Jump to: navigation, search

Contents

[edit] Introduction

Starting on 0.7rc2, a quest editor has been implemented that allows to access cel capabilities in a more graphical way.

Quests are simple state machines, able to react to events and perform operations in entities.

If you are not familiar with them, reading the quest section at the cel manual is highly recommended before going on with this guide.

[edit] Locating the editor

location of the "open editor" button
location of the "open editor" button

The editor can be accessed from the quest (Image:Icons-quest2.png) tab in the entity (Image:Icons-cel.png) section of blender2crystal.

The tab initially only shows the quest selector for the entity, to edit a quest click on the "open editor" button. If you don't see the button it means your blender2crystal version is too old.

[edit] Quest Editor Interface

The quest editor has three main sections, accesible through the Q, S and D buttons (for Quest, Sequences and Defaults).

[edit] Quest graph section

graph editor.
graph editor.

Here the quest graph can be edited, by adding and removing states, triggers and rewards.

A quest can have any number of states, then each state can have several triggers, each of these firing a series of rewards.

Note although the quest is a tree, blender2crystal only allows to see one full branch at a time, so you must select nodes to see their children.

Triggers and rewards are presented as nodes that can be expanded by right clicking to access their properties for editing.

The following cel triggers are supported:

  • entersector: triggers when a camera enters a sector.
  • inventory: triggers when an object enters inventory.
  • meshentersector: triggers when a mesh enters a sector.
  • meshselect: triggers when a mesh is selected.
  • propertychange: triggers when a property changes.
  • sequencefinish: triggers when a sequence finishes.
  • timeout: triggers after a specified time.
  • trigger: triggers when a pctrigger fires.
  • watch: triggers when a mesh becomes visible.

The following cel rewards are supported:

  • action: run an action from a property class in an entity.
  • changeproperty: change a property.
  • cssequence: run a crystalspace sequence.
  • debugprint: print a debug message on stdout.
  • destroyentity: destroys an entity.
  • inventory: manipulates the inventory.
  • message: sends a message to an entity.
  • newstate: switch to quest a new state.
  • sequence: fires a sequence.
  • sequencefinish: finishes a sequence.

[edit] Quest sequences section

sequences editor
sequences editor

A quest can hold any number of sequences controlling movement or light change in objects. Then this sequences can be run by the quest rewards, to create changes in entity parameters.

Each sequence is composed of operations, defining the actual changes.

Currently the following operations are supported:

  • transform: to transform object position or orientation.
  • light: to transform light color.
  • debugprint: to print debug messages.

[edit] Quest defaults section

defaults editor
defaults editor

When editing quest or sequence values, the user can input variables in the form of $ prefixed values. This variables can be defined per object, but it is also wise to provide sensible defaults so your quests can be used without too much hassle.

Note how on the quest selector for the entity (left), the chosen defaults appear between parenthesis next to the "not set" values.

Notice the difference between entity values for the quest (left), and quest default values (right). You can use to provide nice values that you can override in certain entities to bring more flexibility to your quests.

Personal tools
Documentation