premium banner
A Barter Trader configurable for players make trades or shops. Reject money, embrace bartering.

Description

TaleShop

Create and manage your own trading shops in Hytale with NPC traders and automatic inventory management!

What is TaleShop?

TaleShop allows players to set up custom trading shops with interactive NPC merchants. Stock your shop with items from nearby chests, set your prices, and let players trade with your NPC trader. It's perfect for creating player-driven economies on your server!

Key Features

  • Player-Owned Shops - Create as many shops as you want with custom trades
  • NPC Traders - Spawn NPCs that players can interact with
  • Custom Entity Selection - Choose from any available NPC entity type for your trader (requires permission)
  • Automatic Inventory - Your shop pulls items from nearby chests automatically
  • Easy Management - Use commands or a graphical UI to manage your shops
  • Remote Access - Open any shop from anywhere without finding the NPC
  • Admin Shops - Create server-managed shops with infinite stock and no storage requirements
  • Persistent Data - JSON by default, SQLite optional

How It Works

  1. Create a shop with /taleshop create <name>
  2. Open the shop editor with /taleshop editor to manage your shops
  3. Add trades through the graphical interface - pick items from your inventory
  4. Spawn an NPC trader at your desired location
  5. Place chests nearby and stock them with your goods
  6. Done! Players can now trade with your NPC

You can also manage your shop by right-clicking your own NPC to access the management interface. Other players who click your NPC will see the shopping interface.

The plugin automatically manages inventory - when players buy from your shop, items come from your chests. When they sell to you, items go into your chests.

Admin shops work differently: they have infinite stock and do not require nearby storage. Buyers still pay the input items, but output items are always available.

Getting Started

Create Your First Shop

  1. Create a shop:
   /taleshop create MyShop
  1. Open the shop editor:
   /taleshop editor

Select your shop and add trades using the graphical interface. You can pick items directly from your inventory!

  1. Spawn the NPC trader:
   /taleshop npc spawn MyShop

The NPC will appear in front of you. If you have the taleshop.npc.selectentity permission, you can choose which entity type to use! Otherwise, it defaults to a Klops Merchant. Right-click it anytime to manage your shop!

  1. Stock your shop: Place chests within 2 blocks of the NPC and fill them with the items you're selling.

That's it! Players can now interact with your NPC to browse and purchase from your shop.

Managing Your Shop

There are two easy ways to manage your shop:

  • Shop Editor UI: Use /taleshop editor to see all your shops and manage them through a user-friendly interface
  • Right-click your NPC: Click your own trader NPC to open the management menu

Both methods let you:

  • Add, edit, and remove trades
  • Rename or delete your shop
  • Preview how customers see your shop

Commands

All commands use /taleshop (aliases: /tshop, /barter)

Essential Commands

Command Description
/taleshop create <name> Create a new shop
/taleshop editor Open the shop management interface
/taleshop list View all your shops
/taleshop admin Open the admin shop management interface
/taleshop npc spawn <name> [entityRole] Spawn your shop's NPC trader (optionally specify entity type)
/taleshop npc despawn <name> Remove your shop's NPC
/taleshop open <owner> <shop> Open any shop remotely

Other Commands

Command Description
/taleshop rename <name> <newName> Rename a shop
/taleshop delete <name> Delete a shop

Full Command List

Command Description
/taleshop create <name> Create a new shop
/taleshop rename <name> <newName> Rename a shop
/taleshop delete <name> Delete a shop
/taleshop list View all your shops
/taleshop get <name> View details about a shop
/taleshop editor Open the shop management interface
/taleshop admin Open the admin shop management interface
/taleshop open <owner> <shop> Open a shop remotely
/taleshop npc spawn <name> [entityRole] Spawn your shop's NPC trader (optional entity role)
/taleshop npc despawn <name> Remove your shop's NPC
/taleshop trade create <shopName> <inputItem> <inputQty> <outputItem> <outputQty> Create a new trade
/taleshop trade list <shopName> List trades in a shop
/taleshop trade update <shopName> <tradeId> <inputItem> <inputQty> <outputItem> <outputQty> Update a trade
/taleshop trade delete <shopName> <tradeId> Delete a trade

