File Formats

From Legends of Fairwind
Jump to: navigation, search

data/*/chr

Sample content:

 00=1
 01=775
 02=776

Define CHR table entries 00 through FF. Right side is the MetaTile Number.

data/*/revisions

Sample content:

 1=4
 775=1

Revision number of each MetaTile.

data/*/palettes

Sample content:

 00=1f132f
 01=031309

This file defines up to 256 different palettes per domain. Each color is one byte (two digits) referencing a color from the system master palette.

data/*/blocks

Sample content:

 0001030204
 0105050505

First two digits on each line are a palette. Next four bytes (two digits each) are CHR table entries for subtile 0, 1, 2, and 3 of the block. (0=upper left, 1=lower left, 2=upper right, 3=lower right.)

data/*/manifest

Sample content:

 block/031309_1_4_1_4_1_4_1_4.png
 music/overworld.ogg

A list of files needed/included in this domain. Files may live in a format-specific subfolder of assets or in the assets folder directly. The other files can deduce a block image filename, as it takes the block line (0105050505 as an example) and translates it first to the palette and metatile numbers 031309, 1, 1, 1 and 1, then looks up the current revision numbers for each of the metatiles and concatenates all of those data with underscores. block/palette_metatile0_revision0_metatile1_revision1_metatile2_revision2_metatile3_revision3.png

data/*/profiles

Sample content:

 00=Clear, SendTo:1, Show:1, Objects:1
 01=Show:2, Disable:1, Objects:2

Possible instructions are:

Clear = Clear the rendering list.

SendTo:Z = Place subject on specified Z.

Include:P = Include all rules from profile P.

Show:Z = Add blocks from specified Z.

Objects:Z = Add objects from specified Z (and enable physics interactions with them.)

Enable:Z = Enable physics interaction with objects from specified Z (even if not drawn.)

Disable:Z = Disable physics interactions with objects from specified Z (even if drawn.)

Mask* = Mask all previously shown blocks and empty spaces

Unmask* = Unmask all previously shown blocks and empty spaces

Mask = Mask all blocks shown from this point forward

Unmask = Unmask all blocks shown from this point forward

Next = Begin Next Layer

Still Need

  • A way to set the background color.
  • A way to specify the four(?) palettes currently in use.