Templates and instances
Understand the template/instance pattern that powers items, shops, and loot in ScryRPG.
Last updated: October 25, 2026
The Core Pattern
ScryRPG uses a template/instance pattern throughout the system. Understanding this pattern helps you work more efficiently with items, shops, and loot.
| Component | Template | Instance |
|---|---|---|
| Items | Definition (name, weight, value) | A specific copy in your inventory |
| Shops | Design (what it sells, pricing) | A deployed shop in your party |
| Loot | Drop table (items, quantities) | An active loot drop to claim |
Items: Templates and Instances
Item Templates
An Item Template defines what an item IS:
- Name, description
- Weight, value
- Stack size, rarity
- Game system
Templates can be private, public, or unlisted. Public templates appear in marketplace discovery after approval; private templates are visible to their creator, and unlisted templates are not listed for discovery. You can fork an available template to make a separately owned copy, with its origin tracked.
Archiving hides a template from active template lists and prevents new forks. If items, shop entries, loot entries, or forks still depend on it, deleting the template archives it so those references remain usable. A template with no dependents can be deleted permanently.
Item Instances
An Item Instance is a specific copy in YOUR inventory:
- Has a quantity (how many you own)
- Lives in a specific container
- Can have custom notes
- Is stored in a container owned by a character or party
Example
The “Longsword” template defines what a longsword is. When you add one to your inventory, you create an instance of that template. You might have 3 longsword instances across different containers.
Why This Pattern?
Consistency
When you add a “Healing Potion” from the marketplace, you get the same item everyone else gets: same weight, same value, same description. No transcription errors.
Reusability
Create a custom magic item template once and reuse it when adding items to characters or parties. You can also create items by hand and set their quantities in inventory.
Flexibility
Instances can be customized without affecting the template. Rename your “Longsword” to “Grandfather’s Blade” without changing the underlying item definition.
Attribution
Forked templates track their origin. If you modify someone’s item, the original creator still gets credit.
Shops and Loot
The same pattern applies to shops and loot:
Shop Templates
Define a shop’s:
- Name and description
- Inventory (which items to sell)
- Pricing (markup/markdown percentages)
- Restocking behavior
Shop Instances
When you “deploy” a shop template to a party:
- Creates a specific shop instance
- Shops start hidden by default; reveal them before players browse and buy
- Inventory is tracked separately from the template
- Can be removed without affecting the template
Loot Templates
Define a loot drop’s:
- Items that can appear
- Quantities and probabilities
- Distribution rules
Loot Instances
When you “drop” loot for a party:
- Creates a claimable loot instance
- Loot starts hidden by default; reveal it before players claim under the selected claiming mode
- Encounter completion attempts to deploy attached loot revealed
- Tracks who took what
- Remains until a GM or manager deletes it, even when emptied
Card Views
Supported templates can be opened as visual cards from their detail pages. Item, creature, spell/ability, and encounter cards use the same fixed renderer as print and export. Shop and loot templates/instances remain responsive container summaries, but Print full set sends authorized contained-item cards to Print Studio using current item details or the exact deployed item snapshot. Deployed-shop currency/till rows are omitted. If cards are present, choose Replace Deck, Add to Deck, or Cancel. See the Printable Cards guide for the complete workflow.
Shared Inventory
Use /share in Discord to get a public read-only link to your active Discord character’s non-private inventory. The account-owned link resolves current data on each visit, including a different character if you switch your active Discord character. Party Settings provides party invitations, not public inventory snapshots.
Practical Implications
For Players
- Items you add are linked to their templates
- Template updates don’t affect existing instances
- You can fork public items to create variants
For GMs
- Create shop/loot templates once, deploy many times
- Each deployment is independent
- Deleting a template with dependents archives it, preserving the items and deployments that refer to it
For Creators
- Publish templates to the marketplace
- Get attribution when others fork your work
- Build a library of reusable content
Learn More
See the Inventory Guide for practical steps on adding and managing items.