Jump to content

How to make Custom map content [ Tutorial & Ongoing Support ]


Poncho

Recommended Posts

I have noticed a few map additions with incorrect coding for certain buildings, this simply results in the building you have added not spawning any loot. 

 

 

 

The problem comes with how most people create these additions, simply by launching dayz through an epoch server via dayz commander will give you a working editor, but some buildings (such as Barracks, Hospitals, and Fire Stations) will not spawn any loot.

 

This is because of their class names. The default ARMA editor makes most building classnames begin with "Map_" . All buildings of this type will not spawn loot in dayz, this is inherited from the EU_ update to the editor. You may simply read through your code and change all these manually to (for example) "Land_A_Hospital" instead of the original "Map_A_Hospital" to trigger loot spawns within those buildings.

 

 

 

There is however an easier way for those of you unfamiliar with code, which also adds a few extra items in. This will however remove some options brought by the EU_ update such as being able to place rocks/cliffs e.t.c so it is important to pick when you want to use the editor I am about to show you.

 

It is called the Jon-C5- Editor Update by (surprisingly enough) Jon-C5-. It is available  here http://www.armaholic.com/page.php?id=5932

 

To turn your map edits into functioning dayz map additions simply follow the instructions below (If you do not wish to use the Jon-C5-Editor, skip to step 4):

 

1) Download the zip file linked above.

 

2) Drag/copy&paste it into your Arma2 Operation Arrowhead folder (where your @dayz and @dayzepoch folder are stored)

 

3) Launch dayz with the following launch options (set via steam or dayz commander):

-mod=@Jon_EditorUpdate

4) Once you are in the main menus press ALT+E

 

5) This will open up the editor click the Chernarus map then click ok.

 

6) A map view will then pop up, on the right hand side you will see a list of categories:

            - First click 'Centre' then right click on the map, select 'new',  and press ok,

            - Next click 'Group' then right click on the map, slect 'new'. and press ok,

            - Now click 'Unit' then right click on the map, select the unit you want - default may be 'Alsatian' the change from 'non-

              playable' to 'playable'.

 

7) You are now ready to start editing. To begin, enter the '3D View' and click on 'Vehicle' (this is where all the buildings are

     listed). Right click on the map and select 'new', The list will then appear.

 

8) Once you have selected an item, the ALT key will allow you to raise or lower items, with the SHIFT key allowing you to spin it

    around.

 

9) Once you are happy with the edit, save it (Name it something relative to the edit). Then check your edits, sometimes large

     items may shift from where you placed them.

 

10) Locate the mission.sqf file, usually in My Documents > Arma 2 > Missions > "Your mission name"

 

11) Open up the mission.sqf file, you must now make some small edits to allow it to add these items to your server. Example

       Below:

 

 

Default mission.sqf code example, areas to edit show indicated.

