Jump to content
  • 0

add on buildings in twice


chisel

Question

So I have an epoch server and a few of the guys have spent considerable time adding in features such as additional buildings to existing towns and entire new towns with paved roads, both brand new and paved over top of existing dirt roads.

 

I have some of these additions in my server.pbo.  Now it seems these items are spawning into the map twice.  Fire barrels are there twice, buildings are there twice, doors need opened twice etc.  I've found some older threads with this problem but the code the fixes refer to does not match any code in the new epoch files.

 

Does anyone know why this is happening and can you offer some help?

 

I'm not going to say for sure the 1.0.2.5 update is causing this but it was never noticed until after the update.  Likely coincidence but I wanted to give all info.

 

Here's the server and installed items:

 

Epoch Chernarus 1.0.2.5/103718

Take Clothes

Self Bloodbag

DZAI Bandits

Custom loot

 

With these very few mods I've never had this issue before.

 

Any suggestions would be great.

 

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0

How are you adding the new buildings ?

Are you using separate mission files or are you merging them with the existing mission file ? 

 

We had this problem on an old server where the map editor admin had tried to cut and paste the old layout from one map to the other and accidentally hit CTRL+V twice, he didn't even know he'd done it until like your issue we noticed two of everything.   

Link to comment
Share on other sites

  • 0

Have you placed the execVM to call the buildings .sqf file within a 

if (isServer) then {...};

If not you may be creating them on the server and then the player creates them locally also..

 

 

all building.sqf files are in "buildings" folder.  I call them with:

[] execVM "\z\addons\dayz_server\buildings\newbuilding.sqf"; at the very bottom of my server_functions.sqf

 

and yes, all my sqf files start with:

if (isServer) then {

 

and end with:

};

 

Does that all check out?

Link to comment
Share on other sites

  • 0

Don't call them from server_functions.sqf, although it should technically work from there, that file is for setting up.. well, server functions :) I couldn't guarantee that that file isn't being called twice, which would explain why buildings are doubling up..

 

Use init.sqf in your mission folder. 

Link to comment
Share on other sites

  • 0

This thread is about to all kung-fused! 

 

I've been loading my map additions server side for several months now and had no issues. Personally I think its better as it reduces the mission file size and has in my experience helped with AI recognising walls etc (don't ask me why, but it works).  The only way I see that these items are doubling up is either , you copy pasted twice or you're calling the files twice :(

Link to comment
Share on other sites

  • 0

You already have it on your server side, why not try to remove the code from the sqf files, see if that does anything.

lol, have you done this before?  The buildings go up in sqf files, I cannot remove the code from them...

 

Hayward, I'm with ya on this, I'll look around, but I know the items going in twice are not in the sqf files twice, I'll double and triple check my call lines...

Link to comment
Share on other sites

  • 0

Don't call them from server_functions.sqf, although it should technically work from there, that file is for setting up.. well, server functions :) I couldn't guarantee that that file isn't being called twice, which would explain why buildings are doubling up..

 

Use init.sqf in your mission folder. 

 

That's where I call them so they'll be server side. Smaller mission file and AI can't see through and it works just fine.

Link to comment
Share on other sites

  • 0

Packaging the building.sqf files in dayz_Server.pbo is the right thing to do, calling them from server_functions.sqf is not !

 

Call them from init.sqf in your mission and then get back to us with how you get on ;) No confusion there..

This is the first time I've heard of doing it this way,I mean I do call some additions kept in my mission.pbo from the init.sqf but I was unaware I could call server side additions from my init let alone that I should.

 

Thanks I'll give this a shot and get back to you.  I guess I use the same [] execVM... but path is to the server files, and this should go at the very end of the init?

 

Thanks again.

 

*********  Ok, so I've gone ahead and removed the calls from the server.pbo\ server_functions.sqf and put them in the init.sqf in the same fashion as the mission held additions.  I placed the server ones first...  Seems all is working however the first call for the server items always gives an error when joining the server of "cannot find z\....buildingaddtion.sqf when joining.  If I rearrange the calls it gives the same error always to the first one...

 

