Latest version | 1.5.1 |
---|---|
Minimum Core | 12 |
Compatible Core | 12 |
Last updated | 2 months ago |
Created | 3 years ago |
Authors |
|
Languages |
|
Systems | All systems |
Project source | Project URL |
Report bugs | Bug tracker URL |
Read-me | Readme URL |
This module allows you to tag PlaceableObjects in the scene and retrieve them just as easy.
All major PlaceableObjects' configuration dialogues (such as actor prototype tokens, tokens, tiles, walls, lights, etc), now has a "Tags" field.
Each tag is separated by a comma.
Example of Sequencer finding tagged objects in the scene and playing effects on them:
Get Documents with matching tags provided to the method.
Tagger.getByTag(String|Array, Object)
@param {String|Array} inTags An array of tags or a string of tags (separated by commas) that will be searched for
@param {Object} inOptions An optional object that can contain any of the following:
- matchAny {Boolean} - whether the Documents can contain any of the provided tags
- matchExactly {Boolean} - whether the tags on the Documents must contain ONLY the tags provided
- caseInsensitive {Boolean} - whether the search is case insensitive (capitals vs lowercase is not considered)
- allScenes {Boolean} - whether to search in all scenes, this will return an object with the key
as the scene itself, and an array for objects found within that scene
- objects {Array} - an array of PlaceableObjects or Documents to test
- ignore {Array} - an array of PlaceableObjects or Documents to ignore
- sceneId {String} - a string ID for the scene to search in
@returns {Array} Returns an array of filtered Documents based on the tags
Examples:
Tagger.getByTag("tags")
Tagger.getByTag("tags, TO, LOOK, foR", { caseInsensitive: true })
Tagger.getByTag(["tags", "to", "look", "for"], { matchAny: true, sceneId: "8xjy4UUVoRcEYUNy" })
Get all tags from a given PlaceableObject or Document
Tagger.getTags(PlaceableObject|Document)
@param {PlaceableObject|Document} inObject The PlaceableObject or Document get tags from @returns {array} An array of tags from the PlaceableObject or Document
Check if a PlaceableObject or Document has the given tags
Tagger.hasTags(PlaceableObject|Document, String|Array, Object)
@param {PlaceableObject|Document} inObject The PlaceableObject or Document to check
@param {String|Array} inTags An array of tags or a string of tags (separated by commas) that will be searched for
@param {Object} inOptions An optional object that can contain any of the following:
- matchAny {Boolean} - whether the Documents can contain any of the provided tags
- matchExactly {Boolean} - whether the tags on the Documents must contain ONLY the tags provided
- caseInsensitive {Boolean} - whether the search is case insensitive (capitals vs lowercase is not considered)
@returns {Boolean} Returns a boolean whether the Document has the given tags
Set the tags on a PlaceableObject or Document
Tagger.setTags(PlaceableObject|Document|Array, String|Array)
@param {PlaceableObject|Document|Array} inObjects PlaceableObjects or Documents to set tags on (array, or a single of either)
@param {String|Array} inTags An array of tags or a string of tags (separated by commas) that will override all tags on the Documents
@returns {Promise} A promise that will resolve when the Documents' tags have been updated
Tagger.setTags(_token, "skeleton")
Tagger.setTags(_token, ["tags", "to", "set"])
Adds tags to a PlaceableObject or Document
Tagger.addTags(PlaceableObject|Document|Array, String|Array)
@param {PlaceableObject|Document|Array} inObjects PlaceableObjects or Documents to add tags on (array, or a single of either)
@param {String|Array} inTags An array of tags or a string of tags (separated by commas) that will be added to the Documents
@returns {Promise} A promise that will resolve when the Documents' tags have been updated
Tagger.addTags(_token, "skeleton")
Tagger.addTags(_token, ["tags", "to", "add"])
Removes tags from a PlaceableObject or Document
Tagger.removeTags(PlaceableObject|Document|Array, String|Array)
@param {PlaceableObject|Document|Array} inObjects PlaceableObjects or Documents to remove tags from (array, or a single of either)
@param {String|Array} inTags An array of tags or a string of tags (separated by commas) that will be removed to the Documents
@returns {Promise} A promise that will resolve when the Documents' tags have been updated
Tagger.removeTags(_token, "skeleton")
Tagger.removeTags(_token, ["tags", "to", "remove"])
Removes all tags from a PlaceableObject or Document
Tagger.clearAllTags(PlaceableObject|Document|Array)
@param {PlaceableObject|Document|Array} inObjects PlaceableObjects or Documents to remove all tags from (array, or a single of either)
@returns {Promise} A promise that will resolve when the Documents' tags have been updated
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: tagger or copy its manifest URL:
And paste it to the input box at the bottom of your window.
You can install this package directly to your Forge account.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.