Implement the sub-module moving the attribute bars and nameplate to work well with our dynamic borders. The attribute bars are moved below the token, one on top of the other, and the nameplate is moved above. This is done by monkey patching the `_drawBar()` and `_refreshNameplate()` functions from the Token class. This is vulnerable to compatibility issues with other modules, but is the only way I found for the changes to be shown without further input. Indeed, those functions are called after the `drawToken` hook, which makes it impossible to move those UI elements there. We can do it in the `refreshToken` hook, which works *but* requires the canvas view to be moved at least once for the position change to be reflected, which looks a bit broken. So we monkey patch the functions, but bind them beforehand to be able to call them within our custom function as we don't want to duplicate what they do. Update README and translations for the added setting. |
||
---|---|---|
assets/default-borders | ||
lang | ||
packs/macros | ||
scripts | ||
.gitattributes | ||
.gitignore | ||
LICENSE | ||
module.json | ||
README.md |
The Mill's Fabula - v0.3.0-dev
This little FoundryVTT module is a collection of compendiums and functionalities to power our Fabula Ultima campaigns.
Compatibility
This is only compatible with Foundry v12 currently.
Installation
Currently, this can only be installed via manifest file, using the following URL :
https://git.tfk-astrodome.net/trotFunky/TheMillsFabula/raw/branch/release/module.json
Features
This module is an aggregate of different things that are useful for us or that the GM wanted to play with, so they don't necessarily connect with each other and can be disabled if wanted.
They are described below in their own sections.
Combat border
This part of the module adds a dynamic border around player tokens, which changes during combat.
The border is always visible, but after a player has taken their turn it will switch to a different border, highlighting the tokens that have played for this combat turn.
The module supports going back and forth in the combat rounds, as well as going back in the turn order. (Though because of limitations of the Fabula Ultima system, does not allow going forward in the turn order.)
Settings
- An image to use for the default/idle border
- An image to use for the took turn/played/inactive border
Limitations
There are currently two main issues that need to be fixed :
- The tokens will not be updated when the GM is not on the scene.
- Indeed, the Fabula Ultima system seems to prevent players from receiving combat events, so the GM is the only one that can receive them and update the tokens. That means they need to be in the active combat scene for the changes to take effect.
- However, given that the module only uses the current state, if the GM comes back to the scene and a combat event is triggered, the token borders will become correct.
- The token borders will be incorrect when switching to a new scene
- It is unclear why, but apparently switching to another scene is very different from loading a new scene, and the combat encounter of the scene is not available when tokens are created. This means that the combat status, and thus the border type, cannot be properly determined on scene switch.
- This can be fixed by receiving a combat update, either from the players or the GM, on the scene.
Token UI adjustments
Given that we add a border on the tokens, it conflicts with the base attribute bars which are drawn over the token's
square.
The token UI adjustments move the two attribute bars below the token, outside its space, first HP then mana.
As this is where the nameplate of the token should be, move it above the token instead.
Limitations
- The token's detailed UI when right-clicking will overlap the bars in their new positions (it already overlapped the name)
- The current implementation relies on monkey patching, which make it vulnerable to compatibility issues with other modules manipulating the same methods.
Compendia
- The only thing in the compendium pack is a macro automating the tinkerer's alchemy potions, allowing to choose how many PIs to spend, how to allocate the results, previews and a final chat message with the results.
Dependencies
Modules:
- socketlib
System:
- Fabula Ultima
License
The code present in this repository is licensed under the Mozilla Public License 2.0.
Assets that we created in this repository are licensed under CC-BY-SA 4.0, unless otherwise specified.