From 3a1dd0649822736f831a73b87aca1a7be35ae4ea Mon Sep 17 00:00:00 2001 From: Jeff Hitchcock Date: Thu, 21 Mar 2024 16:12:52 -0700 Subject: [PATCH] Update wiki with new hooks --- wiki/Active-Effect-Guide.md | 2 +- wiki/Advancement-Type-Item-Choice.md | 4 +- wiki/Hooks.md | 106 ++++++++++++++++++++++++++- wiki/Roll-Formulas.md | 3 +- 4 files changed, 110 insertions(+), 5 deletions(-) diff --git a/wiki/Active-Effect-Guide.md b/wiki/Active-Effect-Guide.md index 128b60e20d..4ea6a57546 100644 --- a/wiki/Active-Effect-Guide.md +++ b/wiki/Active-Effect-Guide.md @@ -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. diff --git a/wiki/Advancement-Type-Item-Choice.md b/wiki/Advancement-Type-Item-Choice.md index ebc1d25543..8b0002d069 100644 --- a/wiki/Advancement-Type-Item-Choice.md +++ b/wiki/Advancement-Type-Item-Choice.md @@ -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. @@ -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 diff --git a/wiki/Hooks.md b/wiki/Hooks.md index 2a08c516d5..09f40f5645 100644 --- a/wiki/Hooks.md +++ b/wiki/Hooks.md @@ -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 @@ -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. @@ -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 | Details on the rests completed. | + ### `dnd5e.transformActor` Fires just before a new actor is created during the transform process. @@ -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. diff --git a/wiki/Roll-Formulas.md b/wiki/Roll-Formulas.md index e92ac685a5..5d3a590fa2 100644 --- a/wiki/Roll-Formulas.md +++ b/wiki/Roll-Formulas.md @@ -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) + >
To explore the data model within Foundry to find the properties detailed below, here are a few approaches: > > • 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):