Author: HallyG
Author Website:

Requirements: No addons required

Version: 1.4

Short description: adds a shop dialog in to any mission such that players can buy and sell equipment, using an in-game currency system, defined by the mission maker.

Date: 2020-03-13 09:40

Comments: (1)


HALs Store


Adds a shop dialog in to any mission such that players can buy and sell equipment, using an in-game currency system, defined by the mission maker.

Buy and sell items to custom stores.
Easily configurable Store; define your own traders and categories in your description.ext.
Each Trader can have its own categories (eg: Handguns, Magazines, Backpacks) each with their own items.
Items have their own prices; if the player does not have enough money for an item, the item cannot be purchased.
Items have their own stock; if there is no stock for an item, the item cannot be purchased.
Items have their own descriptions (taken from the in-game config files) but can have their own custom description which supports structured text.
Purchase items to nearby vehicles or even to the player, the player's backpack, uniform and vest.
Helpful dialog which indicates the current load of a container in addition to how much space the selected item will occupy in that container.
The dialog utilises checkboxes (default: all deselected) which allow the user to filter items with preset conditions (sell, available for purchase, compatible with equipped weapons).
The dialog utilises progress bars to show the user the stats of the currently selected backpack/optic/uniform/vest or weapon.
Weapons include: Accuracy, Impact, Rate of Fire and Range.
Equipment stats include: Ballistic Protection, Explosion Resistance and Maximum load.
Optics stats include: Zoom.

Installation / Usage:
For usage instructions and information of how to use the HALs Store please refer to the included documentation and/or example mission.





Media: has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Youtube channel

Known issues:
I haven't tested it on a dedicated server, yet, but I'll get around to it when my schedule opens up.

Credits & Thanks:
All the members of the community who dedicate their time to document the wiki, post snippets and answers questions on the forums.
7erra for the German translation.
vbr74 for the French translation.
Kain181 for the Spanish translation.

Added Selling.
The no stock and too expensive filters have been combined into one: "Only show items available for purchase"
Added filter to enable selling (only sellable items in the current container (eg trader category) are shown).
You can only sell an item to a store if the store itself sells the item.
If you sell a weapon with attachments, the attachments won't be sold and are added to the container.
Global item sell factor is controlled by the variable HALs_store_sellFactor whose default value is defined in config.hpp.
Added French Translation (thanks to vbr74).
Added "All" category to the dropdown box.
Added a button to alphabetise the listed store items.
Fixed issue where lbValue returned an incorrect value.
Fixed issue which displayed the incorrect description for a store item.
Optimised the functions: HALs_store_fnc_main, HALs_store_fnc_getTraderStock HALs_store_fnc_setTraderStock and HALs_store_fnc_updateStock.
Removed the functions: HALs_store_fnc_blur, HALs_fnc_getModuleRoot and HALs_store_fnc_addMoneyOnOpen.
Updated defines.hpp by removing unused class definitions.
Updated dialog.hpp by replacing Safezone value with pixelGridNoUIScale values.
Updated dialog.hpp by replacing magic numbers with MACROs.
Updated HALs file structure to be compatible with my other projects (moved HALs\Core to HALs\Addons\Core).

ADDED: (Function) HALs_store_fnc_addMoneyOnOpen
ADDED: Option to change the currency symbol used.
CHANGED: Restructured HALs\Addons folder. Everything is initialised through HALs\Addons\main\config.hpp now.
CHANGED: Categorised functions in the HALs\Core folder.

FIXED: The mass of items of containers within containers were not calculated.
FIXED: Edit box maximum characters set to 6 (credits to: R3vo).
FIXED: Players couldn't buy items in multiplayer (credits to: Antoine)
OPTIMIZED: Removed the creation of unneccesary private variables.
OPTIMIZED: HALs_store_fnc_main, HALs_store_fnc_initModule, HALs_store_fnc_blur, HALs_fnc_getModuleRoot
ADDED: (Function) HALs_store_fnc_getItemType
ADDED: (Function) HALs_fnc_getModuleSettings
ADDED: Spanish Translation thanks to Kain181.
ADDED: French Translation thanks to vbr74.
CHANGED: (Dialog) Visual changes. Text should be easier to read and dialog should scale better with different resolutions
CHANGED: (Config) The configuration files for HALs_Money and HALs_Store have been moved from the description.ext to config.hpp in their respective folders.
HALs_Money: HALs\Addons\Money\config.hpp
HALs_Store: HALs\Addons\Store\config.hpp

FIXED: Could not equip a sniper/shotgun if the equip checkbox was checked.
FIXED: Mass of glasses were considered 0.
FIXED: Could buy items to the inventories of other traders.
FIXED: Could trade with dead traders.
FIXED: Could trade with traders while in a vehicle.
FIXED: Could not equip item if container was completely full/no container existed (Now, the equip checkbox must be checked).
FIXED: Backpack pictures were not showing.
FIXED: Backpack stats were not working.
ADDED: German Translation thanks to 7erra.
ADDED: Items can now have custom structured text descriptions.
ADDED: fn_purchase added message if player couldnt equip item.
Uses new stringtable entry ("STR_HALS_STORE_ITEM_NOEQUIP").
ADDED: traders can be any type now ("CAManBase", "ReammoBox_F" or "Car_F").
NB automatically clears a traders inventory on init if they are not type "CAManBase"
If trader is type "CAManBase", can only purchase to player's uniform/vest/backpack.
ADDED: Stats for weapons, uniform, vests, backpacks and optics.


Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!

Tags: Script,   Action,   Dialog,   Roleplay,   Buy,   Equipment,   Currency System