For GM use only; see below for players.
To use, select the token. Hit the button (GM INIT). When prompted, enter the total initiative modifier for the token. Token will automatically be added to turn order.

For Player-Controlled Tokens:
"Initiative": @{selected|token_name} rolls a [[1d20+@{selected|init}&{tracker}]] for initiative!

Make sure to select "Token Action" before saving!
Make sure to select "Visible to Players: All Players" before saving!

For Player Use:
To use, have an Attribute in Journal Entry linked to that token called 'initiative', which represents that characters total initiative modifier. Select token, hit the button "Initiative". Token will automatically be added to turn order.

Improved Version:

This does the same thing, but then adds the initiative bonus as a decimal after the initial roll (in cases of a tie, the higher initiative bonus is sorted to go first.)

Other Macro Related Information

Work in progress (use for general systems only, if system specific add to that page!)

Common Macro/Dice Issues

These are a list of common pitfalls when creating complex macros or dice rolls.

Subtracting a Negative Attribute

When subtracting an attribute it is best to put parentheses around the attribute. What this is preventing from happening is a double subtraction instead of the subtraction of a negative. For example let's say our THAC0 attribute is negative two.
/r 1d20-@{THAC0} translates into /r 1d20--2, which is bad syntax and will fail.
/r 1d20-(@{THAC0}) translates into /r 1d20-(-2), which is good syntax and will give you the desired result.

Conditional Statements (Math Only)

Using the multiplicative properties of 0(absorption) and 1(identity) you can write conditional statements for integer values(and to some extent floating point values too)

An example of this is the formula "if x greater than or equal to A, then T; else F," where T and F are some values.
If x or A are dice rolls, surround them with [[]] inside these formulas.

This can be written as a macro with

[[{{x,something-less-than-A}>A}*(T-F) + F]]

Example 1:

[[{{3,0}>2}*(4) + 3]]

Example 2:

[[{{[[1d4]],0}>2}*(4) + 3]]

The above examples will multiply (4) with however many times the statement '{X}>2' was true and add +3 to the result.
For example 1 that is true 1 time, since 3 > 2, but 0 < 2. This will result in 1*4+3 = 7.
For example 2 that is true 0-1 time, depending on the result of the 1d4. This will result in either 0*4+3=3 or 1*4+3=7.

Similarly, "x greater than A, then T; else F" is written

[[{{x,something-less-than-A}>[[A+1]]}*(T-F) + F]]

(Assuming A is an integer)
Alternatively, you can multiply one minus the (x==A) check below with the (x>=A) check above, like so:

Now for some identities: "x less than A" is the inverse of "x greater than or equal to A," so the conditional can be written as "x greater than or equal to A, then F; else T" using the formulas above. Similarly with "x less than or equal to A" and "x greater than A," as well as with "x not equal to A" and "x equal to A."

Custom Power Cards

Custom Power Cards are not macros: they are an API script for applying html and css to the output of a macro in the chat pane.

Sample of a standard macro and its output.

Standard macro that will include an emote, plus my attack and damage rolls it would look like this:

Macro Name: dagger

Macro Body: /me rams his dagger home

/roll 1d20+10 vs AC

/roll 1d4+9 Damage

The output would look like:

Sample of a standard macro action with Custom Power Cards.

With Custom Power Cards the macro would be constructed as an API command using Custom Power Cards markup tags: