This plugin can be used as an initiative tracker within Obsidian.md.
When enabled, the plugin will add an additional view in the right pane, where players and creatures can be added to track their initiatives during combat.
This is a trimmed-down fork of https://github.com/valentine195/obsidian-initiative-tracker which aims to separate out the iniative concepts from the DnD 5e specific stuff to make it system agnostic.
- No XP or Level settings
- Dropped support for homebrew creatures
- Dropped all of the 5e specific import functionality
- Massively simplified the settings screen
- Made the encounter renderer use internal links
- Give multiple creatures with the same name a unique index
- Initiative modifiers support dice strings (like 2d6)
- Misc bugfixes
Encounters can be created and launched directly from notes using the "encounter" code block, like so:
```encounter
creatures:
- 2: Fighter 1, 13, 11, 550120
- 2: Fighter 2, 13, 10, 575120
```
This will render like this in Preview:
(gruvbox theme)
Clicking on the button next to the encounter name will then launch the encounter in the Initiative Tracker. The names attempt to wikilink as though you had surrounded them with [[{name}]]
.
With players configured, that looks like:
On hover, you get both a preview of the internal note and also an initative summary:
There are 3 parameters for each encounter, with more detail below.
```encounter
name: string # Name of the encounter. Optional.
players: boolean | string | array # Which players to include. Optional.
creatures: array # Array of creatures to include in the encounter. Optional.
```
The name of the encounter, which will be displayed both in Preview mode as well as in the Initiative Tracker when the encounter is launched.
The players
parameter can be used to filter the players stored in settings before starting the encounter.
If the players
parameter is omitted, all players will be added to the encounter.
```encounter
players: false # No players will be added to the encounter.
players: none # Same as players: false
players: true # All players will be added. Same as omitting the parameter.
players: # Players will only be added to the encounter if they match the provided names.
- Name
- Name 2
```
The most complicated parameter, creatures
may be used to add additional creatures to the encounter.
The basic creature will be defined as an array with the syntax of [name, hp, ac, initiative modifer]
.
Please note that in all cases, hp, ac, and the modifier are optional.
```encounter
creatures:
- My Monster # 1 monster named My Monster will be added, with no HP, AC or modifier.
- Goblin, 7, 15, 2 # 1 goblin with HP: 7, AC: 15, MOD: 2 will be added.
```
Multiple of the same creature may be added using X: [name, hp, ac, initiative modifer]
, which will add X
creatures:
```encounter
creatures:
- 3: Goblin, 7, 15, 2 # 3 goblins with HP: 7, AC: 15, MOD: 2 will be added.
```
You may also add multiple creatures by simply adding additional lines; this will also allow you to change HP, AC and modifier values for different creatures:
```encounter
creatures:
- 2: Goblin, 7, 15, 2 # 2 goblins with HP: 7, AC: 15, MOD: 2 will be added.
- Goblin, 6, 15, 2 # 1 goblin with HP: 6, AC: 15, MOD: 2 will be added.
- Goblin, 9, 15, 2 # 1 goblin with HP: 9, AC: 15, MOD: 2 will be added.
- Hobgoblin, 20, 19, 2d+3 # 1 Hobgoblin with HP: 20, AC: 19: MOD: 2d+3 (rerolls each time) will be added
```
Monsters may be added to the combat by clicking the Add Creature
button, which will open a form where the creature's name, HP, AC and initiative can be set.
Once all of the creatures in a given combat have been added, initiatives can be modified by clicking on the initiative number and entering the new initiative. Names for non-player creatures can be modified in the same way.
Creatures may be disabled or removed from the combat, or statuses (such as "poisoned") may be added in the Actions
menu on the right of each creature.
Combat can be started by clicking the play
button. This will display the currently active creature. Clicking next
or previous
will move to the next enabled combatant.
Initiatives can be re-rolled for all creatures in the combat by clicking the Re-roll Initiatives
button.
The creatures HP and status effects can be reset by clicking Reset HP and Status
.
A new encounter (just player characters) can be started by clicking New Encounter
.
The plugin registers several commands to Obsidian that can be assigned to hotkeys or used with the Command Palette (Ctrl / Cmd + P).
If the initiative tracker view has been closed for any reason, use this command to add it back to the right pane.
This command can be used to start or stop an encounter.
If the encounter is active, this command can be used to make the next enabled combatant active (similar to clicking the Next
button).
If the encounter is active, this command can be used to make the previous enabled combatant active (similar to clicking the Previous
button).
The setting tab has options for adding and managing players and the ability to change the formula used to calculate the initiative.
Players may be added in settings. Players created in this way will be automatically added to encounters.
This setting can only be modified when the Dice Roller plugin is installed.
This setting can be used to modify how a creature's initiative is calculated by the plugin. Use %mod%
as a placeholder for the creature's initiative modifier.
It defaults to 1d20 + %mod%
.
This will support any dice formula supported by the Dice Roller plugin.
The initiative plugin will dynamically populate conditions from notes tagged
#condition
. I'm still working on rendering the description text to look
better, but it's functional for now.
This is a list of features that are planned for the plugin. Some of these may or may not be developed.
- Wikilink conditions
- Add a setting to point to a conditions tag
- Make the rendering for the conditions hover-over look better
From Obsidian v0.9.8, you can activate this plugin within Obsidian by doing the following:
- Open Settings > Third-party plugin
- Make sure Safe mode is off
- Click Browse community plugins
- Search for this plugin
- Click Install
- Once installed, close the community plugins window and activate the newly installed plugin
- Download the Latest Release from the Releases section of the GitHub Repository
- Extract the plugin folder from the zip to your vault's plugins folder:
<vault>/.obsidian/plugins/
Note: On some machines the.obsidian
folder may be hidden. On MacOS you should be able to pressCommand+Shift+Dot
to show the folder in Finder. - Reload Obsidian
- If prompted about Safe Mode, you can disable safe mode and enable the plugin. Otherwise head to Settings, third-party plugins, make sure safe mode is off and enable the plugin from there.
You can follow the same procedure to update the plugin
This plugin comes with no guarantee of stability and bugs may delete data. Please ensure you have automated backups.
Check out valentine195's other plugins!
- Obsidian Leaflet - Add interactive maps to Obsidian.md notes
- Dice Roller - Inline dice rolling for Obsidian.md
- 5e Statblocks - Format statblocks 5e-style