Skip to content

DayZ Studio 0.1.0-alpha.3 - money and traders

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Oct 21:28
· 18 commits to main since this release

Money and traders

DayZ has no money, so the third alpha brings some. Your quests can now pay out dollar bills, and any NPC can run a store where players buy gear with those bills or sell their loot.

🧪 Still an alpha. Please tell us what breaks or confuses you.

Already on alpha.1 or alpha.2? DayZ Studio will offer this update by itself when it starts (or File ▸ ⟳ Check for updates). Your projects, keys, workspace profiles and map data are kept.

Running a server with a mod you made? Rebuild it and update it on your server (and on the Workshop) to give your players the bills and stores.


What's new

💵 Dollar bills. Every mod you build now includes $1, $5, $10, $20, $50 and $100 bills. They are real items, not a number on the screen:

  • they stack (up to 1,000 bills) and split like rags,
  • each one has its own colour, so you can tell a $5 from a $50 in your inventory,
  • players can drop them, loot them from bodies and lose them when they die.

Give them out like any other item: as a quest reward ("$20 × 5"), from a conversation reply or as a gift.

🎨 Your own banknotes. Don't like Studio's "Chernarus Reserve Notes"? Put your own pictures in Documents\DayZStudio\Assets\Currency (for example dollar_20_front.png and dollar_20_back.png) and your next build uses them.

🛒 Traders. File ▸ 🛒 Traders & money is where you set up a store. Each row of its price list has:

  • what the player pays, and what the trader pays to buy the item back,
  • how many pieces one trade covers ("5.56 rounds × 20"),
  • a stock limit, refilled when the server restarts (leave it empty for endless),
  • a category heading (Food, Medical, Ammunition…),
  • an optional 🔒 lock: any condition, such as "only for players the Survivors see as Friendly", plus the reason players see.

Then open an NPC in the Quests view and pick the store in its Trader field. Its conversation gets a "Let's trade." reply.

🖥 The trade screen in game. It has two columns: what the trader sells on the left, what it will buy from you on the right, and your money at the top.

  • Click or press Enter to trade one, or hold Shift to trade ten.
  • Use the arrow keys or the mouse to move around, and Esc to close.
  • The trader takes the biggest bills that fit and gives change back in bills.
  • Only items that aren't ruined, aren't being worn and are empty can be sold, so nobody sells their backpack with the loot still inside.

🏳 Factions matter. An NPC with a faction won't trade with players that faction sees as Hostile. Friendly tiers get their discount on everything the NPC sells, and the trade screen shows it ("Friendly: 10% off").

🪙 Your own currency. If your server uses a mod with other money (coins, bottle caps, rubles…), add it under Custom currencies. It can be a set of money items, each with its value, or a player stat used as a bank balance. Then pick it as the store's currency.

🏕 Try it in the Showcase. The Showcase template (File ▸ Templates & examples) now pays $100 for the first quest and gives Mirek a camp store: food, bandages, ammo, a few magazines, and Morphine for friends of the camp only. Mirek also buys your apples.

Also new: stackable items in rewards and gifts are now given as an amount: "Rag × 2" gives two rags, no longer two full stacks.

For veterans and modders: the technical details
  • Bills: classes DSQ_Dollar1 … DSQ_Dollar100 on DSQ_Money_Base : Inventory_Base (canBeSplit = 1, varQuantityMax = 1000), one model with a camo hidden selection and a texture per denomination. tools/money.py draws the textures, writes the MLOD in Python and converts both with DayZ Tools (ImageToPAA, binarize). The result is cached per mod, so only the first build takes about a minute longer. Your own artwork stays on your PC; only the converted textures go into your mod, so check its license before you publish.
  • Trader data is exported to profile/DZStudioQuests/trade.json and checked by the studio server before every build: traders, their price lists, conditions and custom currencies (kind: "items" with item values, or kind: "stat").
  • Server-checked trades: the client only asks for a trade (open / buy / sell with the row and amount). The server checks the distance to the NPC, the faction tier, the row's condition, the stock and the player's money, then answers with a fresh trade screen.
  • Paying: the trader takes the largest bills that fit first; if they can't add up to the exact price, it takes one larger bill and gives change, largest bills first. Sold items are counted by quantity for stackables.
  • Stock is kept in server memory, so it refills on every restart.

Known issues

  • Not yet tested in a live game: trading ten at once (Shift), a custom currency, and a Hostile player being turned away at a store. Everything else on the trade screen was tested on a local server.
  • Bills given by a trade come out as separate stacks; DayZ lets you merge them by dragging one onto another.
  • Still from earlier alphas: the docked game window hasn't been tested in every workspace layout; the four views can't float in their own window yet; guards' aim animation is basic; with Nahimic audio software the installer may close right after starting (run it again).

DayZ Studio is a free, fan-made tool and is not affiliated with Bohemia Interactive.