GithubHelp home page GithubHelp logo

mess's Introduction

Mess - Moerills enhancing super-suit(e)

GitHub release (latest by date) GitHub GitHub Releases

This module is deprecated and won't be developed or maintained anymore. (Maybe, just maybe i'll push an update to it to either remove the big features alltogether or push a small css fix. But no promises and don't expect anything here!) If you liked the rolling check out Mars 5e.
If you liked the animated templates, check out Token Magic FX.

This module is a mess!
Just kidding! This module does not serve a more specific purpose, like most of my other modules, but is more of a growing collection of stuff, that:

  • me or my player want for my game,
  • quality of life improvements,
  • things which i just found kinda interesting to play around with, but not worth their own module,
  • proof of concepts.

Settings allow to granularly dis-/enable features to your liking. Important: If you change the settings you need to refresh the page for all connected clients for the changes to take effect! (This may change in a future update, but currently it only works this way. Shouldn't be to bad, since you'd enable most features once and not change them mid session.)

Current Feature List

Important Information!

FVTT Version compatibility

My focus is the FVTTs stable branch. I will neither promise nor prioritise updates for FVTTs beta or alpha branches! Feel free to report a bug so i know whats coming, but don't expect a fix before a stable FVTT update.

Module compatiblity

This module is not designed to be compatible with most other modules, so incompatibilities may arise if some features are enabled. And i do not really care about compatibility with other modules for this Mess. (Also there are to many to keep track of now. Some parts of this mess are deep or very specific changes, that are to much work to make work with everything.)
So be warned and carefully test the features without other modules enabled before submitting a bug report here!

Bug Reporting

Go to the GitHub's issue board and check if the Bug is already reported. If not first test with all other modules disabled! If the bug persists create a new issue, with at least the following information:

  1. Module version
  2. FVTT version
  3. Browser and OS used. Or if the app itself is used.
  4. Bug description
    • What happened?
    • What should've happened?
    • Console errors? (F12 or F11 in most browsers)
  5. Workflow to recreate the bug
  6. Helpful videos or screenshots if possible
  7. Either activate notifications, stay active or post your discord handle so i can get back to you for further questions

I will only take a quick glance at half hearted bug reports or Discord mentions! Don't expect me to react there!

Atribution

Special thanks to:

  • GitHub User @bsleys for his continued support on helping to enhance this module with features!
  • Discord User @BrotherSharp for the japanese translation!
  • Github User @rinnocento for the portuguese translation!
  • @NickEast for his foundry project creator which i'm using in a modified version for my building and publishing workflow.

This module would not be possible without the great work from Atropos on FoundryVTT and the DnD5e System for FoundryVTT! Part of the code (especially the code for the rolls) is heavily based on the DnD5es code, which is licensed under GNU GPLv3.

The templates used in the videos are from Pierluigi Riminis Perfect Spell Pack 2 animated.

Support the development

I'm doing this project mostly alone (with partial help of some wonderful people mentioned above) in my spare time and for free.
If you want to encourage me to keep doing this, i am happy about all kind of tokens of appreciation. (Like some nice words, recommending this project or even a small donation over at my PayPal).

Licensing

Mess is licensed under the LGPL v3.

This work is licensed under Foundry Virtual Tabletop EULA - Limited License Agreement for module development.

Universal Features

Template Changes

Scaling and animated template textures

video templates
Tired of FVTTs tiling for template textures? Then this feature is perfect for you! When this feature is enabled template textures are scaled up and rotated to match the template. This also allows for the usage of video files as template textures! Nice! (For all textures the same rules as for all FVTT image and video files do apply) This also automatically activates Automatic Ability template texture when you're using the DnD5e system.

Hide grid highlight and border for textured templates

hide highlight
When the template borders and grid highlights stand in the way of a fully immersive experience, use this feature to just hide them! This only hides borders and highlights for all textured templates. If you want to make sure which grid squares are covered by the templates, just hover over it and the highlight and border will get displayed!

Auto targetting on template move

Using this feature you automatically target each token inside a template you move around!
Activating this feature also activates Automatic template targeting for DnD5e.

Miscellaneous

Momentum based preview snapping

preview snapping When moving placeables, like tiles or tokens, around you never know exactly where they end up, as long as grid snapping is enabled. This feature adds momentum based preview placement, to counter this issue!

"Uhm... Huh? I don't get it!"

