Putting map addons into server pbo

A couple of newbie questions for those that know more than me, pretty much most of you ..

After reading this http://opendayz.net/threads/military-base-reddawn-outpost.11919/

What I do is create a buildings folder inside the server pbo, such as dayz_epoch then call on it from the bottom of the server_functions.sqf like example

[] execVM "buildings\RedDawnBase.sqf";

And if that's the case, Would I be able to add more than just this without it impacting too much on the mission file, say more map addons/buildings/points of interest.


Would that be right?? or am I wrong here....

Any info, even calling me a dumb noob(as long as u show me what I did wrong) would be useful..
I'm still learning, so I understand that I don't know shit about it tbh

Thnx in advance
Bags
 
On my server
If (isserver) then [execVM "mission.sqf";];
works at the bottom of the init.sqf file. This should not work though. The bracket is weird, however it works. I don't question it. The Arma gods do not look down on me kindly sometimes.
 
Unpack your server.pbo and create a Folder inside (call it building if you want, I called it addons).
Open your server_functions.sqf wich is in the init folder with a texteditor and put this in, at the very bottom.
Code:
[] execVM "\z\addons\dayz_server\yourfoldername\yourfilename.sqf";
(replace yourfoldername and yourfilename with the actual names of your folder and files)
You can have as many of this lines like you want to add files
Code:
//foldername
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";

In the actual sqf-files just make sure that you replace those 3 lines at the end (if they are there/will be only if you take the sqf direct from the Editor)
Code:
processInitCommands;
runInitScript;
finishMissionInit;
with this
Code:
};

and at the begining replace this
Code:
activateAddons [
];
 
