Skip to content

Commit

Permalink
Update wiki with new hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
arbron committed Mar 21, 2024
1 parent 954e5d2 commit 3a1dd06
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wiki/Active-Effect-Guide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Up to date as of 3.0.0](https://img.shields.io/static/v1?label=dnd5e&message=3.0.0&color=informational)
![Up to date as of 3.1.0](https://img.shields.io/static/v1?label=dnd5e&message=3.1.0&color=informational)

This document only covers Active Effects available to the Core dnd5e System.

Expand Down
4 changes: 2 additions & 2 deletions wiki/Advancement-Type-Item-Choice.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Up to date as of 2.2.0](https://img.shields.io/static/v1?label=dnd5e&message=2.2.0&color=informational)
![Up to date as of 3.1.0](https://img.shields.io/static/v1?label=dnd5e&message=3.1.0&color=informational)

This advancement type is designed for any feature that gives the player a choice of options to add to their character at a certain level. This covers features with a limited set of options such as Fighting Style and more open ended features such as Magical Secrets.

Expand All @@ -19,7 +19,7 @@ The `Allow Drops` indicates whether the drop area should be shown to the player

Item types can be restricted using the `Type` field, which is null if any item type is acceptable, or can be set to one of the top-level types (except things like class, subclass, and background).

Finally, the `pool` contains an array of item UUIDs indicating a fixed list of options presented to the player. When creating or modifying the Item Grant Advancement, drag-and-drop the items to present to the player to this section.
Finally, the `pool` contains an array of objects with item UUIDs indicating a fixed list of options presented to the player. When creating or modifying the Item Grant Advancement, drag-and-drop the items to present to the player to this section.

## Player Experience

Expand Down
106 changes: 105 additions & 1 deletion wiki/Hooks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Up to date as of 3.0.2](https://img.shields.io/static/v1?label=dnd5e&message=3.0.0&color=informational)
![Up to date as of 3.1.0](https://img.shields.io/static/v1?label=dnd5e&message=3.1.0&color=informational)

## Actor

Expand Down Expand Up @@ -42,6 +42,62 @@ Fires after an ability save has been rolled.
| roll | D20Roll | The resulting roll. |
| abilityId | string | ID of the ability that was rolled as defined in `DND5E.abilities`. |

### `dnd5e.preBeginConcentrating`

Fires before a concentration effect is created. Returning `false` will prevent concentration effect from being created.

| Name | Type | Description |
| ---------- | ------- | -------------------------------------- |
| actor | Actor5e | The actor initiating concentration. |
| item | Item5e | The item that will be concentrated on. |
| effectData | object | Data used to create the ActiveEffect. |

### `dnd5e.beginConcentrating`

Fires after a concentration effect is created.

| Name | Type | Description |
| ------ | -------------- | --------------------------------------- |
| actor | Actor5e | The actor initiating concentration. |
| item | Item5e | The item that is being concentrated on. |
| effect | ActiveEffect5e | The created ActiveEffect instance. |

### `dnd5e.preEndConcentrating`

Fires before a concentration effect is deleted. Returning `false` will prevent concentration effect from being deleted.

| Name | Type | Description |
| ------ | -------------- | -------------------------------------- |
| actor | Actor5e | The actor ending concentration. |
| effect | ActiveEffect5e | The ActiveEffect that will be deleted. |

### `dnd5e.endConcentrating`

Fires after a concentration effect is deleted.

| Name | Type | Description |
| ------ | -------------- | ---------------------------------- |
| actor | Actor5e | The actor ending concentration. |
| effect | ActiveEffect5e | The ActiveEffect that was deleted. |

### `dnd5e.preRollConcentration`

Fires before a saving throw to maintain concentration is rolled. Returning `false` will prevent the normal rolling process.

| Name | Type | Description |
| ------- | -------------------- | ------------------------------------------------- |
| actor | Actor5e | Actor for which the saving throw is being rolled. |
| options | D20RollConfiguration | Configuration data for the pending roll. |

### `dnd5e.rollConcentration`

Fires after a saving throw to maintain concentration is rolled.

| Name | Type | Description |
| ----- | ------- | ------------------------------------------------- |
| actor | Actor5e | Actor for which the saving throw has been rolled. |
| roll | D20Roll | The resulting roll. |

### `dnd5e.preCalculateDamage`

Fires before damage amount is calculated for an actor. Returning `false` will prevent damage from being applied.
Expand Down Expand Up @@ -263,6 +319,15 @@ Fires when the actor completes a short or long rest.
| actor | Actor5e | The actor that just completed resting. |
| result | RestResult | Details on the completed rest. |

### `dnd5e.groupRestCompleted`

Fires when the rest process is completed for a group.

| Name | Type | Description |
| ------ | ------------------------ | -------------------------------------- |
| group | Actor5e | The group that just completed resting. |
| result | Map<Actor5e, RestResult> | Details on the rests completed. |

### `dnd5e.transformActor`

Fires just before a new actor is created during the transform process.
Expand Down Expand Up @@ -509,6 +574,45 @@ Fires after the Item has rolled to recharge, but before any changes have been pe
| item | Item5e | Item for which the roll was performed. |
| roll | Roll | The resulting roll. |

### `dnd5e.preSummon`

Fires before summoning is performed. Returning `false` will prevent summoning from occurring.

| Name | Type | Description |
| ------- | -------------- | ------------------------------------------ |
| item | Item5e | The item that is performing the summoning. |
| profile | SummonsProfile | Profile used for summoning. |

### `dnd5e.preSummonToken`

Fires before a specific token is summoned. After placement has been determined but before the final token data is constructed. Returning `false` will prevent this token from being summoned.

| Name | Type | Description |
| ------- | --------------- | -------------------------------------------- |
| item | Item5e | The item that is performing the summoning. |
| profile | SummonsProfile | Profile used for summoning. |
| config | TokenUpdateData | Configuration for creating a modified token. |

### `dnd5e.summonToken`

Fires after token creation data is prepared, but before summoning occurs.

| Name | Type | Description |
| --------- | -------------- | ------------------------------------------ |
| item | Item5e | The item that is performing the summoning. |
| profile | SummonsProfile | Profile used for summoning. |
| tokenData | object | Data for creating a token. |

### `dnd5e.postSummon`

Fires when summoning is complete.

| Name | Type | Description |
| ------- | -------------- | ------------------------------------------ |
| item | Item5e | The item that is performing the summoning. |
| profile | SummonsProfile | Profile used for summoning. |
| tokens | Token5e[] | Tokens that have been created. |

### `dnd5e.preCreateScrollFromSpell`

Fires before the item data for a scroll is created. Returning `false` will prevent the scroll from being created.
Expand Down
3 changes: 2 additions & 1 deletion wiki/Roll-Formulas.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Up to date as of 3.1](https://img.shields.io/static/v1?label=dnd5e&message=3.1&color=informational)
![Up to date as of 3.1.0](https://img.shields.io/static/v1?label=dnd5e&message=3.1.0&color=informational)

> <details><summary>To explore the data model within Foundry to find the properties detailed below, here are a few approaches:</summary>
>
> • Select a token, then open up the dev tools (F12 on Win; ⌥⌘I on Mac), and paste this into the Console (or save it as a Script macro in your hotbar):
Expand Down

0 comments on commit 3a1dd06

Please sign in to comment.