# ASCII Script Export File Format

This document describes the ASCII Script file format exported by Moppi Demopaja. In this documentation only the parts of the file format which may not be self explanatory are described. This documentation is meant to be a reference so it's recommended to have an exported script on hand when browsing this. More information will follow with the SDK.

MUSIC "<file name>"

The Music chunk contains the file name of the music to be played on the background of the demo.

TIMING <BPM> <Quarter-notes per Beat> <Beats per Measure> <Edit Accuracy>

The Timing chunk contains information about the timing used in the demo. Beats per Measure and Edit accuracy are not needed outside the Demopaja, they are included just for completeness. To convert seconds to the Demopaja timing system use this equation:

time = seconds * (BeatsPerMin * QNotesPerBeat * 256.0 / 60.0)

Just to summarise the equation: the tiniest time unit is 1/256th part of a quarter note.

DURATION <duration>

The duration of the demo in Demopaja timing format. See above.

LAYOUT_SIZE <width> <height>

The width and height of the demo layout.

FILE <file id> "<file name>" CLASS "<class name>" <class ID part A> <class ID part B>

A file imported to the demo. File ID is later used to refer to this file. File name is the file to load, class information is about the Import plugin class to use.

LAYER {

The beginning of a layer block. The end of a block mark is "}". Everything inside these two brackets belongs to the layer.

NAME "<name>"

The name of a layer, an effect, a gizmo or a parameter. This chunk is inside one of the mentioned blocks.

TIMESEGMENT {

The beginning of the Time segment block.

ORIGO <time>

The origo of a Time segment. The time is in Demopaja time format.

KEY <time>

A time segment key. The time is in Demopaja time format.

EFFECT CLASS "<class name>" <class ID part A> <class ID part B> {

The beginning of an effect block. The class information is to determine the effect used.

GIZMO {

The beginning of a gizmo block.

PARAMETER <type> {

The beginning of a parameter block. There are 7 types of parameters. INTEGER has one value which is a integer number. FLOAT has one value which is a real number. VECTOR2 has two real values which describe a 2D point. VECTOR3 has three real values which describe a 3D point. COLOR has four values which describe the R, G, B and Alpha components of a color. TEXT has one value which is a string of text. FILE has one value which is a reference to an imported file.

CONTROLLER {

The beginning of a controller block.

OUT_OF_RANGE <start> <end>

The out of range chunk contains the Out of range method flags. 0x1 = Constant, 0x2 = Repeat, 0x3 = Loop

KEY SMOOTH <number> <time> <values> <tension> <continuity> <bias> <ease in> <ease out>

A smooth interpolated keyframe. The values field in a smooth key can hold 1 to 4 numbers, each separated with a space.

KEY LINEAR <number> <time> <values> <ease in> <ease out>

A linear interpolated keyframe. The values field in a linear key can hold 1 to 4 numbers, each separated with a space.

KEY HOLD <number> <time> <values>

A hold interpolated keyframe. The values field in a hold key can hold 1 to 4 numbers, each separated with a space.

VALUE <values>

A static value for a parameter. The values field in a hold key can hold 1 to 4 numbers, each separated with a space.