fvtt-version-compat

Wrap Foundry V12/V13/V15 deprecated globals into modern namespaced APIs.

1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-version-compat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fvtt-version-compat
Source: https://github.com/ImproperSubset/hh-agentics/tree/main/fvtt-dev/skills/fvtt-version-compat
Command: npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-version-compat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill provides compatibility wrappers to migrate Foundry V12/V13/V15+ code away from deprecated globals to modern namespaces, enabling safe cross-version development and maintenance.

Core Features & Use Cases

  • Compatibility wrappers for Foundry APIs moved to namespaces (ActorSheet, ItemSheet, TextEditor, and more).
  • Deferred sheet registration using the DocumentSheetConfig to support V13+ and V15+ workflows.
  • Cross-version template loading and HTML enrichment with a unified approach.
  • Clear guidance and patterns for caching lookups and safe fallbacks to ensure stable modules across Foundry versions.

Quick Start

  • Set up the compat wrappers described in scripts/compat.js and scripts/compat-helpers.js.
  • Obtain the appropriate base class with getActorSheetClass() and extend it for your actor sheets.
  • Register sheets in the ready hook using registerActorSheet and registerItemSheet.
  • Preload templates with loadHandlebarsTemplates and render them via the modern API.

Frequently Asked Questions about fvtt-version-compat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Foundry VTT modules from deprecated globals to modern namespaced APIs?

To migrate Foundry VTT modules from deprecated globals, use compatibility wrappers to map V11/V12 globals to modern V13+ namespaces. This enables safe cross-version development for actor/item sheets, template loading, and HTML enrichment.

What is the best way to handle ActorSheet and ItemSheet registration across Foundry V12 and V13?

The best way to handle ActorSheet and ItemSheet registration is using deferred registration via DocumentSheetConfig. Obtain base classes with getActorSheetClass(), then register sheets in the ready hook to support V13+ workflows.

How does cross-version template loading and HTML enrichment work in Foundry VTT?

Cross-version template loading and HTML enrichment work by applying a unified wrapper approach to cache lookups and resolve modern namespaces. This ensures consistent rendering behavior and safe fallbacks across Foundry V12/V13/V15+.

Does Foundry VTT API migration require explicit error handling for unresolved namespaces?

Foundry VTT API migration requires explicit error handling by throwing errors when an API cannot be resolved. Wrappers cache lookups to ensure consistent behavior and prevent silent failures across different Foundry versions.

Can I preload Handlebars templates using modern APIs for Foundry V13+ modules?

You can preload Handlebars templates using modern APIs by calling loadHandlebarsTemplates, then rendering them via the modern namespace. This unified approach maintains stable module functionality across Foundry V12/V13/V15+.