DayzHUBม็อด

Mod · version 1.0.6

DayzHUB Trader

Trader adds shops to your server. Players buy and sell at NPC traders and vending machines. Money comes from DayzHUB Banking or the Trader LB bridge (for LBmaster money servers). You run everything from an in-game editor.

Needs DayzHUB Core DayZ 1.30 @DayzHUB_Trader Product page
Trader

Trader adds shops to your server. Players buy and sell at NPC traders and vending machines. Money comes from DayzHUB Banking or the Trader LB bridge (for LBmaster money servers). You run everything from an in-game editor. You do not need to edit files to start. If you like, you can also edit prices and trader rules in Notepad (section 13).

The currency follows the Banking setting: dollars ($) or euros (€). With the LB bridge it follows your LBmaster currency setup. Both the text and the cash icons switch. Examples in this guide are written with "$".

What you get:

  • NPC traders and vending machines, placed by you anywhere on the map.
  • Vehicle traders with delivery pads.
  • A Second market where players sell to each other.
  • A Workbench for weapons, plus optional licences and optional trade points (both off by default).
  • VIP vending machines for chosen players.
  • Safe zones you can switch on or off for each trader.
  • A garbage bin and a Missing-item box.
  • Map markers for your traders on the vanilla map, the Expansion map and the LB map, with a name and an icon you choose.
  • Files you can edit in Notepad: Config\Prices.json for prices and Config\Traders.json for trader rules.
  • Daily backups of your files, kept for 7 days.
  • Full control from an editor and from the admin bar.
A vending machine in the world, with the Trade prompt and the "Safe zone" marker on screen

Moving from Expansion Market or TraderPlus 2.5? The migration tool converts your traders, prices and stock into Trader files in your browser. Nothing is uploaded.

1. Requirements#

  • DayZ 1.30.
  • DayzHUB Core 1.0.11 or newer.
  • DayzHUB Banking. Or, on a server that uses LBmaster money, the optional Trader LB bridge instead (Extra\@DayzHUB_TraderLBServer).
  • With DayzHUB Banking: a Banking account for every player who wants to trade. Players make it at an ATM.

Trader never holds money itself. Every buy and every sell goes through the Banking account, or through LBmaster money when you use the LB bridge. The money and its look follow your Banking setup. Without Banking (LB bridge), prices use your LBmaster currency setup and its symbol.

The LB bridge is a server mod only. Load it with -servermod, never in -mod, and never together with DayzHUB Banking.

2. Install (server owners)#

You get two folders and a key:

  • @DayzHUB_Trader (client mod, signed)
  • @DayzHUB_TraderServer (server mod)
  • keys\DayzHUB.bikey

Steps:

  1. Copy both mod folders to your server folder.
  2. Copy DayzHUB.bikey into your server keys folder.
  3. Add the mods to your start parameters. Core and Banking (or the LB bridge) must be there too.
-mod=@CF;...;@DayzHUB_Core;@DayzHUB_Banking;@DayzHUB_Trader
-servermod=@DayzHUB_BankingServer;@DayzHUB_TraderServer

Keep the rest of your own mod list. Players download the client mod. They never need the server mod.

LBmaster money server? Also copy Extra\@DayzHUB_TraderLBServer and load it with -servermod only. Never put it in -mod, and never use it together with DayzHUB Banking.

3. Licence note#

Trader is licensed per server IP and port. If the licence service cannot be reached, your server keeps running for a grace period of 3 hours. The server never stops because of the licence. Only selling stops when the licence is paused.

This is not the "Licences" tab that players see in the shop. That tab is explained in section 7.

4. First boot and files#

On the first start Trader makes its folder in your server profile:

<profile>\DayzHUB\DHUB_Trader\

On a normal server this is <server>\profiles\DayzHUB\DHUB_Trader\. It has four folders:

  • Config\: the files you may edit. Settings, Second market, bins and boxes, prices and trader rules.
  • Data\: the files Trader writes while the server runs. Do not edit them.
  • Backups\<date>\: daily copies of your files. The newest 7 days are kept, plus one pre-migration copy.
  • Logs\: the log files (section 12).

Section 13 lists every file and the folder it is in.

Updating from an older version? On the first start after the update, the mod moves your old files into the new folders by itself, keeps every setting, and keeps a pre-migration backup. You don't need to do anything. The pre-migration copy is in Backups\<date>\pre-migration\ and is never deleted by the 7-day clean-up.

Trader starts clean. There are no traders, no items and no prices. A starter list of categories is included, so you can fill it with items. The Traders list in the admin bar is empty until you place your first trader. A new trader starts with no categories ticked, and NPC traders wear only underwear until you dress them. You build the rest yourself. This is on purpose.

Licences and trade points are off by default. Turn them on only if you want them.

Quick start:

  1. Join your server as an admin.
  2. Open the admin bar and go to the Trader page (section 5).
  3. Place a trader.
  4. Aim at the trader and press F "Edit trader".
  5. Add items and prices to the categories in the Catalog tab.
  6. Tick the categories this trader sells in the Trader tab.
  7. Dress the NPC in the Outfit tab.
  8. Press Save & Apply.

An update never resets your settings. Config\Settings.json, Config\FleaConfig.json and Config\PropsSettings.json are written only when they are missing. After that Trader only adds new settings with their default value and keeps your own values. Config\Prices.json and Config\Traders.json are written again each time the catalogue is saved, so they always match the editor (section 13).

The profile folder <server>\profiles\DayzHUB\DHUB_Trader with its four folders: Config, Data, Backups and Logs

5. Admin: the admin bar#

Open the admin bar with Insert. Go to the Trader page. You need the permission for each part:

  • trader.edit to edit traders.
  • trader.place to place, move and delete traders.
  • trader.vip to manage VIP players.

If your Core has no permission system, Core admins can do everything.

The page has four sections.

Traders#

