Jump to content

[TUTORIAL] How to make Custom map content 1.0.6.2


freakneek

Recommended Posts

G'day, Guys and Girls,
you might want grab another Rabbitman Beer or R4Z0R soda (if your not allowed beer). This is gonna be a long one!

This tutorial goes into some length and is for the most part, copy/paste, from @Poncho's How to make Custom map content [ Tutorial & Ongoing Support ] tutorial. I had a major issue today trying to figure out why my map edit wasn't working. but after many thanks to the awesome @JasonTM, for identifying the issue, It has been found that you need to use a compiles line instead of a execVM line in the code.

***NOTE***
This tutorial is not my work.... BUT, I felt that this could use an update.

***for those of you who already know how to do this scroll down to the server_functions.sqf part!***

Most people create these map 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.
 
 
***UPDATED PART FOR 1.0.6.2***
4. In the init folder you will find a file called server_functions.sqf . Find these lines:
// Precise base building 1.0.5
call compile preprocessFileLineNumbers

Just above it add this line:

call compile preprocessFileLineNumbers "\z\addons\dayz_server\maps\mapedit.sqf";

so now it looks like this....

call compile preprocessFileLineNumbers "\z\addons\dayz_server\maps\mapedit.sqf";

// Precise base building 1.0.5
call compile preprocessFileLineNumbers 

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
***END UPDATED PART FOR 1.0.6.2)***

 

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)?

  Hide contents

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

***NOTE***
NOT SURE IF THIS LINK IS STILL VALID!!! LET ME KNOW IF THERES AN UPDATED LINK

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:

 

Quote

 

  On 7/7/2014 at 3:05 PM, Fully said:
 

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.

 

OK i think that is pretty much it.....
HAPPY MAP EDITING!!
-Freak

Link to comment
Share on other sites

  • freakneek changed the title to [TUTORIAL] How to make Custom map content 1.0.6.2

Thanks for adding this post to help here. I see the reason and I think this post is needed for new players. But the post needs a few changes.

17 minutes ago, freakneek said:

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

The Editor update is not longer needed. Most of the buildings you are using are build in epoch already. If you are using the editor update you can add more trouble to your mapaddons as you want to. For example a lot rocks are only build in in this addon but cannot be used in epoch without this editor addon. So after you have finshed your work on a mine with these rock typs you found out, that the last couple of hourse are for nothing because epoch will not load the buildings ingame because they are not available. This happend to me so please remove that part or give a hint that is not needed for the most items.

There is a second way to add buildings to your server from @ebayShopper

https://epochmod.com/forum/topic/34614-sqf-compact-editor-ouput/

This way to add buildings is much better for the server performance. In particular if you are using a huge amount of added buildings.

If you can add these information to the mainpost it would be a good summary for new players how to add buildings.

Link to comment
Share on other sites

38 minutes ago, A Man said:

Thanks for adding this post to help here. I see the reason and I think this post is needed for new players. But the post needs a few changes.

The Editor update is not longer needed. Most of the buildings you are using are build in epoch already. If you are using the editor update you can add more trouble to your mapaddons as you want to. For example a lot rocks are only build in in this addon but cannot be used in epoch without this editor addon. So after you have finshed your work on a mine with these rock typs you found out, that the last couple of hourse are for nothing because epoch will not load the buildings ingame because they are not available. This happend to me so please remove that part or give a hint that is not needed for the most items.

There is a second way to add buildings to your server from @ebayShopper

https://epochmod.com/forum/topic/34614-sqf-compact-editor-ouput/

This way to add buildings is much better for the server performance. In particular if you are using a huge amount of added buildings.

If you can add these information to the mainpost it would be a good summary for new players how to add buildings.

first off thanks for the reply :-)
ill add something for that in the next 24 hours (im in bed now  so it will have to wait)...

is it just the rocks that that are the issue? or are their other objects that also have the same issue?

Link to comment
Share on other sites

There are multiple buildings with that problem. I had that with a couple of others and roads as well. The point is you never knew if the buildings is only in the editor and with the addon available or not. Since this addon is only needed for a special type of buildings e.g. the takistan villa, there is no reason to load it.

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
  • Discord

×
×
  • Create New...