#
3.3 Shops
Shop system is already far in development, though not yet finished and this documention could change in the future!
Shops in ARL are prefab-driven. The best workflow is to inherit from the built-in vendor prefabs so you keep compatibility with framework updates and get a map marker out of the box.
#
Recommended workflow (inherit)
Base vendors (for custom shops)
ArmaReforgerLife/Prefabs/Characters/NPC/Vendors/ARL_Vendor_Base.et
(items)ArmaReforgerLife/Prefabs/Characters/NPC/Vendors/ARL_Vendor_Vehicle_Base.et
(vehicles)
Ready-made vendors (quick start)
- Examples like
ARL_Vendor_General_Store.et
already exist.You can inherit from these and only tweak the config.
- Examples like
Why inherit?
Your vendor stays separate from core prefabs while still receiving compatibility from upstream changes. The vendor already includes a MapMarkerComponent.
#
Tip
Create a Vendors
layer in your subscene and place all vendors there. Keep any spawner helpers as children of the vendor so they move together.
#
Steps to set up (existing/ready-made vendor)
- In Resource Browser, inherit from a ready-made vendor (e.g.,
ARL_Vendor_General_Store.et
) into your addon. - Place your inherited prefab in the world and position it.
- (Optional) Adjust the MapMarkerComponent title/icon.
- Open the Shop Component on the vendor and assign/tweak its Shop Config.
- (Optional) Add spawner children (see “Spawners” below).
- Save and test (Play-in-Editor).
#
Steps to set up (custom vendor from base)
- Inherit a new prefab from:
- Items:
ARL_Vendor_Base.et
- Vehicles:
ARL_Vendor_Vehicle_Base.et
- Items:
- Place your inherited vendor in the world.
- Assign a Shop Config (create one if needed).
- (Optional) Add spawner children (see below).
- Save and test.
#
Spawners (optional but recommended)
Add these as children of the vendor:
Items spawn point:
ArmaReforgerLife/Prefabs/MP/Spawning/ARL_Spawner.et
Vehicle spawn point (for vehicle vendors):
ArmaReforgerLife/Prefabs/MP/Spawning/ARL_VehicleSpawner.et
(Optional) Preview camera:
ArmaReforgerLife/Prefabs/MP/Spawning/ARL_CameraSpawner.et
Behavior
- If no item spawner is present on an item vendor, purchased items go directly to inventory.
- Vehicle vendors should have a vehicle spawner where vehicles appear.
#
Shop Config (what to fill in)
ARL_ShopConfig
- Shop Name – Displayed in the UI.
- Trade Type – Buy / Sell / Buy & Sell.
- Bulk Transactions Allowed – Allow quantity > 1.
- Accessibility → Allowed Jobs – Job names with access (leave empty = public).
- Categories – Tabs in the UI:
- Name – Tab label (e.g., “Electronics”).
- Items – Entries within the tab:
- Resource Name – The
.et
prefab to sell. - Max Buy Amount – Per-purchase cap.
- Resource Name – The
Notes
- Prices come from your ARL_ItemConfig (by resource/variant).
If an item isn’t defined there, it appears as $0.
#
Testing
- Open the shop, switch tabs, confirm items.
- Buy a single item/vehicle and check:
- Inventory shop → item appears in inventory, or
- Spawner shop → item/vehicle appears at the spawner.
- If selling is enabled, sell an item and confirm money changes.
#
Quick checklist
- You inherited from
ARL_Vendor_Base
/ARL_Vendor_Vehicle_Base
(or a ready-made vendor). - Shop Config assigned with at least one Category and Item.
- Items exist in ARL_ItemConfig (to avoid $0).
- Spawner child positioned correctly (required for vehicles, optional for items).
- Map marker set (title/icon) if desired.
- Saved subscene → play test buy/sell.
#
Troubleshooting
- $0 price → Add the item to ARL_ItemConfig with a proper definition/variant.
- Nothing appears → Check spawner placement; for inventory path, check free inventory space.
- No access → Verify Allowed Jobs (or leave empty for public).