Register

Release 9.224

Version 9 Prototype

September 17, 2021

Foundry Virtual Tabletop - Version 9 Prototype 2 Release Notes

Release Notes for Foundry Virtual Tabletop Version 9 Prototype 2 Release
Welcome to the Foundry Virtual Tabletop update notes for Version 9 Prototype 2.

Hello and welcome to the exciting release of Foundry Virtual Tabletop Version 9 Prototype 2, another prototype release in the Version 9 series of releases. The release of V9p2 marks the first official implementation of support for playing cards in Foundry VTT, and brings the prototyping phase for V9 to a close! We're eagerly looking forward to moving into the API development phase for V9 to add some polish to the awesome features these two releases have introduced.

WARNING: Updates on the Prototype channel provide the implementation of major new features which are likely to introduce unforeseen bugs, breakages to existing game systems or modules, or other problems which will be disruptive to the usage of the software. Do not install this update unless you are doing so for the specific purposes of testing, it is not intended for use in 'live game' scenarios. The purpose of Prototype builds are to allow new experimental features to be tested and to help developers to begin the process of updating packages which are impacted by these changes. If you chose to update to this version you expose yourself to serious risk of having a bad experience. Please take this warning to heart.

Be certain to carefully back up any critical user data before installing this update.

Update Highlights

This release is an update on the Prototype channel, and introduces a variety of new features! During this release our focus was on implementing the feature most voted for by our Patreon subscribers: Card Support. In addition to spending the majority of our development time focused on that implementation, we also took a little time to finish up some things that didn't get polished off in time for V9p1 and detoured a little to fix some bugs reported in both V9p1 and 0.8.x.

Card Support

This update introduces the first iteration on Card Support for Foundry VTT and brings a lot of great features the community requested as part of the scope. This introduces a new "Cards" sidebar tab which can be used to manage available decks, hands, and piles of cards- all of which can be assigned to users in your game using the standard approach to permissions. While the UI and UX still needs a bit of polish, out of the gate the Cards UI supports actions for passing cards between hands and other types of card collections, mechanics for dealing cards to one or more players, and ability to reset the deck- returning cards from all hands back to the deck they originated from. For developers: game systems can customize the data of cards through the usualtemplate.json approach, and custom sheets can be registered for any Cards instance. customizable data structures for cards (which the development community specifically sought).

In no particular order, the Cards system presently supports the following actions:

We also took the time to prepare and package images for two different Foundry VTT-themed playing card decks, each with enough images to support a standard 54-card deck. If you'd like to try out these pre-built decks, you can download and import the following JSON files:

Dark-gold Poker Deck Light-soft Poker Deck

API Improvements and UI Changes

During the testing phase for V9p1 we heard from a number of devs about changes that could be made to open parts of the API in ways that could provide more efficient paths to accomplishing features of their their systems and modules. As a result we implemented a number of API changes to expose new data to aspects of the Document schema or the canvas, and also to provide new interfaces for some existing API features. One particular feature we'd like to highlight is the introduction of the keepId option for Document and Compendium import and export functions. This allows documents to maintain a unique id regardless of where they are stored for convenient updating.

In addition to API improvements, we've begun the process of migrating a large number of CSS declarations which were individually declared previously to CSS variables. By introducing a broad amount of CSS variables commonly used throughout the UI it is our hope that community developers will have an easier time presenting a more unified look when modifying the UI. We've also refactored the "HUD" section of the UI to use a flexbox container, allowing for the rendered UI menus to be a little more conscious of where eachother are and reduce cases where certain UI elements might overlap inconveniently.

Continued Lighting and Vision Improvements

Version 9 Prototype 1 focused pretty heavily on retooling the lighting engine to introduce Adaptive Lighting, but as always we couldn't finish everything before release, so we shifted a number of items to this Release so we could spend some more time on them. While we don't introduce any new, flashy lighting features as part of this version, a lot of changes have been made to improve performance and correct for issues related to lighting and vision from V9p1.