A list of every trader. Each row has:

  • Go to: teleports you to the trader.
  • Move: puts the trader in the placer so you can set it down somewhere else.
  • Delete: asks "Sure?" first. Press again within about 4 seconds to confirm.

A trader shows up in this list only after you place it.

Admin bar, Trader page, Traders list with Go to / Move / Delete

Place a trader#

Type a Name, then pick a card:

  • NPC trader
  • Vending machine
  • NPC vehicle trader
  • Vehicle vending machine

You enter the placer. Keys:

  • Left mouse button: Place
  • Q and E: Rotate
  • PgUp and PgDn: Height
  • Right mouse button: Cancel

Placing saves at once.

Admin bar, Place a trader, with the four cards and the Name field
The placer on screen with the key hints (Place, Rotate, Height, Cancel)

Bins and boxes#

Place a Garbage bin or a Missing-item box. A list shows the ones you placed. "Kept items" shows items that players reported. Clear empties that list. More in section 9.

Admin bar, Bins and boxes section with Garbage bin, Missing-item box and Kept items

VIP players#

Type the player's Steam64 id. Then press one of the two buttons:

  • Give VIP 30 days
  • Give VIP permanent

Each VIP player then shows as a row in the list, with a Remove VIP button on that row.

More in section 8.

Admin bar, VIP players section with the Steam64 field, the two Give VIP buttons, and a VIP row with its Remove VIP button

6. Admin: the trader editor#

Aim at a trader and press F "Edit trader". The editor opens. It has six tabs: Catalog, Vehicles, Trader, Outfit, Placement and Currencies.

Aiming at a trader as an admin, showing the F "Edit trader" prompt

Save and discard#

The header shows "N unsaved changes" when you have edits. Two buttons:

  • Save & Apply: saves and puts the change live at once.
  • Discard: press it, then press again within a few seconds ("Press again to discard changes"). This stops accidents.

You must save or discard before you place a new trader.

The editor header with "N unsaved changes" and the "Press again to discard changes" confirm

Catalog tab#

This is where you build the store.

Click a number to type. Stock blank = unlimited. Sell blank = cannot be sold here.

Prices apply to all traders. Each trader then adjusts the price with its own tax, markup and sell-back share (see the Trader tab).

The prices are also kept in Config\Prices.json. You can edit them in Notepad instead. Then restart the server or use the Console action "reload catalogue" (TRADER_catalogue_reload). The editor and the file stay in sync. See section 13.

Categories. On the left is the category tree. You can add a Category and a Sub-category, Rename them (select the category, type the new name in the box and press Rename), and drag them to change the order. Icons come from Core. The side panel of a category also has a "Reputation needed (pts)" field. It is the same minimum-points lock as the POINTS chip players see in the shop (section 7), but for the whole category.

A category renamed from Beverages to Drinks: the new name shows in the list

Prices and Stock. Two views. Prices shows buy and sell prices. Stock shows stock numbers.

Filter. A filter box finds items fast.

Add items. Search for items, tick the ones you want and add them. Set a Start buy price and a Start sell price first. They are used for everything you add.

Item panel. Pick an item to edit it:

  • Buy price
  • Sell price (blank = cannot be sold here)
  • Stock max and Stock start
  • Max per buy (optional). The most of this item a player can buy in one purchase. Empty or 0 = use the global Max units per item. When both are set, the lower one applies.
  • Restock per hour
  • Dynamic price
  • Licence needed (type an id, or pick from the list of known ids)
  • Reputation needed (pts)
  • Move to...
  • Remove

Whole store. This button ticks every item in the store, not only the open category. Use it for bulk edits.

Bulk edit. With items ticked, pick "Set to" or "Change by %", enter a value, and press "Apply to N items". "Keep" leaves a value as it is.

Dynamic price. It only works for items that have a stock limit and Dynamic price switched on. A full shelf costs 90% of the list price. An empty shelf costs 150%. Stock is one level for each item, shared by all traders.

Licence and reputation. Licence needed locks an item until the player owns that licence. It only works when licences are on (LicencesOn in Config\Settings.json, section 13). When licences are off, the licence fields are hidden and no item is locked by a licence. Reputation needed locks it until the player has enough trade points. Players see the second one as "Trade points" in the shop. It is the same thing.

Editor, Catalog tab, category tree, item list and item panel
Editor, Add items search with ticked items and the Start buy price and Start sell price fields
Editor, Bulk edit with "Whole store" ticked and "Apply to N items"
Editor, Catalog in the Stock view
Editor, the category panel with Category, Sub-category, Rename

Vehicles tab#

Add vehicles and their prices for vehicle traders. See section 10.

Editor, Vehicles tab

Trader tab#

Settings for the open trader.

  • Name.
  • Kind: NPC or Vending.
  • Role: General, Vehicles or Second market.
  • Currency: Bank money or one of your own currencies (see the Currencies tab below). Players at this trader see prices, cash and cart in that currency and pay and get paid in its items.
  • Opens at (hour) and Closes at (hour). Server time. "00:00 to 00:00 means always open".
  • Tax and Markup: change the price at this trader.
  • Sell-back share: how much of the sell price this trader pays.
  • Safe zone: one row with an On or Off switch and the radius box (m) beside it. Off = no safe zone for this trader. A radius of 0 = automatic size (interaction radius + 12 m). It does NOT mean off. See "Safe zone" in section 7.
  • Prompt distance (m): how far away the trade prompt appears for this trader. Default 1.3 m, up to 3 m. Raise it for a trader behind a counter.
  • Licence needed and Reputation needed: for the whole trader.
  • Screen picker (vending machines only): the look of the machine screen.
  • Featured item: the item shown big on the home page. "Automatic" picks the best sale.
  • Workbench (shops): On or Off. On = the Workbench tab shows at this trader when it sells at least one weapon and a part that fits it. Off = it never shows. New traders and older files are On. Kept in Config\Traders.json as Workbench.
  • Categories sold here: tick what this trader sells. Tick all and Untick all help.
  • Sells (vehicle traders): three switches, Land, Water and Air. Each is On or Off. Off means this trader does not sell and does not buy back vehicles of that type. See section 10.
  • VIP machine (vending machines only). See section 8.

