Base Building DayZ Project. This adds a building function in DayZ mod regardless of map.
I will be providing minimal support for anyone modifying the existing code. If you have any questions, please message me on git or email me at daimyo21mods@gmail.com
Arma 2 SQF Syntax Highlights for Notepad++ HIGHLY RECOMMENDED
PBO View (or equivalent pbo tool) -- http://www.armaholic.com/page.php?id=1434
YOUR servers dayz_1.YOURWORLD.pbo
mission file
YOUR servers dayz_server.pbo
hive server file
If you know how to unpbo and pbo your mission/server files, skip past step 6
Ctrl + U
)click open
Download the master branch from https://github.com/Daimyo21/BaseBuilding-DayZ/archive/master.zip
Extract to folder of your choice.
Once downloaded, you'll notice 2 folders, dayz_1.world and dayz_server
dayz_1.world is a generic mission file that can be used with any DayZ map
dayz_server is a generic bliss server file (last release before Reality), only including the files modified to get Base Building to work when the server restarts.
Should transfer over to Reality Server Build easily.
If your using other server files like Pwnzor, it shouldnt be hard to implement if you know the server files well
I will not provide support for any other server build other than Bliss/Reality
Lets do the easy stuff first.
Assuming you have YOUR MISSION folder open as well as dayz_1.world mission folder opened
Simply Drag and Drop these files over FROM dayz_1.world TO YOUR dayz_1.YOURWORLD folders main directory:
-buildRecipeBook folder
-dayz_code folder
-build_recipe_dialog.hpp
-build_recipe_list_dialog.hpp
-defines.hpp
description_code.txt
file in dayz_1.worldinit_code.txt
file in dayz_1.worldGoto "dayz_code\compile\" folder directory in YOUR dayz_1.YOURWORLD mission folder (that we dragged in earlier)
Pay attention to ONLY these files:
-fn_selfActions 1.7.4.4 with Base Building 1.2
-fn_selfActions 1.7.6.1 Default as of 3-15-2013 no BB
-fn_selfActions 1.7.6.1 with Base Building 1.2
-player_build - with ActiveCombat 1.1 compatibility
-player_build
If you DO NOT have a modified fn_selfActions.sqf and are running 1.7.6.1
Simply rename
"fn_selfActions 1.7.6.1 with Base Building 1.2" to fn_selfActions.sqf
Then delete:
-fn_selfActions 1.7.4.4 with Base Building 1.2
-fn_selfActions 1.7.6.1 Default as of 3-15-2013 no BB
(do this for whatever version you are running, if your running neither versions shown, Reference off the README.txt in the compile folder
In YOUR "dayz_server\init\server_functions.sqf"
Find this function:
check_publishobject = {
"bunch of code inside"
};
And Change this line:
if ((typeOf _object) in _allowedObjects) then {
to:
if ((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class) then {
This will insure that your buildables will write to database.
if (!(_object isKindOf "Building")) exitWith {
deleteVehicle _object;
};
TO:
//if (!(_object isKindOf "Building")) exitWith {
//deleteVehicle _object;
//};
In "dayz_1.world\dayz_code\actions\player_remove.sqf"
Change this:
if (isServer) then { dayzDeleteObj call local_deleteObj; };
to this:
if (isServer) then { dayzDeleteObj call server_deleteObj; };
Continue below.
-Section 1 is mandatory if you want your buildables to be placed properly after server restart.
-Section 2 is REQUIRED if you did Section 1
-Section 3 is optional but recommended for server who want their bases to update in a 300 meter radius of KeyPad Panels
-Use PBO View to pbo your dayz_1.YOURWORLD folder and your dayz_server folder
Can be found in the battleye folder. Not 100% sure if that is all the filters, please report any kicks that you do not know how to resolve or simply change to log only!
Line 20 - 23 in scripts.txt add:
!"_detonate = \"grenade\" createVehicle _pos;"
5 createVehicle !"\"createVehicle\"," !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];\n_object setDir _dir;\nplayer reveal _object;" !"_item = createVehicle [_iItem, _iPos, [], _radius, \"CAN_COLLIDE\"];" !"_item = createVehicle [\"WeaponHolder\", position player, [], 0.0, \"CAN_COLLIDE\"];" !"_holder = \"WeaponHolder\" createVehicle _pos;" !"_bolt = createVehicle [\"WoodenArrowF\", _endPos, [], 0, \"CAN_COLLIDE\"];" !"_weapon = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];" !"_weapon = _classname createVehicle _location;\n_weapon setDir _dir;\n_weapon setpos _location;\nplayer reveal _weapon;" !"dayz_hasFire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];"
5 createVehicleLocal !"\"createVehicleLocal\"," !"_point = \"Logic\" createVehicleLocal getPosATL _unit;" !"_object = _type createVehicleLocal _position;" !"_fl = \"#particlesource\" createVehicleLocal getpos _v;" !"_lightArea = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_lightSpark = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_source = \"#particlesource\" createVehicleLocal getpos (_this select 0);" !"_source = \"#particlesource\" createVehicleLocal _pos;\n_source setParticleParams" !"_smoke = \"#particlesource\" createVehicleLocal _pos;\n_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];" !"_Crater= \"CraterLong\" createvehiclelocal [_pos select 0, _pos select 1, 0];\n_Crater setdir (_dir + (180 * _i));" !"_source = \"#particlesource\" createVehicleLocal getPosATL _unit;"
1 disableUserInput !"\"disableUserInput\"," !"disableUserInput false;"
Ill update as long as people message me with kicks due to base building
BaseBuilding_Deployables.sql can be found in:
"BaseBuilding-DayZ\basebuilding\database"
Execute the script.
This is the file used to modify parameters such as:
Alternatively, if you modify any of these parameters, they are ONLY client side. In order to make sure these parameters stay persistent on server restart, you must modify the:
build_baseBuilding_arrays = { BUNCH OF CODE SIMILAR TO BUILD_LIST.sqf };
Found in the "dayz_server (Modified Default Bliss)\init\server_functions.sqf" that we installed earlier
You can simply copy and paste the:
_buildlist = [ ENTIRE ARRAY WITH PARAMETERS YOU CHANGED ];
from "dayz_1.world\dayz_code\external\dy_work\build_list.sqf"
Into the server_functions.sqf's _buildlist = [ SERVER BUILD LIST ARRAY ];
Detailed information can be found inside the build_list.sqf itself on how to modify these parameter arrays!
found in dayz_1.world\dayz_code\external\dy_work\player_bomb.sqf
Controls functionality of player placed bombs, modify at your own risk!
Anti measure for player exploits into walls
When player gets out of vehicle, it teleports him into the vehicle he was getting out of to counter he/she glitching through walls.
I recommend not modifying this and you must have permission from W4rGo to do so.