Difference between revisions of "Template:Dice expression"
From Roll20 Wiki
m |
|||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{token|{{{ | + | <includeonly>{{token|{{{dice expression|dice expression}}}}} {{rarr}} {{token|{{{roll|roll}}}|-}} |
− | {{token|{{{ | + | {{token|{{{dice expression|dice expression}}}}} {{rarr}} {{token|{{{dice expression|dice expression}}}}}{{token|{{{modifier|modifier}}}|-}} |
− | {{token|{{{ | + | {{token|{{{dice expression|dice expression}}}}} {{rarr}} <nowiki>{</nowiki>{{token|{{{expression list|expression list}}}}}<nowiki>}</nowiki>{{token|{{{group modifier|group modifier}}}|-}} |
− | {{token|{{{ | + | {{token|{{{dice expression|dice expression}}}}} {{rarr}} {{token|{{{dice expression|dice expression}}}}} {{token|{{{operator|operator}}}}} {{token|{{{dice expression|dice expression}}}|-}} |
− | {{token|{{{ | + | {{token|{{{dice expression|dice expression}}}}} {{rarr}} {{token|{{{function|function}}}}}({{token|{{{dice expression|dice expression}}}}})<br> |
− | {{token|{{{ | + | {{token|{{{roll|roll}}}}} {{rarr}} {{token|{{{math expression|math expression}}}}}df<br> |
− | {{token|{{{ | + | {{token|{{{roll|roll}}}}} {{rarr}} {{token|{{{math expression|math expression}}}}}d{{token|{{{math expression|math expression}}}|-}} |
+ | {{token|{{{math expression|math expression}}}}} {{rarr}} {{integer|-}} | ||
+ | {{token|{{{math expression|math expression}}}}} {{rarr}} ({{token|{{{math expression|math expression}}}}} {{token|{{{operator|operator}}}}} {{token|{{{math expression|math expression}}}}})<br> | ||
+ | {{token|{{{operator|operator}}}}} {{rarr}} +<br> | ||
+ | {{token|{{{operator|operator}}}}} {{rarr}} -<br> | ||
+ | {{token|{{{operator|operator}}}}} {{rarr}} *<br> | ||
+ | {{token|{{{operator|operator}}}}} {{rarr}} /<br> | ||
+ | {{token|{{{function|function}}}}} {{rarr}} floor<br> | ||
+ | {{token|{{{function|function}}}}} {{rarr}} ceil<br> | ||
+ | {{token|{{{function|function}}}}} {{rarr}} round<br> | ||
+ | {{token|{{{function|function}}}}} {{rarr}} abs<br> | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} {{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} f{{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} !{{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} !!{{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} !p{{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} r{{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} ro{{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} {{token|{{{keep-drop|keep-drop}}}|-}} | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} s<br> | ||
+ | {{token|{{{modifier|modifier}}}}} {{rarr}} sd<br> | ||
+ | {{token|{{{compare|compare}}}}} {{rarr}} {{epsilon}} | ||
+ | {{token|{{{compare|compare}}}}} {{rarr}} {{integer|-}} | ||
+ | {{token|{{{compare|compare}}}}} {{rarr}} >{{integer|-}} | ||
+ | {{token|{{{compare|compare}}}}} {{rarr}} <{{integer|-}} | ||
+ | {{token|{{{keep-drop|keep-drop}}}}} {{rarr}} {{token|{{{keep|keep}}}|-}} | ||
+ | {{token|{{{keep-drop|keep-drop}}}}} {{rarr}} {{token|{{{keep|keep}}}}}{{integer|-}} | ||
+ | {{token|{{{keep-drop|keep-drop}}}}} {{rarr}} {{token|{{{drop|drop}}}|-}} | ||
+ | {{token|{{{keep-drop|keep-drop}}}}} {{rarr}} {{token|{{{drop|drop}}}}}{{integer|-}} | ||
+ | {{token|{{{keep|keep}}}}} {{rarr}} k<br> | ||
+ | {{token|{{{keep|keep}}}}} {{rarr}} kh<br> | ||
+ | {{token|{{{keep|keep}}}}} {{rarr}} kl<br> | ||
+ | {{token|{{{drop|drop}}}}} {{rarr}} d<br> | ||
+ | {{token|{{{drop|drop}}}}} {{rarr}} dh<br> | ||
+ | {{token|{{{drop|drop}}}}} {{rarr}} dl<br> | ||
+ | {{token|{{{expression list|expression list}}}}} {{rarr}} {{token|{{{dice expression|dice expression}}}}}, {{token|{{{rest expression list|rest expression list}}}|-}} | ||
+ | {{token|{{{rest expression list|rest expression list}}}}} {{rarr}} {{token|{{{dice expression|dice expression}}}|-}} | ||
+ | {{token|{{{rest expression list|rest expression list}}}}} {{rarr}} {{token|{{{expression list|expression list}}}|-}} | ||
+ | {{token|{{{group modifier|group modifier}}}}} {{rarr}} {{token|{{{keep-drop|keep-drop}}}|-}} | ||
+ | {{token|{{{group modifier|group modifier}}}}} {{rarr}} {{token|{{{compare|compare}}}|-}} | ||
+ | {{token|{{{group modifier|group modifier}}}}} {{rarr}} f{{token|{{{compare|compare}}}|-}}</includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 17:53, 14 January 2015
Formalizes the dice expression syntax. Each of the token
in the output below may be changed by offering it up as a parameter. For example, each instance of compare
can be changed by supplying a value for the parameter compare. This allows callers of this template to avoid name collisions with other tokens in the formal syntax.
Wikitext | Output |
---|---|
{{dice expression}}
|
dice expression
→
→
→ {
}
→
→
( ) →
df →
d
→ integer
→ (
) → +
→ -
→ *
→ /
→ floor
→ ceil
→ round
→ abs
→
→ f
→ !
→ !!
→ !p
→ r
→ ro
→
→ s
→ sd
→ ε
→ integer
→ >integer
→ <integer
→
→
integer →
→
integer → k
→ kh
→ kl
→ d
→ dh
→ dl
→
,
→
→
→
→
→ f
|
{{dice expression |dice expression=foo |roll=bar |modifier=baz |expression list=fizz |group modifier=buzz}} |
foo
→
→
→ {
}
→
→
( ) →
df →
d
→ integer
→ (
) → +
→ -
→ *
→ /
→ floor
→ ceil
→ round
→ abs
→
→ f
→ !
→ !!
→ !p
→ r
→ ro
→
→ s
→ sd
→ ε
→ integer
→ >integer
→ <integer
→
→
integer →
→
integer → k
→ kh
→ kl
→ d
→ dh
→ dl
→
,
→
→
→
→
→ f
|
The above documentation is transcluded from Template:Dice expression/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |