Giter Club home page Giter Club logo

foundry-helpers's Introduction

Snugug's Little Helpers

A collection of Foundry VTT helpers.

Tiered Difficulty Check

Tiered Difficulty Check is a macro for use with Monk's Active Tile Triggers and Monk's TokenBar. It allows you to request a roll from your players and then, instead of setting a single DC, you run the macro to check a range of DCs, and then take action based on the results. This macro must be imported into your world in order to use.

Screenshot of the configured macro action and tile with anchors

To set it up, start by including a Request Roll action. The only required settings for it are Continue with: All Tokens and Continue if: Always. This will ensure that the rolls are made and then get passed onto the macro.

Next, add a Run Macro action, setting it to Tiered Difficulty Check. If you don't see the macro in the dropdowns, make sure you import it from the module. Then, pass in the checks you want in Args. Each check should be space separated, with no space inside them. Check options are:

  • x - An exact match of for x
  • x-y - Any number greater than or equal to x and less than or equal to y
  • >x - Any number greater than x
  • >=x - Any number greater than or equal to x
  • <x - Any number less than x
  • <=x - Any number less than or equal to x
  • crit-success, crit, critical, critical-success - A roll of the highest dice face, regardless of total (for instance, rolling a 20 on a d20)
    • crit-fail, crit-failure, critical-fail, critical-failure, fumble - A roll of the lowest dice face, regardless of roll total (for instance, rolling a 1 on a d20)

If a token matches one of these options, they'll be added to a group. Tokens that match multiple options will be placed into multiple groups. For instance, if you passed in >=18 >15 10-15 crit fumble into Args, a token that rolled a 20 on a d20 will be placed into the >=18 group, the >15 group, and the crit group, a token that had a total of an 11 will be placed into the 10-15 group, and a token that rolled a 1 on a d20 will be placed into the fumble group.

With the tokens grouped, you can now set up a Anchor actions for each group. The anchor will be named check {{option}} with {{option}} being the option, the previous arguments would create anchors check >=18, check >15, check 10-15, check crit, and check fumble.

With your anchors created, it's time to add the actions in that you'd like to happen for each anchor!

Stacked Conditions

Stacked Conditions provides you with the ability to automatically apply a condition if another has been applied, for instance adding the Incapacitated condition to a token that is Unconscious. It requires Combat Utility Belt and Dynamic Active Effects. Use this to show players all of their stacked conditions, and allows you to write a condition's active effects once and reuse it.

To set up stacked conditions, create a script macro with the following in it:

game.SnugugsLittleHelpers
  // The condition you want to apply
  .applyCondition('Incapacitated')
  // The list of conditions that should get this condition
  .to(['Paralyzed', 'Petrified', 'Stunned', 'Unconscious']);

Each condition must match the name of a condition in Combat Utility Belt's Condition Lab. You can have multiple copies of this in your marco, each with a different condition to apply. Execute the macro to add your mappings and save them for future use.

To remove a mapping, at the bottom of your macro, write game.SnugugsLittleHelpers.removeStackedCondition('Condition') with the condition you want to remove and execute it. To reset all mappings, write game.SnugugsLittleHelpers.resetStackedConditions() and execute it, or use the Reset Stacked Conditions macro that comes with this module.

Bonus: The exports folder of this module contains cub-dnd5e-condition-map.json, a set of D&D 5e conditions pre-configured with Midi QoL effects, including an Immobile condition. There is also an Add Stacked Conditions macro that comes with this module that you can run to add mappings for Incapacitated and Immobile based on the D&D 5e rules.

Add Moulinette Sources

Add Moulinette Sources is a macro for use with Moulinette and its suite of modules. You should import this module into your world and edit the sources array as needed.

When executed, the macro adds the provided sources to Moulinette's index while ensuring there aren't duplicates with existing sources (so can be run multiple times in a row with different sources). Once run, go into Moulinette and run indexing for any of the items you've added.

foundry-helpers's People

Contributors

snugug avatar

Stargazers

 avatar

Watchers

 avatar  avatar

foundry-helpers's Issues

Control Concealer not un-concealing certain buttons

Even with all other modules disabled, some buttons can get stuck as permanently concealed. While you can deselect the a button, the change does not save. If you switch to another tool menu, and then back, you can see the button is reselected. Saving at any point also does not fix this.

My guess is the issue occurs with the left side menu buttons that share names with other buttons on other submenus. (Namely the select tool and occasional other module buttons)

Mod Conflict: Better Target

LibWrapperAlreadyOverriddenError: Conflict detected between module Better Target and module Border Control.

This is not a libWrapper bug.

Find information about these packages here:

Report this conflict here:

Ask the community for support:

== Technical Details:
Detected by libWrapper.
Package IDs= better-target, Border-Control
Error= Failed to wrap 'Token.prototype._refreshTarget' for module better-target with type OVERRIDE. An OVERRIDE wrapper for the same method has already been registered by module Border-Control.

[Detected 1 package: better-target]
LibWrapperError libWrapper-base_errors.js:19
LibWrapperAlreadyOverriddenError libWrapper-api_errors.js:91
register libWrapper-api.js:555
better_target.js:10
_call foundry.js:294
callAll foundry.js:253
setupGame foundry.js:5567
foundry.js:319:30
onError foundry.js:319
call_wrapped libWrapper-wrapper.js:511
listeners.js:134
onError#0 libWrapper-wrapper.js:187
_call foundry.js:298
callAll foundry.js:253
setupGame foundry.js:5567

Macro: Tiered Difficulty Check and Pf2e system

When using Monk's Active Tile Trigger to request a Reflex Save in Pathfinder 2e system, fumble and critical are not doing anything in macro.

so the labels and the code in the labels is never being hit. It instead goes to the labels that the math matches (1+some bonus or 20+somebonus)
note: it is not going to Both, as I have test code that pops scrolling text up for each scenario.

critical fumble <=14 15-23 24-33 >=34
labels: check fumble, check <=14, check 15-23, check 24-33, check >=34, check crit, check critical .... [note i did "check crit" and "check critical" because your documentation said "check crit", but it sure looks like the code would return "check critical"]

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.