Planeshift
scripting.h File Reference

This is PlaneShift's XML based scripting system. More...

#include <iutil/document.h>
#include <csutil/parray.h>
#include <csutil/csstring.h>
#include "util/psconst.h"

Go to the source code of this file.

Classes

class  ApplicativeScript
 ApplicativeScript is the applied script container. More...
 
class  ProgressionScript
 ProgressionScript is the imperative script container. More...
 

Enumerations

enum  SCRIPT_TRIGGER { ATTACK, DEFENSE, MOVE, NEARLYDEAD }
 Events that can trigger scripts, i.e. More...
 

Detailed Description

This is PlaneShift's XML based scripting system.

A RelaxNG schema is in data/ProgressionSchema.rng, both defining the language and allowing one to check the validity of scripts.

Scripts have two modes: imperative and applied.

  • Imperative operations are one-shot, and can do basically anything one would like.
  • Applied operations describe the effect of magic that lasts for a time, but which eventually will wear off. Thus, every applied operation must have a well defined inverse. These become ActiveSpells.

See scripting.cpp for the implementation of all the various operations.

Definition in file scripting.h.