Backup of MML/追加要素 (2) Back


Back to History list

#navi(MML)

*付録 追加要素 [#a54e0255]
#contents

**colors [#d57e0959]
色は<color>要素で指定します。
Colors are specified with the element <color> colors may be either indexed (being list members), or non-indexed (being in isolation). 色の値は0~1の数値で表します。
-index (mandatory if indexed; must be absent if not indexed)
-red
-green
-blue
例えば、番号7の色に黄色を指定したい場合、
 <color index="7" red="1" green"1" blue="0" />
となります。

**shape [#y0123625]
Shapes can be specified with the element <shape>. A shape specification includes which collection, which color table, and which sequence or frame; a shape may also be allowed to be blank. A shape's attributes are

-coll: which collection (0 to 31)
-clut: which color table; default is 0 (0 to 7)
-seq: which sequence (0 to 255)
-frame: like the above, included if the meaning of "frame" is clearer in some context.

A blank shape is specified as one having no attributes: <shape/>. A non-blank shape requires the collection and sequence attributes, and optionally the color-table attribute (default: 0).

**Damage [#y31cfd39]
Damage is specified with the element <damage>. Damage features are set with these attributes, which are all optional.

-type ("true" damage index; none is -1)
-flags (0 or 1 [is alien: weaker in easier difficulty levels])
-base
-random
-scale (1 = identity scaling)

**Fonts [#y02e1e94]
Fonts are specified with the element <font> like colors, fonts may be either indexed (being list members), or non-indexed (being in isolation).

-index (mandatory if indexed; must be absent if not indexed)
-name: the font name; it can be a series of names separated by commas or semicolons, much like HTML font specifications. If a series of the names, the engine will look for a font with the first name, and then the second, and so forth, until it finds such a font.
-size: the font size in points (standard unit)
-style: the font style, which follows MacOS conventions; it is the sum of whichever of these attributes are used:
--1: Bold
--2: Italic
--4: Underline
--8: Outline
--16: Shadow
--32: Condense
--64: Extend
Normal is none of these attributes, or 0.
-file: this is for SDL support, and indicate which font file to use.

None of the font attributes proper are mandatory. This example sets font 4 to the default font for the computer terminals.

 <font index="4" name="Courier" size="12" style="0"/>

**Boolean data [#xd70072a]
This is not a separate element, but a kind of value of an attribute. These values for a boolean attribute,

-1
-t
-true

indicate that a flag is to be on or an action is to be taken. These values,

-0
-f
-false

indicate that a flag is to be off or an action is not to be taken.