Custom building problem with 1.7.7.1 patch

hellwalker

New Member
Hey guys,
i had some custom buildings in my server. On the 1.7.7 it was fine, but when we changed it to the 1.7.7.1 patch those custom buildings disappear. On the Data Base it's everything ok, the buildings are there, but in-game i can't see. I only get these error when i upload the .SQF file through the DayZ Control Center.

The other admin said it may have something to do with the PBO file, because he had to made some changes.

Any of you guys have any idea on how to fix this?
 
We are having the same issue. Some people are saying they just truncated the instance_building and building tables and reinserted them and they worked. Others are saying that custom buildings are supposed to NOT work with 1.7.7.1. I am just not sure what to believe. I would really love to get this working though.

Any help would be greatly appreciated.
 
Found this in a old server_monitor.sqf that is missing in the new version. Iam gona try it now...
Code:
// Spawn Buildings
        //Send the key
        _key = format["CHILD:999:select b.class_name, ib.worldspace from instance_building ib join building b on ib.building_id = b.id where ib.instance_id = ?:[%1]:", dayZ_instance];
        _data = "HiveEXT" callExtension _key;
        diag_log("SERVER: Fetching buildings...");
 
        //Process result
        _result = call compile format ["%1", _data];
        _status = _result select 0;
 
        _bldList = [];
        _bldCount = 0;
        if (_status == "CustomStreamStart") then {
                _val = _result select 1;
                for "_i" from 1 to _val do {
                        _data = "HiveEXT" callExtension _key;
                        _result = call compile format ["%1",_data];
 
                        _pos = call compile (_result select 1);
                        _dir = _pos select 0;
                        _pos = _pos select 1;
 
                        _building = createVehicle [_result select 0, _pos, [], 0, "CAN_COLLIDE"];
                        _building setDir _dir;
                        _bldCount = _bldCount + 1;
                };
                diag_log ("SERVER: Spawned " + str(_bldCount) + " buildings!");
        };
 
Much easier way of doing this in the mission pbo without the need for the tedious editing in database or mission.sqm... Just find the mission.sqf that is saved after you are done editing map and remove the _unit and everything except for all the _vehicle lines. Then paste all the _vehicle lines into a .sqf of your choice with if (isServer) then { at the top and an extra }; at the bottom. Should look like so :
Code:
if (isServer) then {
 
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Barracks_i", [1024.152, 2989.8599, 0.06082559], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -193.71664;
  _this setVehicleLock "LOCKED";
  _this setPos [1024.152, 2989.8599, 0.06082559];
};
};

These files can be as large or as small as you want.

Next just put a [] ExecVM "map\mapnamehere.sqf"; at the bottom of your init.sqf. Works wonders, and is quite simple.



I don't know who originally came up with this method, but thank god they did. Saves so much time and effort.
 
Much easier way of doing this in the mission pbo without the need for the tedious editing in database or mission.sqm... Just find the mission.sqf that is saved after you are done editing map and remove the _unit and everything except for all the _vehicle lines. Then paste all the _vehicle lines into a .sqf of your choice with if (isServer) then { at the top and an extra }; at the bottom. Should look like so :
Code:
if (isServer) then {
 
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Barracks_i", [1024.152, 2989.8599, 0.06082559], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -193.71664;
  _this setVehicleLock "LOCKED";
  _this setPos [1024.152, 2989.8599, 0.06082559];
};
};

These files can be as large or as small as you want.

Next just put a [] ExecVM "map\mapnamehere.sqf"; at the bottom of your init.sqf. Works wonders, and is quite simple.



I don't know who originally came up with this method, but thank god they did. Saves so much time and effort.



^^^^^^^^^^^^^^^^^^^^^WHAT HE SAID!
 
Why u spawn buildings via database? it is not better to place them into the mission.sqm with arma 2 editor?

anyone can explain whats the difference?
 

Tedious and often have errors in placement. If you use the mission.pbo / server.pbo way they are always right where you placed them, + takes much less time / configuration. I can upload a 1000+ piece map edit to a pbo in a minute or two. Easy ~
 
I edited much places with big camps and much car wrecks to simulate an evacuation... and make chernarus more apokalyptic... no erros at the moment everything is placed right ;) ok it takes time but the result is great =)
 
Would someone mind posting a how-to-tutorial on putting this into your server.pbo? I have a rather large mission.pbo file as it is, but im constantly trying to improve my server. Thanks in advance!
 
Locate where your map file saved. Find the .sqf. Get rid of all the code EXCEPT the _vehicle lines. Keep all of those. Paste them into a new .sqf file. Throw an if (isServer) then { at the top and then paste the vehicle code, make sure you close the bracket with a }; at the bottom. Put your new .sqf file into a map folder in your server.pbo. At the bottom of the server_functions.sqf add in a line that looks similar to this :
Code:
[] ExecVM "\z\addons\dayz_server\map\Camp.sqf";
Change the filepath as needed. The map.sqf should resemble this:
Code:
if (isServer) then {
 
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["land_nav_pier_m_2", [13225.278, 3431.5159, -6.0489159], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 56.571701;
  _this setVehicleLock "LOCKED";
  _this setVehicleInit "this setPosASL [getposASL this select 0, getposASL this select 1, -2.5]";
  _this setPos [13225.278, 3431.5159, -6.0489159];
};
};
annnnnd done.
 
Just for clarification... Each and every .sqf file name should have its own separate execVM file path correct?
for example:
[] ExecVM "\z\addons\dayz_server\map\NWAF.sqf";

[] ExecVM "\z\addons\dayz_server\map\NEAF.sqf";
 
Just for clarification... Each and every .sqf file name should have its own separate execVM file path correct?
for example:
[] ExecVM "\z\addons\dayz_server\map\NWAF.sqf";

[] ExecVM "\z\addons\dayz_server\map\NEAF.sqf";

Yeah. You could just add the _vehicle lines from NEAF.sqf at the bottom of the NWAF.sqf and roll it all into one if (isServer) then { I suppose. I didn't, cause i'm lazy lol.
 
Back
Top