Please stay tuned as we move into the API Development phase and start fine-tuning these features and more!

Breaking Changes

Documents and Data

Interface and Applications

Dice System

Other Changes

New Features

Card Support

Architecture and Infrastructure

The Game Canvas

Interface and Applications

API Improvements

Architecture and Infrastructure

Documents and Data

The Game Canvas

  • Added a new PointSource#destroy method to capture source-specific deconstruction operations which are required. (5776)
  • PointSource radius is now clamped between 0 and canvas.dimensions.maxR. (5748)
  • SoundSource has been adapted as a framework which can be used for computing the area of effect polygon for an ambient sound object. (5777)
  • Added a new SoundsLayer#sources collection which tracks currently active SoundSource objects, mirroring the functionality of LightingLayer#sources and SightLayer#sources. (5794)
  • cubeToOffset should no longer cause every other row to be shifted by one on hex grids. (5849)
  • The skipUpdateFog Parameter for Token#updateSource is now passed to a refresh call. (5752)
  • Calling document.object inside a delete or preDelete hook will no longer incorrectly re-create that object in memory. (5859)
  • PlaceablesLayer.layerOptions.objectClass now correctly returns the PlaceableObject subclass as expected. (5858)

Interface and Applications

  • Implemented a simple SceneNavigation.displayProgressBar interface which allows the progress bar normally displayed during Scene loading operations to be used by developers for other purposes to provide user feedback on long-running operations. (5692)
  • FilePicker.upload() now offers an option to suppress the notification when a file is uploaded. (5591)
  • AudioContainer has been refactored to have a single state rather than being split over multiple booleans. (5684)
  • Combatant.visible no longer incorrectly returns true in cases where combatant.isVisible is false. (5705)
  • Added a thumbnail getter to document classes, Actor, Item, Scene, Macro, JournalEntry, Cards, RollTable which provides the path to their thumbnail image (if one exists). (5834)

Other Changes

  • Added a special error Hook event which captures errors originating within hooked function scopes that may have otherwise been unhandled. (5020)
  • Support restoring scroll positions for multi-selectors. (5806)
  • Allow FormDataExtended to support explicit checkbox values provided as part of a RadioNodeList. (5852)

Documentation Improvements

  • Corrected incomplete and missing JSDoc for the Quadtree class. (5688)
  • Corrected missing JSDoc entry for SceneData#playlistSound. (5746)
  • Corrected and clarified JSDoc entry for AVSettings#changed. (5747)
  • Corrected JSDoc entry for GridConfig#_onKeyDown and GridConfig#_onWheel. (5761)
  • Corrected the documentation example used for {{localize}} . (5803)

Localization Improvements

  • The Default Token Configuration sheet has been refactored to reuse elements from Token Config and avoid code duplication. (5775)

Bug Fixes

Architecture and Infrastructure

  • A Package containing an invalid Compendium pack definition now results in that specific pack being ignored rather than the entire Package. (5850)
  • Resolved the deprecation warning triggered by global.ver when calling api/status. (5694)
  • Loading a remote-hosted token image which may have CORS restrictions in-place no longer sometimes results in an infinite loop in the texture loader. (5709)
  • The progress UI for installing a package should no longer hang in cases where the install process does not complete before the initial fetch times out. (5716)
  • Resolved cases where some package titles were incorrectly being displayed with unescaped HTML characters. (5738)
  • Scene textures should once again be properly de-duped in the TextureLoader, and should no longer request multiple downloads of the same file. (5760)
  • Closing (but not quitting) the electron application within macOS should no longer result in the application failing to launch. (5785)
  • Modules with no URL link back to the setup page in the module update log dialog. (5862)
  • The Database Semaphore has been redesigned to wrap the entire server-side transaction rather than only the save operation. This protects concurrency for the entire document object. (5309)
  • Resolved an issue which caused the use of the --noupdate flag to throw client-side console errors. (5693)
  • Corrected a form field issue which caused the Administrator Password field of the configuration tab to unexpectedly launch the first available world.(5868)

