Jump to content
  • 0

How do I add in map modifications from the Arma 3D editor?


Sentinel

Question

8 answers to this question

Recommended Posts

  • 0

Make a new script with this:

if (isServer) then {

};

Copy these sections from the mission.sqf to your new script and paste them between the brackets in the above code:

	_vehicle_1 = objNull;
	if (true) then
	{
	  _this = createVehicle ["Land_Mil_Barracks_i", [7444.3857, 8110.2295, 0.069433667], [], 0, "CAN_COLLIDE"];
	  _vehicle_1 = _this;
	  _this setDir 36.279942;
	  _this setPos [7444.3857, 8110.2295, 0.069433667];
	};

	_vehicle_13 = objNull;
	if (true) then
	{
	  _this = createVehicle ["Land_sara_domek_zluty", [5167.0488, 6250.8979, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
	  _vehicle_13 = _this;
	  _this setDir 206.68541;
	  _this setPos [5167.0488, 6250.8979, 9.1552734e-005];
	};

	_vehicle_14 = objNull;
	if (true) then
	{
	  _this = createVehicle ["Land_sara_Domek_sedy", [5129.5796, 6268.5684, 3.4332275e-005], [], 0, "CAN_COLLIDE"];
	  _vehicle_14 = _this;
	  _this setDir 206.05028;
	  _this setPos [5129.5796, 6268.5684, 3.4332275e-005];
	};

Each one of these sections is a different building. Don't copy the unit, center, and group you placed. Then save the script with ".sqf" at the end (make sure you select "all types" when saving). Place the script into your dayz_server.pbo and add this line to the bottom of the server_functions.sqf:

[] execVM "\z\addons\dayz_server\*********.sqf";

where "*********.sqf" is the name of the script.

Link to comment
Share on other sites

  • 0

Make a new script with this:

if (isServer) then {

};

Copy these sections from the mission.sqf to your new script and paste them between the brackets in the above code:

	_vehicle_1 = objNull;
	if (true) then
	{
	  _this = createVehicle ["Land_Mil_Barracks_i", [7444.3857, 8110.2295, 0.069433667], [], 0, "CAN_COLLIDE"];
	  _vehicle_1 = _this;
	  _this setDir 36.279942;
	  _this setPos [7444.3857, 8110.2295, 0.069433667];
	};

	_vehicle_13 = objNull;
	if (true) then
	{
	  _this = createVehicle ["Land_sara_domek_zluty", [5167.0488, 6250.8979, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
	  _vehicle_13 = _this;
	  _this setDir 206.68541;
	  _this setPos [5167.0488, 6250.8979, 9.1552734e-005];
	};

	_vehicle_14 = objNull;
	if (true) then
	{
	  _this = createVehicle ["Land_sara_Domek_sedy", [5129.5796, 6268.5684, 3.4332275e-005], [], 0, "CAN_COLLIDE"];
	  _vehicle_14 = _this;
	  _this setDir 206.05028;
	  _this setPos [5129.5796, 6268.5684, 3.4332275e-005];
	};

Each one of these sections is a different building. Don't copy the unit, center, and group you placed. Then save the script with ".sqf" at the end (make sure you select "all types" when saving). Place the script into your dayz_server.pbo and add this line to the bottom of the server_functions.sqf:

[] execVM "\z\addons\dayz_server\*********.sqf";

where "*********.sqf" is the name of the script.

 

 

I'm getting stuck at "Waiting for server to start authentication..."

 

My server never starts, what did I do wrong?

Link to comment
Share on other sites

  • 0

This is how I spawn things server side with the call command.

Make a new file yourname.sqf

Copy your mission.sqf contents into it (or make a copy of mission.sqf and rename it)

Take your yourname.sqf and make sure to take out centers and units ect. (The stuff you do not want to spawn)

Example on what you are looking to delete..

_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_1 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["BAF_Soldier_AA_W", [10373.473, 2279.9941, 5.1498413e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
  if (true) then {setPlayable _this;};
};

After you have taken that out you will want to delete everything above your FIRST "if (true) then" statement

Next take out ALL the lines with "_vehicle_** = objNull;" AND "_vehicle_** = _this;" (Where ** is a Number)

 

Here is a before and after of what one building would look like in you file.

Before

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Panelak", [10379.037, 2062.9531, 9.059906e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -29.655073;
  _this setPos [10379.037, 2062.9531, 9.059906e-006];
  _this setVehicleInit "this setVectorUp [0.0001,0.0001,1]";
};

After

if (true) then
{
  _this = createVehicle ["Land_Panelak", [10379.037, 2062.9531, 9.059906e-006], [], 0, "CAN_COLLIDE"];
  _this setDir -29.655073;
  _this setPos [10379.037, 2062.9531, 9.059906e-006];
  _this setVehicleInit "this setVectorUp [0.0001,0.0001,1]";
};

Delete all the commands below the last vehicle you are trying to spawn

Now If you used any commands in the editor like setVectorUp ect you will need to keep processInitCommands; at the end of the file below the last };

Example

if (true) then
{
  _this = createVehicle ["Land_A_GeneralStore_01a", [10095.647, 2112.9924, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _this setDir 165.46989;
  _this setPos [10095.647, 2112.9924, -6.1035156e-005];
  _this setVehicleInit "this setVectorUp [0.0001,0.0001,1]";
};

processInitCommands;

Now save your work and set your file aside.

Unpack your dayz_server.pbo

You will find a folder inside called Compile.

Place your yourname.sqf file inside it.

 

Now Navigate to the folder init and open server_functions.sqf

At the end of all the compile preprocessFileLineNumbers add spawn_yourname = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\yourname.sqf";

You are done with server_functions.sqf

 

Now navigate to the system folder in dayz_server and open server_monitor.sqf

Add _syourname = [] call spawn_yourname;  before the last bracket

 

So it looks like this.

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

    
    sm_done = true;
    publicVariable "sm_done";
};

Save and repack your dayz_server.pbo and upload to your server.

 

sorry for any typos its late :)

If anyone needs help understanding this feel free to shoot me a PM.

Link to comment
Share on other sites

  • 0

great post but I have a couple of questions

 

1. Does it reduce server load "lag" by moving the custom map.sqf files to the server.pbo?

3. Why am I removing the "_vehicle_5 = objNull;" part of the file?

2. Is this just going to make a smaller mission.pbo for players to download and that's why to add them using this method?

 

I ran into a problem on my server after 25 or more players of to much lag. I had to remove some of our custom map additions and it was fixed. I would like to add them back in following your tut if it will enable me to have my cake and eat it to :)

 

Thanks

Link to comment
Share on other sites

  • 0

great post but I have a couple of questions

 

1. Does it reduce server load "lag" by moving the custom map.sqf files to the server.pbo?

3. Why am I removing the "_vehicle_5 = objNull;" part of the file?

2. Is this just going to make a smaller mission.pbo for players to download and that's why to add them using this method?

 

I ran into a problem on my server after 25 or more players of to much lag. I had to remove some of our custom map additions and it was fixed. I would like to add them back in following your tut if it will enable me to have my cake and eat it to :)

 

Thanks

1. Not sure on that one

3. They are not needed when you spawn in "vehicles" this way

2. Yes and it is much more simple to add lots of "vehicles" with init commands.

 

Our old server had this problem too when we were with a company I won't name. We moved to a dedi box and really never had any problems with lag unless there was 40+ people for a few hours. (Dead bodies I think). I would try it out this way and see if it will work for you maybe by adding the ones you removed.

Link to comment
Share on other sites

  • 0

This is how I spawn things server side with the call command.

Make a new file yourname.sqf

Copy your mission.sqf contents into it (or make a copy of mission.sqf and rename it)

Take your yourname.sqf and make sure to take out centers and units ect. (The stuff you do not want to spawn)

Example on what you are looking to delete..

_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_1 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["BAF_Soldier_AA_W", [10373.473, 2279.9941, 5.1498413e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
  if (true) then {setPlayable _this;};
};

After you have taken that out you will want to delete everything above your FIRST "if (true) then" statement

Next take out ALL the lines with "_vehicle_** = objNull;" AND "_vehicle_** = _this;" (Where ** is a Number)

 

Here is a before and after of what one building would look like in you file.

Before

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Panelak", [10379.037, 2062.9531, 9.059906e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -29.655073;
  _this setPos [10379.037, 2062.9531, 9.059906e-006];
  _this setVehicleInit "this setVectorUp [0.0001,0.0001,1]";
};

After

if (true) then
{
  _this = createVehicle ["Land_Panelak", [10379.037, 2062.9531, 9.059906e-006], [], 0, "CAN_COLLIDE"];
  _this setDir -29.655073;
  _this setPos [10379.037, 2062.9531, 9.059906e-006];
  _this setVehicleInit "this setVectorUp [0.0001,0.0001,1]";
};

Delete all the commands below the last vehicle you are trying to spawn

Now If you used any commands in the editor like setVectorUp ect you will need to keep processInitCommands; at the end of the file below the last };

