Salta ai contenuti

Selling things

Questi contenuti non sono ancora disponibili nella tua lingua.

GDMP has one currency, Gems. Players buy Gems in the launcher and spend them in experiences. You sell two kinds of things:

  • a game pass: bought once, owned forever (a VIP lounge, a skin, a trail, an extra area to explore…);
  • a developer product: bought again and again (confetti, a pet treat, seeds in a co-op farm…). Your server script grants it.

Whatever you sell follows the store rules: no pay-to-win.

You keep 70% of every sale, credited to your Gems as you sell (Gems page → Creator earnings).

In the launcher: open your experience → Store → Create a store / Edit store. Each item has a kind, an id (vip, skip: what your level and scripts use), a name, a price in Gems and a description.

  • Save to package writes store.json in your package.
  • Save and publish sends it to GDMP (you must be signed in; the first account that publishes an experience’s store owns it). New and changed items go on sale once GDMP staff have checked them against the store rules; until then only you see them, marked Waiting for review. A new price doesn’t need a new check; a new name or description does. You get a notification with the decision.
store.json
{ "items": [ { "id": "vip", "kind": "pass", "name": "VIP", "description": "The lounge, forever.", "price": 100 } ] }

Players must be able to trust that Gems never buy a win. Every item follows these rules; GDMP checks new and changed items before they go on sale, and can take an item off sale later if it breaks them. A decision always names the rule.

  1. S1 · No paid advantage. Nothing you sell may help its owner beat other players: no extra speed, lives, points, power, time or shortcuts in anything players compete in (races, rounds, scores, PvP, leaderboards).
  2. S2 · No random rewards. Everyone who buys an item gets the same thing: no loot boxes or mystery prizes.
  3. S3 · Say what it does. The name and description tell players exactly what they get.
  4. S4 · It must exist. What you sell must be in your experience when someone buys it.
  5. S5 · For everyone. Items follow the content rules of the asset guidelines: all ages, no false “free” and no fake prices (S6), nothing that belongs to someone else (S7).

Fine to sell:

  • Looks: hats, skins, trails, colours, name effects, emotes, confetti.
  • Things to do: a private area, a mini-game, extra levels, a pet.
  • Boosts in solo or co-op play where nobody is ranked against anyone else (double harvest in a co-op farm is fine; double speed in a race is not).

A zone with buy <item> asks the player who walks in:

gdmp zone shop1 w=40 h=90 cooldown=6 : buy vip
scripts/server/main.js
gdmp.economy.promptPurchase(playerId, "vip"); // GDMP asks the player (the store's name and price)
gdmp.economy.ownsPass(playerId, "vip"); // true / false
gdmp.economy.onAccount((playerId, account) => { /* the hub vouched for who they are: account.passes */ });
gdmp.economy.onPassPurchased((playerId, passId) => { /* open the lounge */ });
gdmp.economy.onProductPurchased(p => { // p = {receipt, playerId, itemId, name, price}
if (p.itemId !== "skip") return false; // not granted: offered again next time
gdmp.players.teleport(p.playerId, 780, 105);
return true; // GRANTED: never delivered again
});

A client script can ask for its own player: gdmp.economy.promptPurchase("vip").

  • The purchase prompt is GDMP’s, drawn above everything your experience draws, with the price from the store. A script can ask for a prompt, never answer it or change a price.
  • The player’s launcher pays; the game server only learns about a purchase from the hub.
  • A developer product your script does not grant (returns false) stays with the hub and is delivered again the next time that player joins.

The economy needs the net capability (a Studio level already has it). Full list: gdmp.economy.