Coder Social home page Coder Social logo

jagusti / fvtt-wfrp4e-gmtoolkit Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 9.0 1.06 MB

Utility module with tweaks, enhancements and macros to help GMs with game management when running Warhammer Fantasy Roleplay (4e) sessions in Foundry Virtual Tabletop.

License: MIT License

CSS 2.05% JavaScript 89.34% HTML 1.66% Handlebars 6.55% Python 0.41%
foundry-vtt ttrpg vtt-modules warhammer-rpg wfrp

fvtt-wfrp4e-gmtoolkit's People

Contributors

ancainu avatar dependabot[bot] avatar doumoku avatar forien avatar jagusti avatar leratierbretonnien avatar mcgregor777 avatar silentmark avatar txus5012 avatar yasnen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fvtt-wfrp4e-gmtoolkit's Issues

Flag 'passive' talents on tokens

Flag tokens where the actor has any of the following talents.

  • Acute Sense
  • Combat Aware
  • Animal Affinity
  • Detect Artefact
  • Holy Visions
  • Magical Sense
  • Nose for Trouble
  • Savant (Lore)(?)
  • Second Sight
  • Sixth Sense

Add Dark Whispers functionality

Add Vindico#9013's Dark Whispers macro.

PRIORITY:

  • Add macro attribution
  • Generate and incorporate macro icon
  • Restrict to GM users
  • Add translation strings for user facing text

OPTIONAL:

  • Exclude current GM user from available target list
  • Add character names to user list
  • Add user configurable message wrappers
  • Add styling to make input box clearer
  • Add chat card button to accept or reject the whisper , and apply Corruption update if accepted
  • Filter out or prevent selection of characters that have no Corruption
  • Show current and maximum Corruption of characters listed
  • Whisper to offline party members
  • Add Dark Whisper to Token Hud
  • Add sample Dark Whispers table
  • Add alternative whisper opening and closing text
  • Add option for open/public or private whispers

Improve handling of non-PC targets when updating Fortune or XP

Targeting a creature or NPC results in a TypeError when running the Reset Fortune or Add XP message.

  • Reset Fortune
    • Provide UI message to specify that a PC actor should be targeted
    • Log console info message to advise no action taken for non-PC token
  • Add XP
    • Provide UI message to specify that a PC actor should be targeted
    • Log console info message to advise no action taken for non-PC token

Set and activate between sessions scene

  • Add GM option to specify a scene for landing PCs between sessions
  • Automatically activate the between session scenes when the End of Session macro is run.

Error in fr.json

at line 33, it should be GMTOOLKIT.Talent.Luck, not GMTOOLKIT.LuckTalent

regards

Document initial functionality

Macros

  • Add XP
  • Advantage Macros
  • Set Token Vision and Light
  • Pull Everyone to Scene
  • Reset Fortune
  • Simply d100

Token Hud Extension

  • Character vs NPC / creature views
  • Active scene mode
  • Conditions

Other

  • Styling
    • Macros
    • Conditions
  • Getting Started
    • Installing and Enabling
    • Finding Macros
    • Settings

Including:

  • screenshot and/or video
  • known module conflicts / clashes

Cap to max Advantage in Increase Advantage macro

From JDW via Discord

