HallyG 239 Posted July 25, 2017 HALs Store v1.5 Video (v1.5): Spoiler Overview: HALs Store adds a weapon store to any mission. This provides players with the opportunity to buy and sell equipment or weapons from stores defined by the mission maker. HALs Store v1.5 Download Changelog: v1.5 v1.4.1 v1.4 v1.1 Features: Easily configurable store; define your own traders and the items they buy and sell in description.ext. In-game currency system, fully integrated with the money objects (added in the Old Man update) available in the editor. Each Trader has its own categories, each with their own items. e.g. Handguns, Magazines, Backpacks Items have prices and can only be purchased if the player has sufficient money. Stores have stock - an item can only be purchased if it is stocked. Items can be purchased from the trader to the player, their equipment or nearby vehicles. Items can be sold to the trader from the player, their equipment or nearby vehicles. Helpful progress bars indicate the current load of a container, and the space available after purchase. Filter available items with preset conditions (compatible with equipped weapons, available for purchase). Progress bars show various stats about the available weapons and equipment. e.g. Ballistic Protection, Explosion Resistance, Impact, Accuracy Usage Unpack the downloaded .rar and check out the demo mission. For further details (such as changing the sell price), please see: Installation Configuration and Configuration Example How to use and useful functions for mission makers Cheers 20 3 Share this post Link to post Share on other sites
Guest Posted July 26, 2017 An Armaholic mirror is now available:HALs Store v1.0.0 Share this post Link to post Share on other sites
7erra 629 Posted July 26, 2017 Really great dialog! I took a look at the stringtable.xml and added a German translation: Spoiler <?xml version="1.0" encoding="UTF-8"?> <Project name="HALs_store"> <Package name="General"> <Key ID="STR_HALS_STORE_ACTION"> <Original>Store</Original> <English>Store</English> <French></French> <German>Geschäft</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_UNAVALIABLE"> <Original>Item unavaliable</Original> <English>Item unavaliable</English> <French></French> <German>Gegenstand nicht verfügbar</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_OUTOFSTOCK"> <Original>Insufficient stock</Original> <English>Insufficient stock</English> <French></French> <German>Ausverkauft</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_TOOEXPENSIVE"> <Original>Insufficient funds</Original> <English>Zu wenig Geld</English> <French></French> <German></German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_NOCARGOSPACE"> <Original>Insufficient cargo space</Original> <English>Insufficient cargo space</English> <French></French> <German>Nicht genug Platz</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_PURCHASED"> <Original>purchased</Original> <English>purchased</English> <French></French> <German>gekauft</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> </Package> <Package name="Dialog"> <Key ID="STR_HALS_STORE_CHECKBOX_AFFORD"> <Original>Only show items which the player can afford</Original> <English>Only show items which the player can afford</English> <French></French> <German>Zeige nur Gegenstände, die sich der Spieler leisten kann</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_CHECKBOX_STOCK"> <Original>Only show items which are in stock</Original> <English>Only show items which are in stock</English> <French></French> <German>Zeige nur Gegenstände, die auf Lager sind</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_CHECKBOX_COMPATIBLE"> <Original>Only show items compatible with the player's equipped weapons</Original> <English>Only show items compatible with the player's equipped weapons</English> <French></French> <German>Zeige nur Gegenstände, die mit der ausgerüsteten Waffe des Spielers kompatibel sind</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_CHECKBOX_EQUIP"> <Original>Equip item upon purchase (if possible)</Original> <English>Equip item upon purchase (if possible)</English> <French></French> <German>Gegenstand beim Kauf ausrüsten (wenn möglich)</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_BUTTON_PURCHASE"> <Original>Purchase</Original> <English>Purchase</English> <French></French> <German>Kaufen</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_TEXT_PRICE"> <Original>Price</Original> <English>Price</English> <French></French> <German>Preis</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_TEXT_INSTOCK"> <Original>IN STOCK</Original> <English>IN STOCK</English> <French></French> <German>AUF LAGER</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_TEXT_NOSTOCK"> <Original>OUT OF STOCK</Original> <English>OUT OF STOCK</English> <French></French> <German>AUSVERKAUFT</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_LISTBOX_NOMONEY"> <Original>%1¢ more required</Original> <English>%1¢ more required</English> <French></French> <German>%1¢ mehr benötigt</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> </Package> </Project> 1 Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 26, 2017 Okay, I confirm that 7erra's translations are well-worded... ;-) @7erralittle mistake: Spoiler <Key ID="STR_HALS_STORE_ITEM_TOOEXPENSIVE"> <Original>Insufficient funds</Original> <English>Zu wenig Geld</English> <French></French> <German></German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> 1 Share this post Link to post Share on other sites
HallyG 239 Posted July 26, 2017 On 26/07/2017 at 1:06 PM, 7erra said: Really great dialog! I took a look at the stringtable.xml and added a German translation: Reveal hidden contents <?xml version="1.0" encoding="UTF-8"?> <Project name="HALs_store"> <Package name="General"> <Key ID="STR_HALS_STORE_ACTION"> <Original>Store</Original> <English>Store</English> <French></French> <German>Geschäft</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_UNAVALIABLE"> <Original>Item unavaliable</Original> <English>Item unavaliable</English> <French></French> <German>Gegenstand nicht verfügbar</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_OUTOFSTOCK"> <Original>Insufficient stock</Original> <English>Insufficient stock</English> <French></French> <German>Ausverkauft</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_TOOEXPENSIVE"> <Original>Insufficient funds</Original> <English>Zu wenig Geld</English> <French></French> <German></German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_NOCARGOSPACE"> <Original>Insufficient cargo space</Original> <English>Insufficient cargo space</English> <French></French> <German>Nicht genug Platz</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_ITEM_PURCHASED"> <Original>purchased</Original> <English>purchased</English> <French></French> <German>gekauft</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> </Package> <Package name="Dialog"> <Key ID="STR_HALS_STORE_CHECKBOX_AFFORD"> <Original>Only show items which the player can afford</Original> <English>Only show items which the player can afford</English> <French></French> <German>Zeige nur Gegenstände, die sich der Spieler leisten kann</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_CHECKBOX_STOCK"> <Original>Only show items which are in stock</Original> <English>Only show items which are in stock</English> <French></French> <German>Zeige nur Gegenstände, die auf Lager sind</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_CHECKBOX_COMPATIBLE"> <Original>Only show items compatible with the player's equipped weapons</Original> <English>Only show items compatible with the player's equipped weapons</English> <French></French> <German>Zeige nur Gegenstände, die mit der ausgerüsteten Waffe des Spielers kompatibel sind</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_CHECKBOX_EQUIP"> <Original>Equip item upon purchase (if possible)</Original> <English>Equip item upon purchase (if possible)</English> <French></French> <German>Gegenstand beim Kauf ausrüsten (wenn möglich)</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_BUTTON_PURCHASE"> <Original>Purchase</Original> <English>Purchase</English> <French></French> <German>Kaufen</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_TEXT_PRICE"> <Original>Price</Original> <English>Price</English> <French></French> <German>Preis</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_TEXT_INSTOCK"> <Original>IN STOCK</Original> <English>IN STOCK</English> <French></French> <German>AUF LAGER</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_TEXT_NOSTOCK"> <Original>OUT OF STOCK</Original> <English>OUT OF STOCK</English> <French></French> <German>AUSVERKAUFT</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> <Key ID="STR_HALS_STORE_LISTBOX_NOMONEY"> <Original>%1¢ more required</Original> <English>%1¢ more required</English> <French></French> <German>%1¢ mehr benötigt</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> </Package> </Project> 7erra, thank you for your feedback and the translations. I'll update the github. On 26/07/2017 at 2:07 PM, sarogahtyp said: Okay, I confirm that 7erra's translations are well-worded... ;-) Reveal hidden contents <Key ID="STR_HALS_STORE_ITEM_TOOEXPENSIVE"> <Original>Insufficient funds</Original> <English>Zu wenig Geld</English> <French></French> <German></German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> Heh, nice find. Nothing like some accidental language lessons when you are buying firearms.. 1 Share this post Link to post Share on other sites
Luca 13 Posted July 26, 2017 Have't tried this yet but it looks great! I already have a mission that could use this however would it be possible to add the ability for the player to sell the Items that can also be bought? Would be nice if you could add that as I really need a sell-system but am not able to create one myself. Anyway, keep up the good work! 1 Share this post Link to post Share on other sites
R3vo 2654 Posted July 27, 2017 I believe it would make sense to also display some stats, similar to the Arsenal. 1 Share this post Link to post Share on other sites
HallyG 239 Posted July 27, 2017 18 hours ago, bf2freak1997 said: I already have a mission that could use this however would it be possible to add the ability for the player to sell the Items that can also be bought? Would be nice if you could add that as I really need a sell-system but am not able to create one myself. Thanks for your feedback. This is a feature that I want to (and probably will no doubt) add but will require some prior planning since it might require a change in the GUI. 8 hours ago, R3vo said: I believe it would make sense to also display some stats, similar to the Arsenal. Thanks for your suggestion, I am already adding it now. I'll push an official update later this week but in the mean time the GitHub will be updated with the bug fixes, translations and some other misc. additions (and probably the new stats bars later but those will be added later today/tomorrow). Share this post Link to post Share on other sites
Luca 13 Posted July 27, 2017 Cool, thanks for your reply! Looking forward to it. I also love the Idea with the stats, looking forward for that as well! Share this post Link to post Share on other sites
Luca 13 Posted July 30, 2017 Love the new relase, however it would be nice to have documentation or at least an example in the mission on how to add custom descriptions (maybe I'm just too stupid, not sure). And I also think there's a bug with the "show only Items that are compatible..."-option. Whenever I have a Weapon equipped and select that option no Items are being displayed anymore (except for magazines) even though scopes, muzzle items, etc. are compatible with my weapon (MX and Protector in my case). Share this post Link to post Share on other sites
HallyG 239 Posted July 30, 2017 2 hours ago, bf2freak1997 said: Love the new relase, however it would be nice to have documentation or at least an example in the mission on how to add custom descriptions (maybe I'm just too stupid, not sure). And I also think there's a bug with the "show only Items that are compatible..."-option. Whenever I have a Weapon equipped and select that option no Items are being displayed anymore (except for magazines) even though scopes, muzzle items, etc. are compatible with my weapon (MX and Protector in my case). I forgot to upload the new description.ext but I think I updated the example configuration page (should be near the top of the github page) if you want to take a look. I'll take a look now. I haven't updated any of the example missions (just fyi) but I'll post a pre-release version with a demonstration of all the new features. Share this post Link to post Share on other sites
Luca 13 Posted July 30, 2017 Firstly, thanks for your reply! Secondly: Yep there's something on the configuration page. Haven't seen that - sorry. Also, what's up next if I may ask? Share this post Link to post Share on other sites
Chuc 83 Posted July 31, 2017 Looks really good. Gonna try it now and see how it goes Share this post Link to post Share on other sites
HallyG 239 Posted July 31, 2017 HALs Equipment Store v1.1 Download: Updated links in the first post. Changelog: The full changelog can be found HERE. Fixed various bugs. Added German Translation thanks to 7erra (currently missing one translation but only because I added it in v1.1). Added, traders can now be any object which has the type CAManBase, Car_F or ReammoBox_F. Added: items can now have custom descriptions which support structured text. Added: item stats bars (thanks to R3vo for the suggestion) Thank goodness for BIS arsenal because I was being a complete idiot when attempting to extract maximum values.. 2 Share this post Link to post Share on other sites
7erra 629 Posted July 31, 2017 <KEY ID="STR_HALS_STORE_ITEM_NOEQUIP"> <Original>Unable to equip</Original> <English>Unable to equip</English> <French></French> <German>Ausrüsten fehlgeschlagen</German> <Russian></Russian> <Spanish></Spanish> <Italian></Italian> </Key> If you want to know a translation beforehand I'll keep an eye on my PNs, just saying ;) 1 Share this post Link to post Share on other sites
Guest Posted July 31, 2017 The Armaholic mirror has been updated with the new version:HALs Store v1.1 Share this post Link to post Share on other sites
Kain181 1 Posted August 3, 2017 Hi, it's possible an option to display the current money on screen permanently?! Share this post Link to post Share on other sites
HallyG 239 Posted August 3, 2017 54 minutes ago, Kain181 said: Hi, it's possible an option to display the current money on screen permanently?! Thank you for the suggestion, I haven't really considered adding an option but maybe I should give it a rethink. Meanwhile, this is what you can use to display money on the screen, permanently. Add this to your initPlayerLocal.sqf Spoiler [] spawn { if (isNil "HALs_money_updateDelay") then { waitUntil {!(isNull findDisplay 46)}; disableSerialization; _control = (findDisplay 46) ctrlCreate ["RscStructuredText", 19998]; _control ctrlSetTextColor [0.67,1,0.67,1]; _control ctrlSetFont "PuristaLight"; _width = (15/108) * safeZoneH; _control ctrlSetPosition [safeZoneX + safeZoneW - _width, safeZoneY + safeZoneH - ((13/108) * safeZoneH), _width, (4/108) * safeZoneH]; _control ctrlCommit 0; HALs_money_updateDelay = 0.15; HALs_money_nextUpdate = diag_tickTime; HALs_money_previousBalance = -1; addMissionEventHandler ["EachFrame", { if (diag_tickTime > HALs_money_nextUpdate) then { _money = [player] call HALs_money_fnc_getFunds; if !(_money isEqualTo HALs_money_previousBalance) then { HALs_money_previousBalance = _money; _control = (findDisplay 46) displayCtrl 19998; _control ctrlSetStructuredText parseText format ["<t size='1.7' shadow='2' align='right'>%1¢</t>", _money]; }; HALs_money_nextUpdate = diag_tickTime + HALs_money_updateDelay; }; }]; }; }; 1 Share this post Link to post Share on other sites
Kain181 1 Posted August 8, 2017 Thank you so much!!! So, now i've a doubt about the actual state of your project ... it'spossible to define another object instead of CargoNet as a trader already, e.g: footlockers, crates, boxes ..?! Share this post Link to post Share on other sites
xjoker_ 25 Posted August 9, 2017 Why there isn't any information about the command "lbSetTextRight" on the wiki ? Share this post Link to post Share on other sites
7erra 629 Posted August 9, 2017 There are several commands with no documentation on the wiki. Some of them aren't used and others are not important because they arent used on a regular basis. The syntax for the lbSetTextRight command is this: _listbox lbSetTextRight [_index,"Some text"]; // Seems not to work: // lbSetTextRight [_idc, _index, "Text"]; // even though it is the nomal syntax for the other LB commands And it will look like this: _listbox = (findDisplay 9999) displayCtrl 1500; for "_i" from 0 to 10 do { _index = _listbox lbAdd ("Left: " +str _i); _lbConversation lbSetTextRight [_index,"Right: " +str _index]; }; 1 Share this post Link to post Share on other sites
HallyG 239 Posted August 12, 2017 On 08/08/2017 at 4:05 PM, Kain181 said: Thank you so much!!! So, now i've a doubt about the actual state of your project ... it'spossible to define another object instead of CargoNet as a trader already, e.g: footlockers, crates, boxes ..?! Firstly, sorry for the delayed reply, I have been away. Secondly, cars, ammoboxes and CAManBase type objects should be allowed as traders (as of version 1.1). Currently, I don't think footlockers are supported but I can easily change that. I will check that this is functioning correctly later on today. Cheers 1 Share this post Link to post Share on other sites
199918hao 1 Posted July 26, 2018 Hello,HallyG The HAL‘s store is very good! I want to convert HAL's_money into a custom money system, such as the Ravage money system. How can I change it? I know there are a few variables like _price, _money should have more. . . . But the HAL's_money script is too complicated. I analyzed it for a long time and couldn’t figure it out. Here is the Ravage store buy script params ["_classname", "_price", "_cfg"]; _trader = player getVariable ["isTradingWith", nil]; _shopType = missionNameSpace getVariable (_trader getVariable "isTrader"); _text = getText (configFile >> _cfg >> _classname >> "displayName"); _money = {_x isEqualTo "rvg_money"} count magazines player; if (_money < _price) exitWith {hint "Not enough money!"}; if (!(player canAdd [_classname, 1])) exitWith {hint "Your inventory is full already."}; if (_classname in (weapons _trader)) then { _trader removeWeaponGlobal _classname; } else { _trader removeItem _classname; }; for "_prout" from 1 to _price do {player removeItem "rvg_money"}; player addItem _classname; hint format ["You bought one %1 for %2$.", _text, _price]; cameraOn say3d selectRandom ["bank1", "bank2", "bank3"]; I know that HALs_store is a virtual currency system and Ravage's currency has actual items, and the amount of money is defined according to the number of items. So how can I change it? Share this post Link to post Share on other sites
HallyG 239 Posted July 27, 2018 19 hours ago, 199918hao said: Hi, you could change the functions HALs_money_fnc_addFunds and HALs_money_fnc_getFunds without having to alter the functionality of the store script itself. I would provide some code for you to try but I am unable to test anything because my computer is completely broken. Cheers, Hal Share this post Link to post Share on other sites
199918hao 1 Posted July 27, 2018 2 hours ago, HallyG said: Hi, you could change the functions HALs_money_fnc_addFunds and HALs_money_fnc_getFunds without having to alter the functionality of the store script itself. I would provide some code for you to try but I am unable to test anything because my computer is completely broken. Cheers, Hal Unfortunately, your computer is broken.You can also help me solve the problem here. So how do I change HALs_money_fnc_addFunds and HALs_money_fnc_getFunds functions? I know that ravage has a statement:“_money = {_x isEqualTo "rvg_money"} count magazines player;” Means to check the number of rvg_money item in the equipment . “for "_prout" from 1 to _price do {player removeItem "rvg_money"};” This is the statement to remove rvg_money item after buying something.The knowledge of my script is not enough, so I can only know the meaning of these two sentences.So how can I change it? The following is the Ravage trading script, you can analyze. Ravage‘s sell.sqf params ["_classname", "_price", "_cfg"]; _trader = player getVariable ["isTradingWith", nil]; _shopType = missionNameSpace getVariable (_trader getVariable "isTrader"); _text = getText (configFile >> _cfg >> _classname >> "displayName"); if (_classname in magazines player) then { player removeMagazine _classname; } else { /*if (_classname in (items backpackContainer player)) then { player removeItemFromBackpack _classname; } else { if (_classname in (items vestContainer player)) then { player removeItemFromVest _classname; } else { if (_classname in (items uniformContainer player)) then { player removeItemFromUniform _classname; } else { if (_classname in weapons player) then { player removeWeaponGlobal _classname; } else { player removeItem _classname; }; }; }; };*/ if (_classname in (backpackItems player)) then { player removeItemFromBackpack _classname; } else { if (_classname in (vestItems player)) then { player removeItemFromVest _classname; } else { if (_classname in (uniformItems player)) then { player removeItemFromUniform _classname; } else { if (_classname in weapons player) then { player removeWeaponGlobal _classname; } else { player removeItem _classname; }; }; }; }; }; for "_prout" from 1 to _price do {player addItem "rvg_money"}; if (_trader canAdd [_classname, 1]) then { _trader addItem _classname; }; hint format ["You sold one %1 for %2$.", _text, _price]; cameraOn say3d selectRandom ["bank1", "bank2", "bank3"]; Ravage‘s buy.sqf params ["_classname", "_price", "_cfg"]; _trader = player getVariable ["isTradingWith", nil]; _shopType = missionNameSpace getVariable (_trader getVariable "isTrader"); _text = getText (configFile >> _cfg >> _classname >> "displayName"); _money = {_x isEqualTo "rvg_money"} count magazines player; if (_money < _price) exitWith {hint "Not enough money!"}; if (!(player canAdd [_classname, 1])) exitWith {hint "Your inventory is full already."}; if (_classname in (weapons _trader)) then { _trader removeWeaponGlobal _classname; } else { _trader removeItem _classname; }; for "_prout" from 1 to _price do {player removeItem "rvg_money"}; player addItem _classname; hint format ["You bought one %1 for %2$.", _text, _price]; cameraOn say3d selectRandom ["bank1", "bank2", "bank3"]; Share this post Link to post Share on other sites