4 min read

Templates & Instances

Understand the template/instance pattern that powers items, shops, and loot in ScryMarket.

Last updated: February 21, 2026

The Core Pattern

ScryMarket uses a template/instance pattern throughout the system. Understanding this pattern helps you work more efficiently with items, shops, and loot.

ComponentTemplateInstance
ItemsDefinition (name, weight, value)A specific copy in your inventory
ShopsDesign (what it sells, pricing)A deployed shop in your party
LootDrop 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:

  • Public (marketplace) - Available to everyone
  • Private - Only visible to the creator
  • Forked - Copied and modified from another template

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
  • Tracks who owns it

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 once, use it forever. Add it to multiple characters, share it with your party, or publish it to the marketplace.

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
  • Players can 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
  • Players see and claim items
  • Tracks who took what
  • Disappears when fully claimed

Card Views

Item, shop, and loot templates can be viewed as visual cards in the Card Showcase. Cards present templates in a printable, tabletop-friendly format with artwork, stats, and descriptions. You can access the Card Showcase from any template’s detail page in the marketplace.

Shared Inventory

Party inventories can be shared publicly via a unique link. This creates a read-only snapshot that anyone can view without logging in, useful for session planning or sharing your party’s gear with absent players. Share links are generated from the Party Settings page.

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
  • Templates stay in your library forever

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.