Let me explain: As long as you drag the placeable quickly around, the preview won't snap, but when you slow down the preview starts snapping to grid. (As long as you don't press the shiftKey to disable snapping).

"Why so complicated? Why not just always snap?"

To make dragging around more beautiful! Letting the placeable always snap, makes it kinda jumpy when dragging around, resulting in a less smooth and visually less appealing experience. Using the past momentum of the mouse, the algorithm notices when you slow down to precisely place a placeable, snapping it at the position it will really end up.
Imporant: This feature still needs a bit fine tuning, adjusting the parameters, ... Feedback for this is valuable! You can provide feedback here

Drag and Drop animations for sorting lists

Dragging
Adds animations for Drag and Drop animations to make them more appealing to the eye and more obvious where stuff will end up when dropped.

Some important information and known issues for this feature

  1. Its supposed to work with all sidebar directories, that support a drag and drop workflow to sort.
    • Scene directory may look a bit odd (especially for scenes without thumbnails)
  2. Many actor sheets are supported out of the box. Tested with:
    • DnD5e default and tidy5e sheets
    • Pf2e character sheet
    • The container box may look a bit misleading..
  3. sorting to the end of a list/folder is kinda difficult at the moment. For sidebar directories dragging onto the folder itself puts it at the end. (Trying to fix this just introduced quite a few more issues and was not worth the effort. Also to my knowledge its the same for base FVTT dragging)

DnD5e specific features

Ability template textures

Auto Template Want to be cool and really show a fireball each time you cast it, instead of the blank template for targeting?
This feature lets you specify textures for your templates automatically created by using a feature or spell. It adds to the item sheet a field to select an image or video file as texture. If no file is specified the module will automatically try to select a file depending on the settings set or blank if none found.
Important This feature gets automatically activated when you activate Scaling and animated template textures and are using the DnD5e system.

Auto targeting with ability templates

This awesome template gets created when you cast a spell, but you still have to manually specify the tokens as targets? Uff! But i'm here to help: This feature automatically targets the tokens inside of your placed template.
This doesn't do anything with the targets though, since, to my knowledge, RAW you roll only one dmg die for all AoE skills. So it only rolls once for AoE abilities, without a target, as seen in the GIF, in the previous section.

Actor Sheet Changes

A collection of small actor sheet enhancements, mainly aimed at the default DnD 5e Actor sheet. Each of them can be dis-/enabled independently. These settings are also client side, so each user can decide for him-/herself if (s)he wants to use it.

Numerical scroller

To lazy to use the keyboard to just reduce the hitpoints by just 1? I got you covered! When enabling this feature you can click on a numerical field and use the mousewheel to de-/increase the value of the field!

Alphabetical item sort

sort button
Keeping order is an ordeal! This feature adds a button that sorts all items of the current category alphabetically, so you don't have to!

Prepared Spell Tracker

pepared-spell-tracker-example
Always forget how many spells you're allowed to prepare? Fret not, this feature adds a field to the actor sheet to allow you to specify the maximum number of allowed prepared spells.

mess's People

Contributors

dependabot[bot] avatar drdwing avatar moerill avatar oaden avatar rinnocenti avatar

Stargazers

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

Watchers

 avatar  avatar

mess's Issues

Crash attempting to cast a spell

mess v0.2
foundry 0.5.7, dnd 0.90, native client

steps:

  1. import brutus from starting heros
  2. drag fireball from srd spell compendium into brutus sheet
  3. attempt to cast fireball

image

doing the same without mess does work as expected

Cone Template Texture Scaling is Off (and a related feature suggestion)

Textures being applied to the cone template are currently squished vertically, even if the image source being used is a square, so there is some repeating of the texture which occurs on the top and bottom of the wide end (most easily seen when using flat cones). In DND5e, cones are as wide at the end as they are long, so a 1:1 height/width ratio square should fill an entire cone.

Here's an image comparing the same image source (a Hypnotic Pattern square with a light border) being applied to a 15' Cone and a 15' Square template:
image
Notice the light border is barely visible in the square, but on the cone it clearly shows where the tiling of the texture happens at the top and bottom.

For the feature suggestion: it would be very nice to be able to set the border color and fill color of a template along with the texture. Having transparent options for both colors would be even more amazing if at all possible.

Reevaluate dynamic imports

Reevaluate things i want to dynamically import.
Propably the way to go here is:
Stuff that is non time critical => dynamic import
Time critical stuff (everything with hooks pre ready needed) => static import and propably just put it into one file.

Show hit/miss