----------------------------------------------------------Remove start Here
activateAddons [
];
                                                                   Replace with: if (isServer) then {
activateAddons [];
initAmbientLife;
----------------------------------------------------------Remove End Here

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["Land_ruin_corner_2", [14110.31, 2782.1448, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setPos [14110.31, 2782.1448, 3.8146973e-006];
};

------------------------------------------------------------------------------------------ Remove Start Here
_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_2 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["GER_Soldier_EP1", [14116.508, 2764.6309, 4.0054321e-005], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
  if (true) then {setPlayable _this;};
};
----------------------------------------------------------------------------------------- Remove End Here

_vehicle_192 = objNull;
if (true) then
{
  _this = createVehicle ["Land_a_stationhouse", [5160.0171, 2183.0002, 0.14117265], [], 0, "CAN_COLLIDE"];
  _vehicle_192 = _this;
  _this setDir 211.89264;
  _this setPos [5160.0171, 2183.0002, 0.14117265];
};


----------------------------------------------------------------------------------------Remove Start Here
processInitCommands;
runInitScript;                                                                                   Replace with: }; By Mr. Smith e.t.c
finishMissionInit;
----------------------------------------------------------------------------------------Remove End Here

Edited mission.sqf code example:

if (isServer) then {

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["Land_ruin_corner_2", [14110.31, 2782.1448, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setPos [14110.31, 2782.1448, 3.8146973e-006];
};

_vehicle_192 = objNull;
if (true) then
{
  _this = createVehicle ["Land_a_stationhouse", [5160.0171, 2183.0002, 0.14117265], [], 0, "CAN_COLLIDE"];
  _vehicle_192 = _this;
  _this setDir 211.89264;
  _this setPos [5160.0171, 2183.0002, 0.14117265];
};
  
}; // By Mr. Smith e.t.c

**If the code editing is not done as follows, it will crash your server on start up. Mainly because of the unit spawn (in this example "GER_Soldier_EP1"), follow the instructions for editing the code and it will work fine**

 

 

 

The Custom Content is now ready for publishing! Here is a quick, safe and guaranteed way to get your [working] edits into your server:

 

1. Unpack your server.pbo

 
2. Create a folder in the root of the server.pbo called: Maps
 
3. Drag your mapedit.sqf into this folder.
 
4. In the init folder you will find a file called server_functions.sqf, at the bottom of the file add this line:
execVM "\z\addons\dayz_server\Maps\mapedit.sqf";

NOTE**:  Be sure to change the mapedit.sqf to whatever it is you have named your file, and that it corresponds with the execVM in your server_functions.sqf

 

 

Phew... A long ass post, but it's pretty comprehensive. Still any questions just let me know.

 

 

Hope this helped! :)

 

 

EXTRA HINTS AND TIPS:

 

Having trouble moving roads and other similar items to where you want them?

Simply add another small item such as a campfire nearby and select them both by clicking and holding your LMB and dragging the selection box over the road and campfire, a small yellow circle will be  shown over the top of them so you can see what you have selected. Then use the campfire to position the road, as long as you have them both selected initially the movement of the road will match the movement of the campfire, allowing you to line that road up exactly where you want it.

 

Want your buildings spawn straight and level like they do with the new epoch build system?

Add the "setVehicleInit" line to the SQF file for any buildings that are leaning.  

_this setDir -415.88132;
_this setVehicleInit "this setVectorUp [0,0,1];";
_this setPos [1939.5042, 14563.26, -0.068630017];

Beidi file should look as follows:

Add the "INIT" line between the "AZIMUT" and "PARENT" lines.

AZIMUT="-67.231117";
INIT="_this setVehicleInit "this setVectorUp [0,0,1];";";
PARENT="";

- Big thanks to Wesley for that one!

 

Want to edit the trader camps / locations (Chernarus Only)?

Follow this link and download the EpochTradrer.Chernarus.rar, extracting the files afterwards.  -------------->https://www.mediafir...6tig61496obvs7u

 

Some people have problems with adding these files so the safest way I have found to get the files in your editor is:

 

1 - Be sure you open the editor by joining a DayZ Epoch server and backing out to the main menu, then hit Alt+E and selecting Chernarus,

     (This is to be sure you load the correct editor so all the objects in the trader camps load in)

 

2 - Create a fresh map edit, progress all the way to placing a playable unit then save it, naming it Epoch Traders (or something memorable),

 

3 - Find where that map edit saved, then drag the mission.biedi and mission.sqf from the above download into the folder (replacing the originals),

 

4 - Launch the editor again and load the Epoch Traders edit you created in step 2, and this should now contain the default epoch trader layout for you to edit!

 

Thanks goes to Scenic for finding the required files for this, anyone up for making a shopping mall? xD

 

Having trouble with buildings 'double-spawning'? (often creating duplicate doors in a building)

If the buildings are being created twice, it is most likely at the server and then as the client joins. To solve this simply:

call the addbuildings.sqf from init.sqf within the isServer section.

 

Thanks go out to axeman for that one ^^

 

 

Here is a little example of how to remove grass from in/around your buildings:


its  under Objects (grasscutter small, med and large)

It removes grass. like roads, tents buildings...etc that have grass coming through use the grasscutter to remove it.

 

hvv0xru.jpg

 

oWHhD7W.jpg

 

 

gPsS0Y9.jpg

 

 

lV2LHRp.jpg

 

Thanks goes out to Fully for putting that one together.

Link to comment
Share on other sites

Hi,

Great post! I followed it to the letter and have made some nice additions to the map. So thank you!

 

I would like to ask you a question though.

How can I force more zombies to spawn. I have added a compound with some really high end loot but I only get a few zombies to spawn. The compound has quite a few loot spawning locations yet the number of zombies are just a handful. Is there any way to enforce more zombies to spawn so that the task of getting to the loot is an effort rather than a 10 second shooting spree?

Any help or suggestions are welcome and appreciated.

Thanks.

Link to comment
Share on other sites

Well I don't know of a way of forcing more zombie spawns, apart from adding more spawn items. Things I could suggest, especially for a military compound would be deer stands. Throw a few of them in around the perimeter to add (around) three zombie spawns for each one you add. Also the guard huts, they add a few spawns and can look nice on the entrance way compound like structures. That is about all I got for now, but it should add a good few :)

Link to comment
Share on other sites

Actually I looked into this a little more, it is possible to increase you max local zombie spawns through the init.sqf in you mission.pbo, this will however have an effect on server performance depending on your increase in number, and remember this will spawn more zombies everywhere, not just your military outpost.

Link to comment
Share on other sites

Hi I downloaded a some custom map additions, but the barracks spawned double. So I need to open two doors each time to get in, it's very annoying. Everything else just works fine (loot etc). This is the sql script:

 

//Chernarus Buildings Upgrade
//Made by Dan 17/06/2013
//If any changes are made give credit where it is due. Thank you.


if (isServer) then {
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_BuildingWIP", [4701.5308, 2543.4883, 0.53826457], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 29.624031;
  _this setPos [4701.5308, 2543.4883, 0.53826457];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_CraneCon", [4687.3389, 2567.2224, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir 58.435925;
  _this setPos [4687.3389, 2567.2224, 1.5258789e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_CraneCon", [4720.0347, 2515.7092, 1.1444092e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir -70.004608;
  _this setPos [4720.0347, 2515.7092, 1.1444092e-005];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_House", [4650.8633, 2576.8569, 4.0054321e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir -268.72992;
  _this setPos [4650.8633, 2576.8569, 4.0054321e-005];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Barracks_i", [4739.439, 2532.8203, -0.056223653], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir -420.45184;
  _this setPos [4739.439, 2532.8203, -0.056223653];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Barracks_L", [4756.6406, 2526.6907, 2.2888184e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir -149.35397;
  _this setPos [4756.6406, 2526.6907, 2.2888184e-005];
};

_vehicle_13 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Guardhouse", [4654.6768, 2600.3901, 0.44740087], [], 0, "CAN_COLLIDE"];
  _vehicle_13 = _this;
  _this setDir 449.85626;
  _this setPos [4654.6768, 2600.3901, 0.44740087];
};

_vehicle_30 = objNull;
if (true) then
{
  _this = createVehicle ["Body2", [4741.625, 2582.7244, -7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_30 = _this;
  _this setPos [4741.625, 2582.7244, -7.6293945e-006];
};

_vehicle_31 = objNull;
if (true) then
{
  _this = createVehicle ["Body1", [4746.9619, 2577.9521, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_31 = _this;
  _this setPos [4746.9619, 2577.9521, -2.8610229e-006];
};

_vehicle_32 = objNull;
if (true) then
{
  _this = createVehicle ["HMMWVWreck", [4756.8018, 2531.4324], [], 0, "CAN_COLLIDE"];
  _vehicle_32 = _this;
  _this setDir -20.610172;
  _this setPos [4756.8018, 2531.4324];
};

_vehicle_33 = objNull;
if (true) then
{
  _this = createVehicle ["UralWreck", [4760.5879, 2534.0142, -9.5367432e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_33 = _this;
  _this setDir -281.79361;
  _this setPos [4760.5879, 2534.0142, -9.5367432e-006];
};

_vehicle_34 = objNull;
if (true) then
{
  _this = createVehicle ["Body2", [4758.7764, 2531.6008, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_34 = _this;
  _this setPos [4758.7764, 2531.6008, -4.7683716e-006];
};

_vehicle_36 = objNull;
if (true) then
{
  _this = createVehicle ["Body2", [4756.7939, 2531.3425, 0.85171193], [], 0, "CAN_COLLIDE"];
  _vehicle_36 = _this;
  _this setPos [4756.7939, 2531.3425, 0.85171193];
};

_vehicle_44 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1Eo_EP1", [4791.1904, 2559.8049, 1.6212463e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_44 = _this;
  _this setDir -128.62337;
  _this setPos [4791.1904, 2559.8049, 1.6212463e-005];
};

_vehicle_45 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1E_EP1", [4787.2349, 2579.6182, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_45 = _this;
  _this setDir -97.526382;
  _this setPos [4787.2349, 2579.6182, -9.5367432e-007];
};

_vehicle_46 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1E_EP1", [4796.9688, 2581.2131, -7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_46 = _this;
  _this setDir -18.64813;
  _this setPos [4796.9688, 2581.2131, -7.6293945e-006];
};

_vehicle_47 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1E_EP1", [4805.6968, 2580.1335], [], 0, "CAN_COLLIDE"];
  _vehicle_47 = _this;
  _this setDir 23.535616;
  _this setPos [4805.6968, 2580.1335];
};

_vehicle_48 = objNull;
if (true) then
{
  _this = createVehicle ["Misc_cargo_cont_tiny", [4778.2808, 2573.6921, 2.8610229e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_48 = _this;
  _this setDir -18.149788;
  _this setPos [4778.2808, 2573.6921, 2.8610229e-005];
};

_vehicle_49 = objNull;
if (true) then
{
  _this = createVehicle ["Misc_cargo_cont_net3", [4762.436, 2591.8044, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_49 = _this;
  _this setDir 25.97208;
  _this setPos [4762.436, 2591.8044, -3.0517578e-005];
};

_vehicle_52 = objNull;
if (true) then
{
  _this = createVehicle ["PowGen_Big", [4747.5303, 2600.3652, 1.7166138e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_52 = _this;
  _this setDir 26.13113;
  _this setPos [4747.5303, 2600.3652, 1.7166138e-005];
};

_vehicle_53 = objNull;
if (true) then
{
  _this = createVehicle ["PowGen_Big_EP1", [4761.0269, 2602.4011, -1.4305115e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_53 = _this;
  _this setDir 82.885468;
  _this setPos [4761.0269, 2602.4011, -1.4305115e-005];
};

_vehicle_55 = objNull;
if (true) then
{
  _this = createVehicle ["ZavoraAnim", [4638.6855, 2612.2302, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_55 = _this;
  _this setDir -72.893005;
  _this setPos [4638.6855, 2612.2302, -1.9073486e-006];
};

_vehicle_66 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_CncBlock_stripes", [4646.7339, 2605.0859, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_66 = _this;
  _this setDir 1.2725383;
  _this setPos [4646.7339, 2605.0859, -2.8610229e-006];
};

_vehicle_67 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4635.3574, 2585.4978, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_67 = _this;
  _this setDir -87.891052;
  _this setPos [4635.3574, 2585.4978, -9.5367432e-007];
};

_vehicle_69 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4634.8496, 2576.6069, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_69 = _this;
  _this setDir -86.988602;
  _this setPos [4634.8496, 2576.6069, -4.7683716e-006];
};

_vehicle_72 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4634.5571, 2567.7451, 1.4305115e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_72 = _this;
  _this setDir -87.891052;
  _this setPos [4634.5571, 2567.7451, 1.4305115e-005];
};

_vehicle_73 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4634.0493, 2558.8542, -0.039470673], [], 0, "CAN_COLLIDE"];
  _vehicle_73 = _this;
  _this setDir -86.988602;
  _this setPos [4634.0493, 2558.8542, -0.039470673];
};

_vehicle_80 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4633.5996, 2549.6096, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_80 = _this;
  _this setDir -87.891052;
  _this setPos [4633.5996, 2549.6096, -9.5367432e-007];
};

_vehicle_81 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4633.0918, 2540.7188, -0.08146286], [], 0, "CAN_COLLIDE"];
  _vehicle_81 = _this;
  _this setDir -86.988602;
  _this setPos [4633.0918, 2540.7188, -0.08146286];
};

_vehicle_82 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4632.7993, 2531.8569, 0.014754295], [], 0, "CAN_COLLIDE"];
  _vehicle_82 = _this;
  _this setDir -87.891052;
  _this setPos [4632.7993, 2531.8569, 0.014754295];
};

_vehicle_83 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4632.2915, 2522.9661, -0.1215086], [], 0, "CAN_COLLIDE"];
  _vehicle_83 = _this;
  _this setDir -86.988602;
  _this setPos [4632.2915, 2522.9661, -0.1215086];
};

