Register

libWrapper

An Add-on Module for Foundry Virtual Tabletop

Author: ruipin Project Source: Project URL Versions 0.6.5+ (Verified 11) Last Updated 9 months, 1 week ago

FVTT libWrapper

Library for Foundry VTT which provides package developers with a simple way to modify core Foundry VTT code, while reducing the likelihood of conflict with other packages and making troubleshooting easier.

 

Why?

The libWrapper library is intended to be used as a replacement for traditional monkey-patching methods, to make interoperability and troubleshooting easier.

It provides a standardized API, improving consistency and compatibility while reducing the likelihood of mistakes.

Its wrapping mechanisms attempt to detect and prevent conflicts between different packages. When conflicts cannot be prevented, libWrapper aids troubleshooting by notifying the game master of what went wrong, and which packages are responsible.

  Traditional monkey-patching libWrapper
Conflict troubleshooting Requires waiting until something goes wrong.
User is responsible for figuring out if an error is caused by a conflict, and which package(s) caused it.
Able to detect most conflicts and warn the user, in many cases automatically upon game launch.
Error Detection None by default. When any error occurs, libWrapper will detect which package(s) caused it (if any), and tell the user.
API None.
Each developer is on their own.
Provides a standard API enforcing best-practices with included error-checking.
Wrapper execution order Package execution order, i.e. random. Customizable.
Developers can request to run first or last, if their module requires it.
Game masters can troubleshoot conflicts by prioritising or deprioritising packages.
Edge cases Each developer must understand the intricacies of Javascript. Handled automatically and transparently.

 

Examples

Note: Images may be out-of-date.

 

Usage

See the project Github page for usage and documentation.

Available Versions

  1. Version 1.12.13.0

    9 months, 1 week ago
    Foundry Version 0.6.5+ (Verified 11) Manifest URL Read Notes
  2. Version 1.11.4.0

    Foundry Version 0.6.5+ (Verified 9) Manifest URL Read Notes
  3. Version 1.10.8.0

    Foundry Version 0.6.5+ (Verified 9.224) Manifest URL Read Notes
  4. Version 1.9.2.0

    Foundry Version 0.6.5+ (Verified 0.8.9) Manifest URL Read Notes
  5. Version 1.8.1.0

    Foundry Version 0.6.5+ (Verified 0.8.9) Manifest URL Read Notes
  6. Version 1.7.5.0

    Foundry Version 0.6.5+ (Verified 0.8.8) Manifest URL Read Notes
  7. Version 1.6.2.0

    Foundry Version 0.6.5+ (Verified 0.8.6) Manifest URL Read Notes
  8. Version 1.5.6.0

    Foundry Version 0.6.5+ (Verified 0.8.2) Manifest URL Read Notes
  9. Version 1.4.3.0

    Foundry Version 0.6.5+ (Verified 0.8.1) Manifest URL Read Notes
  10. Version 1.3.6.0

    Foundry Version 0.6.5+ (Verified 0.7.9) Manifest URL Read Notes
  11. Version 1.2.1.0

    Foundry Version 0.6.5+ (Verified 0.7.9) Manifest URL Read Notes
  12. Version 1.1.5.0

    Foundry Version 0.6.5+ (Verified 0.7.9) Manifest URL Read Notes
  13. Version 1.0.8.0

    Foundry Version 0.6.5+ (Verified 0.7.9) Manifest URL Read Notes