November 26, 2024
Foundry Virtual Tabletop - Version 13 - Prototype 2 Release Notes
Hello Foundry community! We are extremely excited to release our second Prototype build in the Version 13 update cycle, Version 13.333... (repeating, of course!). Our focus was to refine and expand upon the first Prototype release by continuing to front-load the more serious changes to the API.
In addition to the ongoing ruler work to support our community-selected feature (Token Drag Ruler) and the ongoing ApplicationV2 convert-a-palooza, we've also added a slew of improvements throughout the application that we are quite excited to share with all of you today.
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 choose to update to this version you expose yourself to serious risk of having a bad experience. Please take this warning to heart.
Highlights
Making it Shiny
A primary focus for V13 is delivering the next generation of the Foundry user interface, and Prototype 2 provides strong progress in that initiative.
This release implements a flexible CSS theming system, powering a Foundry light mode and dark mode as well as enabling other arbitrary themes. We can't wait to see what the Foundry community does with this functionality in Game Systems and Modules.
Of course, many more important components of the Foundry UI have now also been migrated to Application V2 as well, bringing its visual and architectural improvements to an ever-increasing percentage of the software.
Foundry Rules!
To implement the Token Drag ruler as we envision, we continue to extensively improve the underlying movement-related data structures and API.
With much of that work now in place, Prototype 2 delivers significant improvements in multi-waypoint movement, including:
- Movement that would be blocked by a wall is indicated by a dashed line
- Auto-rotation of token facing as your Token moves about the map (don't worry pog fans, you can lock rotation as usual to prevent this)
- Token movement speeds are now configurable for each waypoint segment
- Better interaction with Scene Regions
Measuring with CTRL also received some love in this release. You can now secretly measure a distance by holding ALT so that you don't tip your cunning plan to your unsuspecting players.
Unleash Your Token's Inner Darkness
Tokens have long been able to emit light, but now you can do the exact opposite and emit darkness as well. Your players will never see that monster coming...
Flashy Chat
Ever miss an incoming chat message because you were on a different sidebar tab? In Prototype 2, new incoming chat message notifications flash to the left of the sidebar to let you easily keep an eye on things.
Time for a Change
It is still a work in progress, but this release brings the beginnings of a prototype Calendar API for supporting configurable in-world calendars with the GameTime class.
Known Issues
- When entering or exiting a Scene Region. a token may sometimes "slide" along its boundary in certain cases. (11868)
- Tokens may clip through walls during movement in certain circumstances. (11869)
Breaking Changes
In addition to the changes listed below, please see details about the conversions to ApplicationV2 here. These conversions may require changes for modules and systems that touch these applications.
Documents and Data
- Switched behavior of
CONFIG.ActiveEffect.legacyTransferralto befalseby default and added a deprecation warning. (11412)
The Game Canvas
- Refactored shape-related properties and functions from
RegiontoRegionDocument. (11819) - Deprecated the
TOKEN_PRE_MOVERegion event, which is no longer triggered. (11839) - Deprecated the
TOKEN_MOVERegion event in favorTOKEN_MOVE_WITHIN, which is only triggered for movement within the Region, but not when moving in or out.TOKEN_MOVEis no longer triggered. (11840)
Other Changes
- Put TinyMCE on a deprecation path to be removed in V15. (11821)
- The default value of
DialogV2WaitOptions#rejectCloseis nowfalse. (11763) - For Compendium Documents,
ClientDocument#collectionnow returns aCompendiumCollection. (11807) - Removed backwards compatible support for changes in V11 or prior which have reached the end of their deprecation period. (11815)
New Features
Architecture and Infrastructure
- Migrated to classic-level version
2.0.0. (11782) - Updated dependencies (including a small Electron version bump to 33.0.2). (11822)
Documents and Data
- The meaning of
Document.metadata.permissionswas refined to be more explicit about whatUSER_ROLESorDOCUMENT_OWNERSHIP_LEVELSare allowed to perform a certain actions.viewwas also added as a permission level on the Document itself that can be used by downstream code. (11280) - Added support for
TypedSchemaFieldoutside ofArrayField. (10833) - Redesigned the functionality of default token settings to better respect user-defined preferences and added support to define those user preferences per Actor type. (11758)
Applications and User Interface
- Changed drag distance evaluation so that it is based on screen coordinates instead of canvas coordinates. (11028)
- Added reporting to indicate which players are idle based on the timestamp that their last user activity packet was received. (11517)
- Rationalized the way that Theme V2 color variables for text are used across themes. (11770)
The Game Canvas
- Allowed token-emitted light sources to be darkness sources. (10741)
- Added movement history visualization. (11735)
- Improved the performance of token target indicators. (11766)
Localization and Accessibility
- Implemented an overall UI scale setting which adjusts the size of game interface elements. (5508)
- Added labels to
nameandimgDocument fields. (11796) - Standardized grammatical number of Document-related localization namespaces. (11823)
- Utilized
DataModel.LOCALIZATION_PREFIXESas part ofDocumentSheetV2conversions. (11825)
Other Changes
API Improvements
Documents and Data
data-dtype=Numberis now added toSetField(NumberField)automatically. (11301)- Changed the type of two base Document data fields to better reflect their intent (
BaseScene#navNameandBasePlaylist#fade). (11824) - The following fields of
TokenDocumenthave now been declared unpreparable:x,y,elevation,width,height, andshape. (11845) nullsight and detection mode ranges are now interpreted as a range ofInfinity. (11852)
Applications and User Interface
- Converted
ActiveEffectConfigtoApplicationV2. (11319) - Converted
ActorDirectorytoApplicationV2. (11320) - Converted
AdventureImportertoApplicationV2. (11322) - Converted
BasePlaceableHUDtoApplicationV2. (11325) - Converted
CardsDirectorytoApplicationV2. (11330) - Converted
ChatLogtoApplicationV2. (11333) - Converted
FolderExporttoDialogV2. (11350) - Converted
HeadsUpDisplaytoApplicationV2. (11355) - Converted
JournalDirectorytoApplicationV2. (11361) - Converted
JournalSheettoApplicationV2. (11364) - Converted
JournalTextPageSheettoApplicationV2. (11365) - Converted
MacroDirectorytoApplicationV2. (11370) - Converted
PlaylistConfigtoApplicationV2. (11379) - Converted
PlaylistSoundConfigtoApplicationV2. (11381) - Converted
RollTableDirectorytoApplicationV2. (11382) - Converted
SceneConfigtoApplicationV2. (11383) - Converted
SidebartoApplicationV2. (11391) - Converted
TokenHUDtoApplicationV2. (11801) - Converted
DrawingHUDtoApplicationV2. (11802) - Converted
TileHUDtoApplicationV2. (11803) - Exposed
SceneControls#activateto the API to support changing scene controls, tools, or toggles without necessarily re-rendering. (11789) - Arbitrary UI elements can now include theme-specific boilerplate variables via use of the
.themedclass in conjunction with the specific theme to apply. (11812)
The Game Canvas
- Separated ruler measurement from ruler drawing. The results of ruler measurement is now passed via sockets instead of recalculating on each client. (10361)
- Checkpoints are now automatically added to the movement path where the Token moves into or out of a Region that has a Behavior that subscribes to the
TOKEN_MOVE_INorTOKEN_MOVE_OUTevent. Added the ability to pause movement at these checkpoints, then subsequently resume (TokenDocument#pauseMovement) or stop (TokenDocument#stopMovement) this movement. (11627) - Added the
snappedproperty to Token movement waypoints to indicate whether the Token was placed with snapping. (11640) Region.CLIPPER_SCALING_FACTORhas been deprecated in favor of the newCONST.CLIPPER_SCALING_FACTOR. Several functions now use this as their defaultscalingFactoroption instead of 1. (11705)- Added
TokenDocument#_preUpdateMovement,TokenDocument#_onUpdateMovement, and the hookspreMoveTokenandmoveToken. (11754) - Added support for a pre-determined cost and custom cost function for each individual waypoint in
Token#measureMovementPath. (11828) - Changed the return type of
Token#constrainMovementPathfrom{reached: number, collision: ElevatedPoint|null}to{reached: number, terminalPath: ElevatedPoint[]}. (11829) - Added
Token#_initializeRuler(): BaseTokenRuler | null, which initializes theTokenRulerinstance of the Token. (11830) - Added
mode: "replace" | "acquire" | "release"option toTokenLayer#setTargets, which determines the targeting behavior of the provided target IDs. (11831) - Added the
linkToMovementupdate operation animation option which sets the animation duration of non-movement properties to the duration of the movement animation. (11832) - The ID of the User that performed the movement is now recorded in the movement history. (11833)
- Intermediate waypoints (the waypoints of grid spaces on the direct path between to waypoints) are now recorded in the movement history.
TokenDocument#getDirectMovementPathhas been replaced byTokenDocument#getIntermediateMovementPath. (11834) - Added the
showRulerupdate option which controls whether the ruler of the Token is shown during the movement animation. Ifundefined, the ruler is shown only if the movement was recorded in the history. (11835) - Added
CONFIG.Token.movement.defaultAction, which is the default action of token movement waypoints. (11836) - Added
Token#updateDragRulerPathandTokenLayer#updateDragRulerPathswhich update the path through the waypoints of the drag operation. (11837) - Changed the signature of
TokenRuler#_getWaypointLabel,TokenRuler#_getGridHighlightStyle, andTokenRuler#refresh. AddedTokenRuler#_getWaypointStyle,TokenRuler#_getSegmentStyle,TokenRuler#_configureOutline, andTokenRuler#_configureDashLine. (11838) - Reworked the Region event data of
TOKEN_MOVE_IN,TOKEN_MOVE_OUT, andTOKEN_MOVE_WITHIN. Thesegments,teleport, andforcedevent data properties have been deprecated. (11841) - Deprecated the
teleportandforcedToken update operation options in favor of the new movement waypoint data. (11842) - Add
TokenDocument#move(waypoints: TokenMovementWaypoint | TokenMovementWaypoint[], options?: object): Promise<boolean>, which moves the Token through the provided waypoints. (11843) - Token drag measurements are now broadcast to other users. (11844)
- Changed the return type of
Token#findMovementPathso that it now requires aresultproperty. (11846) - Changed
PointSourcePolygon#originfromPointtoElevatedPoint. (11847) - Added
Token#_getDragWaypointProperties(): {action?: string, teleport?: boolean}andToken#_getDragPathfindingOptions(): TokenFindMovementPathOptions. (11848) TokenDocument#pauseMovementnow returns a callback that can continue the movement, but only if all other continuation callbacks have been called of all otherToken#pauseMovementcalls that occurred at the same time.Token#continueMovementhas been removed. (11849)- Tokens now automatically rotate in the direction of movement if dragged or moved by keyboard inputs. The
autoRotateupdate operation option controls this behavior. (11850) - Added
Token#_getAnimationRotationSpeed(options: TokenAnimationOptions): numberandToken#_requiresRotationAnimation(): boolean. (11853) - Added
Token#movementAnimationPromise, which returns the promise that resolves once the current movement animation has completed. (11854)
Package Development
- Added support so that modules can use the
preImportAdventureorimportAdventurehooks to register workflows that can perform asynchronous pre-processing or post-processing of adventure data. (11816)
Other Changes
- Allowed for custom enrichers to supply event listeners to their created elements. (8755)
- Improved upon the
GameTimeAPI and addedCalendarConfigto offer a more robust framework for defining a custom in-world calendar, performing date/time transformations, and formatting returned dates. (11426) - Made
ChatLog##renderBatchfunctionality accessible to the public API. (11744) - Provided a way for
Document#toEmbedDocument embeds to attach interactivity to their embedded results viaDocument#onEmbed. (11791) - Improved
AbstractFormInputElementandDataFieldform group/input generation. (11826)
Bug Fixes
Documents and Data
- Resolved an issue where
ActiveEffect._applyLegacycould set values toundefined. (11527) - If the user does not have the prerequisite FILES_UPLOAD permission, generation of new Scene preview thumbnails by that user is cancelled. (11582)
- Fixed an issue where deletion keys were always included in the diff returned by
DataModel#updateSource, even if the key wasn't deleted. (11827) - Fixed bug where retrieving new actor-compendium index fields flushed compendium art from the application. (11863)
Applications and User Interface
- Creating a
JournalEntryPagesubtype with an ApplicationV2 Document sheet no longer prevents the parentJournalEntryfrom being able to render. (11546) - Made the
HTMLDocumentTagsElementsomewhat more permissive. It now accepts theoretically valid UUID strings instead of requiring that the Document exist in the current World or active compendium pack. (11717) - Resolved an issue where
HTMLDocumentTagsElementdid not work with Document types that lacked anamefield. (11738) - Prevented
SceneControlsfrom re-rendering twice every time a new control is activated. (11745) - Fixed typo in
AVConfighint. (11775) - Added handling to playlists for handling drag data that contains sound. (11788)
The Game Canvas
GridLayer.instancenow correctly returns a subclass ofCanvasLayer(notBaseGridas it did previously). (11794)- Reworked the methods used to manage targeting to close several loopholes. Introduced
TokensLayer#setTargetswhich can be used to set multiple targets at once and made severalUsermethods internal. (10613) - Accounted for Token movement being stopped by a Region in Ruler measurement history creation. (10830)
- Added dynamic padding for Token Rings when scale correction is less than 1 to prevent visual cropping. (11580)
- The global light source is no longer restricted by roofs. (11644)
- Fixed a bug that caused cone templates to not highlight all the grid spaces they should in scenes with an uneven grid size. (11749)
- Improved snapping for placeable objects that are copied from a Scene with a different grid configuration. (11751)
- Restored CTRL+A functionality for the Token layer. (11752)
- Fixed output buffer size checks in
expandBufferRedToBufferRGBAandreduceBufferRGBAToBufferREDto address Scene rendering issues in Firefox. (11759) - Performed an editing pass of the User Permission Configuration dialog. (11859)
Other Changes
- Fixed
PerceptionManagerrender flagaliasmisalignment. (11790) - Made
FormApplication#_onChangeInput()more specific in targeting only.editor.prosemirroror.editor.tinymceelements. (9952) - Improved messaging when Foundry is unable to get available packages by replacing the
key.spliterror with a more human-readable error message. (11533) - Added form locking for non-editable Documents to
DocumentSheetV2. (11673) - Escaped the ID in
DocumentSheetV2to prevent an error in_syncPartStatewhen using form fields. (11742) - Fixed an error which was preventing the Prototype and Default Token Configuration windows from opening. (11743)
- Restored the correct range (0.2 to 3) to the Scale control in
TokenConfig. (11747) - Fixed a bug which was causing
ActorSheet#_onDropFolderto always evaluate as true. (11769) - Prevented an error that occurred when force-closing a V1 application that was already closed. (11771)
ForeignDocumentFieldno longer ignoreschoiceswhen creating form groups. (11774)- Fixed a bug causing non-truthy placeholders to not be set by the
setInputAttributeshelper. (11778) - Resolved an issue where the "Append Number to name of Unlinked Tokens" setting could create duplicate numbers in certain circumstances. (11799)
Documentation Improvements
Other Changes
- Corrected the Handlebars
numberFormatdocumentation. (8622) - Resolved an issue that was causing
@typedefdescriptions to be excluded from the generated API docs. (11573) @importwas added for referenced classes and@typedefs so that the type is linked correctly in the API docs. (11579)- Fixed an issue where the
Sceneclass was incorrectly marked as extendingBaseIteminstead ofBaseScene. (11601) - Corrected the "Fog Exploration" toggle in Scene configuration's Lighting tab. (11662)
- Added documentation for the types used in Peggy. (11765)
- Restored
readonlystatus of certainGameproperties. (11813)