ZomBerry is still in early testing stage, please report about any issues! Don't forget to mention game version in issue description
- Make sure that you have installed RPCFramework by Jacob_Mango, Arkensor and Kegan Hollern
- Download latest release here
- Unzip the file into the root of your game and server directory
- Add RPCFramework and ZomBerry to your game and server launch options. For example:
-mod=RPCFramework;ZomBerry;
On server:
- Copy file
Vaker.bikey
fromZomBerry\Keys
into serverkeys
folder - Copy file
admins.cfg
fromZomBerry\Config
to[ServerProfilesFolder]\ZomBerry\
subfolder. Default server profiles dir is%LocalAppData%\DayZ\
(alternatives: default dir, custom dir (passed through
-zbryDir=path_to_dir
launch option), mission dir (you might need to modify your missioninit.c
and add lineg_Game.SetMissionPath(path);
inCreateCustomMission
method) - Add your BIGUID into
admins.cfg
file (use new line for each admin entry, you can easily find BIGUID in server logs)
On client:
- Copy file
ZomBerry.cfg
fromZomBerry\Config
toC:\Users\[Your Username]\Documents\DayZ
dir and change menuKey (if you wish to)
Default menu key is M
ZomBerry was created to be as simple and lightweight for users and developers as possible. Right now, there are two main functions available:
AddCategory requires two arguments:
- string Category name
- int color code (basically, colors are usual HEX color codes but with first byte used for alpha channel. Example: 0xFF00FF00 is opaque green color)
GetZomberryCmdAPI().AddCategory("MyMod", COLOR_RED);
AddCommand requires four arguments and have two optional arguments:
- string displayName - name shown in functions list
- string functionName - name of function which will be called
- Class instance - instance of the Class which the function resides
- string categoryName - name of category for function to be placed
- (optional) bool targetRequired - is target required to execute command? Default: true
- (optional) ZBerryFuncParamArray functionParams - array of custom parameters, check examples below. Default: {}
GetZomberryCmdAPI().AddCommand("Induce sneeze", "MyModSneezeTarget", this, "MyMod", true);
Example with custom parameters:
GetZomberryCmdAPI().AddCommand("Set time", "SetTime", this, "MyMod", false, {
new ZBerryFuncParam("Hour", {0, 23, 12,}), //Params are: string paramName, TIntArray {minValue, maxValue, defaultValue}
new ZBerryFuncParam("Minute", {0, 59, 0,}), //You may use up to 3 custom parameters, this example contains only 2
});
Your function will be called with five arguments:
- string functionName (explains itself)
- int adminId - session id of admin who executed this function
- int targetId - session id of targeted player (=adminId if no target was selected)
- vector cursor - position where admin's cursor intersects with ground
- (optional) TIntArray cmdParams - array with 3 int values, each represents one of custom parameters (check examples below)
Note: you may get PlayerBase of player's character using ZBGetPlayerById(int playerId)
function
Example of CmdAPI interaction can be found here and here
- Major UI tweaks and code review
- New functions in default kit
Done:
- Make commands list completely server-side, so it could be supplemented directly from mission/serverside-only addons