Shops are used to buy items, equipment and other things.
The player can also sell things to a shop.
Shops #
A shop defines the stock it sells to the player, if it allows the player to sell things back to it as well as how it’s UI is presented. Shops are set up in Inventory > Shops.
UI #
A shop can either use a shop layout (see below) to present it’s UI or a menu screen with an Inventory Exchange part, which lists the player’s inventory and the shop’s content side by side.
Save Shop #
You can save the content of shops to remember it between visits (and in save games).
This is useful in case your shop has limited quantities available or you want the player to be able to buy back the items that where sold to the shop.
Saving shops uses the Shop ID that’s defined by Shop Interaction components or Open Shop nodes in schematics.
Currency #
A shop defins the currency it deals in. The prices of items are converted to the used currency based on the current exchange rates.
Shops can also define custom exchange rates. Learn more about currencies in this documentation.
The Shop’s Stock #
Shops can use loot tables to determine the content, as well as define specific content to sell.
The following things can be sold in shops:
- items
- equipment
- abilities
- combatants
- AI behaviours
- AI rulesets
- crafting recipes
- quests
If something is sold can depend on a chance and defined conditions, e.g. based on the player’s level, game states or variable conditions.
Limit Quantity #
The quantity of available items, equipment, etc. can optionally be limited.
This will only be remembered between visits when saving the shops content via the Save Shop option.
Override Price #
Shops can override the prices of the items, equipment, etc. it sells.
Shop Layouts #
Shop layouts are used to define the UI of a shop (when not using an Inventory Exchange menu screen). They are set up in UI > Shop Layouts.
A shop layout works similar to a menu screen – you define different parts of the UI by defining the used UI box and content layout. You can learn more about UI boxes in the Makinom documentation.
Sorting #
You can define different sorting options to manage how content in a shop is sorted.
Content can e.g. be sorted by name, ID or buy price. There are many different sorting options available.
The sorting can be changed in-game using an (optional) sorting input key.
Name Box #
Displays the name of the shop.
Buy/Sell Box #
Displays a choice dialogue when opening the shop to either buy or sell (or cancel).
Buying or selling will open up the type/list boxes, the buy/sell box can be set up to remain open.
Type Box #
Lists the item types that are available to buy/sell.
Selecting a type will update the listed content in the list box.
List Box #
Displays the shop’s stock (items, equipment, etc.) of the selected item type, or all merged together when not using a type box.
You can use HUDs and shortcut UI in the content layout to create more complex UI presentation of the displayed items.
Learn more about shortcut UI in this HUD documentation.
Buy/Sell Quantity Details #
Optionally use a quantity selection as a details display for a selected item. This’ll be shown while selecting items in the list box – accepting an item there will change focus to the quantity details dialogue for changing quantity and accepting purchasing/selling.
Buying and selling have separate settings for this feature.
Buy/Sell Shopping Cart #
Optionally use a shopping cart instead of immediately buying or selling. Accepting items/quantities will add them to the shopping cart, accepting the cart will buy or sell all content in it (if the price doesn’t exceed the player’s inventory).
Buying and selling have separate settings for this feature.
Description Box #
Displays the description of the currently selected input, e.g. an item type or item description.
Info Box #
Can be used to display general information via text and HUDs (as templates).
E.g. use text codes to display the amount of currency the player has, or how many of an item the player has in inventory.
User Info Box #
Can be used to display information about the shop’s user or whole group.
E.g. use HUDs as templates to display status changes (via previews) an equipment would cause on a combatant.
Buy Combatant Info #
This is a special information box that’s used when purchasing combatants in shops.
Purchasing combatants will let them join the player’s group – this box can display detailed information of the combatant using HUDs as templates.
Buy Question #
Optionally display a question dialogue before buying something in a shop.
The question dialogue can use text codes to display content information of the item.
Sell Question #
Optionally display a question dialogue before selling something to a shop.
The question dialogue can use text codes to display content information of the item.
Using Shops #
Shops are used in-game either via a Shop Interaction component or schematics.
Shop Interaction #
A Shop Interaction component defines the used shop and the shop ID (used when saving a shop’s content). A shop can optionally belong to a faction to be able to use faction benefits.
Like other interaction components, shop interactions can be started in many ways, e.g. via Interaction Controller components on the player, clicking on them or entering their trigger (Collider with Is Trigger enabled).
Schematics #
The Open Shop node will open a defined shop. You also define a shop ID (used when saving a shop’s content) and optionally a faction to use faction benefits.
Schematics also have other shop-related nodes available, e.g. you can add new items to a stored shop’s stock or remove the stored data.