_vehicle_88 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4638.8711, 2517.8972, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_88 = _this;
  _this setDir -150.18008;
  _this setPos [4638.8711, 2517.8972, -2.8610229e-006];
};

_vehicle_89 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4646.5059, 2513.3137, -6.6757202e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_89 = _this;
  _this setDir -149.27763;
  _this setPos [4646.5059, 2513.3137, -6.6757202e-006];
};

_vehicle_90 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4654.2173, 2508.9348, 0.055768013], [], 0, "CAN_COLLIDE"];
  _vehicle_90 = _this;
  _this setDir -150.18008;
  _this setPos [4654.2173, 2508.9348, 0.055768013];
};

_vehicle_91 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4661.8521, 2504.3511, -0.03947258], [], 0, "CAN_COLLIDE"];
  _vehicle_91 = _this;
  _this setDir -149.27763;
  _this setPos [4661.8521, 2504.3511, -0.03947258];
};

_vehicle_96 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4670.165, 2499.7595, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_96 = _this;
  _this setDir -152.49948;
  _this setPos [4670.165, 2499.7595, -3.8146973e-006];
};

_vehicle_97 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4677.981, 2495.4875, -7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_97 = _this;
  _this setDir -151.59702;
  _this setPos [4677.981, 2495.4875, -7.6293945e-006];
};

