Arma 3
Ikke nok vurderinger
ArmaRedisClient
 
Vurder  
Favoritt
Favorisert
Fjernet som favoritt
Data Type: Mod, Server
Mod Type: Editor Extension
Filstørrelse
Lagt ut
Oppdatert
2.621 MB
6. juli, 2015 @ 17:39
18. mars, 2017 @ 14:32
15 endringslogger ( vis )

Abonner for å laste ned
ArmaRedisClient

Abonnert
Avslutt abonnement
Beskrivelse
This is a lightweight Arma 3 Redis Client Framework.
It can save/load more then the Arma 3 callExtension buffer limit due to split save/load.

NOTE: List Functions can only work within buffer limit!

Redis Server (64bit only) and Demo Mission are included.
ArmaRedisClientEditor for quick and dirty Redis Server edit.

Startup Parameter -arc for Redis Server Settings (Default: -arc=@ArmaRedisClient\config.xml)

See "Description.ext" in Demo Missions for enhanced security features (Arma 3 1.50+).


Setup DB Connection:

NOTE: Hot Swap Feature!

_host = String of your Redis Server Address ( "localhost" is default)
_port = Number of your Redis Server Port ( 6379 is default)
_password = String of your Redis Server Password ( "12345" is default)

[_host, _port, _password] call db_fnc_setup; ( Server or Singleplayer only )
or
[_host, _port ,_password] remoteExecCall ["db_fnc_setup", 2, false]; ( Multiplayer only )


Save to DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data you wanna save
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, str _data, _db] spawn db_fnc_save; ( Server or Singleplayer only )
or
[_key, str _data, _db] remoteExec ["db_fnc_save", 2, false]; ( Multiplayer only )


Load from DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data
_obj = Target to return data can be Object, Array of Objects, Boolean for Players or Server only, Owner ID, Side or Group ( Multiplayer only )
_fnc = String name of function ( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_data = [_key, _db] call db_fnc_load; ( Server or Singleplayer only )
or
[_key, player, _fnc, _call, _db] remoteExec ["db_fnc_load", 2, false]; ( Multiplayer only )


Delete from DB:

NOTE: Don't work for List's!

_key = String to your saved data ( Case sensitivity )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _db] call db_fnc_delete; ( Server or Singleplayer only )
or
[_key, _db] remoteExec ["db_fnc_delete", 2, false]; ( Multiplayer only )


Add List (or pushBack Element to List) to DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data you wanna save
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _data, _db] spawn db_fnc_listadd; ( Server or Singleplayer only )
or
[_key, _data, _db] remoteExec ["db_fnc_listadd", 2, false]; ( Multiplayer only )


Load List from DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data
_obj = Target to return data can be Object, Array of Objects, Owner ID ( 0 = All and 2 = Server only ), Side or Group ( Multiplayer only )
_fnc = String name of function ( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_data = [_key, _db] call db_fnc_listload; ( Server or Singleplayer only )
or
[_key, player, _fnc, _call, _db] remoteExec ["db_fnc_listload", 2, false]; ( Multiplayer only )


Set List Element in DB to new Value:

_key = String to your saved data ( Case sensitivity )
_index = Number of Index in your List
_data = Number/Array/String of your new Value
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _index, _data, _db] spawn db_fnc_listset; ( Server or Singleplayer only )
or
[_key, _index, _data, _db] remoteExec ["db_fnc_listset", 2, false]; ( Multiplayer only )


Get List Element from DB:

_key = String to your saved data ( Case sensitivity )
_index = Number of Index in your List
_data = Array of your data
_obj = Target to return data can be Object, Array of Objects, Owner ID ( 0 = All and 2 = Server only ), Side or Group ( Multiplayer only )
_fnc = String name of function ( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_data = [_key, _index, _db] call db_fnc_listget; ( Server or Singleplayer only )
or
[_key, _index, _obj, _fnc, _call, _db] remoteExec ["db_fnc_listget", 2, false]; ( Multiplayer only )


Remove List Element from DB:

_key = String to your saved data ( Case sensitivity )
_index = Number of Index in your List you want to remove
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _index, _db] spawn db_fnc_listrem; ( Server or Singleplayer only )
or
[_key, _index, _db] remoteExec ["db_fnc_listrem", 2, false]; ( Multiplayer only )


Delete List from DB:

NOTE: Use only for List's!

_key = String to your saved data ( Case sensitivity )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _db] call db_fnc_listdel; ( Server or Singleplayer only )
or
[_key, _db] remoteExec ["db_fnc_listdel", 2, false]; ( Multiplayer only )


Save Code to DB:

_key = String to your saved data ( Case sensitivity )
_code = Code you wanna save
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _code, _db] spawn db_fnc_codesave; ( Server or Singleplayer only )
or
[_key, _code, _db] remoteExec ["db_fnc_codesave", 2, false]; ( Multiplayer only )


Load Code from DB:

_key = String to your saved data ( Case sensitivity )
_code = Returns your saved Code
_obj = Target to return data can be Object, Array of Objects, Owner ID ( 0 = All and 2 = Server only ), Side or Group ( Multiplayer only )
_fnc = String name of function to return your code( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_code = [_key, _db] call db_fnc_codeload; ( Server or Singleplayer only )
or
[_key, _obj, _fnc, _call, _db] remoteExec ["db_fnc_codeload", 2, false]; ( Multiplayer only )

Save DB to Harddisk:

Due to DB Backup Systems you may need this command

call db_fnc_savedb; ( Server or Singleplayer only )
or
[] remoteExecCall ["db_fnc_savedb", 2, false]; ( Multiplayer only )


Get Server Time:

_return = String or Array of Server Time
_switch = Boolean true returns String ( Format "DD-MM-YYYY HH:MM:SS" ) / false returns Array of Numbers ( Format [DD,MM,YYYY,HH,MM,SS] ) (Default: String)
_delimiter = ( Optional: ) String for Date delimiter (Default: "-")
_type = ( Optional: ) Number for Date Type 1 = DD-MM-YYYY, 2 = YYYY-MM-DD, 3 = MM-DD-YYYY (Default: 1)

_return = _switch call db_fnc_time; ( Server or Singleplayer only )
or
_return = [_switch, _delimiter, _type] call db_fnc_time; ( Server or Singleplayer only )


Log to Server:

_file = String of your Filename to log ( "ArmaRedisClient.log" is default)
_text = String of your Text to log
_timestamp = ( Optional: ) Boolean true / false to add Timestamp to log ( false is default )

[_file, _text, _timestamp] call db_fnc_log; ( Server or Singleplayer only )
or
[_file, _text, _timestamp] remoteExecCall ["db_fnc_log", 2, false]; ( Multiplayer only )
< >
3 kommentarer
Verångä Nömmizger 10. nov., 2016 @ 9:33 
can you make a video how to explain how to do it because i got so confused
Creedcoder  [skaper] 3. juli, 2016 @ 15:25 
I hope you like it XD. Feedback is always welcome.
sorophx 2. juli, 2016 @ 14:05 
Ha! Here I was thinking about trying to write a MongoDB service for Arma, and there's one already for Redis. Guess I don't have to do anything anymore. Redis is a very fast database.