For example:

 

This gives the error at client join of:  ...file1.sqf not found.

 

[] execVM "\z\addons\dayz_server\buildings\file1.sqf";
[] execVM "\z\addons\dayz_server\buildings\file2.sqf";
[] execVM "\z\addons\dayz_server\buildings\file3.sqf";
[] execVM "\z\addons\dayz_server\buildings\file4.sqf";
[] execVM "\z\addons\dayz_server\buildings\file5.sqf";
 
and
 

This gives the error at client join of:  ...file4.sqf not found, with no other changes made other than the order in which they are listed on the init.sqf...

 

[] execVM "\z\addons\dayz_server\buildings\file4.sqf";
[] execVM "\z\addons\dayz_server\buildings\file1.sqf";
[] execVM "\z\addons\dayz_server\buildings\file2.sqf";
[] execVM "\z\addons\dayz_server\buildings\file3.sqf";
[] execVM "\z\addons\dayz_server\buildings\file5.sqf";
 
Right now the server calls are in the init.sqf above the mission calls.  Should I try putting the server calls at the end?
 
**** Edit 2 ****  The listing order in the init.sqf did not stop the first call of the server additions from throwing the not found error...
 
Link to comment
Share on other sites

  • 0

That's where I call them so they'll be server side. Smaller mission file and AI can't see through and it works just fine.

You misunderstand. Anything in DayZ_ server is server side. Just create your own folder and file structure.

Why complicate things by using a file that will be changed in future ?

Whoever said use that file , please ignore them..

Link to comment
Share on other sites

  • 0

So should my server.pbo addins be called the same way as my mission.pbo addins? I.E. at the end of the init.sqf with:
[] execVM "\z\addons\dayz_server\buildings\file4.sqf";

So if I had one addon in server.pbo and one in mission.pbo the end of my init.sqf would look like this:

...
//Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};
#include "\z\addons\dayz_code\system\REsec.sqf"

[] execVM "buildings\berezino_tents.sqf";
[] execVM "\z\addons\dayz_server\buildings\NEAF.sqf";

 

Currently this is how I have the calls listed at the very bottom of the init.sqf.  All additions are loading in to the server, but one issue remains.  The very first "Server" addition throws an error upon client load in.  In the above example any client joining my server would get \z\addons\dayz_server\buildings\NEAF.sqf not found...  Any idea why the first line of my server calls throws this error.  Again, even with the error the NEAF.sqf is in fact in game.

Link to comment
Share on other sites

  • 0
//Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};

if(isServer)then{
[] execVM "buildings\berezino_tents.sqf";
[] execVM "\z\addons\dayz_server\buildings\NEAF.sqf";
};


#include "\z\addons\dayz_code\system\REsec.sqf"

With that you need a buildings folder, in your mission folder, in that is berezino_tents.sqf.

 

You also need a buildings folder in dayz_server.pbo (addons\dayz_server\buildings) that contains NEAF.sqf..

 

If they are packaged correctly all should be well.

Link to comment
Share on other sites

  • 0

Yes, the file structures are correct for both server and mission, but again the first item in the list that points to the server additions throws the not found error...

 

I use PBO Manager, should I try some other packaging tool?  What is recommended?

 

Oh wait, you didn't just quote me there, you've made changes.  I'll try the changes you suggest and get back to you.

 

Thank you.

Link to comment
Share on other sites

  • 0

Hey chisel,

 

im sure you have the same mistake made that i did!

You surely got a custom compiles.sqf file and just copied it from the dayz_code.pbo to your mission file pbo and did the needed changes on it to load some changed scripts.

 

There is the line in it that calls the server_functions.sqf so it loads it twice. Once in the original compiles.sqf in the dayz_code

and once from your mission pbo

 

Just remove the:

call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf";

 

from the compiles.sqf in your mission pbo and your fine :)

 

Moo,

Otter

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...