_vehicle_98 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4685.8604, 2491.4248, 0.095788002], [], 0, "CAN_COLLIDE"];
  _vehicle_98 = _this;
  _this setDir -152.49948;
  _this setPos [4685.8604, 2491.4248, 0.095788002];
};

_vehicle_99 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4693.6758, 2487.1541, -0.039473534], [], 0, "CAN_COLLIDE"];
  _vehicle_99 = _this;
  _this setDir -151.59702;
  _this setPos [4693.6758, 2487.1541, -0.039473534];
};

_vehicle_112 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4701.4458, 2482.9685, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_112 = _this;
  _this setDir -150.18008;
  _this setPos [4701.4458, 2482.9685, 4.5776367e-005];
};

_vehicle_113 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4709.0806, 2478.385, 4.196167e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_113 = _this;
  _this setDir -149.27763;
  _this setPos [4709.0806, 2478.385, 4.196167e-005];
};

_vehicle_114 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4716.792, 2474.0061, 0.05581665], [], 0, "CAN_COLLIDE"];
  _vehicle_114 = _this;
  _this setDir -150.18008;
  _this setPos [4716.792, 2474.0061, 0.05581665];
};

_vehicle_115 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4724.4268, 2469.4224, -0.039423943], [], 0, "CAN_COLLIDE"];
  _vehicle_115 = _this;
  _this setDir -149.27763;
  _this setPos [4724.4268, 2469.4224, -0.039423943];
};

_vehicle_116 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4732.7397, 2464.8308, 4.4822693e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_116 = _this;
  _this setDir -152.49948;
  _this setPos [4732.7397, 2464.8308, 4.4822693e-005];
};

_vehicle_117 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4740.5557, 2460.5588, 0.0099468231], [], 0, "CAN_COLLIDE"];
  _vehicle_117 = _this;
  _this setDir -151.59702;
  _this setPos [4740.5557, 2460.5588, 0.0099468231];
};

_vehicle_118 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4748.4351, 2456.4961, 0.095836639], [], 0, "CAN_COLLIDE"];
  _vehicle_118 = _this;
  _this setDir -152.49948;
  _this setPos [4748.4351, 2456.4961, 0.095836639];
};

_vehicle_119 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4756.2505, 2452.2253, -0.018404007], [], 0, "CAN_COLLIDE"];
  _vehicle_119 = _this;
  _this setDir -151.59702;
  _this setPos [4756.2505, 2452.2253, -0.018404007];
};

_vehicle_128 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4763.6919, 2447.9504, -2.6702881e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_128 = _this;
  _this setDir -150.18008;
  _this setPos [4763.6919, 2447.9504, -2.6702881e-005];
};

_vehicle_129 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4771.3267, 2443.3669, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_129 = _this;
  _this setDir -149.27763;
  _this setPos [4771.3267, 2443.3669, -3.0517578e-005];
};

_vehicle_130 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4779.0381, 2438.988, 0.055744171], [], 0, "CAN_COLLIDE"];
  _vehicle_130 = _this;
  _this setDir -150.18008;
  _this setPos [4779.0381, 2438.988, 0.055744171];
};

_vehicle_131 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4786.6729, 2434.4043, -0.039496422], [], 0, "CAN_COLLIDE"];
  _vehicle_131 = _this;
  _this setDir -149.27763;
  _this setPos [4786.6729, 2434.4043, -0.039496422];
};

_vehicle_132 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4794.9858, 2429.8127, -2.7656555e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_132 = _this;
  _this setDir -152.49948;
  _this setPos [4794.9858, 2429.8127, -2.7656555e-005];
};

_vehicle_133 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4802.8018, 2425.5408, -3.1471252e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_133 = _this;
  _this setDir -151.59702;
  _this setPos [4802.8018, 2425.5408, -3.1471252e-005];
};

_vehicle_134 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4810.6812, 2421.478, 0.09576416], [], 0, "CAN_COLLIDE"];
  _vehicle_134 = _this;
  _this setDir -152.49948;
  _this setPos [4810.6812, 2421.478, 0.09576416];
};

_vehicle_135 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4818.4966, 2417.2073, -0.039497375], [], 0, "CAN_COLLIDE"];
  _vehicle_135 = _this;
  _this setDir -151.59702;
  _this setPos [4818.4966, 2417.2073, -0.039497375];
};

_vehicle_145 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4830.7119, 2425.24, 0.022619247], [], 0, "CAN_COLLIDE"];
  _vehicle_145 = _this;
  _this setDir -233.20804;
  _this setPos [4830.7119, 2425.24, 0.022619247];
};

_vehicle_146 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4835.8833, 2432.4424, 0.11072826], [], 0, "CAN_COLLIDE"];
  _vehicle_146 = _this;
  _this setDir -234.11047;
  _this setPos [4835.8833, 2432.4424, 0.11072826];
};

_vehicle_147 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4841.25, 2439.5513, -0.031732559], [], 0, "CAN_COLLIDE"];
  _vehicle_147 = _this;
  _this setDir -233.20804;
  _this setPos [4841.25, 2439.5513, -0.031732559];
};

_vehicle_148 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4846.6924, 2447.3325, 0.057354927], [], 0, "CAN_COLLIDE"];
  _vehicle_148 = _this;
  _this setDir -236.42987;
  _this setPos [4846.6924, 2447.3325, 0.057354927];
};

_vehicle_150 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4856.6411, 2462.0574, 0.15128803], [], 0, "CAN_COLLIDE"];
  _vehicle_150 = _this;
  _this setDir -236.42987;
  _this setPos [4856.6411, 2462.0574, 0.15128803];
};

_vehicle_151 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4861.7134, 2469.3804, 0.060548782], [], 0, "CAN_COLLIDE"];
  _vehicle_151 = _this;
  _this setDir -235.5274;
  _this setPos [4861.7134, 2469.3804, 0.060548782];
};

_vehicle_160 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4866.3745, 2476.8582, 7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_160 = _this;
  _this setDir -237.65952;
  _this setPos [4866.3745, 2476.8582, 7.6293945e-006];
};

_vehicle_161 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4871.2881, 2484.2822, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_161 = _this;
  _this setDir -236.75708;
  _this setPos [4871.2881, 2484.2822, 3.8146973e-006];
};

