Jump to content

[Release] Build Vectors - Rotate objects in Dayz Epoch (v2.34 P4L & non-P4L)


striker

Recommended Posts

buildvectors.png

 

https://www.youtube.com/watch?v=gsa44JO02VQ&feature=youtu.be

 

Credit Is Due Where Due
 

 


Special Thanks to Raymix and his Script!

Special Thanks to RimBlock and his 

Special Thanks to Jossy and the future improvements I hope to see from him! Check out his work

Special Thanks to KamikazeXeX for his changes to the AdminBuild for Snap Building Pro and his help!

 

Notice
These files have been tested and work on the maps Chernarus and Taviana.

Installation
Warning: This script is fairly untested and could cause unforeseen problems. USE AT YOUR OWN RISK!
Please backup your database before you implement this encase something goes wrong!

Newest Build Vectors Installation (version 4)

 

Snap Build Pro Only

Files & Install guide

http://bitly.com/BuildVectorsSBPv4

 

Plot 4 Life & Snap Build Pro
Files:
http://bitly.com/BuildVectorsV4

Install Guide:
https://github.com/strikerforce/DayzBuildVectors


Legacy Installation (version 3)

  Reveal hidden contents

Build Vectors with Snap Building Pro 1.4.1 (Optional Download with AdminBuild and Plot 4 Life)
  Reveal hidden contents

Step 1:

Download the following files from this link (Without Admin Build and Plot 4 Life): http://bitly.com/BuildVectorsV3
Download the following files form this link (With Admin Build and Plot 4 Life) http://bitly.com/BuildVectorsAdminP4LV3
Once you have downloaded that file, move the custom folder to your root directory of your mission file.

Step 2:

Now that you have done that, open up your init.sqf from your mission folder.

Locate the following line.







Right after that line, add this.

Find the variable

add these two/three global variables below it.

Step 3:


Open up you dayz_server.pbo.

Once you have opened you dayz_server.pbo, navigate to the init folder and open the server_functions.sqf file.

Find this line.









Replace that whole function with this.

Step 4:

Now navigate to the system folder and open the server_monitor.sqf file.

Find the section that begins with the follow line.









And ends with.

Replace everything in between that with.

Step 5:

Now go back to your mission folder and open up the file description.ext.

Add the following to the end of that file.









Step 6:

Install Precise Base Building by Mikeeeyy.



NOTE: server_monitor.sqf is already done for you. Also, This script permanently affects the database. If you ever remove vector build or dayz epoch updates, remember to have this part in your server_monitor.sqf








Step 7 (Optional):
If you are planning to use the noRotate array, you need to see this post for a fix.




Road Map

  • Keep menus up when clicked for better user experience

Known Issues

  • None

Change Log





Version 1:

Released

Version 1.1:

Updated server_monitor.sqf to make sure the vector is the correct format.

Version 2:

Updated files for the snap building pro update v1.3.

Added files for Adminbuild and Right Clickables.

Version 3:

Updated files for snap building pro v1.4.1

Ghost preview supported (Thanks Jossy!)

Version 4:

Cleaned up some of the HORRENDOUS code :P

Fixed issue with objects not snapping correctly to objects of a certain degree after restart. ;)

 

 

Appreciate and support my work? btn_donate_LG.gif

Link to comment
Share on other sites

for everyone who need it,

 

s_player_setVectorsReset
s_player_setVectorsForward
s_player_setVectorsBack
s_player_setVectorsLeft
s_player_setVectorsRight
s_player_setVectors1
s_player_setVectors5
s_player_setVectors45
s_player_setVectors90
 
are the action names for maybe antihack like infi.
Link to comment
Share on other sites

  On 8/7/2014 at 10:35 AM, StiflersM0M said:

 

for everyone who need it,

 

s_player_setVectorsReset
s_player_setVectorsForward
s_player_setVectorsBack
s_player_setVectorsLeft
s_player_setVectorsRight
s_player_setVectors1
s_player_setVectors5
s_player_setVectors45
s_player_setVectors90
 
are the action names for maybe antihack like infi.

 

You will likely want to add those to your custom variables for undefined variable errors in the RPT

Link to comment
Share on other sites

get the following error:

 

8:50:00 Error in expression <tdir _dir;
 
if(_vecExists)then{
_object setVectorDirAndUp _vector;
};
 
_object s>
18:50:00   Error position: <setVectorDirAndUp _vector;
};
 
_object s>
18:50:00   Error setvectordirandup: Type string, expected Array
18:50:00 File z\addons\dayz_server\system\server_monitor.sqf, line 172
 
Due to the error my server will stuck in waiting for server to start authentification
Link to comment
Share on other sites

Works Great. Been testing all morning with various objects and seems very well done. There is a bit of a learning curve to manipulate them (buildables) to your liking, but overall a HUGE step in the right direction for base building. I was even able to build cinder roofs! 

 

Keep up the good work!

 

~RED

 

PS, Had no problems with the latest version of infistar.

Link to comment
Share on other sites

  On 8/7/2014 at 5:41 PM, StiflersM0M said:

 

get the following error:

 

8:50:00 Error in expression <tdir _dir;
 
if(_vecExists)then{
_object setVectorDirAndUp _vector;
};
 
_object s>
18:50:00   Error position: <setVectorDirAndUp _vector;
};
 
_object s>
18:50:00   Error setvectordirandup: Type string, expected Array
18:50:00 File z\addons\dayz_server\system\server_monitor.sqf, line 172
 
Due to the error my server will stuck in waiting for server to start authentification

 

 

Are you using any other mod that uses the worldspace array? Sounds like the worldspace array is like this...

 

[30.61,[8289.48,2503.63,0],"string"]

 

A simple fix would be to do the following:

 

