Shops - GregHib/void GitHub Wiki

Adding default shops

Find the shop in inventories.yml, or add if you know the container id

  id: 1
  shop: true
    - bronze_pickaxe: 10
    - bronze_hatchet: 10
    - iron_hatchet: 10
    - steel_hatchet: 10
    - iron_battleaxe: 10
    - steel_battleaxe: 10
    - mithril_battleaxe: 10

Make sure shop: true is set.

Add the shopkeeper to npcs.yml

  id: 519
  race: "human"
  shop: bobs_brilliant_axes
  examine: "An expert on axes."

shop: needs to be set to the containers string id for shops to open automatically when clicking the "Trade" option

Spawn the shopkeep in the right place in npc-spawns.yml

- { id: bob, x: 3228, y: 3203, plane: 0, direction: SOUTH, members: false }

Opening a shop

Shops can be opened by a player using the OpenShop event"zekes_superior_scimitars"))