The rules of each trader are also kept in Config\Traders.json: hours, tax, markup, sell-back share, safe zone and safe radius. The editor and the file stay in sync. When you press Save & Apply, the file is written at once. When you edit the file, the change is applied at the next restart or with the Console action "reload catalogue" (TRADER_catalogue_reload). See section 13.

The map marker of a trader has no field in this tab. Set it in Config\Traders.json or with the Console (section 11).

Below that is the block TRADE POINTS - ALL TRADERS. It sets the same for every trader:

  • Trade points on or off.
  • Money per point.
  • Daily cap per player.

These three values are kept in Config\Settings.json (PointsOn, PointsMoney and PointsDayCap). Trade points are off by default.

The editor also has a global row "Max units per item". It is the most of one item a player can buy in one purchase, for every trader. Default 20, from 1 to 100. It is kept in Config\Settings.json (MaxUnitsPerItem). An item can have a lower limit of its own (Max per buy, Catalog tab).

When a player tries to trade at a closed trader, a small message "This trader is closed" shows in the top-right corner of the screen.

Trader tab: the Currency dropdown with Bank money and Nails
Trader tab: the Currency set to Nails and saved
Editor, Trader tab with Role, hours, tax, markup, sell-back share, safe radius
Editor, Trader tab: Licence needed, Reputation needed and the TRADE POINTS - ALL TRADERS block
A closed trader: the small message "This trader is closed" in the top-right corner
Trader tab: the Workbench On/Off switch under the categories

Outfit tab#

For NPC traders only. Choose the skin, the 13 wear slots, the hands and the attachments. This is how your trader looks.

Editor, Outfit tab with skin, wear slots, hands and attachments

Placement tab#

  • Open trader card: shows the kind (read only), the Name, and Teleport to trader. Vehicle traders also show their pads, with Add pad, the pad surface (Land, Water, Helipad) and Show cones (On or Off). A pad must stay within 30 m of its trader (PadMaxDistance in Config\Settings.json). Pads of one trader may not overlap (section 10).
  • Orange PLACE NEW card: + Place NPC and + Place vending machine. These start the placer.
  • SAVE TRADER.
  • HOW IT WORKS: a short help box.
Editor, Placement tab with the Open trader card and the orange PLACE NEW card

Currencies tab#

Here you create your own currencies. A currency is made of in-game items, for example Nails. A trader can use it instead of bank money. Players then buy and sell with those items.

Press Add currency. The list on the left shows your currencies (up to 12) and how many traders use each one. Pick a currency to edit it:

  • Name. The name of the currency.
  • Sign before the amount. Optional, up to 6 characters. It is written in front of the number.
  • Text after the amount. Optional. It is written after the number.
  • If you leave the sign and the text empty, the name is shown, cut to 6 characters.
  • This much bank money costs this many units. This is the exchange rate. For example 10 bank money = 1 unit means a price of 100 in bank money costs 10 units.
  • Items of this currency. Search for any item or type a class name and add it. A currency can have up to 8 items. For each item set its Value of one, counted in units. For example Nail = 1 unit.

A Price preview under the rate shows three example prices in bank money and what they cost in your currency. It updates while you type, so you can check the rate before you save.

You keep one price list. Prices are still written in bank money, in the Catalog. A trader that uses a currency converts every price with the rate. Buying rounds the price up. Selling rounds the payout down to the smallest item value.

Press Save & Apply to put the currencies live. Remove currency deletes the selected one. A trader that used it goes back to bank money.

Then open the Trader tab of each trader that should use the currency and pick it in the Currency dropdown.

The currencies are also kept in Config\TraderCurrencies.json. The editor and the file stay in sync (section 13).

Currencies tab with no currency yet and the Add currency button
A new currency with its fields, the price preview and the items list
The Nails currency with its item and the price preview

7. Players: how to trade#

Open a shop#

Stand close to an NPC trader or a vending machine. Press F "Trade". The shop opens.

The shop closes by itself when you walk away or when you close the menu.

You need a Banking account. If you have none, the shop says "You have no bank account". Make one at an ATM.

An NPC trader with the Trade prompt
The shop home page with the featured item

Safe zone#

A safe zone belongs to one trader (an NPC or a vending machine). The admin switches it On or Off for each trader in the trader editor. Inside a zone that is On, players cannot hurt each other. Infected, animals and Expansion AI that enter it are removed while players are nearby. A "Safe zone" marker shows on your screen when you are inside. This is not the map marker from section 11.

  • Off = this trader has no safe zone.
  • Radius 0 = automatic size: the interaction radius plus 12 m. It is not off.
  • You can set any radius up to 30000 m.
  • Zones that are On combine. One central trader with a big radius can cover a whole market, while the other traders there stay Off.

A trader with the zone Off shows no "Safe zone" marker.

Buy#

The Buy tab shows categories on the left and items in the middle.

  • Click a category to see its items.
  • Use the filter chips: In stock, On sale, I can afford, Favourites, My licences.
  • Sort cycles through Default, Name A to Z, Price low to high and Price high to low.
  • Search with the search box.
  • Click the star on an item to make it a favourite. Favourites are saved for you.
  • Compare: pick one item, then press "Pick second" on another.
  • Click an item to see its details and a 3D preview. Choose a number. The most you can pick is the Max units per item of the server (default 20, up to 100), or the Max per buy of that item when it is lower.
  • Add it to the cart. A cart holds up to 24 lines.
  • Open the cart and Confirm.

If your balance is too low, the shop tells you and nothing is taken.

In the cart, the Max button fills in the largest amount you can afford. It stays inside the limits (Max units per item and Max per buy) and the stock of the shop.

Ammo lines show the total rounds, for example "x50 = 1000 rounds".