Find the following line in server_monitor.sqf file in the systems folder of the server.pbo 

if (count _worldspace >= 2) then{

Replace that whole if statement with the following.

		if (count _worldspace >= 2) then
		{
			if(count _worldspace == 3) then{
				_vector = _worldspace select 2;
				if(typename _vector == "ARRAY")then{
					if(count _vector == 2)then{
						if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
							_vecExists = true;
						};
					};

				};

			};
			_dir = _worldspace select 0;
			if (count (_worldspace select 1) == 3) then {
				_pos = _worldspace select 1;
				_wsDone = true;
			}
		};
Link to comment
Share on other sites

  On 8/7/2014 at 8:55 PM, Tim JKL said:

What did you add to fn_selfActions.sqf? I already have a custom one due to the currency system on my server.

 

Not much actually, just two lines.

 

Around line 632 on a fresh copy:

s_player_upgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_UPGRADE",_text], "custom\player_upgrade.sqf",_cursorTarget, -1, false, true, "",""];

Around line 650 on a fresh copy:

s_player_downgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_REMLOCK",_text], "custom\player_buildingDowngrade.sqf",_cursorTarget, -2, false, true, "",""];

Basically a file path change.  :)

Link to comment
Share on other sites

Great addition to Raymix's Snap Building! One thing I'd suggest is adding support for RimBlock's plot for life as that uses the same entry in the worldspace array, maybe add a config variable like "BV_PlotForLifeInstalled = true" then move the worldspace entry over by one, just a suggestion anyhow. Creates so many base building possibilities it's great!

 

If you added support it would look like this:

[[<dir>, <position>], <player uid>, <vector>]

Link to comment
Share on other sites

I am hoping Striker's addition and Rimblock's PfL will make their way into official epoch as toggleable options from init.sqf for an "ultimate compatibility" between these mods if I may, lol. I mean.. lets keep them mission file sizes low, right?  :ph34r:

Link to comment
Share on other sites

  On 8/7/2014 at 10:02 PM, raymix said:

I am hoping Striker's addition and Rimblock's PfL will make their way into official epoch as toggleable options from init.sqf for an "ultimate compatibility" between these mods if I may, lol. I mean.. lets keep them mission file sizes low, right?  :ph34r:

This. As far as I'm aware RimBlock's P4L is making it's way into Official Epoch but won't make it until 1.0.6.

Link to comment
Share on other sites

  On 8/7/2014 at 9:38 PM, striker said:

Not much actually, just two lines.

 

Around line 632 on a fresh copy:

s_player_upgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_UPGRADE",_text], "custom\player_upgrade.sqf",_cursorTarget, -1, false, true, "",""];

Around line 650 on a fresh copy:

s_player_downgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_REMLOCK",_text], "custom\player_buildingDowngrade.sqf",_cursorTarget, -2, false, true, "",""];

Basically a file path change.  :)

Thanks, works great!

Link to comment
Share on other sites

  On 8/7/2014 at 5:43 PM, ZarX said:

Arg I really want this.. but I don't want to give up geeks admin build. It is awesome for building stuff for admin events. Lets you set them up super fast. Is there any way to add geeks admin build to this?

 

I was having similar thoughts, so I decided to edit some files. 

 

I used diffmerge to compare the files and copied the appropriate parts across

 

player_build.sqf (THIS ONE DOESNT WORK PROPERLY!!!!) - PROPER WORKING VERSION DOWN BELOW

  Reveal hidden contents

 

player_upgrade.sqf (working fine) 

  Reveal hidden contents

 

 

this works with all my right click extra buildables, geeks admin build, p4l, vectors, and snap pro

 

Now, for me i've got this working pretty much fine. i've just noticed that metal floors don't like to be saved with vectors. they reset to being flat on restart. 

is this a common issue? or is this due to the changes ive made to get things working with my customised files?

 

everything else i've built on my test server is fine. and saves correctly. 

the worldspace doesn't appear to be getting updated in my sql db for floors like it is with everything else

 

example below: 

ObjectUID;Instance;Classname;Datestamp;LastUpdated;CharacterID;Worldspace;Inventory;Hitpoints;Fuel;Damage
1985044584080;11;CinderWall_DZ;2014-08-09 13:17:07;2014-08-09 13:17:07;660;[353.354,[1984.97,4458.41,0.039],"76561198035522330",[[-0.116,0.993,0],[-0.702,-0.082,0.707]]];[];[];0.00000;0.00000

ObjectUID;Instance;Classname;Datestamp;LastUpdated;CharacterID;Worldspace;Inventory;Hitpoints;Fuel;Damage
19830445542983;11;MetalFloor_DZ;2014-08-09 13:20:41;2014-08-09 13:20:41;660;[83.337,[1983.03,4455.39,2.86],"76561198035522330"];[];[];0.00000;0.00000

edit* im just going through my player_build.sqf again and have noticed some of my PVDZE_obj_Publish = lines have omitted the _vector part.  i'll re-add and see how it goes 

edit2* i updated player_build.sqf to include the _vector lines... lo and behold it all works. it was me who stuffed up (no surprises there haha) 

 

updated player_build.sqf  (working with vectors, snap-pro, plot 4 life, geeks admin build + extra right click buildables)

this one functions properly. it is based off prymary's

  Reveal hidden contents

ObjectUID;Instance;Classname;Datestamp;LastUpdated;CharacterID;Worldspace;Inventory;Hitpoints;Fuel;Damage
198104448612142;11;MetalFloor_DZ;2014-08-09 14:18:49;2014-08-09 14:18:49;660;[265.291,[1980.96,4448.6,1.151],"76561198035522330",[[-0.705,-0.058,0.707],[0.705,0.058,0.707]]];[];[];0.00000;0.00000

Vectors now saving to the database with metal floors! yay

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...