Attribute Names
These formats describe the creation of common attribute names.
Modified Attributes
When the secure template system looks for a modified attribute of name, it will seek out one of the following forms (see Chapter 17 for details):
- [prefix]name[suffix]
useparent-nameuseparent*
prefix
- [
alt-][ctrl-][shift-] - name
-
Requires amodifiersattribute with a value like: MODIFIER[:name][,MODIFIER[:name]]... *
suffix
- <
1-5> -button*
Match Order
- prefix
-name-suffix *name-suffix- prefix
-name* *name*- name
Examples:
alt-unit2
*type-B1
Attribute Values
These rules describe the construction of attribute values.
State Attributes (Chapter 25)
Pick among values based on the current state.
Basic syntax
- rule[
;rule]...
rule
- [states
:][value]
states
- state
- start
-end - first[
,second]... *
Example:
1:value1;2-4:value2;5:;default
Transition Rules (Chapter 25)
These rules (usually values in a State Attribute) tell a header what state to enter.
- [function|rule][
rule] ...
rule
- state
- start
-end - first[
,second]... =
function
push([new state])pop([default state])set([new state])swap([default state])
Examples:
3-2
state1,state2,state3
push() 5-1
State Lists
State lists evaluate to true if the header's state fits all of the listed rules
Basic syntax
- [
!]rule[;[!]rule]...
rule
- state
- start
-end - first[
,second]... *
Examples:
0-1,3
!2-4;1-10
Boolean
Boolean attributes generally follow the same rules as boolean values in Lua: everything but false or nil is considered logically false. Sometimes for attributes, though, evaluating to an empty strings is interpreted as false. See Chapters 17, 25 & 26.