_vehicle_162 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4876.001, 2491.793, 0.055778503], [], 0, "CAN_COLLIDE"];
  _vehicle_162 = _this;
  _this setDir -237.65952;
  _this setPos [4876.001, 2491.793, 0.055778503];
};

_vehicle_163 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4880.9185, 2499.2195, -0.019742012], [], 0, "CAN_COLLIDE"];
  _vehicle_163 = _this;
  _this setDir -236.75708;
  _this setPos [4880.9185, 2499.2195, -0.019742012];
};

_vehicle_164 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4885.8687, 2507.3232, 0.11779881], [], 0, "CAN_COLLIDE"];
  _vehicle_164 = _this;
  _this setDir -239.97896;
  _this setPos [4885.8687, 2507.3232, 0.11779881];
};

_vehicle_165 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4890.4824, 2514.9436, 0.16505146], [], 0, "CAN_COLLIDE"];
  _vehicle_165 = _this;
  _this setDir -239.07649;
  _this setPos [4890.4824, 2514.9436, 0.16505146];
};

_vehicle_166 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4894.8872, 2522.6355, 0.29102039], [], 0, "CAN_COLLIDE"];
  _vehicle_166 = _this;
  _this setDir -239.97896;
  _this setPos [4894.8872, 2522.6355, 0.29102039];
};

_vehicle_167 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4899.4976, 2530.2566, 0.14672375], [], 0, "CAN_COLLIDE"];
  _vehicle_167 = _this;
  _this setDir -239.07649;
  _this setPos [4899.4976, 2530.2566, 0.14672375];
};

_vehicle_192 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4893.8057, 2535.0833, 0.090951368], [], 0, "CAN_COLLIDE"];
  _vehicle_192 = _this;
  _this setDir 29.370615;
  _this setPos [4893.8057, 2535.0833, 0.090951368];
};

_vehicle_193 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4886.002, 2538.7378, -0.022015778], [], 0, "CAN_COLLIDE"];
  _vehicle_193 = _this;
  _this setDir 30.273066;
  _this setPos [4886.002, 2538.7378, -0.022015778];
};

_vehicle_194 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4878.1187, 2542.4487, -0.11330241], [], 0, "CAN_COLLIDE"];
  _vehicle_194 = _this;
  _this setDir 29.370615;
  _this setPos [4878.1187, 2542.4487, -0.11330241];
};

_vehicle_195 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4870.0439, 2546.2424, -0.21402831], [], 0, "CAN_COLLIDE"];
  _vehicle_195 = _this;
  _this setDir 30.273066;
  _this setPos [4870.0439, 2546.2424, -0.21402831];
};

_vehicle_196 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4867.0986, 2554.2112, -2.389678], [], 0, "CAN_COLLIDE"];
  _vehicle_196 = _this;
  _this setDir 27.051233;
  _this setPos [4867.0986, 2554.2112, -2.389678];
};

_vehicle_197 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4859.2485, 2558.4216, -2.640254], [], 0, "CAN_COLLIDE"];
  _vehicle_197 = _this;
  _this setDir 27.953699;
  _this setPos [4859.2485, 2558.4216, -2.640254];
};

_vehicle_198 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4851.3374, 2562.4236, -2.7194319], [], 0, "CAN_COLLIDE"];
  _vehicle_198 = _this;
  _this setDir 27.051233;
  _this setPos [4851.3374, 2562.4236, -2.7194319];
};

_vehicle_199 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4843.4893, 2566.6311, -2.9482546], [], 0, "CAN_COLLIDE"];
  _vehicle_199 = _this;
  _this setDir 27.953699;
  _this setPos [4843.4893, 2566.6311, -2.9482546];
};

_vehicle_208 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4869.1006, 2547.4431, -1.0490417e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_208 = _this;
  _this setDir -322.97015;
  _this setPos [4869.1006, 2547.4431, -1.0490417e-005];
};

_vehicle_209 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4862.105, 2552.9492, 0.14599593], [], 0, "CAN_COLLIDE"];
  _vehicle_209 = _this;
  _this setDir -322.06769;
  _this setPos [4862.105, 2552.9492, 0.14599593];
};

_vehicle_210 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4855.0015, 2558.2605, 0.058043674], [], 0, "CAN_COLLIDE"];
  _vehicle_210 = _this;
  _this setDir -322.97015;
  _this setPos [4855.0015, 2558.2605, 0.058043674];
};

_vehicle_211 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4847.9927, 2563.7732, 0.04053681], [], 0, "CAN_COLLIDE"];
  _vehicle_211 = _this;
  _this setDir -322.06769;
  _this setPos [4847.9927, 2563.7732, 0.04053681];
};

_vehicle_212 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4840.7798, 2569.1555, 0.10797275], [], 0, "CAN_COLLIDE"];
  _vehicle_212 = _this;
  _this setDir -325.28955;
  _this setPos [4840.7798, 2569.1555, 0.10797275];
};

_vehicle_213 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4833.1475, 2573.7866, 0.15237017], [], 0, "CAN_COLLIDE"];
  _vehicle_213 = _this;
  _this setDir -333.39871;
  _this setPos [4833.1475, 2573.7866, 0.15237017];
};

_vehicle_224 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4822.2397, 2576.9573, -2.6702881e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_224 = _this;
  _this setDir 37.162106;
  _this setPos [4822.2397, 2576.9573, -2.6702881e-005];
};

_vehicle_226 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_9", [4826.0747, 2420.3271, 4.1007996e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_226 = _this;
  _this setDir 148.44348;
  _this setPos [4826.0747, 2420.3271, 4.1007996e-005];
};

_vehicle_231 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Mil_Mil_Guardhouse", [4838.7041, 2449.075, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_231 = _this;
  _this setDir 120.46581;
  _this setPos [4838.7041, 2449.075, 1.5258789e-005];
};

_vehicle_244 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Guardhouse", [4848.1348, 2465.2974, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_244 = _this;
  _this setDir 659.78162;
  _this setPos [4848.1348, 2465.2974, -9.5367432e-007];
};

