Repository navigation
Authoring in ZAML
The YAML dialect still has no way to say "repeat this six times" — the screenpart_PrimeCell/screenpart_EventCell blocks in the YAML skin example are unrolled by hand, one list item per index. ZAML adds exactly one construct on top of YAML to remove that repetition: a for loop. Nothing else changes — a .zml/.zmlinc file is ordinary SkinForge YAML with for items sprinkled in, and zml2yml expands every one of them into plain YAML before yml2xml/xmlinc ever see the file.
- for:
var: "$i"
range: [0, 5]
body:
- xmlinc:
file: "screenpart_PrimeCell.ymlinc"
index: "$i"
position: "$i*$screen_width/6,0"var names the token exactly as it appears in body — "$i", dollar sign included — rather than a separate bare name you'd have to mentally re-prefix each time; what you declare is what you'll see used below it (a bare var: i without the $/quotes still works too, for anything written before this convention). range: [start, end] is inclusive, so [0, 5] runs six times. body is a list, expanded once per iteration and spliced in place of the single for item, in order. Inside each copy, every occurrence of $i in a string value is replaced by that iteration's plain integer — the same "a $var can be embedded inside a literal" rule xmlinc itself uses for $vars (e.g. list$i, $i*$screen_width/6,0), not a new substitution mechanism. Nesting a for inside another for's body works: the outer loop's copies still contain an unexpanded inner for, which zml2yml expands on its next pass over the file.
A for item missing var, range, or body is left untouched in the output rather than silently dropped — yml2xml/xmlinc don't understand a for: key, so a malformed loop fails loudly downstream instead of quietly disappearing.
zmlcompile <domain> [srcbase] [dstbase] [cmnbase]
Same signature as ymlcompile (see Quick start). It expands any changed *.zmlinc source — in both the plugin's own tree and the shared Common tree — to .yml/.ymlinc via zml2ymldomain, then hands off to ymlcompile for the rest. zml2ymldomain is the per-domain building block it calls, taking <domain-or-.> [skin] [base] like yml2xmldomain does; use zml2yml.py -i <file> directly to expand a single file in isolation.