Slicetree n n.reld
Contents |
[edit] Naming Scheme
Saved slice collections are stored in the RPG file with the naming scheme:
slicetree_#_#.reld
Where the first # is the slice collection group, and the second # is the slice collection number. The collection numbers do not have to be sequential. There can be gaps. (The slice collection editor will not save any file for a completely empty slice collection)
| number | collection group | description |
|---|---|---|
| 0 | user defined collections | Can be loaded in plotscripts |
| ? | undefined | other groups will be defined later for builtin menus, screens, and other layouts. |
[edit] Data Format
The data in a slicetree_#_#.reld file is stored in RELOAD format.
- Root Node
- "children" node
- one or more nodes containing slice data
- each slice data node contains property nodes (see below)
- each slice with children contains a "children" node
- one or more nodes containing slice data
- each slice data node contains property nodes (see below)
- each slice with children contains a "children" node
- (tree structure continues as deep as necessary)
- one or more nodes containing slice data
- one or more nodes containing slice data
- "children" node
The arrangement of slices and slice children will be different for every collection. There is no limit on the total number of slices, nor is there any limit on the number of child slices any parent slice can contain.
The root slice is always of type slRoot. all other slices can be of any standard slice type. There are no restrictions on which slice types can be parents and children.
[edit] Slice Properties
- Default values for missing properties are 0 unless otherwise noted.
- Property nodes may appear in any order. Don't expect them to always appear in the same order they are listed here!
[edit] All Slices
| name | type | details |
|---|---|---|
| x | int | |
| y | int | |
| w | int | |
| h | int | |
| vis | bool | |
| clip | bool | |
| alignh | int | 0=left, 1=center, 2=right |
| alignv | int | 0=top, 1=center, 2=bottom |
| anchorh | int | 0=left, 1=center, 2=right |
| anchorv | int | 0=top, 1=center, 2=bottom |
| padt | int | |
| padl | int | |
| padr | int | |
| padb | int | |
| fill | bool | |
| type | string | the short name of the specific slice type |
NOTE: x, y, w, h, padt, padl, padr, padb are all pixel values. Any signed 32-bit integer value must be allowed, even if it would be insane for a pixel distance, since games sometimes use these values as meta-data for other purposes on non-visible slices.
[edit] Container Slices
Container slices have no special properties
[edit] Rect Slices
| name | type | details | default |
|---|---|---|---|
| style | int | -1 for none, 0-14 for the styles | -1 |
| fg | int | 0 to 255 color index in master palette for the rect edges. | |
| bg | int | 0 to 255 color index in master palette for the rect body. | |
| trans | int | 0=solid, 1=fuzzy, 2=hollow | |
| border | int | -1 for none 0+ for thickness | -1 |
[edit] Sprite Slices
| name | type | details | default |
|---|---|---|---|
| sprtype | int | the group of sprites, 0-8 for PT#, 9 for MXS (This is a WIP feature) | |
| rec | int | record number of the sprite within its sprite group | |
| pal | int | 16 color palette index, or -1 to use the default palette for this sprite (absent for non-paletted sprites | -1 |
| frame | int | current frame, for sprite groups that allow multiple frames | |
| fliph | bool | true if the sprite is horizontally flipped | |
| flipv | bool | true if the sprite is vertically flipped | |
| trans | bool | true if colour 0 of the sprite is to be transparent (This is a WIP feature) | 1 |
[edit] Text Slice
| name | type | details | default |
|---|---|---|---|
| s | string | A string of text. There are no limits on the length of the string. | |
| col | int | 0 to 255 color index in master palette for the text. | |
| outline | bool | true if the text should be drawn with a black outline | |
| wrap | bool | true if the text should wrap within the chosen slice width. | |
| bgcol | int | 0 to 255 color index in master palette for the background box around the text (no effect if outline is true) |
When a Text Slice is set to wrap, the width and height can be manually adjusted, and the wrapping will be updated. When a Text Slice is not set to wrap, its width and height will be automatically set.
[edit] Grid Slices
| name | type | details | default |
|---|---|---|---|
| cols | int | number of columns in the grid. Node that 0 is a legal value, but will still be treated like 1 column. | |
| rows | int | number of rows in the grid. Node that 0 is a legal value, but will still be treated like 1 row. | |
| show | bool | true if the grid edges should be drawn, false if the grid is invisible just like the Container slice. |
ARCHINYM.LMP . BROWSE.TXT . ATTACK.BIN . BINSIZE.BIN . DEFPAL#.BIN . DEFPASS.BIN . FIXBITS.BIN . LOOKUP.BIN . MENUS.BIN . MENUITEM.BIN . PALETTES.BIN . PLOTSCR.LST . SFXDATA.BIN . SONGDATA.BIN . UICOLORS.BIN . slicetree_#_#.reld . GEN . BAM . Map Format . T . P . E . D . L . N . Z . DOR . DOX . DT0 . DT1 . DT6 . EFS . FOR . FNT . HSP . HSZ . ITM . MAP . MAS . MN . MXS . PAL . PT0 . PT1 . PT2 . PT3 . PT4 . PT5 . PT6 . PT7 . PT8 . SAY . SHO . SNG . STF . STT . TAP . TIL . TMN . VEH