Dice Macros - rpg-sage-creative/rpg-sage GitHub Wiki

Wiki Home | Feature Guide | Quick Start | E20 Demo | One-Page Wiki Related Topics: Dice Command, Dice Output, Dice by Game System, Dice Macros

Dice Macros

Dice Macro Categories are helpful in grouping related macros together, but they also serve a special function for Pathfinder 2e players using imported characters. Macros with the same category name as an imported Pathfinder 2e character name will show up in the imported character's sheet so that you can select then and roll them with the click of a button. Read more about Importing Characters here.

Note: Dice Macros are set on you, as a User of RPG Sage. Therefore they are usable by you on any Server you are on, in any Game or Channel you might be in. They cannot be used by anybody else. Future updates will drastically change accessbility of Dice Macros.

Dice Macro Control

To manage your dice macros, start with the following message command:

sage! macro list

View a Dice Macro


You will first select the type of macro you wish to manage/view:

Character, User, Game, Server, Global

You will then select from your categories and then macros. If you have more than 25 macros or categories, they will be paged via additional dropdown/select fields.

Dice Macro Control Buttons


The "default" buttons are:

  • Roll (rolls the macro with no args)
  • Prompt Roll (if the macro has args, you will be prompted to input them)
  • Close (closes the control)
  • "..." (switches the set of command buttons to "management")

The "management" buttons are:

  • New (creates a new macro)
  • Edit (edits the current macro)
  • Delete (deletes the current macro or category)
  • "..." (switches the set of command buttons to "other")

The "other" buttons are:

  • Reset (restarts the control at macro tier selection)
  • "..." (switches the set of command buttons to "default")

Setting a Dice Macro


Clicking "New" or "Edit" pops up a modal dialog with the fields for dice macros:

Name, Category (optional), and Dice

Moving a Dice Macro


This feature hasn't been implemented in the new control yet, but you can edit a macro's category to move it within the tier.

Deleting Dice Macros


Click the red Delete button and confirm via the following prompt.

Dice Macro Arguments

Dice Macros allow arguments, making them very flexible but also easy to overcomplicate. Arguments are indicated with curly braces: { and }

The two primary types of arguments are: indexed and named.

Note: If you use an argument more than once in your macro, it will be replaced every time.

Indexed arguments start with 0 go up

Valid Values: {0}, {1}, {2}, etc

Example Create:

sage! macro set name="attack" dice="[1d20 {0} atk; 1d6 {1} dmg]"

Example Usage:

[attack "+1" "+2"]

... results in ...

[1d20 +1 atk; 1d6 +2 dmg]

Named arguments should can only letters, numbers, and underscores

Valid Example: {bless_bonus}

Example Create:

sage! macro set name="attack" dice="[1d20 {bless_bonus} atk; 1d6 {bless_bonus} dmg]"

Example Usage:

[attack bless_bonus="+1"]

... results in ...

[1d20 +1 atk; 1d6 +1 dmg]

Arguments can have default values

Valid Default Examples: {atk_bonus:+0}, {dmg_type:P}

Example Create:

sage! macro set name="dagger" dice="[1d20 {atk_bonus:+0} atk; 1d4 {dmg_type:P} dmg]"

Example Usage:

[dagger]

... results in ...

[1d20 atk; 1d4 P dmg]

Example Usage:

[dagger atk_bonus="+1"]

... results in ...

[1d20 +1 atk; 1d4 P dmg]

Example Usage:

[dagger atk_bonus="+2" dmg_type="S"]

... results in ...

[1d20 +2 atk; 1d4 S dmg]

Note: A default value of 0 (or +0) will NOT be shown in the final dice roll

Special Argument Types

VS aka {vs}

VS is a convenience for setting the roll's target success value in d20 style games; AC, DC, and VS are all acceptable as {ac}, {dc}, or {vs}

Example Create:

sage! macro set name="attack" dice="[1d20 {ac} atk; 1d6 dmg]"

Example Usage:

[attack ac=10]

... results in ...

[1d20 ac 10 atk; 1d6 dmg]

Remaining aka {...}

Remaining is more advanced- it takes every indexed argument that wasn't explicitly used in your macro and adds them all with spaces between them.

Example Create:

sage! macro set name="extras" dice="[1d20 {0} atk; 1d6 {1} {...} dmg]"

Example Usage:

[extras +1 +3 "+1d6 sneak" "+1d4 fire" "+1 holy"]

... results in ...

[1d20 +1 atk; 1d6 +3 +1d6 sneak +1d4 fire +1 holy dmg]

Note: If you have more than one "remaining" arg in your macro, they will all get the same set of values.