Buy tab: categories, item grid, filter chips and sort
Item detail with preview, price and number
The cart with the Confirm button
The shop saying the balance is too low
Compare view of two items
Favourites filter and search results

Traders with their own currency#

At a trader that uses one of the server's own currencies, everything is shown in that currency: the prices, your cash, the cart total and the cash left. Your cash is the number of that currency's items you carry. You pay with those items, and a sale pays you in them.

A shop priced in Nails: your cash and the prices are shown in Nails
The cart in Nails, with the Nails you carry and the cash left
The order result in Nails

Order result#

After Confirm you see a result:

  • Completed: everything was delivered.
  • Partly done: some units were delivered and the rest was refunded.
  • Refunded: nothing was delivered and all money came back.
  • Rejected, Pending and Under review can also appear. "Under review" means an admin will look at it.

Refunds are exact. You get back what you paid for the units you did not receive.

Order result: Completed
Order result: Partly done
Order result: Refunded

Full inventory#

Buying is all or nothing. If your inventory cannot hold the whole order, the buy is refused before any money is taken. The shop says "Not enough room: only X of Y fit. Nothing was charged." Make space, or buy less, and try again. Items are never dropped on the ground. This works with DayzHUB Banking and with LB banking.

Sell#

The Sell tab shows what you carry and what it is worth. Pick items, or use Sell all, then press Confirm. You are paid into your Banking account.

If the daily trade-points cap is reached, the shop warns you before you confirm. The sale still goes through; you just earn no more points that day.

The payout depends on the condition of the item:

ConditionPaid
Pristine100%
Worn75%
Damaged50%
Badly damaged25%

A partly filled stack or bottle pays less. The trader's sell-back share also applies. The admin sets it in the Trader tab or in Config\Traders.json (SellPercent).

The trader will not take:

  • Ruined items.
  • Items that have attachments or contents inside. This includes parts mounted on a weapon, such as a scope. Take them off or empty them first.
  • Rotten food.
  • Empty magazines.
  • Empty stacks and empty bottles.
  • Anything the trader does not list, or that has no sell price.

Items that are worth less than the smallest note of the currency cannot be paid out. They are marked "Worth too little" on the Sell page and cannot be picked. The line "Rounded down to the smallest note" reminds you that payouts are rounded down.

The Sell page: items with their payout, and items marked "Worth too little"
Selling at a Nails trader: the basket with the total payout
The sale result, paid in Nails
Sell tab with items and Sell all
The sale result with the payout

Workbench#

The Workbench tab lets you fit parts to a weapon. Pick the weapon, pick a part, and see if it fits before you pay.

The tab shows only at traders that sell at least one weapon and a part that fits it, and only when the admin has not switched the Workbench off for that trader. Vehicle traders and the Second market never show it.

Workbench tab with a weapon and the kit list
Workbench showing a part that fits

Licences#

Licences are optional and off by default. The admin turns them on with LicencesOn in Config\Settings.json. When licences are off, the Licences tab is not shown and no item needs a licence.

When licences are on, the Licences tab shows the licences needed at this trader. Each one shows Owned or Not owned. The licences of each player are kept in Data\Players.json. Admins give and take licences with the Console (section 14).

Items that need a licence carry a LICENCE chip. The card says "Needs licence: %1". Items that need trade points carry a POINTS chip and say "Needs %1 trade points".

Licences tab with Owned and Not owned
Item cards with the LICENCE chip and the POINTS chip

Trade points#

When the admin turns trade points on, you earn points for what you buy and sell. More money traded means more points. There is a daily cap. It resets at midnight, server time.

Selling an item you bought less than 10 minutes ago earns nothing.

Your points show in the shop header. Some items and traders need a minimum number of points. When trade points are off, no points are earned and no point locks apply.

The admin turns trade points on in the Trader tab, or with PointsOn in Config\Settings.json. The points of each player are kept in Data\Players.json.

Second market#

A trader with the role Second market is a place where players sell to each other. It has four tabs:

  • Market: browse listings from other players.
  • Sell item: list one of your items at your own price.
  • My listings: see and take back your listings.
  • Claim box: collect items you bought or got back.

The admin sets the rules in Config\FleaConfig.json (section 13):

  • A fee on each sale. The default is 5%.
  • A lowest and a highest price. The defaults are 10 and 500000.
  • A number of listings for each player. The default is 5.
  • How long a listing runs. The default is 72 hours.
  • Blocked items. Weapons are blocked by default.
  • Which traders run the market. By default, every trader with the role Second market.

Some items can never be listed:

  • Ruined items. The market says "This item cannot be restored later".
  • Bottles and other liquid containers that are empty or only part full. Only a full one can be listed. Same message.
  • Food that is partly eaten or no longer raw, and items that go bad over time. Same message.
  • Items with attachments or contents inside. The market says "Empty the item first".
  • Blocked items. The market says "This item cannot be sold here".

Most of these items do not even show in the Sell item list.

If your inventory is full when you claim an item, the market says "Not enough room in your inventory". Make space and claim again.

Second market, Market tab
Second market, Sell item tab
Second market, My listings tab
Second market, Claim box tab

8. Vending machines and VIP#

A vending machine is a trader without an NPC. Place it with the admin bar or the editor Placement tab. Its home page shows a big screen, sub-category cards and a grid of items.

A vending machine storefront with sub-category cards and the item grid

VIP machines#

You can mark a vending machine as a VIP machine in the Trader tab. Only players on the VIP list can buy there. All other machines and NPC traders work as normal.

  • There is one VIP list for the whole server.
  • Each player is on it permanently or for a number of days. When the days are over, the player is removed by itself.
  • VIP gives access only. There is no discount.
  • A player who is not VIP can still look around. Everything is locked. The shop says "VIP ONLY" and "Only VIP members can trade here". The machine says "This machine is for VIP members."
  • A VIP member sees "VIP - Nd left" in the shop.

Give VIP in the admin bar, VIP players section: type the Steam64 id and press Give VIP 30 days or Give VIP permanent. To take it away, press Remove VIP on that player's row. You can also do this with the Console (section 14).

