Base Building

maca134

Well-Known Member

Something I have been working on for the last 12 hours.
You fill your Stash with your building ingredients then click the build action menu.

All the config is in 1 file and adding new buildings is a piece of cake.
The system can be set to use any object as the 'workbench' and can either use the 'workbench' inventory or the players.

Pretty much any building can be added and any combination of items can be used.

And yes, key code panels are defiantly planned!

I will be releasing this once I have hammered out all the bugs etc

Inspiration and partial based DayZ Epoch building code.
 
maca134, you are just amazing with scripting, ive been following your work and i look forward to it. keep up the amazing job.

do you have the gold coin system finished? i've messages you a couple of times with no response :( i would very much love to use it.
 
The gold system, Im not sure im going to release it, its not an easy mod to install to be honest.

Im thinking about putting together an Epoch Total Conversion pack that would contain the currency system and a few other things maybe as I was thinking about write 'another mod' based on Epoch but I dont want to be cliché lol.

So im getting involved in other projects and trying to improve existing ideas...
 
i am very easy at following directions and making changes to files. i know mysql very well and got a little understanding of the scripting language for arma, enough to get an idea of what its doing(sometimes lol)

i am willing to send a small donation your way for this mod if its complete and you will provide it.
 
Oh ye! Its working at this very moment on DayZ 1.7.7.1 on DayZ ST ;)
I have it building using either the player inventory or an external container, Upgrading structures and removing.
Can be based on CharID or player ID.
And adding new buildings and upgrades is a piece of cake.

The addon is more aimed at Mod author but nothing to stop servers adding it.
 
Im going to have to decline for the moment. Its not ready yet to be honest, there are things that need changing. Also if you havent got a dedicated then you will struggle running it.
 
i got paid hosting with full ftp access and mysql access, but, i understand, very disappointed :( would LOVE to have this and would pay for it :(
 
Oh ye! Its working at this very moment on DayZ 1.7.7.1 on DayZ ST ;)
I have it building using either the player inventory or an external container, Upgrading structures and removing.
Can be based on CharID or player ID.
And adding new buildings and upgrades is a piece of cake.

The addon is more aimed at Mod author but nothing to stop servers adding it.

Actually, im not sure if you have already said it or not, but will the basebuilding addon/mod work within the current EPOCH system.... and if so... can you point in the direction of the release if there was one... only recently got back from THAILAND, so I'm still catching up on my reading of the forums
 
Im trying to make it so that the mod doesnt matter. I have it working atm in Latest epoch, dayz vanilla and dayz aftermath.

Its in the config were is matter, here is an example of a build recipe:
Code:
class Concrete_Wall_EP1: base {
  scope = 2;
  offset[] = {0, 2, 0};
  buildTime = 3;
  tools[] = {
    "ItemEtool",
    "ItemToolbox"
  };
  dir = 0;
  items[] = {
    {"ItemTankTrap", 2},
    {"PartWoodPile", 3},
    {"PartGeneric", 1},
  };
};
So you can put any item and building, if its in the mod, it will work, if not... erm not sure yet lol.
 
Is there a way to change the view? my players who are currently building said its very hard to see if things are lined up or behind the wall if its gonna hit something.

is there a way to have a top down view or a birdeye view when placing?
 
Is there a way to change the view? my players who are currently building said its very hard to see if things are lined up or behind the wall if its gonna hit something.

is there a way to have a top down view or a bird-eye view when placing?


I have actually already implemented this in the Epoch building system (press space toggles bird eye view and pauses the build process). So will be porting it over.
 
ok, u need to execvm this code
Code:
BUILD_camera_mode = 0;
BUILD_player_camera = cameraView;
showCinemaBorder false;
BUILD_switch_camera = {
    if (BUILD_camera_mode == 0) then {
        cutText ["Build Camera Active.", "PLAIN DOWN"];
        BUILD_camera = "camera" camCreate [0,0,0];
        BUILD_camera cameraeffect ["internal", "back"];
        BUILD_camera camsettarget player;
        BUILD_camera camsetrelpos [0,10,20];
        BUILD_camera camcommit 0;
        BUILD_camera_mode = 1;
    } else {
        cutText ["Build Camera Disabled.", "PLAIN DOWN"];
        BUILD_camera cameraeffect ["terminate", "back"];
        camdestroy BUILD_camera;
        player switchCamera BUILD_player_camera;
        BUILD_camera_mode = 0;
    };
    true;
};

This is some of my older code and i would like to refactor at some point.

and you need to setup a player_build.sqf override. If you look around you will find out if you dont know how to do it.

Around line 137 look for
Code:
while {_isOk} do {
 
if (player getVariable["combattimeout", 0] >= time) exitWith {
_isOk = false;
_cancel = true;
_reason = "Cannot build while in combat.";
};
 
cutText ["Planning construction stand still 5 seconds to build. Press SPACE too switch views.", "PLAIN DOWN"];
 
_location1 = getPosATL player;
sleep 5;
_location2 = getPosATL player;
 
if (BUILD_camera_mode == 0) then {
if(_location1 distance _location2 < 0.1) exitWith {
_isOk = false;
};
 
if(_location1 distance _location2 > 5) exitWith {
_isOk = false;
_cancel = true;
_reason = "Moving to fast.";
};
 
if(_counter >= 3) exitWith {
_isOk = false;
_cancel = true;
_reason = "Ran out of time to find position.";
};
_counter = _counter + 1;
};
};

Change to

Code:
_change_build_cam = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 0x39) then { call BUILD_switch_camera; };"];
while {_isOk} do {
 
if (player getVariable["combattimeout", 0] >= time) exitWith {
_isOk = false;
_cancel = true;
_reason = "Cannot build while in combat.";
};
 
cutText ["Planning construction stand still 5 seconds to build. Press SPACE too switch views.", "PLAIN DOWN"];
 
_location1 = getPosATL player;
sleep 5;
_location2 = getPosATL player;
 
if (BUILD_camera_mode == 0) then {
if(_location1 distance _location2 < 0.1) exitWith {
_isOk = false;
};
 
if(_location1 distance _location2 > 5) exitWith {
_isOk = false;
_cancel = true;
_reason = "Moving to fast.";
};
 
if(_counter >= 3) exitWith {
_isOk = false;
_cancel = true;
_reason = "Ran out of time to find position.";
};
_counter = _counter + 1;
};
};
if (BUILD_camera_mode == 1) then {
call BUILD_switch_camera;
};
(findDisplay 46) displayRemoveEventHandler ["KeyDown", _change_build_cam];

You may have to add BE filters. Im off to bed now =)
 
Back
Top