Tip: Most shop management is easier through the graphical editor (/taleshop editor) or by right-clicking your NPC!

Permissions

Permission What it does
taleshop.shop.manage Required for all /taleshop commands (base permission on the command collection)
taleshop.admin.manage Manage admin shops and edit admin-owned NPCs
taleshop.shop.open Additional permission required for /taleshop open
taleshop.npc.selectentity Choose custom NPC entity types when spawning traders

Note: Anyone can trade with NPCs - no permission needed!

Examples

Setting Up a Weapon Shop

# Create the shop
/taleshop create Weapons

# Open the editor and add your trades
/taleshop editor

# Spawn the NPC
/taleshop npc spawn Weapons

Then place chests near the NPC and stock them with weapons. Players can now visit your shop!

Setting Up a Resource Exchange

# Create the shop
/taleshop create Resources

# Open the editor to configure trades
/taleshop editor

# Spawn the NPC
/taleshop npc spawn Resources

Stock your chests with gold or other currency items, and set up trades where players exchange resources for coins.

Opening Shops Remotely

With the taleshop.shop.manage and taleshop.shop.open permissions, you can access any shop without finding the NPC:

# Browse Alice's weapon shop
/taleshop open Alice Weapons

# Check out Bob's resource exchange
/taleshop open Bob Resources

If you're the shop owner, you'll see the management interface. If not, you'll see the shopping interface just like clicking the NPC.

Configuration

The plugin creates a config file at run/mods/Leonardson_TaleShop/TaleShopConfig.json

{
  "StorageBackend": "JSON",
  "StorageDistanceMode": "FIXED",
  "FixedStorageDistance": 2
}
  • StorageBackend: JSON (default) or SQLITE
  • StorageDistanceMode: FIXED (use configured distance) or WORKBENCH (match game's crafting bench distance)
  • FixedStorageDistance: How many blocks away from the NPC to search for chests (default: 2)

Tips & Tricks

  • Use the Editor: The /taleshop editor command provides a visual interface - much easier than remembering commands!
  • Right-Click Management: Click your own NPC to quickly manage trades without typing commands
  • Custom Entities: If you have the taleshop.npc.selectentity permission, you can choose any NPC entity type (Klops, Feran, Trork, etc.) for your trader!
  • Organize Your Storage: Use multiple chests near your NPC for better organization
  • Stock Management: Keep your chests stocked - trades show as "Out of Stock" when empty
  • Multiple Shops: Create different shops for different item categories (Weapons, Potions, Resources, etc.)
  • Shop Names: Use clear, descriptive names - they're shown to all players
  • Trade Limits: Each shop supports up to 20 different trades
  • Pick from Inventory: When adding trades in the editor, you can select items directly from your inventory

Common Questions

Q: How do I add trades to my shop?
A: Use /taleshop editor or right-click your own NPC to open the management interface. You can add trades through the graphical UI!

Q: How close do chests need to be?
A: Within 2 blocks by default (configurable)

Q: Can I have multiple shops?
A: Yes! Create as many as you want.

Q: What happens if my chests are empty?
A: The trade shows as "Out of Stock" until you restock

Q: Do admin shops need storage chests?
A: No. Admin shops have infinite stock and ignore storage containers.

Q: Can other players steal from my chests?
A: The plugin only manages trade transactions - use your server's protection plugins for chest security

Q: Can I move my NPC?
A: Yes! Despawn it with /taleshop npc despawn <name> and spawn it at the new location

Q: How do I know what items to use in trades?
A: When using the editor, you can pick items directly from your inventory - no need to memorize item names!

Q: Can I use different NPC models for my traders?
A: Yes! If you have the taleshop.npc.selectentity permission, you can choose from any available NPC entity type when spawning your trader. A searchable UI lets you preview and select the entity you want!

Support

For issues, suggestions, or questions, please visit the project repository or leave a comment!


Created by LeonardsonCC
License: MIT