## What this does ### Macro Adds a fixed amount of XP and logs a reason for award to all player-assigned characters or just those targeted. - Multiple tokens can be targeted (not simply selected) at once, and each will be adjusted by the same XP, with the same reason recorded in their experience log. - If no tokens are targeted, then all player assigned characters are awarded. - The XP shift can be altered in [user settings](#user-settings). Default is 20XP, in a range 0-200XP. - The change and new amounts are confirmed in the chat log and the character's experience log. ![Add XP](uploads/add-xp_093.gif) ### User Settings Adds user configuration options to: - Override the `default amount` of XP to apply. - Module default is 20XP. - Set a default `reason` for XP awards - Default reason provided is "Session %session% (%date%)", where - `%session%` is the session reference defined in Session Management settings - `%date%` is the Next Session Date defined in World Settings. - The reason is recorded in the Experience Log on the Notes tab of character sheet. - This can be overridden or customised each time by enabling the `Prompt` option. - `Prompt` for the XP amount and reason to be added: - Checked: - the user is prompted for the amount of XP to apply. - the default amount specified above is pre-populated in a dialog box. - Unchecked (default module setting): - simply applies the default amount of XP without adjustment or prompt. - this is the original and default Add XP behaviour. ![](uploads/xp-settings_0-9.png) Notes: - Entering a negative or non-whole number in the `Default Amount` setting will force this this to 0 after saving the settings. - A negative amount of XP can be set in the prompt. - This will reduce the targeted characters total XP to a minimum of 0. - **Caution:** In this way, *Current XP can fall below 0,* especially if more XP has been Spent than the Total. - Experience points are rounded off to the nearest whole number. ## Conflicts / Known Issues * None ## Source - [Script](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/blob/master/scripts/macros/add-xp.js). - The [original version](https://github.com/CatoThe1stElder/WFRP-4th-Edition-FoundryVTT/wiki/Macro-Repository#add-xp) of this macro was developed by DasSauerkraut#3215. ## History - Version 6.1.0. Use default group setting for Session Turnover rather than Group Tests. [#201](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/issues/201) - Version 0.9.5. Add compatibility with FVTT v10 and WFRP4e v6. - Version 0.9.4. Convert to using GM Toolkit groups functionality: enforces requirement for characters to be assigned to players. - Version 0.9.3. Fix compatibility with Advanced Macros module. - Version 0.8. Add reason for experience, including session reference and date parameters. Moved configuration options to Session Management Settings. Removed need to target tokens, and only apply changes to player-assigned characters. List affected characters in dialog prior. Consolidated reporting message to single GM whisper in chat. - Version 0.5. Add module settings for default XP amount and optional prompt. - Version 0.1. Introduce Add XP macro.