Example

if (true) then
{
  _this = createVehicle ["Land_A_GeneralStore_01a", [10095.647, 2112.9924, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _this setDir 165.46989;
  _this setPos [10095.647, 2112.9924, -6.1035156e-005];
  _this setVehicleInit "this setVectorUp [0.0001,0.0001,1]";
};

processInitCommands;

Now save your work and set your file aside.

Unpack your dayz_server.pbo

You will find a folder inside called Compile.

Place your yourname.sqf file inside it.

 

Now Navigate to the folder init and open server_functions.sqf

At the end of all the compile preprocessFileLineNumbers add spawn_yourname = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\yourname.sqf";

You are done with server_functions.sqf

 

Now navigate to the system folder in dayz_server and open server_monitor.sqf

Add _syourname = [] call spawn_yourname;  before the last bracket

 

So it looks like this.

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

    
    sm_done = true;
    publicVariable "sm_done";
};

Save and repack your dayz_server.pbo and upload to your server.

 

sorry for any typos its late :)

If anyone needs help understanding this feel free to shoot me a PM.

 

 

Followed these instructions to the T, or at least I thought I did. And I ended up with the same "Waiting for server to start authentication..." message upon logging in. The server will never load you into the game.

 

Well I found my mistakes and fixed them, still the same thing.

 

I re-uploaded my backup copy of the FRESH "dayz_server.pbo"

 

Low and behold, I still get "Waiting for server to start authentication..."

 

Even with the original PBO restored, it's still not starting?

 

What the heck is going on?

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

×
×
  • Create New...