_vehicle_245 = objNull;
if (true) then
{
  _this = createVehicle ["ZavoraAnim", [4851.2944, 2455.4929, 0.27644274], [], 0, "CAN_COLLIDE"];
  _vehicle_245 = _this;
  _this setDir -58.816338;
  _this setPos [4851.2944, 2455.4929, 0.27644274];
};

_vehicle_251 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_IndFnc_Pole", [4852.3115, 2455.5156, 3.7193298e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_251 = _this;
  _this setDir 113.42896;
  _this setPos [4852.3115, 2455.5156, 3.7193298e-005];
};

_vehicle_295 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4633.4014, 2523.5359, 5.7220459e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_295 = _this;
  _this setDir -115.26544;
  _this setPos [4633.4014, 2523.5359, 5.7220459e-006];
};

_vehicle_296 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4636.1362, 2565.0955, 1.335144e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_296 = _this;
  _this setDir -85.173462;
  _this setPos [4636.1362, 2565.0955, 1.335144e-005];
};

_vehicle_297 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4685.3408, 2493.9458, 2.0980835e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_297 = _this;
  _this setDir -155.42091;
  _this setPos [4685.3408, 2493.9458, 2.0980835e-005];
};

_vehicle_298 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4742.8179, 2461.3313, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_298 = _this;
  _this setDir -156.3916;
  _this setPos [4742.8179, 2461.3313, -1.9073486e-006];
};

_vehicle_299 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4819.0464, 2420.1372, -7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_299 = _this;
  _this setDir 166.89664;
  _this setPos [4819.0464, 2420.1372, -7.6293945e-006];
};

_vehicle_300 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4872.8428, 2492.5962, 3.2424927e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_300 = _this;
  _this setDir 114.36558;
  _this setPos [4872.8428, 2492.5962, 3.2424927e-005];
};

_vehicle_301 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4886.4956, 2535.0425], [], 0, "CAN_COLLIDE"];
  _vehicle_301 = _this;
  _this setDir 27.849123;
  _this setPos [4886.4956, 2535.0425];
};

_vehicle_302 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [4729.3457, 2626.749, -5.0544739e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_302 = _this;
  _this setDir 5.8885822;
  _this setPos [4729.3457, 2626.749, -5.0544739e-005];
};

_vehicle_303 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Hospital", [4785.1362, 2512.8413, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_303 = _this;
  _this setDir 209.95859;
  _this setPos [4785.1362, 2512.8413, 3.0517578e-005];
};

};

 

I spawn the custom map additions server side. I don't see what's the problem. Nothing is doubled in the sqf file above.

Link to comment
Share on other sites

Ok I also had this problem before with dayz.st a while back, maybe you are using them as a host? Either way here is the fix I used.

In dayz_server.pbo\server_monitor.sqf find

//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!");

T
hat's actually the code responsible for spawning buildings at server start. Now look a little lower and you'll find the same code again (Sometimes it has been duplicated) If that is the case - Delete it.

 

Next step...

 

        Before:    

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

        Add:

} forEach _objList;

That should be it, hope it works out :)

 

 

Link to comment
Share on other sites

Thats weird Poncho, I can't find that in my server monitor. Was it removed in 1.0.2.4?

 

private ["_result","_pos","_wsDone","_dir","_block","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_date","_script","_key","_outcome","_vehLimit","_hiveResponse","_objectCount","_codeCount","_objectArray","_hour","_minute","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0"];
[]execVM "\z\addons\dayz_server\system\s_fps.sqf"; //server monitor FPS (writes each ~181s diag_fps+181s diag_fpsmin*)

dayz_versionNo = 		getText(configFile >> "CfgMods" >> "DayZ" >> "version");
dayz_hiveVersionNo = 	getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
_script = getText(missionConfigFile >> "onPauseScript");

if ((count playableUnits == 0) and !isDedicated) then {
	isSinglePlayer = true;
};

waitUntil{initialized}; //means all the functions are now defined

diag_log "HIVE: Starting";

waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)

//Set the Time
//Send request
_key = "CHILD:307:";
_result = _key call server_hiveReadWrite;
_outcome = _result select 0;
if(_outcome == "PASS") then {
	_date = _result select 1; 
		
	if(dayz_fullMoonNights) then {
		//date setup
		//_year = _date select 0;
		//_month = _date select 1;
		//_day = _date select 2;
		_hour = _date select 3;
		_minute = _date select 4;
		
		//Force full moon nights
		_date = [2013,8,3,_hour,_minute];
	};
		
	if(isDedicated) then {
		setDate _date;
		PVDZE_plr_SetDate = _date;
		publicVariable "PVDZE_plr_SetDate";
	};

	diag_log ("HIVE: Local Time set to " + str(_date));
};

	
// Custom Configs
if(isnil "MaxVehicleLimit") then {
	MaxVehicleLimit = 50;
};
if(isnil "MaxHeliCrashes") then {
	MaxHeliCrashes = 5;
};
if(isnil "MaxDynamicDebris") then {
	MaxDynamicDebris = 100;
};
if(isnil "MaxAmmoBoxes") then {
	MaxAmmoBoxes = 3;
};
if(isnil "MaxMineVeins") then {
	MaxMineVeins = 50;
};
// Custon Configs End

