Giter Club home page Giter Club logo

hive's Introduction

Compiling:

You must have Visual Studio 2012 Update 4 or later installed (express versions might work as long as you also have the Windows SDK installed).

The following dependencies are required to build Hive:
	BOOST:
	You need both includes and compiled libraries
	If you don't have it, get boost from http://www.boost.org/
	Compilation instructions (how to use bjam for your compiler) can be found at http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html
	Use 1.54 for vs2012 and 1.55 or higher for vs2013 (1.54 has a bug on vs2012, might be fixed in post 1.55 releases)
	Once compiled, make sure to add the include and lib folders to your VC++ directories inside Visual Studio (User property sheet for your Platform).
        Sample bjam command line (after running boostrap.bat to get bjam.exe):
		For Visual Studio 2012:
			bjam toolset=msvc-11.0 variant=release,debug runtime-link=shared,static link=static threading=multi address-model=32 --without-log --stagedir=lib\x86\v110 --build-dir=out\x86\v110
		For Visual Studio 2013:
			bjam toolset=msvc-12.0 variant=release,debug runtime-link=shared,static link=static threading=multi address-model=32 --without-log --stagedir=lib\x86\v120 --build-dir=out\x86\v120

	Then copy $(BOOST_DIR)boost to $(BOOST_DIR)\include\ (a new folder you made) and add
		$(BOOST_DIR)include 
	to VC++ Include directories and 
		$(BOOST_DIR)lib\$(PlatformShortName)\$(PlatformToolset)\lib
	to VC++ Library directories
	
	POCO:
	Get my customized version by cloning [email protected]:rajkosto/deps-poco.git into some out-of-tree directory.
	Set the environment variable POCO_DIR to the directory Poco.props can be found in.
	The parts of Poco should be built in the following order: CppUnit,Foundation,XML,Zip,Util,Net
	For each of them, open the corresponding solution file for your desired Visual Studio toolset, go to Build->Batch Build, Select All, then click Build.
	You should have 0 failed configurations after the build is done for each one.
	
	TBB:
	Get my customized version by cloning [email protected]:rajkosto/deps-tbb.git into some out-of-tree directory.
	Set the environment variable TBB_DIR to the directory TBB.props can be found in.
	To build TBB, go to the build/vsproject folder from the folder you cloned into.
	Open the makefile_XXX solution for the desired Visual Studio toolset you want to use.
	Go to Build->Batch Build, Select All and then click Build.
	There should be 0 failed configurations after the build is complete.
	
	DETOURS:
	Get my customized version by cloning [email protected]:rajkosto/deps-detours.git into some out-of-tree directory.
	Set the environment variable DETOURS_DIR to the directory Detours.props can be found in.
	Open a Visual Studio command prompt which matches your wanted toolset/platform, cd to the folder, and run nmake from it.
	Some samples might fail to build, but as long as you've got detours.lib, it doesn't matter.
	
	MYSQL:
	Get my precompiled version by cloning [email protected]:rajkosto/deps-mysql.git into some out-of-tree directory.
	Set the environment variable MYSQL_DIR to the directory MySQL.props can be found in.
	As the libraries are precompiled for any possible supported Visual Studio toolchain, you don't compile them yourself.
	
	POSTGRESQL: (only if you want to build DatabasePostgre which probably doesn't work anyway)
	Get my precompiled version by cloning [email protected]:rajkosto/deps-postgresql.git into some out-of-tree directory.
	Set the environment variable POSTGRESQL_DIR to the directory PostgreSQL.props can be found in.
	As the libraries are precompiled for any possible supported Visual Studio toolchain, you don't compile them yourself.
	
You are now ready to open Source/Hive.sln in Visual Studio. The default projects are set to build using the 2012-xp toolset.
If you are using a different toolset, select all the projects in the solution, right click -> Properties, select "All Configurations" from the top-left combobox,
go to the General tab, and select the Platform Toolset you want. After that, click Apply or OK to close the Properties page.
From there, simply compile the Release configuration to get binaries that can be used in-game
The Debug configuration simply compiles an executable that runs some tests, and is not relevant here

Usage:

If you don't want to compile, you can download a prepackaged release for each released version from http://hive.rajko.info/ 
After successful compilation (or download of a prepackaged release), the Binaries folder should contain HiveExt.dll and DatabaseMySql.dll/DatabasePostgre.dll
DatabaseMySql.dll/DatabasePostgre.dll should be placed in the root directory of your game installation
If you don't have the TBB library installed to global system paths, those dlls should also be copied to the same dir as DatabaseMySql.dll/DatabasePostgre.dll
HiveExt.dll needs to go inside the currently used hive mod folder (usually @hive under the root dir)
While your customised copy of HiveExt.ini goes into your profile folder (server profile, like cfgdayz, next to the .RPT files)
For a description of available HiveExt.ini options, consult that file itself, where the descriptions are marked as comments

If you are going to run your own database server to connect to, look inside the SQL folder for the scripts that you need to execute on your database
the x_tables.sql files will create the tables, while the obj_sample_data.sql has the default spawn order for vehicles in it (make sure to change the instance id)
If you are already running some similar db layout, MAKE SURE to read the ENTIRETY of HiveExt.ini (especially the one about the Objects table name, and the PlayerID column)
to be certain that the parameters inside match what you are currently running as the database.

Final:

This project was started as a better alternative to the "official" Hive access library for DayZ,
however, since my request for making it the official Hive access dll was denied (at the time),
and that the most popular usage of it was running "private" or "local" servers for the game, 
I have removed all the restrictions and certificate systems that were in place, so that it can connect to any server you want.

Recently, after the founding of the DayZMod community that currently maintains DayZMod, this project DID become the official Hive access library.
Just compiling the source code isn't enough to connect to the public hive database though, for that, use the libraries distributed with the official server files themselves
Or, download a "blessed" version from http://hive.rajko.info/ (blessed version is identical to the open source one, except that it can connect to the public hive by default)
You can (and it's preferred) to use the precompiled "blessed" version for connecting to your private hive as well, to save you from having to compile it yourself.

Hive access library by Rajko Stojadinovic (https://github.com/rajkosto)
If you would be so kind, and are satisfied with what this thing does, maybe send a donation my way to [email protected]

Good luck with your DayZ hosting !

hive's People

Contributors

rajkosto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hive's Issues

Problem with compile hiveExt with detours.h

Hi, please help fix error when i start compile library, i install boost library download 5 deps (repository) add 5 environment variable to windows (5 deps folider) and try to compile but i see error with detours.h (No such file or directory)

How does the CHILD:500-505 work?

Can I do a Insert statement? What about an update statement?

If so, can you provide an example on how to do this? I would like to see an easy way to issue custom SQL commands.

variables messed

database.dll - 0.9.8.4
hiveEXT.dll - 0.9.6.6

rpt
17:57:03 "HIVE: WRITE: "CHILD:306:1081:[["sklo predni P",1],["sklo predni L",1],["glass2",1],["glass3",1]]:0.0511811:""
17:57:03 "WRITE: ->["PASS"][CHILD:306:1081:[["sklo predni P",1],["sklo predni L",1],["glass2",1],["glass3",1]]:0.0511811:]"
17:57:05 "HIVE: WRITE: "CHILD:305:1081:[94,[8994.75,5386.68,0.00531006]]:0.356997:""
17:57:05 "WRITE: ->["PASS"][CHILD:305:1081:[94,[8994.75,5386.68,0.00531006]]:0.356997:]"

hiveEXT.log
2012-11-16 17:57:03 Database.MySqlPreparedStatement: [Error] SQL: cannot execute 'UPDATE `Object_DATA` SET `Hitpoints` = ? , `Damage` = ? WHERE `ObjectID` = ?'  VALUES("[["sklo predni P",1],["sklo predni L",1],["glass2",1],["glass3",1]]", 0.051181100308895111, 1081), ERROR Data too long for column 'Worldspace' at row 1
2012-11-16 17:57:03 Database.MySqlPreparedStatement: [Error] SQL: cannot execute 'UPDATE `Object_DATA` SET `Hitpoints` = ? , `Damage` = ? WHERE `ObjectID` = ?'  VALUES("[["sklo predni P",1],["sklo predni L",1],["glass2",1],["glass3",1]]", 0.051181100308895111, 1081), ERROR Data too long for column 'Worldspace' at row 1
2012-11-16 17:57:05 Database.MySqlPreparedStatement: [Error] SQL: cannot execute 'UPDATE `Object_DATA` SET `Hitpoints` = ? , `Damage` = ? WHERE `ObjectID` = ?'  VALUES("[["sklo predni P",1],["sklo predni L",1],["glass2",1],["glass3",1]]", 0.051181100308895111, 1081), ERROR Data too long for column 'Worldspace' at row 1
2012-11-16 17:57:05 Database.MySqlPreparedStatement: [Error] SQL: cannot execute 'UPDATE `Object_DATA` SET `Hitpoints` = ? , `Damage` = ? WHERE `ObjectID` = ?'  VALUES("[["sklo predni P",1],["sklo predni L",1],["glass2",1],["glass3",1]]", 0.051181100308895111, 1081), ERROR Data too long for column 'Worldspace' at row 1

mysql-query.log
1829 Execute UPDATE `Object_DATA` SET `Worldspace` = '[[\"sklo predni P\",1],[\"sklo predni L\",1],[\"glass3\",1]]' , `Fuel` = 0.05118110030889511 WHERE `ObjectID` = 1081
1829 Execute UPDATE `Object_DATA` SET `Worldspace` = '[[\"sklo predni P\",1],[\"sklo predni L\",1],[\"glass3\",1]]' , `Fuel` = 0.05118110030889511 WHERE `ObjectID` = 1081

Setup the Visual Environment

Hello,
I keep having lots of issues with the dependencies and all that stuff. I've done all that you said in the Readme but I keep having Errors, Can you help me with this ?

Thanks Dude
Harmdhast

Sorry for my bad english, i'm a french guy.

Infinite loading

I've launch compiling and now it keeps loading...
Don't know what to do : Stop and try again or let it continue...

Harmdhast

arma2oaserver.exe keeps crashing when hiveEXT.dll initializes

as the title says, my arma2oaserver.exe keeps crashing when hiveEXT.dll is initializing.

I mainly run the blisshive and it works like a charm.

heres a small output of my .rpt file:

Mods: @hive
Distribution: 0
Version 1.62.96585
Fault address: 6EEC8F70 00:6EEC8F70 Unknown module
file: dayz_1 (__cur_mp)
world: chernarus

Registers:
EAX:77613665 EBX:1D63BE14
ECX:00000000 EDX:6EEC8F70
ESI:00000000 EDI:00000000
CS:EIP:0023:6EEC8F70
SS:ESP:002B:1E00FAF4 EBP:1E00FAFC
DS:002B ES:002B FS:0053 GS:002B

Flags:00010246

note: Minidump has been generated into the file Bliss\arma2oaserver.mdmp
0:32:51 UH1Wreck_DZ: MainTurret - unknown animation source MainTurret
0:32:51 UH1Wreck_DZ: MainGun - unknown animation source mainGun
0:32:51 UH1Wreck_DZ: Gatling - unknown animation source Gatling
0:32:52 "CLEANUP: INITIALIZING CLEANUP SCRIPT"

Cannot open file 'PocoFoundationmd.lib'

I keep getting this error when building. I've followed the readme exactly;

  • Got Visual Studio 2010 SP1
  • Built latest poco basic edition
  • Copied precompiled tbb into dependencies
  • Got boost built

The weird thing is, the file in question does exist in Dependencies10/poco/lib

Feature Request: Set year/month/date in hiveext.ini

Like This:

;Possible values: Local, Static
Type = Static
;If using Static type, the year/month/day to set the date to
Year = 2012
Month = 7
Day = 3

So then people can make it so its a full moon every night.

Compile errors

When I go to compile, I get these two errors to start with...

Error 2 error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_52.lib' C:\Users\xxx\Documents\Visual Studio 2010\Projects\hive-master\Hive\Source\Restarter\LINK Restarter

Error 1 error MSB3073: The command "bash C:\Users\xxx\Documents\Visual Studio 2010\Projects\hive-master\Hive\Source\HiveLib\version_gen.sh C:\Users\xxx\Documents\Visual Studio 2010\Projects\hive-master\Hive\Source\HiveLib\Version.cpp.template C:\Users\xxx\Documents\Visual Studio 2010\Projects\hive-master\Hive\Source\HiveLib\Version.cpp
:VCEnd" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 103 6 HiveLib

Many players got empty inventory after server restart.

Hi,

I was first reporting this issue to ayan4m1 but I think it's probably something I can put into this thread.

I'm running a quite popular dayz server with panthera 1.6.1 map and many players complains after each restart they are loosing their gear. I tracked this down with one player and saw some strange inventory updates.

Please look at about 04.13 after the restart. It writes [[],[]]:[,[[],[]],[[],[]]] to the inventory.. can't be correct?

/smygarn

-snip -

before restart

2012-11-11 16:59:43 : [Information] Method: 201 Params: 3234:[140,[3004.39,5813.04,-8.24e-04]]:[]:[]:[]:false:false:0:0:101:0:[MR43,amovpercmrunsraswrfldf,41]:0:0::0:
2012-11-11 16:59:43 : [Information] Result: ["PASS"]
2012-11-11 16:59:43 Database.MySQLConnection: [Trace] Execute [59 ms] SQL: update survivor s set s.backpack = '["DZ_ALICE_Pack_EP1",[["huntingrifle"],[1]],[["ItemPainkiller","ItemBloodbag","ItemMorphine"],[2,1,1]]]' , s.inventory = '[["ItemCompass","M16A2","ItemMap","ItemKnife","ItemHatchet","glock17_EP1","ItemFlashlight","ItemMatchbox","Binocular","ItemWatch","ItemToolbox"],[["30Rnd_556x45_Stanag",28],["30Rnd_556x45_Stanag",21],["30Rnd_556x45_Stanag",29],["30Rnd_556x45_Stanag",29],["30Rnd_556x45_Stanag",26],["30Rnd_556x45_Stanag",27],["30Rnd_556x45_Stanag",26],"ItemPainkiller","ItemMorphine","ItemBandage",["17Rnd_9x19_glock17",11],["17Rnd_9x19_glock17",16],["17Rnd_9x19_glock17",7],["17Rnd_9x19_glock17",16],["17Rnd_9x19_glock17",8],"ItemBandage","ItemBandage"]]' , s.medical = '[false,true,false,false,false,false,false,12000,[],[0.757,0],0,[27.755,26.6]]' , s.model = 'Camo1_DZ' , s.state = '["M16A2","amovppnemstpsraswrfldnon",42]' , s.Worldspace = '[204,[4769.53,7693.31,0.001]]' where s.id = 3208
2012-11-11 16:59:43 Database.MySQLConnection: [Trace] Execute [50 ms] SQL: update survivor s set s.state = '["MR43","amovpercmrunsraswrfldf",41]' , s.Worldspace = '[140,[3004.39,5813.04,-8.24e-04]]' where s.id = 3234

after restart

2012-11-11 17:03:34 : [Information] Method: 101 Params: 68256582:1:Lundell:
2012-11-11 17:03:34 Database.MySQLConnection: [Trace] Query [0 ms] SQL: select name from profile WHERE unique_id = '68256582'
2012-11-11 17:03:34 Database.MySQLConnection: [Trace] Query [1 ms] SQL: select s.id, s.worldspace, s.inventory, s.backpack, timestampdiff(minute, s.start_time, s.last_updated) as SurvivalTime, timestampdiff(minute, s.last_ate, NOW()) as MinsLastAte, timestampdiff(minute, s.last_drank, NOW()) as MinsLastDrank, s.model from survivor s join instance i on s.world_id = i.world_id and i.id = 1 where s.unique_id = '68256582' and s.is_dead = 0
2012-11-11 17:03:34 : [Information] Result: ["PASS",false,"3234",[140,[3004.39,5813.04,-8.24e-04]],[["ItemCompass","Makarov","MR43","Binocular","ItemKnife"],["ItemSodaCoke","ItemSodaCoke","ItemSodaPepsi",["2Rnd_shotgun_74Slug",1],"2Rnd_shotgun_74Slug","ItemBandage",["8Rnd_9x18_Makarov",2],["8Rnd_9x18_Makarov",2],"ItemBandage",["8Rnd_9x18_Makarov",2],["8Rnd_9x18_Makarov",4],"ItemBandage","8Rnd_9x18_Makarov"]],["DZ_CivilBackpack_EP1",[[],[]],[["PartFueltank"],[1]]],[36,0,0],"Survivor2_DZ",0.96]
2012-11-11 17:03:35 Database.MySqlPreparedStatement: [Trace] Execute [41 ms] Statement: update survivor set last_updated = CURRENT_TIMESTAMP where id = ? VALUES(3234)
2012-11-11 17:03:35 : [Information] Method: 102 Params: 3234:
2012-11-11 17:03:35 Database.MySQLConnection: [Trace] Query [1 ms] SQL: select s.worldspace, s.medical, s.zombie_kills, s.headshots, s.survivor_kills, s.bandit_kills, s.state, p.humanity from survivor s join profile p on s.unique_id = p.unique_id where s.id = 3234
2012-11-11 17:03:35 : [Information] Result: ["PASS",[false,false,false,false,false,false,true,10685.8,[],[0.287,0],0,[412.055,507.11]],[1,0,1,0],["MR43","amovpercmrunsraswrfldf",41],[140,[3004.39,5813.04,-8.24e-04]],2500]

2012-11-11 17:04:13 : [Information] Method: 201 Params: 3234:[343,[5080.63,4599.38,0]]:[[],[]]:[,[[],[]],[[],[]]]:[false,false,false,false,false,false,true,10685.8,[],[0.287,0],0,[412.055,507.11]]:false:false:0:0:0:0:[,amovpercmstpsnonwnondnon,100]:0:0:Survivor2_DZ:0:
2012-11-11 17:04:13 : [Information] Result: ["PASS"]
2012-11-11 17:04:13 Database.MySQLConnection: [Trace] Execute [36 ms] SQL: update survivor s set s.backpack = '["",[[],[]],[[],[]]]' , s.inventory = '[[],[]]' , s.medical = '[false,false,false,false,false,false,true,10685.8,[],[0.287,0],0,[412.055,507.11]]' , s.model = 'Survivor2_DZ' , s.state = '["","amovpercmstpsnonwnondnon",100]' , s.Worldspace = '[343,[5080.63,4599.38,0]]' where s.id = 3234
2012-11-11 17:04:13 : [Information] Method: 103 Params: 68256582:3234:2:
2012-11-11 17:04:13 : [Information] Result: ["PASS"]

  • snip -

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.