I was thinking it would be nice if an attack is targeted at an enemy it could show if it hit or missed. I was thinking of something like a overlay over the target in the attack chat box when the d20 is rolled to show if it hit, say a blood splat over the token icon on a hit for example.

If you like the idea I'm willing to give it a go.

A way to handle bonus damage

I've haven't found a way to handle "bonus" damage from sneak attacks, hex etc that I liked. When clicking damage rolls a popup shows in the unmodified Foundry to add bonuses etc. Manually entering in the popup or doing a separate attack for it just feels like extra work and clunky.

So I decided to try to add it to mess in a way that seems reasonable to me, IE similar to how versatile damage is done. What I added was a check box to items/spells etc to flag them as a bonus damage item and then when an attack is done their damage is added to the attack card just like versatile damage is for weapons. See below for example of a rogue/warlock with sneak attack and hex. The downside is the damage list can get long but I figure most chars aren't going to have a bunch of possible bonus damages like this.

mess-damage

Let me know what you think and if interested I'll of course pass on the code.

Bob

Resource consumption (dnd5e 0.90) not working

mess: v0.2
foundry: 0.5.7, dnd 0.90

without MESS once a bow is configured like the picture below an ammunition is used when pressing Attack.
with mess the functionality is at the moment missing.

image

Pathfinder support?

Do you have any plans of extending the currently DnD5 exclusive functionality to Pathfinder 2e?

Roll Improvements: support for "dice so nice" module and roll sound

Dice so nice is the 3d dice module and a lot of dice roll modules support it already.

I am adding this as an enhancement request because with my party this was the deciding factor to wait for the future to try mess in a real session because my players want the roll experience they are used to.

Hide grid highlights and border for templates

Idea:

  • hide grid highlights and border for ability templates (only if texture is specified)
  • display on hover border and highlights
  • for regular templates.. keep it normal for the moment

Ability to force damage roll to be a critical

If you do a weapon attack and it crits the damage roll for that hit auto adjusts but if you then do say a sneak attack it's not adjusted to be a critical due to being a separate attack card.

So I added the ability to hold the alt key when clicking on the damage button to force it to roll critical damage. Note I choose alt key due to other places I've see using alt to trigger adv crit etc. Feel free to use whatever you feel is best.

Changes on in dice.js:
First I pulled out the crit formula changes into a separate function:

function getCritRollFormula(formula){
	const rgx = new RegExp(Die.rgx.die, "g");
	const critformula = formula.replace(rgx, (match, nd, d, mods) => {
		if (game.settings.get('mess', 'max-critical'))
				mods = " + " + nd * d + (mods || "");
		else {
				nd = nd * 2;
				mods = mods || "";
		}
		return nd + "d" + d + mods;
	});
	return critformula;
}

Then in rollToHit changed it to use the new function

			const formula = getCritRollFormula(e.dataset.formula);
/**			const formula = e.dataset.formula.replace(rgx, (match, nd, d, mods) => {
				if (game.settings.get('mess', 'max-critical'))
						mods = " + " + nd * d + (mods || "");
				else {
						nd = nd * 2;
						mods = mods || "";
				}
				return nd + "d" + d + mods;
			});
**/

Now its a simple matter of checking for the alt key in rollDmg where you get the new Roll(formula) add the one line just prior to doing r.roll();

	let r = new Roll(formula);
	if (ev.altKey) r.formula = getCritRollFormula(r.formula);
	r.roll();

Bob

Animations stop after approx one second if using with Haste module

Token Mold version 2.6
FVTT version 5.7
Browser and OS used. Or if the app itself is used. WIN 10 Chrome
Template Animations stop after approx one second if using with Haste module. It works fine otherwise. If you click anywhere in Foundry the animation starts again and stops after one second.
Console errors? (F12 or F11 in most browsers) None
Workflow to recreate the bug - Install Haste, Install MESS, create animated template from WEBM or MP4

Chat Card GM Helpers

Add some actions/views to chat cards, for GM only:

  • show target AC/HP
  • roll saving throws for all (non character) targets for a saving throw spell (Think about auto applying dmg? Propably not.. but .. hmmm)

Testing a few of those things using overlays on hover.

