Latest version | 0.2.4 |
---|---|
Minimum Core | 9 |
Compatible Core | 9 |
Last updated | 1 year ago |
Created | 2 years ago |
Authors | |
Languages |
English Français |
Systems | All systems |
Dependencies |
Warp Gate socketlib |
Project source | Project URL |
Report bugs | Bug tracker URL |
Read-me | Readme URL |
Changelog | Changelog URL |
A library for leverage and synchronize the creation/update/delete of Active Effects .
The library was born as a series of functions for integration with the "DFreds Convenient Effects" module and utilities in a multi-system context outside Dnd5e. After extensively testing it with different modules i decide to get better feedback from the community and in preparation for FVTT10 to separate it this part of the code from the projects to use it as a support library.
{
"name": "active-effect-manager-lib",
"type": "module",
"manifest": "https://github.com/p4535992/foundryvtt-active-effect-manager-lib/releases/latest/download/module.json"
}
In compliance with the licenses, some piece of code of some feature has been inserted by other projects that I describe in detail in the "Credits" department of this README, I invite you to support these developers.
My aim is not to take credit for their work, I just don't want to install 100 modules for 100 features which then collide with each other, every single external feature can be disabled in the settings of this module to allow the use of modules between them .
It's always easiest to install modules from the in game add-on browser.
To install this module manually:
https://raw.githubusercontent.com/p4535992/foundryvtt-active-effect-manager-lib/master/src/module.json
This module uses the libWrapper library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
This module uses the socketlib library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
Custom integration for multysistem of Adding and Removing Status Effects of Dfreds convinient effect any credits for this feature is given to DFreds
This will extend the funcionality of the standard status effect name.
Once enabled, right click on any effect in the status effect panel application and select Toggle Status Effect to add or remove the effect from the list.
Conflict: You should not use this and Combat Utility Belt's "Enhanced Conditions" at the same time, as multiple modules replacing/adding to the available status effects can cause conflicts.
Custom integration for multysistem of Shy Effects any credits for this feature is given to Kandashi
This module will disable any active effect icons that do not come from an "Owned source". This level of control can be configured from the module settings. A user requires X permissions on a source item/actor to view the active effects created by that item.
Custom integration for multysistem of Fathomless - Proof of Concept any credits for this feature is given to schultzcole
This feature allow active effect changes to depend on actor data, even actor data that is modified by other active effects, so long as there are no cyclical dependencies.
This feature allows active effect changes to depend on other actor data, even actor data that is modified by other active effects. This is accomplished by constructing a directed graph that encapsulates the dependency relationships between actor properties, then using that graph to perform a Topological Sort in order to apply the effect changes in the correct order so that all dependencies are taken into account.
The nature of this implementation is such that any changes "downstream" of an actor property that is involved in a dependency cycle are ignored.
Referencing an actor property in an effect change is done with the syntax &my.actor.property.path. Note the use of & rather than @, which is deliberate (see the related caveat below).
Custom integration from Drop Effects on Items
With it enabled, creating duplicate effects between different items (e.g. "Poisoned" for various weapons or spells which inflict that condition) is as simple as dragging and dropping from one to the next. It also allows the application of item effects onto actors from the item sheet directly.
Custom integration from DFreds Convenient Effects
With it enabled, creating duplicate effects between different actors (e.g. "Poisoned" for various weapons or spells which inflict that condition) is as simple as dragging and dropping from one to the next.
Custom integration from Quick status effect
Quickly select effects for a token or tokens by replacing the built-in status effect selector with an auto-complete-esque search box and filtered list.
addEffectOnActor(
actorId: string,
effectName: string,
effect: Effect,
): Promise<Item | ActiveEffect | boolean | undefined>;
findEffectByNameOnActor(
actorId: string,
effectName: string): Promise<ActiveEffect | undefined>;
hasEffectAppliedOnActor(
actorId: string,
effectName: string,
includeDisabled: boolean): Promise<boolean | undefined>;
hasEffectAppliedFromIdOnActor(
actorId: string,
effectId: string,
includeDisabled: boolean,
): Promise<boolean | undefined>;
toggleEffectFromIdOnActor(
actorId: string,
effectId: string,
alwaysDelete: boolean,
forceEnabled?: boolean,
forceDisabled?: boolean,
): Promise<boolean | undefined>;
addActiveEffectOnActor(
actorId: string,
activeEffectData: ActiveEffectData): Promise<ActiveEffect | undefined>;
removeEffectOnActor(
actorId: string,
effectName: string): Promise<ActiveEffect | undefined>;
removeEffectFromIdOnActor(
actorId: string,
effectId: string): Promise<ActiveEffect | undefined>;
addEffectOnToken(
tokenId: string,
effectName: string,
effect: Effect): Promise<ActiveEffect | undefined>;
findEffectByNameOnToken(
tokenId: string,
effectName: string): Promise<ActiveEffect | undefined>;
hasEffectAppliedOnToken(
tokenId: string,
effectName: string,
includeDisabled: boolean): Promise<boolean | undefined>;
hasEffectAppliedFromIdOnToken(
tokenId: string,
effectId: string,
includeDisabled: boolean,
): Promise<boolean | undefined>;
toggleEffectFromIdOnToken(
tokenId: string,
effectId: string,
alwaysDelete: boolean,
forceEnabled?: boolean,
forceDisabled?: boolean,
): Promise<boolean | undefined>;
toggleEffectFromDataOnToken(
tokenId: string,
effect: Effect,
alwaysDelete: boolean,
forceEnabled?: boolean,
forceDisabled?: boolean,
): Promise<boolean | undefined>;
addActiveEffectOnToken(
tokenId: string,
activeEffectData: ActiveEffectData): Promise<ActiveEffect | undefined>;
removeEffectOnToken(
tokenId: string,
effectName: string): Promise<ActiveEffect | undefined>;
removeEffectFromIdOnToken(
tokenId: string,
effectId: string): Promise<ActiveEffect | undefined>;
removeEffectFromIdOnTokenMultiple(
tokenId: string,
effectIds: string[]): Promise<ActiveEffect | undefined>;
updateEffectFromIdOnToken(
tokenId: string,
effectId: string,
origin: string,
overlay: boolean,
effectUpdated: Effect,
): Promise<boolean | undefined>;
updateEffectFromNameOnToken(
tokenId: string,
effectName: string,
origin: string,
overlay: boolean,
effectUpdated: Effect,
): Promise<boolean | undefined>;
updateActiveEffectFromIdOnToken(
tokenId: string,
effectId: string,
origin: string,
overlay: boolean,
effectUpdated: ActiveEffectData,
): Promise<boolean | undefined>;
updateActiveEffectFromNameOnToken(
tokenId: string,
effectName: string,
origin: string,
overlay: boolean,
effectUpdated: ActiveEffectData,
): Promise<boolean | undefined>;
onManageActiveEffectFromEffectId(
effectActions: {
create: 'create';
edit: 'edit';
delete: 'delete';
toogle: 'toggle';
update: 'update';
},
owner: Actor | Item,
effectId: string,
alwaysDelete?: boolean,
forceEnabled?: boolean,
forceDisabled?: boolean,
isTemporary?: boolean,
isDisabled?: boolean,
): Promise<Item | ActiveEffect | boolean | undefined>;
onManageActiveEffectFromEffect(
effectActions: {
create: 'create';
edit: 'edit';
delete: 'delete';
toogle: 'toggle';
update: 'update';
},
owner: Actor | Item,
effect: Effect,
alwaysDelete?: boolean,
forceEnabled?: boolean,
forceDisabled?: boolean,
isTemporary?: boolean,
isDisabled?: boolean,
): Promise<Item | ActiveEffect | boolean | undefined>;
onManageActiveEffectFromActiveEffect(
effectActions: {
create: 'create';
edit: 'edit';
delete: 'delete';
toogle: 'toggle';
update: 'update';
},
owner: Actor | Item,
activeEffect: ActiveEffect | null | undefined,
alwaysDelete?: boolean,
forceEnabled?: boolean,
forceDisabled?: boolean,
isTemporary?: boolean,
isDisabled?: boolean,
): Promise<Item | ActiveEffect | boolean | undefined>;
Promise.<void>
The effect object structer is the following:
{
customId: string
name: string
description: string
icon: string
tint: string
seconds: number
rounds: number
turns: number
isDynamic: boolean
isViewable: boolean
isDisabled: boolean
isTemporary: boolean
isSuppressed: boolean
flags = {},
changes = ActiveEffectChangeData[],
atlChanges = ActiveEffectChangeData[],
tokenMagicChanges = ActiveEffectChangeData[],
nestedEffects = Effect[],
transfer: boolean
atcvChanges = ActiveEffectChangeData[],
dae = {},
overlay: boolean
}
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: active-effect-manager-lib or copy its manifest URL:
And paste it to the input box at the bottom of your window.
You can install this package directly to your Forge account.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.