Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Template:Dice expression"

From Roll20 Wiki

Jump to: navigation, search
m
Line 1: Line 1:
<includeonly>{{token|{{{1|dice expression}}}}} {{rarr}} {{token|basic roll|-}}
+
<includeonly>{{token|{{{1|dice expression}}}}} {{rarr}} {{token|roll|-}}
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|fudge roll|-}}
+
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|computed roll|-}}
+
 
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|{{{1|dice expression}}}}}{{token|modifier|-}}
 
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|{{{1|dice expression}}}}}{{token|modifier|-}}
 
{{token|{{{1|dice expression}}}}} {{rarr}} <nowiki>{</nowiki>{{token|expression list}}<nowiki>}</nowiki>{{token|group modifier|-}}
 
{{token|{{{1|dice expression}}}}} {{rarr}} <nowiki>{</nowiki>{{token|expression list}}<nowiki>}</nowiki>{{token|group modifier|-}}
 
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|{{{1|dice expression}}}}} {{token|operator}} {{token|{{{1|dice expression}}}|-}}
 
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|{{{1|dice expression}}}}} {{token|operator}} {{token|{{{1|dice expression}}}|-}}
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|function}}({{token|{{{1|dice expression}}}}})</includeonly><noinclude>{{documentation}}</noinclude>
+
{{token|{{{1|dice expression}}}}} {{rarr}} {{token|function}}({{token|{{{1|dice expression}}}}})<br>
 +
{{token|roll}} {{rarr}} {{token|math expression}}df<br>
 +
{{token|roll}} {{rarr}} {{token|math expression}}d{{token|math expression|-}}
 +
{{token|math expression}} {{rarr}} {{integer|-}}
 +
{{token|math expression}} {{rarr}} ({{token|math expression}} {{token|operator}} {{token|math expression}})<br>
 +
{{token|math expression}} {{rarr}} {{token|function}}({{token|math expression}})<br>
 +
{{token|operator}} {{rarr}} +<br>
 +
{{token|operator}} {{rarr}} -<br>
 +
{{token|operator}} {{rarr}} *<br>
 +
{{token|operator}} {{rarr}} /<br>
 +
{{token|function}} {{rarr}} floor<br>
 +
{{token|function}} {{rarr}} ceil<br>
 +
{{token|function}} {{rarr}} round<br>
 +
{{token|function}} {{rarr}} abs<br>
 +
{{token|modifier}} {{rarr}} {{token|compare|-}}
 +
{{token|modifier}} {{rarr}} f{{token|compare|-}}
 +
{{token|modifier}} {{rarr}} !{{token|compare|-}}
 +
{{token|modifier}} {{rarr}} !!{{token|compare|-}}
 +
{{token|modifier}} {{rarr}} !p{{token|compare|-}}
 +
{{token|modifier}} {{rarr}} r{{token|compare|-}}
 +
{{token|modifier}} {{rarr}} ro{{token|compare|-}}
 +
{{token|modifier}} {{rarr}} {{token|keep drop|-}}
 +
{{token|modifier}} {{rarr}} s<br>
 +
{{token|modifier}} {{rarr}} sd<br>
 +
{{token|compare}} {{rarr}} {{epsilon}}
 +
{{token|compare}} {{rarr}} {{integer|-}}
 +
{{token|compare}} {{rarr}} >{{integer|-}}
 +
{{token|compare}} {{rarr}} <{{integer|-}}
 +
{{token|keep drop}} {{rarr}} {{token|keep|-}}
 +
{{token|keep drop}} {{rarr}} {{token|keep}}{{integer|-}}
 +
{{token|keep drop}} {{rarr}} {{token|drop|-}}
 +
{{token|keep drop}} {{rarr}} {{token|drop}}{{integer|-}}
 +
{{token|keep}} {{rarr}} k<br>
 +
{{token|keep}} {{rarr}} kh<br>
 +
{{token|keep}} {{rarr}} kl<br>
 +
{{token|drop}} {{rarr}} d<br>
 +
{{token|drop}} {{rarr}} dh<br>
 +
{{token|drop}} {{rarr}} dl<br>
 +
{{token|expression list}} {{rarr}} {{token|{{{1|dice expression}}}}}, {{token|rest expression list|-}}
 +
{{token|rest expression list}} {{rarr}} {{token|{{{1|dice expression}}}|-}}
 +
{{token|rest expression list}} {{rarr}} {{token|expression list|-}}
 +
{{token|group modifier}} {{rarr}} {{token|keep drop|-}}
 +
{{token|group modifier}} {{rarr}} {{token|compare|-}}
 +
{{token|group modifier}} {{rarr}} f{{token|compare|-}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 17:41, 14 January 2015

[view] [edit] [history] [purge] Documentation icon Template documentation

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
roll


dice expression

dice expression

modifier


dice expression

→ {expression list

}group modifier


dice expression

dice expression
operator
dice expression


dice expression

function

(dice expression

)
roll

math expression

df
roll

math expression

dmath expression


math expression

integer

math expression

→ (math expression
operator
math expression

)
operator

→ +

operator

→ -

operator

→ *

operator

→ /

function

→ floor

function

→ ceil

function

→ round

function

→ abs

modifier

compare


modifier

→ fcompare


modifier

→ !compare


modifier

→ !!compare


modifier

→ !pcompare


modifier

→ rcompare


modifier

→ rocompare


modifier

keep-drop


modifier

→ s

modifier

→ sd

compare

→ ε

compare

integer

compare

→ >integer

compare

→ <integer

keep-drop

keep


keep-drop

keep

integer
keep-drop

drop


keep-drop

drop

integer
keep

→ k

keep

→ kh

keep

→ kl

drop

→ d

drop

→ dh

drop

→ dl

expression list

dice expression

, rest expression list


rest expression list

dice expression


rest expression list

expression list


group modifier

keep-drop


group modifier

compare


group modifier

→ fcompare


{{dice expression
|dice expression=foo
|roll=bar
|modifier=baz
|expression list=fizz
|group modifier=buzz}}
foo
bar


foo

foo

baz


foo

→ {fizz

}buzz


foo

foo
operator
foo


foo

function

(foo

)
bar

math expression

df
bar

math expression

dmath expression


math expression

integer

math expression

→ (math expression
operator
math expression

)
operator

→ +

operator

→ -

operator

→ *

operator

→ /

function

→ floor

function

→ ceil

function

→ round

function

→ abs

baz

compare


baz

→ fcompare


baz

→ !compare


baz

→ !!compare


baz

→ !pcompare


baz

→ rcompare


baz

→ rocompare


baz

keep-drop


baz

→ s

baz

→ sd

compare

→ ε

compare

integer

compare

→ >integer

compare

→ <integer

keep-drop

keep


keep-drop

keep

integer
keep-drop

drop


keep-drop

drop

integer
keep

→ k

keep

→ kh

keep

→ kl

drop

→ d

drop

→ dh

drop

→ dl

fizz

foo

, rest expression list


rest expression list

foo


rest expression list

fizz


buzz

keep-drop


buzz

compare


buzz

→ fcompare