Also use css classes to hide the information from players. (yes they could go into console and change that stuff.. but cheating is already easy in FVTT, so why make it more complicated? 🤷

Roll with dis-advantage toggle improvements

I like the icons approach for the normal, adv, dis roll compared to having the button toggles

two improvements i would suggest:

  • the saturation of the disadvantage roll is not enough, the green dice is too visible and it almost looks like 1 green and 1 red dice at the same time. I would make the green way more faded out.

  • allow right click to cycle in other direction. from normal roll with a left click you go to the disadvantage icon, with a right click you go do the advantage click. This way you are always 1 click away from your desired roll type.

"Damage" button missing from chat card

Alternative Rolling is disabled in MESS settings. Persists when all modules except MESS are disabled. Button is restored as soon as MESS is disabled.

Sometimes module does not work after enabling it

-foundry 0.5.7, mess 0.3.3
-no other modules active, quite an empty world.

trying to roll attacks from one of the start heroes or from a NPC monster and I get the following error in console.

  • disabling and re-enabling the mod fixes the issue
  • when dis and re-enabling the module sometimes this error appears again

modify-rolling.js:119 Uncaught (in promise) TypeError: Cannot read property 'value' of null
at r (modify-rolling.js:119)
at d (modify-rolling.js:351)
at modify-rolling.js:729
at Function._call (foundry.js:2204)
at Function.call (foundry.js:2189)
at Function.create (foundry.js:9424)
at Function.create (foundry.js:27641)
at Item5e.roll (entity.js:289)

Item description not loading in chat card

FVTT 0.60, DnD5e:
Clicking an item name in the initial chat card no longer reveals the description text.

Have tested with only MESS enabled and behavior persists.

Rollover highlighting on item name works, no error or acknowledgement of click in console.

Refactor the whole modify roll code

The roll modifier got quite a mess now. Although fitting to the modules name, try to refactor it a bit, offload stuff into separate files, ....

Momentum based snapping - Feedback

This issue is used to gather feedback to the momentum based snapping of placeables.

If you notice any issues, providing a video or gif to showcase it would be preferrable.

Apply damage to tokens not working

Mess: v0.2
Foundry: v0.57, dnd5e v0.90, native client

Right clicking on the card and clicking apply damage with a selected token doesnt work as expected (tried with a creature with 100+ hp and the screenshot below and it killed the creature in 1 shot)

Would be cool to have it work with both the right click option on the card (as shown below). if multiple damage options are available like for a versatile weapons the rolled damage is used.

Another option is by having 4 small buttons appear on the right side of the damage, once the damage is rolled. (i think minorQOL does something like that)

image

One Token not rolling attacks

Token Mold version

.50

FVTT version

.60

Browser and OS used. Or if the app itself is used.

App

Bug description

(a) What happened?

For only one of the tokens, when you click on a Weapon to activate an attack, it puts into the chat window a button to attack but it does not actually attack or roll.

(b) What should've happened?

For every other token, when you click on a Weapon to activate an attack, it (1) automatically rolls the attack and (2) gives an option to click to roll for damage in the chat window

(c) Console errors? (F12 or F11 in most browsers)

Uncaught (in promise) ReferenceError: parts is not defined
at l (dice.js:246)
at r (modify-rolling.js:78)

Workflow to recreate the bug

Open Token sheet and click on a Weapon to attack.

Helpful videos or screenshots if possible

The first of 3 chat windows below demonstrates the issue with the problem token. The following two are what happens when any other token's weapon is clicked.

Screen Shot 2020-05-28 at 8 48 26 AM

Damage formulas not working 100% currectly

Found a problem with using data formulas for example for rogue sneak attacks "ceil(@classes.rogue.levels/2))d6" would display the full formula and if its a crit hit both my new code based on Roll.alter() and Roll.alter can't handle the formula. To clean up the display in the damage card and make crits work correctly at the bottom of getDmgData in dice.js where it looks like you are handling localizations of damage types change the loop per below to also evaluate the formula

	for (let part of rollData.parts) {
		let roll = new Roll(part[0], rollData);
		const dmgType = CONFIG.DND5E.damageTypes[part[1]];
		if (dmgType)
			part[1] = game.i18n.localize('DND5E.Damage' + CONFIG.DND5E.damageTypes[part[1]]);
		else if (part[1] === 'versatile')
			part[1] = game.i18n.localize('DND5E.Versatile');

		//evalute damage formula's for example "ceil(@classes.rogue.levels/2))d6" -> "4d6"
		let terms = roll._evalParentheticalTerms(roll.formula).map(t => {
			if ( t instanceof Roll ) {
				t.roll();
				return t.total;
			}
			return t;
		});
		part.push(terms.join(''));
	}

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.