The VIP list is kept in Data\Players.json. Do not edit it by hand. Use the admin bar or the Console.

A non-VIP player at a VIP machine: everything locked, "VIP ONLY"
A VIP member at a VIP machine with "VIP - Nd left"

9. Garbage bin and Missing-item box#

Garbage bin#

Place it from the admin bar. A player aims at the bin and presses F "Open garbage bin", puts items inside, then presses F "Close and destroy contents". The items are gone for good. Anyone within 3 m can close the bin, and that also destroys what is inside.

The bin also closes by itself and destroys its contents when nobody has been within 5 m for about 60 seconds. You set this in Config\PropsSettings.json with BinAutoCloseSeconds and BinAutoCloseDistance. Set BinAutoCloseSeconds to 0 to turn it off.

The Garbage bin open, with the "Close and destroy contents" button

Missing-item box#

For a player who lost an item to a bug.

  1. Aim at the box and press F "Report item". The box opens, and the "Missing item report" window opens with it.
  2. Put the item you want to report into the box.
  3. Press "Send report" in the window.

The window then says "Report sent. Thank you." If that item was already reported, it says "Already reported. Thank you." instead.

The report goes to the admins on Discord. The item stays in the box under "Kept items" in the admin bar until you clear it.

  • The box takes single items only. Stacks, and items with attachments or contents inside, are refused.
  • Only the player who opened the box can use it and take loose items out.
  • Loose items that are not reported go back to the player when the box closes. If the inventory is full, they are dropped at the player's feet.
  • The box closes by itself after 2 minutes with no activity, or when the player walks more than 3 m away.
  • A daily limit and a wait between reports stop spam (PerPlayerPerDay and CooldownSeconds).

To use the Discord message, put your webhook address in Config\PropsSettings.json (key MissingWebhookUrl). It must start with https. Without it, the window says "Reports are not set up on this server."

The Missing-item box open after the first F "Report item", with the item inside and the report window next to it
The "Missing item report" window with the "Send report" button

10. Vehicle traders#

Set the trader Role to Vehicles. It then sells cars, boats and helicopters from the Vehicles tab.

What a trader sells: Land, Water, Air#

In the Trader tab of a vehicle trader, the Sells block has three switches: Land, Water and Air. Each is On or Off. Off means this trader does not sell and does not buy back vehicles of that type. This way one trader can sell only cars, another only boats and another only helicopters. The switches are kept in Config\Traders.json (SellLand, SellWater, SellAir).

Trader tab of a vehicle trader: the Sells block with Land set to Off

Pads#

A vehicle is delivered on a pad. Add up to 8 pads for each trader. A pad is one of three types: Land, Water or Helipad. Each pad has a size (width and length). Set pads on the Placement tab. A pad must be within 30 m of its trader. You can change this distance with PadMaxDistance in Config\Settings.json (10 to 100 m). Cones show the pad to players near it. In the editor, the pad row shows a red dot while something stands on it. You can hide the cones of a trader with Show cones Off.

Pads of one trader may not overlap. Keep a small gap of about half a metre between them. If a pad touches another one, the editor refuses it with the message "Blocked Pad 2" (the number of the pad in the way). Move the pad or make it smaller.

Helicopters need Expansion Vehicles.

A bought vehicle stays on the server after a restart only if your mission types.xml has an entry with a lifetime for that vehicle class. This is normal DayZ persistence.

Green pad cones mark each vehicle pad. In the editor, a red dot on a pad row means something is blocking that pad.

Buy#

The vehicle shop shows a showroom. Pick a vehicle and press "BUY - DELIVER TO PAD". The pad must be free. If it is blocked, the shop says "The vehicle pad is blocked, move whatever stands there" and you pay nothing. The vehicle appears on the pad. It comes with fuel. The fuel level is a percent that you set (default 100).

Vehicle showroom with the BUY - DELIVER TO PAD button
Pad blocked message
Vehicle delivered on the pad

Sell back#

Use the Sell tab at the vehicle trader. Only vehicles parked inside one of the trader's pads show up. If none is there, the list is empty. Rules:

  • Only the last driver of the vehicle can sell it. Otherwise the shop says "Only the last driver can sell it".
  • It must not be destroyed.
  • Nobody may sit inside.
  • The cargo must be empty.
  • The price follows the condition and the parts. It is never more than the current buy price.

Vehicle traders have no stock numbers.

Vehicle Sell tab with a vehicle and its payout

11. Map markers#

Each trader can show a marker on the map, with a name and an icon you choose. Markers are on by default.

Where the markers show:

  • The vanilla DayZ map: always.
  • The Expansion map: needs Expansion Navigation.
  • The LB map: needs LB Groups.
  • The DayzHUB Console live map, as "Trader - name", if you use DayzHUB Console.