/* Increases Advantage for the selected token by 0 */
if(Number(actor.data.data.status.advantage.max) > Number(actor.data.data.status.advantage.value))
{
actor.update({"data.status.advantage.value" : Number(actor.data.data.status.advantage.value)+1})
ui.notifications.notify(Advantage increased by 1 to ${actor.data.name}`)
}```

Check Furnace is installed for Set Token Vision macro

If KakaRoTo's Furnace module (with advanced macro support) isn't installed, the Set Token Light and Vision macro fails with the following console error:

foundry.js:26245 SyntaxError: Illegal return statement
    at Macro.execute (foundry.js:26242)
    at Hotbar._onClickMacro (foundry.js:20094)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.v.handle (jquery.min.js:2)
  • Check that Furnace is installed and active when firing the macro
  • If it's not, provide UI feedback to the GM

FVTT v9 Compatibility

The following need compatibility updates:

  • Send Dark Whispers
    • table used to prepopulate Send Dark Whispers prompt is wfrp4e format, so needs converting to normal FVTT format
  • Token Hud Extensions
    • Corruption shortcuts use wfrp4e tables for mutations and wrath of the gods that need to be awaited.
  • #68
    • Dialog presents, updates seem to be made to token settings, but changes are not reflected on canvas
    • Likely changes also needed to animation settings
  • #70

The following work with existing functionality:

  • Add, Clear, Reset Advantage
  • Automated Advantage Handling
  • Add XP
  • Session Turnover
  • Pull Everyone to Scene
  • Reset Fortune
  • Simply d100
  • Make Secret Party Test
  • Toggle Scene Visibility and Light
  • GM Toolbox

Macro: Party Tests

Add macro for the GM to make a test for the whole party. Primary use case is secret Perception tests.

In the first instance, this might just be a basic Perception test, with no modifiers, run against all PCs that are active in the game or associated with players.

Fancy version might be

  • add option to run silently (based on specified parameters) or interactively
  • #61
  • optionally make Public roll (default: Self)
  • #62
  • #63
  • #64

Possible checks:

  • tests related to #26 'passive' talents
  • From @SeanPP: Intuition, Track, Secret Signs, Sleight of Hand

Support user settings for Add XP

  • Add dialog to change amount of XP per use
  • Add module setting for user defined default XP
  • Add module setting to toggle XP prompt

Set up group selection and filtering

  • Define groups for selecting multiple:

    • users: users, gms, players, spectators, assigned
    • actors: actors, characters, party, entourage, company
    • tokens: tokens, nonparty, pcTokens, npcTokens, friends, enemies
    • combatants: combatants, allies, adversaries
  • Filter group depending on context / state

    • active: currently logged in (default)
    • present: present in the viewed scene
    • interaction: selected or targeted in the viewed scene
  • Applies to (and should update) (with specified default)

    • Send Dark Whispers (related: #58): party, active
    • Make Secret Party Tests: party, present
    • Add XP: party (optionally targeted)
    • Reset Fortune: party
  • #117

Default to Normal Vision if no Night or Dark Vision

Macro: Set Token Vision and Light

If a user selects Night or Dark Vision and the token does not have the talent/trait, Dim Vision is currently set to 0. Instead, it should be set to the default Normal Vision value.

Dark Whispers: Search for eligible actors (not players).

Can this be modified or can you suggest how to make this change please.

Currently this only works if:
Actor Created
Player Created
Actor Assigned to player
Player has logged in.
(Sometimes the GM then needs to refresh).

Use Case:
We use Hot Seat Observer module to allow local players to interact (4 at this point). And the issue is that it can only be assigned to 1 player at a time.

A modification to search the actors selected (vs players) would fix this.

Yes it means its possible to send out a dark whisper to a player who isn't in game but this is on the GM.

Compatibility 0.8.x

Soon the WFRP4e main system/modules will be updated to 0.8.x and there is some code reworked there. This module might need an update too.

Advantage uses pre-calculated values

Happens when using the _data rather than data values for status.advantage.max. Maximum value is misrepresented and outcome for advantage adjustments is incorrectly determined, which can result in either no advantage being incremented or the Initiative Bonus cap being ignored.

Prompt to set Global Illumination off or Token Vision on

When the Token Vision and Light dialog is presented,

  • show the status of
    • Scene Config: Global Illumination
    • Scene Config: Token Vision
    • Scene Config: Darkness Threshold / Level
  • If on, prompt to automatically set Global Illumination off
  • If off, prompt to automatically set (scene) Token Vision on

Advantage macros affect actors rather than tokens

image

The add, clear and reduce macros are updating the advantage on the actor rather than the token. Where multiple tokens are created from (and therefore share) the same actor, they are equally affected by the advantage change, even when Link Actor Data is not selected on the token.

  • The current actor-based behaviour is fine when you only have a single token for an actor (such as with PCs or main NPCs).
  • If you drag actors direct from a compendium (eg, Bestiary), that generates additional (unique) actor-tokens, and also avoids the issue. It's a workaround, but it does mean you end up with multiple copies of the compendium entry in your actor list.

To fix this

  • change the macro to affect the token's advantage rather than the related actor data

Apply Night Vision when near light source scenery

Macro: Set Token Vision and Light

If there is scene illumination within a token's line of sight, it should be able to benefit from Night Vision, even if there is no scene configured ambient light and it is carrying no active light source itself.

Add Soulfire (MIracle of Sigmar) to light source options

Reference: WFRP4e p226

  • Update Soulfire (Miscast) translation key to avoid conflict
  • Add Soulfire (Miracle) to light source option and translation files
  • Apply lighting animation using Fellowship Bonus for dim and bright distance

For Fellowship bonus, use token.actor.data.data.characteristics.fel.bonus

Note: Pha's Protection works in a similar way, using WP Bonus for distance.

Improve translation strings

Translation strings needs better structure and consistency.
Some phrase elements may be reusable from system language files.

Common phrases

  • Namespace
  • Dialog box phrases
    • Apply Changes
    • Cancel Changes
  • UI Feedback
    • No target PC token
    • No selected token

Macro-specific phrases

  • Chat message responses
  • UI labels

Fix

  • GMT.GlowingSkin
  • GMT.SetVisionTitle

Extend

  • Backport amends to fr.json

Token layout is broken in Safari

Screen Shot 2020-08-11 at 10 43 57 PM

This is on Big Sur, but I assume it would be the same in older versions of Safari. Works fine in Chrome on the same server, user etc.

'0' shortcut key inadvertently triggers when editing token settings

As far as I could trace it, this is an issue with this module, but I'm not 100% sure.

When I open the settings for a token and focus e.g. the rotation value, and edit it by pressing the zero key it triggers this message:
"Token Vision is disabled and Global Illumination enabled in scene {sceneName}."

And it cancels my input, so there's no way to edit that field anymore. I don't think it's just that field, but this doesn't happen with e.g. the character sheet.

Cannot render settings submenus in FVTT v9

foundry.js:316 Error: An error occurred while rendering GMToolkitAdvantageSettings 48: You must specify both namespace and key portions of the setting
    at ClientSettings.get (foundry.js:2113)
    at gm-toolkit-settings.mjs:285
    at Array.forEach (<anonymous>)
    at getDataSettings (gm-toolkit-settings.mjs:272)
    at GMToolkitAdvantageSettings.getData (gm-toolkit-advantage-settings.js:18)
    at GMToolkitAdvantageSettings._render (foundry.js:3031)
    at GMToolkitAdvantageSettings._render (foundry.js:3733)
    at GMToolkitAdvantageSettings.render (foundry.js:2990)
    at SettingsConfig._onClickSubmenu (foundry.js:55267)
    at HTMLButtonElement.dispatch (jquery.min.js:2)

Derive light and sight based on condition

Preset sight or light option depending on condition, in the following priority:

  • Blinded vision = Blinded
  • Unconscious: vision =No Vision
  • Ablaze: light = Ablaze

Apply Blinded or Unconscious in preference to Dark Vision or Night Vision (see #41).

Prompt for vision update when condition is updated, even if Token Vision & Light dialog is not open.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.