Homebrew: Action

From 5etools Community Wiki
Jump to: navigation, search

framless
v1.1.0

Building an action

As with any Homebrew item, make sure you have reviewed the _Meta section. If your file doesn't have it, it won't work.

Basic skeleton

To start, copy the following code block and fill the empty "" values.

Action code block
"action": [
    {
        "source": "",
        "name": "",
        "page": 0,
        "entries": [
            ""
        ],
        "time": [
            {
                "number": 0,
                "unit": ""
            }
        ]
    }
]


  • "source" β€” make sure it is the same as the "json" key in the _meta.
  • "page" β€” the page of the document the action appears at. If there's no page, leave it at 0.
  • "entries" β€” the text of the action. Note that you can write several strings ("") separated with a comma.
  • "time" β€” here you can describe how long the action takes. "unit" can be "action", "bonus" or "reaction". "number" is the amount of units it takes. If it does not apply to the action, you can delete this block.

Deeper time customization

Multiple time units

  • If you want your action to take more than one time unit, you can place several "time" objects ({}). The following example reads as "1 action/1 reaction":
"time": [
    {
        "number": 1,
        "unit": "action"
    },
    {
        "number": 1,
        "unit": "reaction"
    }
]

Custom time text

  • It is possible to enter whatever text you want directly as strings. They will show up in the filters as well.
"time": [
    "1 day"
]

Reference Tag

How to link to entries within the strings

{@action <name_of_action> | <json_source> | <optional_text_information>})
Example:
{@action Tumble|DMG}
{@action Tumble|DMG| acrobatically avoid }


Field List action

If you do not include the required fields (denoted with bold text) the JSON may pass JSONLint but will fail upon stitch.

Field Name Data Type Description Required
name String The action's title True
source String json (_meta's json value) True
entries Array of Strings action description True
page Integer page number within source False
fromVariant Object descript False
time Array of Objects descript False



πŸ—„οΈ Reference Files:
πŸ›’οΈ Requirements Specs (Schemata)
[[ |🧾 Blank Template]]
πŸ“– Sample JSON
πŸ’Ύ No Functional Example
πŸ“š Repository of Other Examples

Homebrew Support


Known Issues
Looks like its perfect... (Did we miss anything?)


FAQ
Nothing's here (Do you have any suggestions?)
Best Practices
None as yet (Do you have any suggestions?)



Related Features



Did that answer your question(s)?

If not please check the under Support; Troubleshooting or the Known Issues page for further guidance, or go to the Discord community and leave a comment in the issues channel.

If you enjoy the project, please follow this link to see how you can contribute and help make it even better.