There is no marker field in the in-game editor. You set markers in one of these places:

  • Config\Traders.json, for each trader: Marker (1 = show, 0 = hide), MarkerName and MarkerIcon. Apply the change with a restart or the Console action "reload catalogue" (TRADER_catalogue_reload).
  • The Console action "show or hide a trader on the map" (TRADER_marker_set). Pick the trader, on or off, a name (up to 40 characters, empty = the trader's name) and an icon.
  • MapMarkers in Config\Settings.json. Set it to 0 to hide every marker at once.

The name is the trader's name unless you type another one. Icons: store, station, camp, factory, police, tourism, transmitter, monument, viewpoint and tsign. The default is store, and station for vehicle traders.

A trader shows on the map only after you place it, and only while Trader runs normally on your server. While the licence is paused, the markers are hidden.

Traders on the DayzHUB Console live map, shown as "Trader - name"

12. Logs and your safety net#

Logs are in <profile>\DayzHUB\DHUB_Trader\Logs\. DayzHUB Core writes them. By default they are deleted after 30 days. You change this with the Core setting keepLogsDays (0 = keep them forever).

  • trader-<date>.log: general messages and errors.
  • tx-<date>.log: money steps.
  • trades-<date>.log: every buy and sell.
  • edit-<date>.log: every change an admin made.
  • props-<date>.log: bins and boxes.

Backups:

  • Each time Trader saves a file, it keeps a copy in Backups\<date>\. It makes at most one copy of a file every 10 minutes.
  • The newest 7 days are kept. Older day folders are deleted by themselves.
  • If a file is damaged, Trader loads the newest good copy by itself.
  • The pre-migration copy from the update is never deleted.

How a buy is kept safe:

  • The order is written down before any money moves.
  • The server decides the price and the distance. The client cannot change them.
  • Refunds are exact.
  • One order at a time for each player, with a short wait.
  • Limits: 24 lines in a cart, and at most the Max units per item of the server (default 20, up to 100) of each item. An item can have a lower Max per buy.
  • If the inventory cannot hold the whole order, the buy is refused before any money is taken.

If the server stops during an order, the order is finished or refunded at the next start.

13. Settings and files#

All files are in <profile>\DayzHUB\DHUB_Trader\, in four folders. Most things are easier to change in the editor.

The Config folder (files you may edit)#

FileWhat it holds
Config\Settings.jsonTrade points, licences on or off, map markers on or off, the pad distance and the Discord webhook for the trade log.
Config\FleaConfig.jsonSecond market rules.
Config\PropsSettings.jsonGarbage bins and Missing-item boxes.
Config\Prices.jsonThe prices and stock of every item, by category.
Config\Traders.jsonThe rules and the map marker of every trader.
Config\TraderCurrencies.jsonYour own currencies (see the Currencies tab, section 6).

Settings.json, FleaConfig.json and PropsSettings.json are made with default values on the first start. After that Trader never overwrites them. When an update brings a new setting, it is added with its default value and your own values stay. Edit these three files while the server is stopped. If Settings.json is not valid JSON, Trader does not save over it. Fix the file and start again. If FleaConfig.json cannot be read, the Second market stays off.

Prices.json and Traders.json work in a different way. See their sections below.

The Data folder (do not edit)#

FileWhat it holds
Data\Catalogue.jsonTraders, categories, items, prices and sales.
Data\Players.jsonLicences, trade points and the VIP list.
Data\Stock.jsonStock levels.
Data\Flea.jsonSecond market listings and the Claim box.
Data\Journal.jsonThe order journal.
Data\VehicleOwners.jsonVehicle ownership records.
Data\Props.json, Data\PropsKept.json, Data\MissingItems.jsonBins, boxes and the reported items.
Data\Favourites\<steamid>.jsonA player's favourites.

The Backups and Logs folders#

FolderWhat it holds
Backups\<date>\Daily copies of your files. The newest 7 days are kept.
Backups\<date>\pre-migration\The copy made when the update moved your old files. It is never deleted.
Logs\The logs from section 12.

Config\Settings.json#

KeyMeaningDefault
VersionFile version. Do not change it.2
WebhookUrlDiscord address for the trade log. https only.empty
PointsOn1 turns trade points on.0
PointsMoneyMoney per point.100
PointsDayCapDaily cap per player.50
PointsMaxMost trade points a player can have.1000000
LicencesOn1 turns licences on (Licences tab, licence locks).0
PadMaxDistanceLongest distance from a vehicle trader to its pads, 10 to 100 m.30
MaxUnitsPerItemMax units per item: the most of one item a player can buy in one purchase, 1 to 100. An item can set a lower Max per buy in the editor.20
MapMarkers1 shows the trader markers on the map, 0 hides them all (section 11).1

Config\FleaConfig.json (Second market)#

KeyMeaningDefault
VersionFile version. Do not change it.2
Enabled1 = on.1
MinPriceLowest price.10
MaxPriceHighest price.500000
FeePercentFee on a sale, in percent (up to 50).5
MaxListingsListings for each player (up to 8).5
ListingHoursHow long a listing runs, in hours (up to 720).72
TradersTrader ids that run the market. Empty = every Second market trader.empty
BlockedClassesItem classes that cannot be listed.empty
BlockedKindsKinds of items that cannot be listed. Weapon_Base blocks all weapons.Weapon_Base

Ruined items, liquid containers that are not full, and items with attachments or contents inside can never be listed, whatever these settings say (section 7). If the file cannot be read, the Second market is off.

Config\PropsSettings.json (bins and boxes)#

KeyMeaningDefault
MissingWebhookUrlDiscord address for reports. https only.empty
ServerNameName shown in reports.empty
CooldownSecondsWait between reports, 10 to 3600 seconds.60
PerPlayerPerDayReports for each player each day, 1 to 100.10
RepeatHoursWait before the same item can be reported again, 0 to 168 hours.24
MessageMaxLongest report text, 0 to 200 characters.200
BinAutoCloseSecondsThe bin closes by itself after this time. 0 = off, else 20 to 600 seconds.60
BinAutoCloseDistance...when nobody is within this distance, 2 to 50 m.5
BinBlockedItems the bin refuses.empty

The Missing-item box always closes after 2 minutes with no activity. This time is fixed.

Config\Prices.json#

The prices of every item, grouped by category. You can edit them in Notepad instead of the editor.

KeyMeaning
Version, HelpFile version and a short help text. Leave them as they are.
CategoriesOne block for each category, with its Category name and its Items.
ClsThe item class name.
BuyBuy price. 0 = not for sale.
SellSell price. 0 = the trader does not buy it. Sell may not be above Buy.
StockMaxStock max. 0 = unlimited stock.
StockBaseStock start: the stock after a restart.
RestockPerHourUnits added each hour.
NoDyn1 = no dynamic price for this item.
MinPointsReputation needed (trade points).
LicenceLicence needed (licence name, or empty).

How to change prices with the file:

  1. Open Config\Prices.json in Notepad, change the numbers and save.
  2. Restart the server, or use the Console action "read Catalogue.json, Prices.json and Traders.json again" (TRADER_catalogue_reload).
  3. The editor now shows the new prices.

Moving a line to another category in the file does not move the item. Add and remove items in the editor or the Console.

Trader applies the file only when it has changed. A line it cannot read is skipped and noted in the Trader log; the rest is applied. A file that is not valid JSON is not applied at all and is not overwritten, so you can fix it.

Apply your file edits before you press Save & Apply in the editor. Each save in the editor writes Prices.json and Traders.json again from the catalogue. If your file edits were not applied yet, Trader first keeps a copy of your edited file in Backups\<date>\ (named kept-Prices.json or kept-Traders.json), so your work is not lost.

Config\Traders.json#

The rules and the map marker of every trader. It works like Prices.json: edit, save, then restart or use "reload catalogue". Traders that are not placed yet are not in the file.

KeyMeaning
Version, HelpFile version and a short help text. Leave them as they are.
IdThe trader id. Do not change it.
NameThe trader's name.
CurrencyThe Id of a currency from TraderCurrencies.json. Empty = bank money.
SellPercentSell-back share: how much of the sell price this trader pays, 1 to 200%.
MarkupPercentMarkup, -50 to 500%.
TaxPercentTax, 0 to 100%.
OpenHour, CloseHourOpening hours, 0 to 23, server time. The same hour twice = always open.
SafeZone1 = safe zone on, 0 = off.
SafeRadiusSize of the safe zone, 0 to 30000 m. 0 = the interaction radius plus 12 m.
InteractRadiusInteraction radius: how close a player must be to use the trader, 2 to 50 m.
PromptDistanceHow close a player must stand to get the trade prompt, 1.3 to 3 m. Empty = 1.3, higher values become 3.
SellLand, SellWater, SellAirVehicle traders: 1 = sells and buys back that vehicle type, 0 = does not.
Marker1 = show the trader on the map, 0 = hide it (section 11).
MarkerNameName on the map. Empty = the trader's name.
MarkerIconMap icon: store, station, camp, factory, police, tourism, transmitter, monument, viewpoint or tsign. Empty = store, or station for vehicle traders.
WorkbenchShops only, the last key of a block. 1 = the Workbench tab shows when this trader sells a weapon and a part that fits it (default), 0 = it never shows. A missing key counts as 1. Same as the Workbench switch in the editor.

Config\TraderCurrencies.json#

Your own currencies. You normally make them in the Currencies tab. If you edit the file, restart the server afterwards.

KeyMeaning
VersionFile version. It is 1.
IdThe currency id. A trader refers to it. Do not change it.
NameThe currency name.
PrefixSign before the amount. Up to 6 characters.
SuffixText after the amount.
RateMoney, RateUnitsThe exchange rate. RateMoney bank money = RateUnits units. For example 10 and 1 means 10 bank money = 1 unit.
ItemsThe items of the currency, up to 8. Each has Cls (the item class name) and Value (what one is worth, in units).

The limits are 12 currencies, 8 items for each currency and 6 characters for the sign.

14. DayzHUB Console#

If you use DayzHUB Console, Trader sends it events and gives it actions you can press from the website. There are 30 actions. Each one shows in the Console as "Trader: " followed by its name.

GroupActionWhat it does
Statusstatusstatus
Statussafe_statussafe zone status
Ordersjournal_listlist the open purchases
Ordersretry_owedretry the refunds and payouts owed now
Ordersreview_refund *refund a purchase that needs review
Ordersreview_drop *close a purchase that needs review, no refund
Storecatalogue_reloadread Catalogue.json, Prices.json and Traders.json again
Storetrader_listlist the traders
Storeprice_setset the prices of an item
Storeitem_addadd an item to the catalogue
Storeitem_remove *remove an item from the catalogue
Traderssafe_setset the safe radius of a trader
Tradersrole_setmake a trader a general trader, a vehicle trader or a Second market
Tradersfeatured_setset the featured item of a trader
Tradersmarker_setshow or hide a trader on the map
Tradersrules_setedit the rules of a trader
Playerslicence_grantgive a player a licence
Playerslicence_revoke *take a licence from a player
Playerspoints_setset the trade points of a player
Playersplayer_infoshow licences, points and VIP of a player
VIPvip_grantgive a player VIP for the VIP vending machines
VIPvip_revoke *take VIP from a player
VIPvip_listlist the VIP players
Bins and boxesprop_listlist the garbage bins and missing-item boxes
Bins and boxesprop_addplace a garbage bin or missing-item box
Bins and boxesprop_movemove a garbage bin or missing-item box
Bins and boxesprop_remove *remove a garbage bin or missing-item box
Bins and boxesprop_reloadread Props.json again
Missing itemsmissing_listlist the reported missing items
Missing itemsmissing_clear *clear reported missing items

Actions marked * are marked as risky in the Console. Check twice before you run them.

The code of each action in the Console is TRADER_ followed by the action, for example TRADER_marker_set.

Edit the rules of a trader (rules_set): trader, sell-back share 1 to 200%, markup -50 to 500%, tax 0 to 100%, hours as HH-HH, safe zone keep, on or off, safe radius 0 to 30000 m, interaction radius 2 to 50 m.

Show or hide a trader on the map (marker_set): trader, on or off, a name (up to 40 characters, empty = the trader's name) and an icon (section 11).

The licence actions answer "licences are off" while licences are off. While the Trader licence is paused, only status, list the open purchases, retry and the two review actions work.

Every trader with a map marker also shows on the Console live map (section 11).

Events sent to Console: buys, sells, Second market sales, orders that need attention, and VIP changes.

15. FAQ and troubleshooting#

  • The shop says "You have no bank account". The player has no Banking account. Make one at an ATM.
  • The shop says "Your bank account is full". A payout cannot be added to the account. The item is kept. Spend or move some money and try again.
  • I placed a trader but it has no items. Trader starts clean. Add items to the categories in the Catalog tab, tick the categories in the Trader tab, and press Save & Apply.
  • My NPC trader stands in underwear. New NPCs have no outfit. Dress them in the Outfit tab.
  • Players do not see a Licences tab. Licences are off by default. Set LicencesOn to 1 in Config\Settings.json while the server is stopped.
  • My vehicle does not show in the Sell tab. Park it inside one of the trader's pads (inside the cones).
  • An item does not show in the Sell tab. The sell price is blank, or the item is ruined, has attachments or contents, is rotten food, or is empty. Take off mounted parts, such as a scope, first.
  • My buy was refused with "Not enough room". That is the rule. The whole order must fit. Nothing was charged. Make space or buy less. See section 7.
  • I cannot pick a higher number for an item. The number is limited by Max units per item (default 20) and by the Max per buy of that item. The lower one applies. An admin can change both in the editor.
  • I changed a price and nothing happened. In the editor: press Save & Apply. The header shows "N unsaved changes" until you do. In Config\Prices.json: restart the server or use the Console action "reload catalogue" (TRADER_catalogue_reload).
  • I edited Prices.json and my change is gone. The editor was saved before your file edit was applied. Your edited file is kept in Backups\<date>\kept-Prices.json. Copy your change back, then restart or use "reload catalogue" before you save in the editor again.
  • The trade points do nothing. They are off by default. Turn them on in the Trader tab, in the TRADE POINTS block, or with PointsOn in Config\Settings.json.
  • A vehicle will not deliver. The pad is blocked. Remove what stands on it. In the editor, a blocked pad shows a red dot in its row.
  • The editor says "Blocked Pad 2" when I set a pad. The pad overlaps another pad of the same trader. Move it or make it smaller. Keep about half a metre between pads.

My trader is not on the map. Check these in order:

  • MapMarkers is 1 in Config\Settings.json.
  • Marker is 1 for that trader in Config\Traders.json, or use the Console action "show or hide a trader on the map".
  • After a file edit, restart the server or use "reload catalogue".
  • The trader is placed.
  • For the Expansion map you need Expansion Navigation. For the LB map you need LB Groups. The vanilla map always shows the markers.
  • The Second market refuses my item. Ruined items are never listed. Bottles and other liquid containers are listed only when full. Partly eaten or cooked food cannot be listed either. The market says "This item cannot be restored later". If it says "Empty the item first", take off the attachments or empty it. If it says "This item cannot be sold here", the admin blocked that item.
  • Players can fight at a trader. Check the Safe zone row in the Trader tab. It must be On, and the radius must be big enough (0 = interaction radius + 12 m). The on-screen "Safe zone" marker shows the zone.
  • A player cannot sell a vehicle. Only the last driver can sell it. Nobody may sit inside, and the cargo must be empty.
  • Where do I find out who changed a price? In Logs\edit-<date>.log.

16. Compatibility#

  • DayZ 1.30.
  • Needs DayzHUB Core 1.0.11 or newer and DayzHUB Banking. On LBmaster money servers, use the optional Trader LB bridge (Extra\@DayzHUB_TraderLBServer) instead of Banking. It is a server mod only (-servermod), never in -mod, and never together with DayzHUB Banking.
  • Works with any map.
  • Map markers: the vanilla DayZ map always shows them. The Expansion map shows them with Expansion Navigation. The LB map shows them with LB Groups.

Support: dayzhub.net and the DayzHUB Discord.

Settings explorer#

Every setting of this mod in one list. Type to narrow it down. Click a name to copy it.

Settings.json
2

File version. Do not change it.

empty

Discord address for the trade log. https only.

0

1 turns trade points on.

100

Money per point.

50

Daily cap per player.

1000000

Most trade points a player can have.

0

1 turns licences on (Licences tab, licence locks).

30

Longest distance from a vehicle trader to its pads, 10 to 100 m.

20

Max units per item: the most of one item a player can buy in one purchase, 1 to 100. An item can set a lower Max per buy in the editor.

1

1 shows the trader markers on the map, 0 hides them all (section 11).

FleaConfig.json
2

File version. Do not change it.

1

1 = on.

10

Lowest price.

500000

Highest price.

5

Fee on a sale, in percent (up to 50).

5

Listings for each player (up to 8).

72

How long a listing runs, in hours (up to 720).

empty

Trader ids that run the market. Empty = every Second market trader.

empty

Item classes that cannot be listed.

Weapon_Base

Kinds of items that cannot be listed. Weapon_Base blocks all weapons.

PropsSettings.json
empty

Discord address for reports. https only.

empty

Name shown in reports.

60

Wait between reports, 10 to 3600 seconds.

10

Reports for each player each day, 1 to 100.

24

Wait before the same item can be reported again, 0 to 168 hours.

200

Longest report text, 0 to 200 characters.

60

The bin closes by itself after this time. 0 = off, else 20 to 600 seconds.

5

...when nobody is within this distance, 2 to 50 m.

empty

Items the bin refuses.

Check your settings file#

Paste a settings file. The checker finds JSON mistakes, keys it does not know (with a suggestion for typos), values of the wrong kind and numbers outside the documented range. It runs in your browser: nothing is uploaded.

Something missing or wrong on this page? Tell us in the DayzHUB Discord and we fix it.

DayZ Hub

การตั้งค่าคุกกี้

เลือกว่าจะให้ DayZ Hub นับการเข้าชมของคุณด้วยระบบวิเคราะห์แบบไม่ใช้คุกกี้ของเราหรือไม่ คุณเปลี่ยนได้ทุกเมื่อ

คุกกี้ที่จำเป็นจำเป็นสำหรับการเข้าสู่ระบบ ความปลอดภัย ภาษาของคุณ และตัวเลือกนี้
เปิดใช้งานเสมอ
การวิเคราะห์ — Plausibleนับการเข้าชมหน้าโดยไม่ใช้คุกกี้หรือข้อมูลส่วนบุคคล เพื่อให้เราปรับปรุง DayZ Hub ได้