Script:Ongoing Cleanup
From Roll20 Wiki
Page Updated: 2023-07-30 |
This is a wiki page template, to have an easier starting point for creating some types of pages. See Category:Page Template for other templates. |
The Ongoing Cleanup API was generated as a Utility Mod to help improve optimization. During play in a Living Community/West Marches style campaign, where sessions are a series of one-offs with varying participation of players and rotating Game Masters, it was found that manual cleanup was necessary to improve reactions of APIs and overall experience of the VTT. This API was created as an alternative to the Triggered Cleanup, which only runs when the appropriate API command is sent through the chat window. This API was designed with Long Duration Campaigns in mind and applies two features to help with the cleanup. The first is a listener that is triggered when a token linked to a character sheet is manually deleted and removes all tokens representing that character sheet on all maps, to include archived maps and excluding any maps with the term 'bullpen' (not case-sensitive) in the title.
Version: 1.0
Last Modified: 2023-06-26
Code: Ongoing Cleanup
Dependencies: None
Conflicts: None
Installation and Configuration
Ongoing Cleanup can be added to a table using the Mod Scripts option in the Settings of the main page for a given table. It can be added from the Roll20 Mods Library. There are no configuration requirements.
Script Use
The script will delete every token on every layer on every map, archives included and with the exception of any maps with the term 'bullpen' in the name. This occurs automatically when a token linked to a character sheet is deleted. The script will search for all other tokens that also represent the same character sheet as the token that was manually deleted.
Additionally, whenever a character sheet is deleted, any tokens that represent that character sheet will also be removed from every layer on every map, archives included and with the exception of any maps with the term 'bullpen' in the name.