Documents and Data

  • Small tokens should no longer unexpectedly grow bigger while they are being dragged. (5226)
  • Changing the default sheet class should now clear cached sheet instances from other documents as expected. (5754)
  • Corrected a number of errors related to use of the deleteAll option for Document.deleteDocuments when clearing the contents of an unlocked Compendium pack. (5781)
  • Nested Roll Table results should now correctly enforce the Draw With Replacement option from their parent tables. (5793)
  • Drag and drop operations for sidebar items should no longer create invalid dynamic links. (5829)
  • Corrected an issue where the slugification of world-level titles for compendium packs could unintentionally create a .db file with an invalid name. (5856)

The Game Canvas

  • The SightLayer#testVisibility method should no longer unexpectedly reveal objects which are not currently in view. (5739)
  • Closing the scene configuration should once again reset the lighting layer darkness level. (5740)
  • LightingLayer#hasGlobalIllumination should no longer incorrectly returns true in cases where the Vision Limitation Threshold is zero, but the darkness level above zero. (5741)
  • Corrected an issue where programmatic creation of Roof tiles could result in TypeErrors. (5757)
  • Universal lights are no longer incorrectly blocked by walls. (5772)
  • Moving a placed Door no longer results in the door becoming unresponsive. (5773)
  • Corrected cases where a scene transition could result in ruler tools no longer displaying their labels. (5774)
  • Triggering a Fog of War reset should no longer result in a thrown error. (5778)
  • Limited light emission angles should once again rotate when the token does. (5799)
  • Toggling Has Vision on a currently controlled token should once again update the player's vision. (5867)
  • Rapid drawing of light sources should no longer result in console errors or result in cases where canvas clicks fail to respond.(5873)
  • Resolved a memory leak which could occur during commitFog workflow where a pre-existing fog texture would not be properly destroyed. (5878)
  • Fixed an incorrect computation in the downscaling ratio for fog resolution which could result in different fog quality for scenes with an extreme aspect ratio. (5879)

Interface and Applications

  • World descriptions should now truncate before reaching a state that significantly displaces other UI elements. (5737)
  • Combatant visibility in the combat tracker is no longer incorrectly linked to Token visibility, and it should once again be possible to reveal a token in the combat order without having to first make it visible within a Scene. (5710)
  • Resizing a Token width/height base size should now correctly update the dimensions of the linked ObjectHUD container. (5713)
  • The Sheet Configuration Dialog now correctly refers to Documents rather than entities. (5728)
  • Right-clicking a sidebar tab should now correctly pop out the tab even if it is Collapsed. (5729)
  • The Control tools wrappable area no longer incorrectly disables mouse interaction. (5736)
  • Macros should once again allow their owners to edit them even if they are not the GM. (5765)
  • Users can no longer modify Combatants that they do not own. (5769)
  • The popped out combat tracker should once again highlight entries for hovered tokens. (5771)
  • The Alternate Actor Tokens field of the TokenConfig sheet should display the current image as the currently selected option in the dropdown. (5797)
  • As part of the HUD refactor, the Controls Toolbar should no longer overlap with the players list window. (5802)
  • Playlists should no longer become non-interactive as a result of errors when a PlaylistSound cannot be found. (5805)
  • The minimum Token scale value should now match the UI slider minimum of 0.20. (5855)
  • Using alt+mousewheel to adjust grid size in the grid configuration tool should now correctly adjust scene padding. (5872)

Dice System

  • Deferred inline rolls should once again resolve data from controlled tokens correctly. (5758)
  • The dice parser should now properly handle cases where multiple modifiers stack. (5767)
  • Rolling an inline roll should once again use the configured Roll Type. (5768)

Other Changes

  • Corrected an issue where a System which only registered a setting menu could result in the settings page rendering empty. (5865)
  • Closing a sheet for an embedded document on a synthetic actor should no longer trigger a token update. (5866)