{"id":15932573,"url":"https://github.com/snugug/foundry-helpers","last_synced_at":"2026-06-02T03:30:16.537Z","repository":{"id":37927717,"uuid":"483604229","full_name":"Snugug/foundry-helpers","owner":"Snugug","description":"A collection of Foundry VTT helpers","archived":false,"fork":false,"pushed_at":"2022-06-14T11:24:17.000Z","size":54,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-03T05:44:50.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Snugug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-20T10:13:40.000Z","updated_at":"2022-05-04T13:35:58.000Z","dependencies_parsed_at":"2022-08-25T22:22:15.695Z","dependency_job_id":null,"html_url":"https://github.com/Snugug/foundry-helpers","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2Ffoundry-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2Ffoundry-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2Ffoundry-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2Ffoundry-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snugug","download_url":"https://codeload.github.com/Snugug/foundry-helpers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170065,"owners_count":19759143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T02:02:34.883Z","updated_at":"2026-06-02T03:30:16.467Z","avatar_url":"https://github.com/Snugug.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snugug's Little Helpers\n\nA collection of Foundry VTT helpers.\n\n## Tiered Difficulty Check\n\nTiered Difficulty Check is a macro for use with [Monk's Active Tile Triggers](https://foundryvtt.com/packages/monks-active-tiles) and [Monk's TokenBar](https://foundryvtt.com/packages/monks-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.\n\n![Screenshot of the configured macro action and tile with anchors](https://user-images.githubusercontent.com/377188/164716747-bb4c628e-456d-4c52-8050-3f96f33a69a1.png)\n\nTo 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.\n\nNext, 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:\n\n- `x` - An exact match of for `x`\n- `x-y` - Any number greater than or equal to `x` and less than or equal to `y`\n- `\u003ex` - Any number greater than `x`\n- `\u003e=x` - Any number greater than or equal to `x`\n- `\u003cx` - Any number less than `x`\n- `\u003c=x` - Any number less than or equal to `x`\n- `crit-success`, `crit`, `critical`, `critical-success` - A roll of the highest dice face, regardless of total (for instance, rolling a 20 on a d20)\n- - `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)\n\nIf 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 `\u003e=18 \u003e15 10-15 crit fumble` into `Args`, a token that rolled a 20 on a d20 will be placed into the `\u003e=18` group, the `\u003e15` 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.\n\nWith 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 \u003e=18`, `check \u003e15`, `check 10-15`, `check crit`, and `check fumble`.\n\nWith your anchors created, it's time to add the actions in that you'd like to happen for each anchor!\n\n## Stacked Conditions\n\nStacked 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](https://foundryvtt.com/packages/combat-utility-belt/) and [Dynamic Active Effects](https://foundryvtt.com/packages/dae). Use this to show players all of their stacked conditions, and allows you to write a condition's active effects once and reuse it.\n\nTo set up stacked conditions, create a script macro with the following in it:\n\n```js\ngame.SnugugsLittleHelpers\n  // The condition you want to apply\n  .applyCondition('Incapacitated')\n  // The list of conditions that should get this condition\n  .to(['Paralyzed', 'Petrified', 'Stunned', 'Unconscious']);\n```\n\nEach 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.\n\nTo 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.\n\n**Bonus:** The `exports` folder of this module contains `cub-dnd5e-condition-map.json`, a set of D\u0026D 5e conditions pre-configured with [Midi QoL](https://foundryvtt.com/packages/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\u0026D 5e rules.\n\n## Add Moulinette Sources\n\nAdd Moulinette Sources is a macro for use with [Moulinette](https://foundryvtt.com/packages/moulinette-core) and its suite of modules. You should import this module into your world and edit the `sources` array as needed.\n\nWhen 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnugug%2Ffoundry-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnugug%2Ffoundry-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnugug%2Ffoundry-helpers/lists"}