activateAddons [];
initAmbientLife;
with this
Code:
if (isServer) then {

Also make sure that you took out everything like this
Code:
_this = createCenter west;
_center_6 = _this;
 
_group_4 = createGroup _center_6;
 
_unit_6 = objNull;
if (true) then
{
  _this = _group_4 createUnit ["Bandit1_DZ", [11451.369, 11311.747], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_4 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

This will spawn all custom buildings serverside wich can be good as missionfilesize wont enlarge (dont do heavily normaly with those addons) but also it will prevent that certain AI´s or Zombies glitch to walls.
Works perfect! Enjoy!

PS: Many THX to P1 Kashwak who shared this in the first place.
 
Unpack your server.pbo and create a Folder inside (call it building if you want, I called it addons).
Open your server_functions.sqf wich is in the init folder with a texteditor and put this in, at the very bottom.
Code:
[] execVM "\z\addons\dayz_server\yourfoldername\yourfilename.sqf";
(replace yourfoldername and yourfilename with the actual names of your folder and files)
You can have as many of this lines like you want to add files
Code:
//foldername
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";
[] execVM "\z\addons\dayz_server\foldername\yourfilename.sqf";

In the actual sqf-files just make sure that you replace those 3 lines at the end (if they are there/will be only if you take the sqf direct from the Editor)
Code:
processInitCommands;
runInitScript;
finishMissionInit;
with this
Code:
};

and at the begining replace this
Code:
activateAddons [
];

activateAddons [];
initAmbientLife;
with this
Code:
if (isServer) then {

Also make sure that you took out everything like this
Code:
_this = createCenter west;
_center_6 = _this;

_group_4 = createGroup _center_6;

_unit_6 = objNull;
if (true) then
{
  _this = _group_4 createUnit ["Bandit1_DZ", [11451.369, 11311.747], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_4 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

This will spawn all custom buildings serverside wich can be good as missionfilesize wont enlarge (dont do heavily normaly with those addons) but also it will prevent that certain AI´s or Zombies glitch to walls.
Works perfect! Enjoy!

PS: Many THX to P1 Kashwak who shared this in the first place.



Hi,

I have done exactly what you have in your thread a few dozen times and it doesn't work on my server. All my custom buildings have been in mission.pbo and work fine there but when I move them to a folder in dayz_server.pbo with reference in server_functions.sqf when I login in I get error that the first custom building listed cannot be found

ie: \buildings\lopatino.sqf not found


Since I cut and pasted my custom files from mission side then changed path to:

[]execVM \z\addons\dayz_server\buildings\lopatino.sqf"';

Its not a typo and the sqf files work on mission side

what is my problem?? one thread showed dayz_server\Mission\buildings path I tried that too but I don't have Mission folder in root of dayz_server

thanks in advance

Gramps ....frustrated
 
Sorry for the late reply, havnt been on much lately! So you have in your sqf file "if (isServer) then {" on the top, removed all center,group and units entries and has deleted the 3 lines at the end and replaced them with }; ?

Should look like :
if (isServer) then {

_vehicle_xxxx = objNull;
if (true) then
{
_this = createVehicle ["ClutterCutter_small_EP1", [13402.218, 5238.4785, 1.2874603e-005], [], 0, "CAN_COLLIDE"];
_vehicle_xxxx = _this;
_this setPos [13402.218, 5238.4785, 1.2874603e-005];
};
(here can be much more entries like above)
};

And in the server_function.sqf at the bottom

[] execVM "\z\addons\dayz_server\yourfoldername\yourfilename.sqf"; (this should be repeated for each file)

If this is the case it must work! Make sure you didnt delete any of the building code by mistake, like _vehicle_xxxx = objNull; etc
and make sure you have all the }; too.
 
i am very confused i tried adding building and it jut crashes my server
does any of this look correct?

if (isServer) then
{
_vehicle_87 = objNull;
if (true) then
{
_this = createVehicle ["Land_HBarrier_large", [11830.977, 12592.087, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_87 = _this;
_this setDir 30.962219;
_this setPos [11830.977, 12592.087, -1.5258789e-005];
};

_vehicle_134 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_Barracks_i_EP1", [4490.3066, 10858.975, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_134 = _this;
_this setDir 114.96602;
_this setPos [4490.3066, 10858.975, 3.0517578e-005];
};

_vehicle_135 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_Barracks_i_EP1", [4480.0405, 10863.438], [], 0, "CAN_COLLIDE"];
_vehicle_135 = _this;
_this setDir 115.14184;
_this setPos [4480.0405, 10863.438];
};

_vehicle_136 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_Barracks_i_EP1", [4470.5269, 10867.93, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_136 = _this;
_this setDir 115.19157;
_this setPos [4470.5269, 10867.93, 3.0517578e-005];
};

_vehicle_137 = objNull;
if (true) then
{

_vehicle_146 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_hangar_EP1", [4279.6763, 10975.53, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_146 = _this;
_this setDir -24.999294;
_this setPos [4279.6763, 10975.53, -3.0517578e-005];
};
};[/code]
 
try using this version instead:

Code:
if (isServer) then
{
_vehicle_87 = objNull;
if (true) then
{
_this = createVehicle ["Land_HBarrier_large", [11830.977, 12592.087, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_87 = _this;
_this setDir 30.962219;
_this setPos [11830.977, 12592.087, -1.5258789e-005];
};

_vehicle_134 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_Barracks_i_EP1", [4490.3066, 10858.975, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_134 = _this;
_this setDir 114.96602;
_this setPos [4490.3066, 10858.975, 3.0517578e-005];
};

_vehicle_135 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_Barracks_i_EP1", [4480.0405, 10863.438], [], 0, "CAN_COLLIDE"];
_vehicle_135 = _this;
_this setDir 115.14184;
_this setPos [4480.0405, 10863.438];
};

_vehicle_136 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_Barracks_i_EP1", [4470.5269, 10867.93, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_136 = _this;
_this setDir 115.19157;
_this setPos [4470.5269, 10867.93, 3.0517578e-005];
};

_vehicle_146 = objNull;
if (true) then
{
_this = createVehicle ["Land_Mil_hangar_EP1", [4279.6763, 10975.53, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_146 = _this;
_this setDir -24.999294;
_this setPos [4279.6763, 10975.53, -3.0517578e-005];
};
};

processInitCommands;
 
Back
Top