Private Storage Addon (Node.js)

  • Offline micovery
  • Moderator
  • Hardened
  • ******
  • Posts: 159

Private Storage Addon (Node.js)

« posted: Dec 27, 2014, 04:13 PM »
EDIT by AgentRev: now included by default as of A3W v1.3b
---

This addon allows players to have persistent private storage. Player must approach one of the private storage boxes on the map, and choose the "Access Storage" action.

The storage menu is integrated with the existing player inventory. The private storage appears to the players similarly to how crates appear in the inventory.


Here is the config for the addon (no need to edit mission.sqm):

Code: [Select]
ps_cities_whitelist = ["Lakka", "Kavala", "Athira", "Paros", "Chalkeia"];
ps_box_models = ["Land_PaperBox_open_full_F", "Land_Pallet_MilBoxes_F", "Land_PaperBox_open_empty_F", "Land_PaperBox_closed_F"];
ps_markers_enabled = true; 
ps_markers_properties = ["ICON", "mil_dot", "ColorUNKNOWN", [1.2,1.2], "Storage"];
ps_container_class = "Supply500";


See source over at: https://github.com/micovery/ArmA3_Wasteland.Altis/pull/30/

Screenshots:


http://i.imgur.com/YXNt0Le.jpg
Private Storage Addon (Node.js)

Demo video

Database/Persistence supported: Node.js (sock-rpc-stats) (CouchDB, Redis, MySQL, Cassandra, MongoDB)

Re: Private Storage Addon

« Reply #1 posted: Dec 27, 2014, 08:51 PM »
So can u buy this at the store? and put it at your base?
  • Offline micovery
  • Moderator
  • Hardened
  • ******
  • Posts: 159

Re: Private Storage Addon

« Reply #2 posted: Dec 28, 2014, 05:02 AM »
So can u buy this at the store? and put it at your base?

No, you provide a list of cities where you want private storage boxes to be available ... using the "ps_cities_whitelist" config variable. When the server starts, it spawns 1 box in each city.

If you leave the city list empty, then it spawns one in every city. The boxes are spawned in inside car garage buildings.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Private Storage Addon (Node.js)

« Reply #3 posted: Dec 28, 2014, 11:29 AM »
Well if you add the object to R3F and the store it would be?
  • Offline micovery
  • Moderator
  • Hardened
  • ******
  • Posts: 159

Re: Private Storage Addon (Node.js)

« Reply #4 posted: Dec 28, 2014, 12:36 PM »
Well if you add the object to R3F and the store it would be?

Yes, it should work with pretty much any object you want from the store. You just need to make sure that it has the variable "is_storage" set to true.

Code: [Select]
  _obj setVariable ["is_storage", true, true];

The one thing is that the actual stuff inside the "Private storage" wont be saved ... unless you are using Node.js stats. If anyone is up for porting the persistence to extDB, or iniDB ... more than welcome.

The way it works is that for each player there is an invisible box of class "Supply500". Since the "Private Storage" for each player is technically just another box, it could be saved in similar way to how regular boxes are saved.


The tricky part is that you don't want every player's "Private Storage" box to be recreated after a restart.

The "Private Storage" box for a player should only be created when the player joins ... otherwise you'd have thousands of invisible "Private Storage" boxes sitting at coordinate [0,0,1000].

Re: Private Storage Addon (Node.js)

« Reply #5 posted: Feb 08, 2015, 07:33 PM »
Anyone to port this on extdb version?  :)

Re: Private Storage Addon (Node.js)

« Reply #6 posted: Feb 09, 2015, 12:18 AM »
Would like to see this for exdb as well.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Private Storage Addon (Node.js)

« Reply #7 posted: Feb 09, 2015, 09:08 AM »
Well I like the idea, but it kinda breaks down the whole wasteland idea imho. It takes wasteland more to the Altis Life idea. Weapons, crates and vehicles in wasteland should be losable I think.
If you use this you can kinda ditch the whole store in vehicles and crates thing imho.
Not interesting enough for me to port to extDB. But if someone else is up to it :)

Re: Private Storage Addon (Node.js)

« Reply #8 posted: Feb 13, 2015, 11:31 AM »
Any guide for Windows Server installation of Node.js?

I only see Linux guide on Github.

Re: Private Storage Addon (Node.js)

« Reply #9 posted: Feb 14, 2015, 02:12 AM »
Any guide for Windows Server installation of Node.js?

I only see Linux guide on Github.

hi blackcircle

to install the sock under windows rpc

install that : http://nodejs.org/

next see here : https://bitbucket.org/micovery/sock.dll/ install sock.dll in you arma3server root

created a database name that you would like ex : sock

in the command prompt node.js install that : npm install -g sock-rpc-stats

for the connection of the sock via mysql sends this command in command prompt node.js

for example : sock-rpc-stats --url=mysql://root:pass@127.0.0.1:3306/sock

then launches arma3server.exe with this command:

for example : arma3server.exe -sock_host=127.0.0.1 -sock_port=1337

here is you would have in your sock rpc server arma3

Re: Private Storage Addon (Node.js)

« Reply #10 posted: Feb 14, 2015, 10:35 AM »
Thanks Patmac ;). I will try today

Re: Private Storage Addon (Node.js)

« Reply #11 posted: Feb 14, 2015, 11:35 AM »
I've got this error:

> sock-rpc-stats --url=mysql://root:*****@127.0.0.1:3306/sock
SyntaxError: Unexpected identifier
    at Object.exports.createScript (vm.js:44:10)
    at REPLServer.defaultEval (repl.js:117:23)
    at bound (domain.js:254:14)
    at REPLServer.runBound [as eval] (domain.js:267:12)
    at REPLServer.<anonymous> (repl.js:279:12)
    at REPLServer.emit (events.js:107:17)
    at REPLServer.Interface._onLine (readline.js:214:10)
    at REPLServer.Interface._line (readline.js:553:8)
    at REPLServer.Interface._ttyWrite (readline.js:830:14)
    at ReadStream.onkeypress (readline.js:109:10)
>

I'm sure about my password.
  • Offline nrz7
  • Geared Up
  • **
  • Posts: 21

Re: Private Storage Addon (Node.js)

« Reply #12 posted: Jul 19, 2016, 07:47 AM »
I'm assuming that "Supply500" is the biggest config avaliable, but i can't find any info about "Arma 3 container class" in A3 documentation.

Exists any way to add more space to Private Storage?

Code: [Select]
//Arma 3 Storage container class (see list below)
/*
 * Supply0, Supply1, Supply2, Supply3, Supply4, Supply5, Supply6, Supply7, Supply8, Supply9, Supply10, Supply20
 * Supply30, Supply40, Supply50, Supply60, Supply70, Supply80, Supply90, Supply100, Supply110, Supply120, Supply130
 * Supply140, Supply150, Supply160, Supply170, Supply180, Supply190, Supply200, Supply210, Supply220, Supply230, Supply240
 * Supply250, Supply300, Supply350, Supply380, Supply400, Supply420, Supply440, Supply450, Supply480, Supply500
 */

  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: Private Storage Addon (Node.js)

« Reply #13 posted: Jul 19, 2016, 11:39 AM »
Yes I believe it would be possible by using classname from ammocrates, I'll have to double check to make sure those wouldn't save separately or show in game.
  • Offline nrz7
  • Geared Up
  • **
  • Posts: 21

Re: Private Storage Addon (Node.js)

« Reply #14 posted: Jul 24, 2016, 01:26 PM »
I try it without apparent issues.