Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FVTT v9 and WFRP v5 Compatibility #75

Merged
merged 7 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@ All notable changes to this project will be documented in this file. The format

## Unreleased
See [Issue Backlog](../../issues) and [Roadmap](../../milestones).
- *Fix* non-rendered html in Marginal Success roll description.
- *Changed* Foundry compatibility to v9. WFRP4e system compatibility is v5.
- *Fixed* non-rendered html in Marginal Success roll description.
- *Fixed* issue where module settings could not be accessed [[#70](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/issues/70)].
- *Added* RollTable compatibility to the Send Dark Whispers macro. This fixes issues with "undefined" Dark Whisper text in the Send Dark Whispers dialog [[#69](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/issues/69)].
- *Added* Dark Whispers RollTable from compendium for use by Send Dark Whispers macro.
- *Added* prompt to import table in Send Dark Whispers dialog if not present.
- *Added* RollTable compatibility to Token Hud Extensions. This fixes issues with rolling for Mental Corruption, Physical Mutation and Wrath of the Gods using Token Hud Extension shortcuts. [[#69](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/issues/69)].
- *Changed* Token Hud shortcut for Mental Corruption from `CTRL+SHIFT+double-click` to `SHIFT+double-click`.
- *Added* message prompt to install Mental Corruption, Physical Mutation and Wrath of the Gods Rolltables if not present.
- *Changed* Set Token Vision and Light macro to be compatible with Foundry v9 canvas and lighting updates. This fixes issues with tokens not updating light and sight radius or animation when using the macro [[#68](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/issues/68)].
- Sight changes may not be refreshed until tokens are moved or deselected and then reselected. This is due to an outstanding Foundry core bug [#6389]((https://gitlab.com/foundrynet/foundryvtt/-/issues/6389)).
- *Changed* listed radius for Soulcast (Miscast) from 15m to 15yds, to maintain consistency with Ablaze condition lighting details. French translation retains metric units.
- *Changed* Storm Lantern narrowbeam angle from 60 to 90 degrees, as per WFRP p309. Token lock rotation is no longer adjusted (previously the macro would ensure it was not locked.)
- *Changed* Night Vision to use sight angle of light source.
- *Fixed* issue with Night Vision multiplier being applied to Dim Sight on tokens that do not have Night Vision when multiple tokens are selected.
- *Removed* redundant "nochange" processing for light and sight, as this is not triggered.

## Version 0.8.0
- *Changed* Advantage scripts to handle non-token characters.
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ Utility module with tweaks, enhancements and macros to help GMs manage games of

## Compatibility

Version 0.8.0 requires
- Foundry VTT: 0.8.8 - 0.8.9
- WFRP4e: 4.0.6 - 4.3.1
Version 0.9.0 requires
- Foundry VTT: v9
- WFRP4e: v5

This version (including new enhancements) is partially compatible with WFRP4e 5.x and Foundry 9.x. Known conflicts are described in issue #69, and will be addressed in the next release. Future versions of the Toolkit may not be compatible with earlier versions of Foundry or the WFRP4e system.

If you are using earlier versions of WFRP4e (3.4.1 - 3.6.2) and Foundry (0.7.10), then you should use [v0.6.3](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/releases/tag/v0.6.3) of the GM Toolkit.
If you are using earlier versions of WFRP4e (4.0.6 - 4.3.1) and Foundry (0.8.8 - 0.8.9), then you should use [v0.8.0](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/releases/tag/v0.8.0) of the GM Toolkit.

## Installation Instructions
For full details, see the [Getting Started guide](../../wiki/getting-started) on the [wiki](../../wiki).
Expand All @@ -23,7 +21,8 @@ For full details, see the [Getting Started guide](../../wiki/getting-started) on
3. [Import macros](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/wiki/getting-started#macros) to your Macro Directory via `Compendiums` > `Macro` > `GM Toolkit`.
- Any imported macros will appear in the Macro Directory, next to the Macro Hotbar.
- Open the Macro Directory and drag required macros onto a free space on the Marco Hotbar.
4. Revised macros will *not automatically* replace your existing GM Toolkit macros. You will need to manually re-import them from the Macro Compendium into your Macro Directory to take advantage of the improvements.
- Revised macros will *not automatically* replace your existing GM Toolkit macros. You will need to manually re-import them from the Macro Compendium into your Macro Directory to take advantage of the improvements.
4. [Import RolLTables](https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/wiki/getting-started#macros) to your RollTable suite via `Compendiums` > `RollTable` > `GM Toolkit`.

## References

Expand Down
5 changes: 4 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"GMTOOLKIT.TokenHudExtension.StatusChanged" : "{targetStatus} changed from {originalStatus} to {newStatus} for {targetName}",
"GMTOOLKIT.TokenHudExtension.StatusNotChanged" : "{targetStatus} is unchanged at {originalStatus} for {targetName}",
"GMTOOLKIT.TokenHudExtension.LittlePrayerResult" : "<p>{actorName} offered a Little Prayer to the Gods ({littlePrayerResult}).</p>",
"GMTOOLKIT.TokenHudExtension.ImportTable" : "{table} table not found. Please import from the Compendium.",
"GMTOOLKIT.TokenHudExtension.Sufferance" : "{actor} suffers {plight}",

"GMTOOLKIT.Dialog.Apply": "Apply Changes",
"GMTOOLKIT.Dialog.Cancel" : "Cancel",
Expand All @@ -48,7 +50,7 @@
"GMTOOLKIT.LightSource.GlowingSkin" : "Glowing Skin (Mutation) (10yd)",
"GMTOOLKIT.LightSource.Ablaze" : "Ablaze (Condition) (15 yds)",
"GMTOOLKIT.LightSource.Pha" : "Pha's Protection (WP Bonus yds)",
"GMTOOLKIT.LightSource.Soulfire" : "Soulfire (Miscast) (15 m)",
"GMTOOLKIT.LightSource.Soulfire" : "Soulfire (Miscast) (15 yds)",

"GMTOOLKIT.Vision.Normal" : "Normal",
"GMTOOLKIT.Vision.None" : "None",
Expand Down Expand Up @@ -164,6 +166,7 @@
"GMTOOLKIT.Dialog.DarkWhispers.SendWhisper" : "Whisper",
"GMTOOLKIT.Dialog.DarkWhispers.NoCorruption" : "No Corruption to spend on offer.",
"GMTOOLKIT.Dialog.DarkWhispers.HasCorruption" : "Someone to bargain with.",
"GMTOOLKIT.Dialog.DarkWhispers.ImportTable" : "Import the Dark Whispers RollTable from the GM Toolkit compendium to see Dark Whisper prompts here.",

"GMTOOLKIT.Message.DarkWhispers.Accept" : "Heed the Whisper",
"GMTOOLKIT.Message.DarkWhispers.Reject" : "Deny the Dark Gods",
Expand Down
3 changes: 3 additions & 0 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"GMTOOLKIT.TokenHudExtension.StatusChanged" : "{targetStatus} est passé de {originalStatus} à {newStatus} pour {targetName}",
"GMTOOLKIT.TokenHudExtension.StatusNotChanged" : "{targetStatus} demeure à {originalStatus} pourr {targetName}",
"GMTOOLKIT.TokenHudExtension.LittlePrayerResult" : "<p>{actorName} a offert une Modeste Prière aux Dieux ({littlePrayerResult}).</p>",
"GMTOOLKIT.TokenHudExtension.ImportTable" : "{table} table not found. Please import from the Compendium.",
"GMTOOLKIT.TokenHudExtension.Sufferance" : "{actor} suffers {plight}",

"GMTOOLKIT.Dialog.Apply" : "Appliquer les changements",
"GMTOOLKIT.Dialog.Cancel" : "Annuler",
Expand Down Expand Up @@ -164,6 +166,7 @@
"GMTOOLKIT.Dialog.DarkWhispers.SendWhisper" : "Murmurer",
"GMTOOLKIT.Dialog.DarkWhispers.NoCorruption" : "No Corruption to spend on offer.",
"GMTOOLKIT.Dialog.DarkWhispers.HasCorruption" : "Someone to bargain with.",
"GMTOOLKIT.Dialog.DarkWhispers.ImportTable" : "Import the Dark Whispers RollTable from the GM Toolkit compendium to see Dark Whisper prompts here.",

"GMTOOLKIT.Message.DarkWhispers.Accept" : "Obéir au Murmure",
"GMTOOLKIT.Message.DarkWhispers.Reject" : "Ignorer les Dieux Noirs",
Expand Down
34 changes: 21 additions & 13 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "wfrp4e-gm-toolkit",
"title": "GM Toolkit (WFRP4e)",
"description": "Utilities for WFRP4e GMs",
"version": "0.8.0",
"minCoreVersion": "0.8.8",
"compatibleCoreVersion": "0.8.9",
"version": "0.9.0",
"minCoreVersion": "9",
"compatibleCoreVersion": "9",
"author": "Jagusti",
"authors" : [
{
"name": "Jagusti",
"discord": "Jagusti#3610",
"ko-fi": "jagusti"
"name": "Jagusti",
"discord": "Jagusti#3610",
"ko-fi": "jagusti"
}
],
"system": ["wfrp4e"],
Expand All @@ -19,12 +19,20 @@
"styles": ["/css/gmtoolkit.css"],
"packs": [
{
"name": "gm-toolkit-macros",
"label": "GM Toolkit",
"path": "packs/gm-toolkit-macros.db",
"entity": "Macro",
"module": "wfrp4e-gm-toolkit",
"system": "wfrp4e"
"name": "gm-toolkit-macros",
"label": "GM Toolkit",
"path": "packs/gm-toolkit-macros.db",
"entity": "Macro",
"module": "wfrp4e-gm-toolkit",
"system": "wfrp4e"
},
{
"name": "gm-toolkit-tables",
"label": "GM Toolkit",
"path": "packs/gm-toolkit-tables.db",
"entity": "RollTable",
"module": "wfrp4e-gm-toolkit",
"system": "wfrp4e"
}
],
"languages": [
Expand All @@ -41,7 +49,7 @@
],
"url": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit",
"manifest": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/releases/latest/download/module.json",
"download": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/releases/download/v0.8.0/wfrp4e-gm-toolkit.zip",
"download": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/releases/download/v0.9.0/wfrp4e-gm-toolkit.zip",
"bugs": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/issues",
"changelog": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/releases",
"readme": "https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/wiki",
Expand Down
2 changes: 1 addition & 1 deletion modules/gm-toolkit-settings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,6 @@ export function getDataSettings(data, feature) {
s.isNumber = true;
s.inputType = "number"
}
s.value = game.settings.get(s.module, s.key);
s.value = game.settings.get(s.namespace, s.key);
});
}
31 changes: 17 additions & 14 deletions modules/token-hud-extension.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,6 @@ export default class TokenHudExtension {
})
hudCorruption.find("i").dblclick(async (ev) => {
GMToolkit.log(false, `Corruption hud extension double-clicked.`)
if (ev.ctrlKey && ev.shiftKey && wfrp4eContent.core) {
let result = game.wfrp4e.tables.formatChatRoll("mutatemental");
ChatMessage.create(game.wfrp4e.utility.chatDataSetup(result, "roll", true));
GMToolkit.log(false, `${actor.name} spawned a mental mutation.`)
ev.preventDefault();
ev.stopPropagation();
return;
}
if (ev.ctrlKey && ev.altKey) {
let littlePrayer = new Roll("d100")
littlePrayer.roll();
Expand All @@ -370,17 +362,28 @@ export default class TokenHudExtension {
return;
}
if (ev.shiftKey && ev.altKey && wfrp4eContent.core) {
let result = game.wfrp4e.tables.formatChatRoll("wrath");
ChatMessage.create(game.wfrp4e.utility.chatDataSetup(result, "roll", true));
GMToolkit.log(false, `${actor.name} incurred the Wrath of the Gods.`)
let result = (game.tables.getName("Wrath of the Gods Table")) ? await game.wfrp4e.tables.rollTable("wrath") : `${game.i18n.format("GMTOOLKIT.TokenHudExtension.ImportTable", {table: "Wrath of the Gods"})}`
let chatData = game.wfrp4e.utility.chatDataSetup(result?.result || result, "gmroll", true)
chatData.flavor = game.i18n.format("GMTOOLKIT.TokenHudExtension.Sufferance", {actor: actor.name, plight: "the Wrath of the Gods"})
ChatMessage.create(chatData, {});
ev.preventDefault();
ev.stopPropagation();
return;
}
if (ev.ctrlKey && wfrp4eContent.core) {
let result = game.wfrp4e.tables.formatChatRoll("mutatephys");
ChatMessage.create(game.wfrp4e.utility.chatDataSetup(result, "roll", true));
GMToolkit.log(false, `${actor.name} spawned a physical mutation.`)
let result = (game.tables.getName("Physical Mutation")) ? await game.wfrp4e.tables.rollTable("mutatephys") : `${game.i18n.format("GMTOOLKIT.TokenHudExtension.ImportTable", {table: "Physical Mutation"})}`
let chatData = game.wfrp4e.utility.chatDataSetup(result?.result || result, "gmroll", true)
chatData.flavor = game.i18n.format("GMTOOLKIT.TokenHudExtension.Sufferance", {actor: actor.name, plight: "Physical Mutation"})
ChatMessage.create(chatData, {});
ev.preventDefault();
ev.stopPropagation();
return;
}
if (ev.shiftKey && wfrp4eContent.core) {
let result = (game.tables.getName("Mental Corruption")) ? await game.wfrp4e.tables.rollTable("mutatemental") : `${game.i18n.format("GMTOOLKIT.TokenHudExtension.ImportTable", {table: "Mental Corruption"})}`
let chatData = game.wfrp4e.utility.chatDataSetup(result?.result || result, "gmroll", true)
chatData.flavor = game.i18n.format("GMTOOLKIT.TokenHudExtension.Sufferance", {actor: actor.name, plight: "Mental Corruption"})
ChatMessage.create(chatData, {});
ev.preventDefault();
ev.stopPropagation();
return;
Expand Down
Loading