if (isServer and isNil "sm_done") then {

	serverVehicleCounter = [];
	_hiveResponse = [];

	for "_i" from 1 to 5 do {
		diag_log "HIVE: trying to get objects";
		_key = format["CHILD:302:%1:", dayZ_instance];
		_hiveResponse = _key call server_hiveReadWrite;  
		if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
			diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
			_hiveResponse = ["",0];
		} 
		else {
			diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
			_i = 99; // break
		};
	};

	_objectArray = [];
	if ((_hiveResponse select 0) == "ObjectStreamStart") then {
		_objectCount = _hiveResponse select 1;
		diag_log ("HIVE: Commence Object Streaming...");
		for "_i" from 1 to _objectCount do { 
			_hiveResponse = _key call server_hiveReadWrite;
			_objectArray set [_i - 1, _hiveResponse];
			//diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
		};
		diag_log ("HIVE: got " + str(count _objectArray) + " objects");
	};

	// # START OF STREAMING #
	_countr = 0;	
	_totalvehicles = 0;
	{
		//Parse Array
		_countr = _countr + 1;

		_idKey = 	_x select 1;
		_type =		_x select 2;
		_ownerID = 	_x select 3;

		_worldspace = _x select 4;
		_intentory=	_x select 5;
		_hitPoints=	_x select 6;
		_fuel =		_x select 7;
		_damage = 	_x select 8;

		_dir = 0;
		_pos = [0,0,0];
		_wsDone = false;
		if (count _worldspace >= 2) then
		{
			_dir = _worldspace select 0;
			if (count (_worldspace select 1) == 3) then {
				_pos = _worldspace select 1;
				_wsDone = true;
			}
		};			
		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};

		if (_damage < 1) then {
			//diag_log format["OBJ: %1 - %2", _idKey,_type];
			
			//Create it
			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_object setVariable ["lastUpdate",time];
			_object setVariable ["ObjectID", _idKey, true];

			_lockable = 0;
			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
			};

			// fix for leading zero issues on safe codes after restart
			if (_lockable == 4) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 3) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 2) then {
					_ownerID = format["00%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["000%1", _ownerID];
				};
			};

			if (_lockable == 3) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 2) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["00%1", _ownerID];
				};
			};

			_object setVariable ["CharacterID", _ownerID, true];
			
			clearWeaponCargoGlobal  _object;
			clearMagazineCargoGlobal  _object;
			// _object setVehicleAmmo DZE_vehicleAmmo;
			
			if ((typeOf _object) in dayz_allowedObjects) then {
				_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
				// Test disabling simulation server side on buildables only.
				_object enableSimulation false;
				// used for inplace upgrades and lock/unlock of safe
				_object setVariable ["OEMPos", _pos, true];
			};
			
			_object setdir _dir;
			_object setposATL _pos;
			_object setDamage _damage;

			if (count _intentory > 0) then {
				if (_type in DZE_LockedStorage) then {
					// Fill variables with loot
					_object setVariable ["WeaponCargo", (_intentory select 0), true];
					_object setVariable ["MagazineCargo", (_intentory select 1), true];
					_object setVariable ["BackpackCargo", (_intentory select 2), true];
				} else {

					//Add weapons
					_objWpnTypes = (_intentory select 0) select 0;
					_objWpnQty = (_intentory select 0) select 1;
					_countr = 0;					
					{
						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
						};
						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes; 
				
					//Add Magazines
					_objWpnTypes = (_intentory select 1) select 0;
					_objWpnQty = (_intentory select 1) select 1;
					_countr = 0;
					{
						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
						if (_x == "ItemTent") then { _x = "ItemTentOld" };
						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes;

					//Add Backpacks
					_objWpnTypes = (_intentory select 2) select 0;
					_objWpnQty = (_intentory select 2) select 1;
					_countr = 0;
					{
						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes;
				};
			};	
			
			if (_object isKindOf "AllVehicles") then {
				{
					_selection = _x select 0;
					_dam = _x select 1;
					if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
					[_object,_selection,_dam] call object_setFixServer;
				} forEach _hitpoints;

				_object setFuel _fuel;

				if (!((typeOf _object) in dayz_allowedObjects)) then {
					
					//_object setvelocity [0,0,1];
					_object call fnc_veh_ResetEH;		
					
					if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
						_object setvehiclelock "locked";
						_object setVariable ["R3F_LOG_disabled",true,true];
					};
					
					_totalvehicles = _totalvehicles + 1;

					// total each vehicle
					serverVehicleCounter set [count serverVehicleCounter,_type];
				};
			};

			//Monitor the object
			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
		};
	} forEach _objectArray;
	// # END OF STREAMING #


	// preload server traders menu data into cache
	{
		// get tids
		_traderData = call compile format["menu_%1;",_x];
		if(!isNil "_traderData") then {
			{
				_traderid = _x select 1;

				_retrader = [];

				_key = format["CHILD:399:%1:",_traderid];
				_data = "HiveEXT" callExtension _key;

				//diag_log "HIVE: Request sent";
		
				//Process result
				_result = call compile format ["%1",_data];
				_status = _result select 0;
		
				if (_status == "ObjectStreamStart") then {
					_val = _result select 1;
					//Stream Objects
					//diag_log ("HIVE: Commence Menu Streaming...");
					call compile format["ServerTcache_%1 = [];",_traderid];
					for "_i" from 1 to _val do {
						_data = "HiveEXT" callExtension _key;
						_result = call compile format ["%1",_data];
						call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
						_retrader set [count _retrader,_result];
					};
					//diag_log ("HIVE: Streamed " + str(_val) + " objects");
				};

			} forEach (_traderData select 0);
		};
	} forEach serverTraders;

	//  spawn_vehicles
	_vehLimit = MaxVehicleLimit - _totalvehicles;
	diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
	if(_vehLimit > 0) then {
		for "_x" from 1 to _vehLimit do {
			[] spawn spawn_vehicles;
		};
	};
	//  spawn_roadblocks
	diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
	for "_x" from 1 to MaxDynamicDebris do {
		[] spawn spawn_roadblocks;
	};
	//  spawn_ammosupply at server start 1% of roadblocks
	diag_log ("HIVE: Spawning # of Ammo Boxes: " + str(MaxAmmoBoxes));
	for "_x" from 1 to MaxAmmoBoxes do {
		[] spawn spawn_ammosupply;
	};
	// call spawning mining veins
	diag_log ("HIVE: Spawning # of Veins: " + str(MaxMineVeins));
	for "_x" from 1 to MaxMineVeins do {
		[] spawn spawn_mineveins;
	};

	if(isnil "dayz_MapArea") then {
		dayz_MapArea = 10000;
	};
	if(isnil "HeliCrashArea") then {
		HeliCrashArea = dayz_MapArea / 2;
	};
	if(isnil "OldHeliCrash") then {
		OldHeliCrash = false;
	};

	allowConnection = true;

// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire, _useStatic, _preWaypoint, _crashDamage]
nul =    [
                3,        //Number of the guaranteed Loot-Piles at the Crashside
                4,        //Number of the random Loot-Piles at the Crashside 3+(1,2,3 or 4)
                300,     //Fixed-Time (in seconds) between each start of a new Chopper
                500,      //Random time (in seconds) added between each start of a new Chopper
                1,        //Spawnchance of the Heli (1 will spawn all possible Choppers, 0.5 only 50% of them)
                'center', //Center-Marker for the Random-Crashpoints, for Chernarus this is a point near Stary
                4000,     //Radius in Meters from the Center-Marker in which the Choppers can crash and get waypoints
                true,     //Should the spawned crashsite burn (at night) & have smoke?
                false,    //Should the flames & smoke fade after a while?
                false,    //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf
                1,        //Amount of Random-Waypoints the Heli gets before he flys to his Point-Of-Crash (using Static-Crashpoint-Coordinates if its enabled)
                0.0001         //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged)
            ] spawn server_spawnCrashSite;
		
	// [_guaranteedLoot, _randomizedLoot, _frequency, _variance(DONOTUSE), _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire, waypoints, damage]
nul = 	[
				7, 
				5, 
				700, 
				0, 
				0.99, 
				'center', 
				4000, 
				true, 
				false, 
				false, 
				5, 
				1
		]  	  spawn server_spawnC130CrashSite;		
	};

	if (isDedicated) then {
		// Epoch Events
		_id = [] spawn server_spawnEvents;
		// server cleanup
		_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";

		// spawn debug box
		_debugMarkerPosition = getMarkerPos "respawn_west";
		_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
		_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
		_vehicle_0 setPos _debugMarkerPosition;
	};

	sm_done = true;
	publicVariable "sm_done";
};

 

Thanks for your help, really appreciate it!

Link to comment
Share on other sites

Okay Robinajax, you need to unpack you server.pbo (if with vilayer just look for dayz_epoch in vilayercodecustom), inside it (as default) you will have 4 folders:

 

compile

init

modules

system                            <---------- This one**

 

and a few other files, we can ignore those.

 

You need to look in the system folder, in that you will have three files:

 

server_cleanup.fsm

server_monitor.sqf          <---------- This one**

s_fps.sqf

 

It is in the server_monitor.sqf that the edits I pointed out should be made.

Link to comment
Share on other sites

FuzionOG why are you trying to edit your mission.sqf, if it is for map edits I would strongly recommend adding them server side or mission side in my other thread linked in the original post.

 

If it is problems with editing .sqf files however, make sure you have this installed ---> http://www.armaholic.com/page.php?id=8680

 

I would say it is a necessity for dayz editing. Mostly for the fact that it will quickly show you if you have made a mistake in your structure with the colouring system.

Link to comment
Share on other sites

Yes I know, that's the above file :P , it's just not there lol.

 

 

Ahh lol, my bad misread you post. Hmmm yarrr like I said this was a problem I had with dayz.st a while back before I ran epoch, still had the fix saved in a server maintenance folder on my pc, seems it the code has heavily edited mainly due to traders e.t.c. I have looked through your code however and there doesn't seem to be any duplicate lines. I'm afraid I'm a little stumped on this one, I'll do a little more digging and see what I can find.

 

In the mean time anyone else got any suggestions? I know it sucks when you have lingering problems like this in your server so hopefully we can help get it sorted quick :)

Link to comment
Share on other sites

Very good guide and very helpful, but can someone tell me where i can find the normal barracks, the one with a door and 5 or 6 rooms and one that goes to a shower..?  I can only find the ones that are like sandbag huts in the desert.

Thanks!

Link to comment
Share on other sites

Very good guide and very helpful, but can someone tell me where i can find the normal barracks, the one with a door and 5 or 6 rooms and one that goes to a shower..?  I can only find the ones that are like sandbag huts in the desert.

Thanks!

Land_Mil_Barracks_i

Link to comment
Share on other sites

are there any map editor objects that will cause it not to work, when uploaded to the server?

I had trouble with non lootable buildings like pier floor and ruins, for those i left them in MAP_ and they work correctly. Best way to create map i think is create your shortcut of arma 2 oa with epoch and jon editor mod, so you have all aviable buildings

Link to comment
Share on other sites

I had problem with this. My mission.sqf on server i delete it and upload mission.sqf to server with custom buildings. and custom buildings arent on server map. Can anybody help me ?

you should copy vehicles from your custom sqf and paste them on the sever mission sqf, be sure the numbers are correlative, if your last vehile from your mission sqf are _vehicle_34, your next vehicle need to be _vehicle_35 or higher, you can use "replace" function of the notepad++ to do this.

Link to comment
Share on other sites

Hi,

 

I installed the Jon C5 editor and made a load of edits and added them using an sql insert into the database. When I then tried to join my server, I got a message say the Jon C5 editor didn't have a key that is accepted by the server, please remove or get a key. Then it throws me out.

 

Any ideas what this is about and how I sort it?

 

Thanks

 

Andy

Link to comment
Share on other sites

Hi there guys,

 

Been a little busy these past few days. Ok first off since the new update, it is far better to add them in server side. I will update the original post with an easy set of instructions. 

 

anugnes3 bad idea trying to insert them into the database, Epoch has a lot of patches and updates to the sql that removes old stuff and updates it. Adding it server side is an easier and safer option, and better for mission file for the reduced mission file.

 

MettPC please please please don't put it in your mission.sqf, that is used for the traders and their bases. Adding it in there is a terribly bad idea, again because that is a file that has changed and most likely will in the future.

 

Adding your edits in, one addon at a time is the best way. That way any problems and changes, it is easy to correct and alter.

Link to comment
Share on other sites

are there any map editor objects that will cause it not to work, when uploaded to the server?

 

Yeah as said the jon editor update is an easy way to be sure everything will work. Otherwise for editing the code, be sure the only items you change from Map_ to Land_ are the ones you know to be lootable in dayz. Anything else will reject the change and render the edit redundant.

Link to comment
Share on other sites

I disagree with the sqf question, if you are modding your server, you need to check every file before update to a new version, not copy and paste without watching what are you doing. But i agree with calling new buildings from server side gives you a better performance, anyway when you edit dayz_server.pbo file it easily becomes inestable forcing you to have multiples backups and organize your stuff

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...