Jump to content
  • 0

Custom buildings


BetterDeadThanZed

Question

I've been running a Chernarus server for a few months and previously I added custom buildings via the database. These buildings spawned loot and zedz. It's my understanding that since Epoch doesn't use the database for custom buildings, they are loaded on the client, which makes it so zedz and AI can see through them, plus they don't spawn loot or zedz. Also, adding buildings via sqf file and linked via the init file, creates a large mission file, which is undesirable.

 

So, my question is this: Will there be a way to add custom buildings in Epoch using the database in future versions? 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hey

Problem here is that some of the building in the editor are not setup to spawn stuff. On my server, we have got many addition buildings that have loot and zeds. What you need to do is change the class names in the sqf file you add.

 

This url has most of the information you need to swap the class names: http://picacid.com/arma2/loot_en.html

 

Example:

 

This code was generated in the editor, I placed a supermarket in stary but as is, it will not spawn loot

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_A_GeneralStore_01", [7105.5522, 7802.2627, -0.99499023], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -102.32523;
  _this setPos [7105.5522, 7802.2627, -0.99499023];
};

 

But if you look at that link, change the class name from "MAP_A_GeneralStore_01" to "Land_A_GeneralStore_01", 

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_GeneralStore_01", [7105.5522, 7802.2627, -0.99499023], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -102.32523;
  _this setPos [7105.5522, 7802.2627, -0.99499023];
};

 

Now the supermarket will spawn loot and zombies!

Link to comment
Share on other sites

  • 0

I probably should have been clearer. I know how to make buildings that spawn loot and zedz. I've got an sqf full of buildings that will spawn loot. My question is if it'll ever be possible to add buildings via database with Epoch so they won't be spawned on the client side. I already know how to spawn buildings that spawn stuff, but without the ability to add them to the database, the mission file gets unreasonably large and the zedz and AI can see/walk/shoot through them.

 

Also, it should be noted that spawning buildings that don't use the "MAP" name will require you to make changes to BattlEye, as anything with "Land_" is set to kick a player.

Link to comment
Share on other sites

  • 0

Ahh, my mistake. Although players should not be getting kick because of custom buildings, it means its setup wrong. Custom content should not be spawned on client side at all.

 

The building should only be spawned on/by the server. On my server, all my custom content lives in the server pbos.

 

 

I might have a look at adding buildings via the DB in the future, technical it will be possible in the next Epoch release with the HIVE:999 stuff

Link to comment
Share on other sites

  • 0

Ahh, my mistake. Although players should not be getting kick because of custom buildings, it means its setup wrong. Custom content should not be spawned on client side at all.

 

The building should only be spawned on/by the server. On my server, all my custom content lives in the server pbos.

 

 

I might have a look at adding buildings via the DB in the future, technical it will be possible in the next Epoch release with the HIVE:999 stuff

 

When you spawn buildings in an sqf, they spawn client side. That's why your mission file gets so big. The client has to download it, then it spawns on the client side. When the buildings are in the database, they are spawned server side. The BE filters on my server need to be set up to allow these items to be spawned client side.

 

For example, this is one line in my createvehicle.txt:

 

5 "Land_" !="Land_Fire_DZ" !="Land_HBarrier1_DZ" 

 

I have a choice to either add exceptions for every building that starts with Land_ or just change that to a "1".

Link to comment
Share on other sites

  • 0

Sorry mate but if they are spawning on client side its wrong 100%

 

But just because its in the mission, doesnt mean it 'spawns' on the client.

 

In the init.sqf, custom building sqf's should be in the 'if (isServer) then {' block or be contained within a 'if (isServer) then {'

 

This means that the code will ONLY run on the server. When the client connects to the server, first they download the mission files, then when is says receiving data, thats the player downloading buildings, vehicles, etc.

 

if (isServer) then {
call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs
 
// Add trader citys 
_nil = [] execVM "mission.sqf"; // <--- THIS ONLY RUNS ON THE SERVER
_nil = [] execVM "customs\mapcontent1.sqf"; // <--- THIS ONLY RUNS ON THE SERVER
_serverMonitor =  [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

 

So on my server, all content, including the epoch mission.sqf run within my server.pbo file and have been for months.

Link to comment
Share on other sites

  • 0

Hello guys!

I am trying to spawn some new traders to the server...

But it seems like the mission isn loading server traders from mission.sqf file?

 

Its setup like this:

if (isServer) then {
call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs
 
// Add trader citys 
_nil = [] execVM "mission.sqf"; // <--- THIS ONLY RUNS ON THE SERVER
_nil = [] execVM "objects\trees.sqf"; // <--- THIS ONLY RUNS ON THE SERVER
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

What am i doing wrong, since the buildings and traders are not spawning? :S

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