Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* =========================================================
* @File Trinkets&Trackers.js
* @File TrinketsAndTrackers.js
* @Project Trinkets and Trackers (T&T)
* @Description Professional base prototype for commands, cards and helpers.
* @Author AmadeusVF
Expand Down
4 changes: 2 additions & 2 deletions T&T - Trinkets and Trackers/script.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "T&T - Trinkets and Trackers",
"script": "Trinkets&Trackers.js",
"script": "TrinketsAndTrackers.js",
"version": "1.2.2",
"previousversions": [],
"description": "# Trinkets & Trackers\n\nTrinkets & Trackers is an interactive Roll20 Mod/API. It helps GMs and players manage interactive inventories, item use, item catalogs, and shops directly from chat cards and token actions.\n\n## Important Setup\n\nThis script requires Roll20's API Sandbox Version to be set to **Experimental**. If the game is using the default sandbox, the script warns the GM in chat and does not register its commands.\n\nThe script loads catalog data from three Roll20 handouts. Create handouts with these exact names and paste the matching JSON data into each handout's Notes / Description field:\n\n* **T&T Items Catalog** - item catalog data used for search, details, inventory additions, and shop stock.\n* **T&T Items Template** - template data used when cloning item entries into character inventories.\n* **T&T Shop Catalog** - shop definitions and stock data that can be loaded into live shop state.\n\n## Main Commands\n\n* **!tnt** or **!tntHelp** - Shows the available command menu.\n* **!tntToken init** - GM command. Creates token-action abilities for the selected character token, including Inventory, Shop, Search, Initiative, Ability Check, Saving Throw, Skill Check, and Attacks.\n* **!tntToken clear** - GM command. Removes the managed T&T token-action abilities from the selected character.\n* **!tntToken attacks** - Shows attack and spell action cards for the selected token.\n* **!tntToken refreshattacks** - Refreshes cached repeating attack data for the selected token or supplied token reference.\n* **!tntToken refreshspells** - Refreshes cached repeating spell data for the selected token or supplied token reference.\n* **!tntAttr get attribute_name** - GM command. Reads an attribute from the selected token's linked character.\n* **!tntAttr set attribute_name value** - GM command. Updates an attribute on the selected token's linked character.\n\n## Inventory Commands\n\n* **!tntInventory** or **!tntInventory get** - Shows the selected token's inventory and wallet.\n* **!tntInventory add itemName qty** - GM command. Adds catalog-backed inventory items to the selected character.\n* **!tntInventory remove itemName qty** - Removes inventory items from the selected character.\n* **!tntInventory give sourceTokenId targetTokenId itemName qty** - Transfers items between nearby tokens when the source character is accessible to the player.\n* **!tntInventory use sourceTokenId targetTokenId itemName** - Uses an inventory item, including supported consumable effects such as healing.\n* **!tntInventory discard sourceTokenId itemName qty** - Discards items from a source token's inventory.\n\n## Currency Commands\n\n* **!tntCurrency give sourceTokenId targetTokenId {cp|sp|gp} qty** - Transfers coins from a source token to a target token.\n* **!tntCurrency take sourceTokenId targetTokenId {cp|sp|gp} qty** - Takes coins from a target token into the source token, subject to access checks.\n\n## Item Catalog Commands\n\n* **!tntItem search itemName** - Searches the item catalog and shows matching item cards.\n* **!tntItem details itemName** - Shows a detailed item card for an exact catalog item.\n* **!tntItem list** - GM command. Shows the grouped item catalog.\n* **!tntItem rawList** - GM command. Shows the ungrouped item catalog.\n* **!tntItem create** - GM command. Opens an interactive item draft card for creating a catalog item.\n* **!tntItem remove itemName** - GM command. Removes an item from the catalog handout.\n* **!tntItem reload** - GM command. Reloads item catalog data from the handout.\n\n## Shop Commands\n\n* **!tntShop list** - Shows public shops available to the player. GMs can also see hidden shops.\n* **!tntShop get shopId** - Opens a shop's item list.\n* **!tntShop buy shopId buyerTokenId itemName qty** - Buys an item for a token, updates inventory, spends currency, and reports the purchase.\n* **!tntShop menu** - GM command. Opens the shop administration menu.\n* **!tntShop detail shopId** - GM command. Shows shop details and management controls.\n* **!tntShop create shopId shopName** - GM command. Creates a live shop.\n* **!tntShop delete shopId yes** - GM command. Deletes a live shop after confirmation.\n* **!tntShop add shopId itemName [price currency] [stock] [equippable]** - GM command. Adds a catalog item to a shop.\n* **!tntShop remove shopId itemName** - GM command. Removes an item from a shop.\n* **!tntShop open|close|hide shopId** - GM command. Changes shop visibility/state.\n* **!tntShop reveal shopId** and **!tntShop toggle shopId** - GM command. Toggles hidden/open states from management cards.\n* **!tntShop price shopId itemName price currency** - GM command. Sets a shop item price.\n* **!tntShop stock shopId itemName stock** - GM command. Sets a shop item stock amount.\n* **!tntShop stockmode shopId** - GM command. Toggles whether a shop tracks stock.\n* **!tntShop rollprice shopId** - GM command. Clears explicit item prices so catalog/default prices can be used again.\n* **!tntShop blacklist shopId add|remove tokenRef** - GM command. Updates shop blacklist access.\n* **!tntShop config shopId key value** - GM command. Updates shop configuration such as price visibility or stock behavior.\n* **!tntShop load [shopId] [overwrite]** - GM command. Imports one or all shops from the shop catalog handout into live state.\n* **!tntShop reload** - GM command. Reloads shop catalog data from the handout.\n* **!tntShop export shopId** - GM command. Exports a live shop back to the shop catalog handout.\n\n## Data Managed\n\nThe script stores live shop state, draft items, cache data, and settings under `state.TRINKETS_AND_TRACKERS`. Character inventories are stored in a `store` attribute on each character. The token setup commands also create/update character abilities and cache attributes such as `user.T&T_attack_list`, `user.T&T_spell_list`, `user.T&T_fast_details`, and `user.tnt_spell_dump`.",
"description": "# Trinkets and Trackers\n\nTrinkets and Trackers is a Roll20 Mod script for Dungeons and Dragons campaigns. It provides chat-based tools for inventory, item catalogs, shops, currency, and token actions.\n\nFeatures:\n* Chat-based command menus and action cards.\n* Interactive inventory management for player characters and NPCs.\n* Dynamic shops with prices, stock, visibility, purchases, and catalog import or export.\n* Currency transfers using cp, sp, and gp.\n* Item search, item details, item use, discarding, and token-to-token item transfers.\n* Token management with generated token actions. In progress.\n* Auto loot and rewards system. TBD.\n* NPC management. TBD.\n* World management. TBD.\n* Campaign management. TBD.\n\nSetup: use the Experimental API sandbox and create the required handouts named T&T Items Catalog, T&T Items Template, and T&T Shop Catalog.",
"authors": "AmadeusVF",
"roll20userid": "15900768",
"useroptions": [],
Expand Down
Loading