thecannons / BaseBuilding-DayZ

Base Building DayZ Project. This adds a building function in DayZ mod regardless of map.
9 stars 16 forks source link

BaseBuilding-DayZ

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

Base Building Full Features List:

Base Building - DayZ 1.2 Changelog

Important for people experiencing broken codes!

RECOMMENDED TO GET STARTED

Installation Tutorial

If you know how to unpbo and pbo your mission/server files, skip past step 6

  1. Open PBO View
  2. Click Unpack at top (or Ctrl + U)
  3. Browse harddrive for YOUR dayz_1.YOURWORLD.pbo mission file, select it and click open
  4. Do this for YOUR dayz_server.pbo file too.
  5. Now youll have YOUR server file and YOURWORLD mission file unpbo'd

Part 1 - The Basics:

I will not provide support for any other server build other than Bliss/Reality

Part 2 - dayz_1.world folder:

Lets do the easy stuff first.
Assuming you have YOUR MISSION folder open as well as dayz_1.world mission folder opened

Modifying your description.ext:

Modifying your init.sqf:

dayz_code folder:

For people who DO NOT have a modified fn_selfActions.sqf:

If you DO NOT have a modified fn_selfActions.sqf and are running 1.7.6.1

(do this for whatever version you are running, if your running neither versions shown, Reference off the README.txt in the compile folder

People WITH Modified fn_selfActions.sqf:

People NOT running my ActiveCombat 1.1:

People who are running my ActiveCombat 1.1:

Part 3 - dayz_server (Modified Default Bliss) folder

For People Running Reality Server Build for 1.7.6.1:


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;
//};

Also for Reality Build users on 1.7.6.1 or objects not removing from Database after restart:

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

Battleye Filters:

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

Database:

BaseBuilding_Deployables.sql can be found in:

"BaseBuilding-DayZ\basebuilding\database"

Execute the script.


Enjoy Building your new base!

Modifying Buildable Parameters

build_list.sqf:

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!

Other Scripts

player_bomb.sqf

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_discWall.sqf

Anti measure for player exploits into walls

antiWall.sqf

When player gets out of vehicle, it teleports him into the vehicle he was getting out of to counter he/she glitching through walls.

dialog_menus by W4rGo

I recommend not modifying this and you must have permission from W4rGo to do so.



CREDITS: