Jump to content

[Release] - A Plot for life v2.5. Keep your buildables on death. Take plot ownership


Recommended Posts

The menu for take ownership is there, it just doesn't seem to be taking ownership. I've checked the files again and the only difference is the 2 sleep lines added....

 

Which files from this mod are you using in the test server (GitHub / dropbox) and which version ?.

 

I am playing around with my v2.4 files and have an issue with the plot pole not appearing.  This is due to changes I made for dev v2.5 and reversed for Dev v2.4 so I am just wondering if you have somehow got them files. 

 

Search plot_take_ownership.sqf and tell me what the line is for "FNC_GetPlayerUID"

 

Just noticed, the sleep lined should be 

sleep 0.01;

I missed off the ';' in the initial post.  I will amend it up there now.

Link to comment
Share on other sites

the changes made to the server_monitor.sqf are between lines 118 and lines 124.  A Plot for Life does not touch anything else.

 

If you have all those other mods installed I am guessing one or more of them require you to edit that file and putting this mods changes and the other mod(s) changes together has given you an error.

 

I am running Vanilla Epoch and my mod on my test server right now and do not have the error you are getting.

 

I suggest you check all the changes you made to this file to make sure they are all correct.

 

The error message you are getting is because this line

_objWpnTypes = (_inventory select 0) select 0;

is returning a string value rather than an array.

 

If you paste up the server_monitor.sqf then I may be able to point you to the error but please put it in spoiler tags.

Testing with a Vanille Epoch but still get that error :(

Maybe i just go back with v2.34

Link to comment
Share on other sites

Anyone looking to install from this point onwards and who have a test server may want to look at the v2.4 Dev branch on the GitHub.

 

This version is smaller and has a few enhancements that seem to be working fine in my Alpha testing.  I will continue testing tomorrow.  Apart from the changes mentioned in post, I have also added a counter to the take ownership function so people can see how many items they have taken ownership of and that it has run and completed.

 

Take Ownership in v2.4 has been tested with a few items and seems to be working fine.

 

If you are having problems with the mod then please post the server rpt file, the client rpt file (of the client who is having the problem or is performing the action when the problem occurs) and a copy of the file listed in any error messages from those rpt files.  I will be spending quite a bit of time on the new version testing tomorrow and can take some time out to look at reported bugs if I have the information requested.

 

@RedBaron,

if you contact me on Skype (details in my profile here) then I may be able to connect to your server and have a little look around to try and help you out.  I do not do this usually but you have been spending a lot of time helping to debug this new take ownership function so I am willing to make an exception.  Please note that I am on an 8 hour time difference to the UK and 7 to Europe though.

Link to comment
Share on other sites

Thanks RimBlock.

 

I have added the ; at the end of both lines in plot take ownership and will resume tests.

 

I am running 2.34 stable. Should I have moved to 2.35 stable...? As I was so close, was trying to get 2.34 sorted first and I thought 2.35 was the other stuff you added...let me know on that.

 

I'll see how this goes and then try and grab you on skype at some decent time tomorrow :)

Link to comment
Share on other sites

i take this from github

 

I need a lot more information.  What branch on the GitHub (Master / A Plot for Life V2.35 or v2.4 or some other branch).

 

You also have not posted you server RPT file (in spoiler tags).

 

I am testing the v2.35 (current stable release) files from GitHub now on Vanilla EPoch.

Link to comment
Share on other sites

@truongdatnhan

 

I have taken the files from the master branch of my Github and have put them on my test server.   The server starts without an issue.

 

I would suggest downloading the master branch again and giving it another go.  The organisation of the Git has been improved over the last week so you may have grabbed as files were moving around.

Link to comment
Share on other sites

Soo i tried to install this on a fresh server and im just getting kicked to loby without any popup error msg

 

Can anyone help me? Running DayZ Overpoch

 

This mod is designed and build for vanilla Epoch.  I am fairly sure others are using it on Overpoch though and they may jump in and help you out.

Link to comment
Share on other sites

V2.4 update.

 

Integration of fn_plot_check and fn_check_owner functions looks pretty complete.  I will probably move it to Beta today or tomorrow.

 

The v2.4 release faves a few KB in size, reports on how many items have been taken over with the Take Ownership function (so people can see it is working) and removes the option to turn it off with a init variable.

 

Question 

Has anyone got any strong reasons to want my to keep the player_build file as well as the Modular_build set.  If not then I will remove it and save more KBs... 

Link to comment
Share on other sites

Sorry for taking so long to reply:

 

This is what I'm doing for player content:

 - player content is an SQF file which contains the players items they have built on the server which have been transferred from the database

 - I have customised the hive and server_monitor.sqf so that it deletes the custom files first, then it processes the players requests (convert to player content, delete from database) and have a MySQL procedure which re-creates the appropriate files (add a call to player_content.sqf in server_functions.sqf which stores a list of player content files to process, and the player content file [playeruid].sqf in a sub-directory) - I've added the stored procedure as an example on how to do this, though I need to update it after installing vector building.

BEGIN
		-- Declare the cursor variables
		DECLARE v_finished INTEGER DEFAULT 0;
		DECLARE this_playerUID VARCHAR(20) DEFAULT '';
		-- Create and run the cursor to be used for the player content files
		DECLARE curP CURSOR FOR
			SELECT trim(substring(worldspace, locate('",',worldspace,locate('",',worldspace,locate('",',worldspace,locate('",',worldspace))))+3,17)) 
			FROM player_content 
			GROUP BY trim(substring(worldspace, locate('",',worldspace,locate('",',worldspace,locate('",',worldspace,locate('",',worldspace))))+3,17)) 
			ORDER BY trim(substring(worldspace, locate('",',worldspace,locate('",',worldspace,locate('",',worldspace,locate('",',worldspace))))+3,17)) ASC;

		-- Prepare the event handler for the cursor		
		DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_finished = 1;
		
		-- ---------------------------------------------------------------------------------------------
		-- Configuration Options defined by Instance Only Modify this block
		-- ---------------------------------------------------------------------------------------------
		SET @pci_filePath = 'C:\\\\z\\\\addons\\\\dayz_server\\\\init\\\\pc_init.sqf';
		SET @pc_directory = 'C:\\\\z\\\\addons\\\\dayz_server\\\\buildings\\\\player_content\\\\\\';
		-- ---------------------------------------------------------------------------------------------
		-- DO NOT CHANGE BELOWobject_data
		-- ---------------------------------------------------------------------------------------------

		-- Make sure other queries will work with this sproc
		SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
		
		-- Keep everything in a transaction to avoid data corruption and Process the tag options in the database
		START TRANSACTION;
			-- Archive objects to be delete
			REPLACE INTO `object_archive` (`ObjectID`,`ObjectUID`,`Instance`,`Classname`,`Datestamp`,`LastUpdated`
				,`CharacterID`,`Worldspace`,`Inventory`,`Hitpoints`,`Fuel`,`Damage`)
			SELECT	`ObjectID`,`ObjectUID`,`Instance`,`Classname`,`Datestamp`,`LastUpdated`,`CharacterID`
				,`Worldspace`,`Inventory`,`Hitpoints`,`Fuel`,`Damage`
			FROM `object_data`
			WHERE	LEFT(RIGHT(`worldspace`,2),1) IN (1,2)
				AND	`worldspace` like '%","%';

			-- Delete objects tagged as delete
			DELETE FROM `object_data`
			WHERE	LEFT(RIGHT(`worldspace`,2),1) = 2;
			
			-- Move player content to player_content table
			INSERT INTO `player_content` (`ObjectID`,`ObjectUID`,`Instance`,`Classname`,`Datestamp`
				,`LastUpdated`,`CharacterID`,`Worldspace`,`Inventory`,`Hitpoints`,`Fuel`,`Damage`)
			SELECT	`ObjectID`,`ObjectUID`,`Instance`,`Classname`,`Datestamp`,`LastUpdated`,`CharacterID`
				,`Worldspace`,`Inventory`,`Hitpoints`,`Fuel`,`Damage`
			FROM `object_data`
			WHERE	LEFT(RIGHT(`worldspace`,2),1) = 1
				AND	worldspace like '%","%';
			
			-- Delete migrated objects
			DELETE FROM `object_data`
			WHERE	LEFT(RIGHT(`worldspace`,2),1) = 1
				AND	worldspace like '%","%';
			
			-- Create the include file for player content
			SET	@sql_text = CONCAT('SELECT CONCAT(\'[] execVM "\\\\z\\\\addons\\\\dayz_server\\\\buildings\\\\player_content\\\\\',trim(substring(worldspace, locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace))))+3,17)),\'.sqf";\') INTO OUTFILE \'',@pci_filePath,'\' FIELDS TERMINATED BY \',\' ESCAPED BY \'|\' LINES TERMINATED BY \'\\n\' FROM player_content GROUP BY trim(substring(worldspace, locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace))))+3,17)) ORDER BY trim(substring(worldspace, locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace))))+3,17)) ASC');
			PREPARE stmt1 FROM @sql_text;
			EXECUTE stmt1;
			DEALLOCATE PREPARE stmt1;
			
			OPEN curP;
			read_loop: LOOP
				FETCH curP INTO this_playerUID;
				IF v_finished = 1 THEN LEAVE read_loop;
				END IF;
				SET @sql_text = CONCAT('SELECT CONCAT(\'_bldObj = objNull; _bldObj = createVehicle ["\',classname,\'",\',substring(worldspace,locate(\'[\',worldspace,2), (locate(\']\',worldspace,1)+1) - (locate(\'[\',worldspace,2))),\',[],0,"CAN_COLLIDE"]; _bldObj setDir \',replace(substring(worldspace,locate(\'[\',worldspace)+1, (locate(\'[\',worldspace,2)) - (locate(\'[\',worldspace) + case when worldspace like \'["%\' then 3 else 2 end)),\'"\',\'\'),\'; _bldObj setVectorDirAndUp \',substring(worldspace,locate(\'"[\',worldspace)+1,locate(\']"\',worldspace)-locate(\'"[\',worldspace)),\'; _bldObj setPos \',substring(worldspace,locate(\'[\',worldspace,2), (locate(\']\',worldspace,1)+1) - (locate(\'[\',worldspace,2))),\'; _bldObj addEventHandler ["HandleDamage", {false}]; _bldObj enableSimulation false; // \', objectid) INTO OUTFILE \'',@pc_directory,this_playerUID,'.sqf\' FIELDS TERMINATED BY \',\' ESCAPED BY \'\' LINES TERMINATED BY \'\\n\' FROM player_content WHERE trim(substring(worldspace, locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace,locate(\'",\',worldspace))))+3,17)) = "',this_playerUID,'"');
				PREPARE stmt2 FROM @sql_text;
				EXECUTE stmt2;
				DEALLOCATE PREPARE stmt2;
			END LOOP read_loop;
			CLOSE curP;
		COMMIT;
	END


 - There are three global variables I use: Auto-tag, No-tag and AllObjects.

/*
This defines the objects that can be tagged, or not tagged.  all objects is used in player_build_countNearby.sqf and plotObjects.sqf for objects to count (instead of all objects, as map content is not applicable)
*/
 
 autoTagObjects = ["BagFenceRound_DZ","CinderWall_DZ","DeerStand_DZ","DesertCamoNet_DZ","DesertLargeCamoNet_DZ","Fence_corrugated_DZ","ForestCamoNet_DZ","ForestLargeCamoNet_DZ","Fort_RazorWire","Hedgehog_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","LightPole_DZ","MetalGate_DZ","MetalFloor_DZ","MetalPanel_DZ","Sandbag1_DZ","SandNest_DZ","Scaffolding_DZ","StickFence_DZ","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodFloor_DZ","WoodLadder_DZ","WoodLargeWallWin_DZ","WoodLargeWall_DZ","WoodLargeWallWin_DZ","WoodRamp_DZ","WoodSmallWallThird_DZ","WoodSmallWallWin_DZ","WoodSmallWall_DZ","WoodStairsRails_DZ","WoodStairsSans_DZ","WoodStairs_DZ"]; // These objects will automatically be tagged for archiving
 noTagObjects = ["CanvasHut_DZ","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ","CinderWallDoorSmall_DZ","CinderWallDoor_DZ","FireBarrel_DZ","Generator_DZ","GunRack_DZ","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","M240Nest_DZ","MetalFloor_Preview_DZ","Plastic_Pole_EP1_DZ","StorageShed_DZ","TentStorage","TentStorageDomed","TentStorageDomed2","VaultStorageLocked","WoodCrate_DZ","Wooden_shed_DZ","WoodShack_DZ"]; // These objects can never be tagged for archiving
 allObjects = ["Plastic_Pole_EP1_DZ","BagFenceRound_DZ","CinderWall_DZ","CinderWallHalf_DZ","DeerStand_DZ","DesertCamoNet_DZ","DesertLargeCamoNet_DZ","Fence_corrugated_DZ","ForestCamoNet_DZ","ForestLargeCamoNet_DZ","Fort_RazorWire","Hedgehog_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","LightPole_DZ","MetalGate_DZ","MetalFloor_DZ","MetalPanel_DZ","Sandbag1_DZ","SandNest_DZ","Scaffolding_DZ","StickFence_DZ","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodFloor_DZ","WoodLadder_DZ","WoodLargeWallWin_DZ","WoodLargeWall_DZ","WoodLargeWallWin_DZ","WoodRamp_DZ","WoodSmallWallThird_DZ","WoodSmallWallWin_DZ","WoodSmallWall_DZ","WoodStairsRails_DZ","WoodStairsSans_DZ","WoodStairs_DZ","CanvasHut_DZ","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ","CinderWallDoorSmall_DZ","CinderWallDoor_DZ","FireBarrel_DZ","Generator_DZ","GunRack_DZ","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","M240Nest_DZ","MetalFloor_Preview_DZ","StorageShed_DZ","TentStorage","TentStorageDomed","TentStorageDomed2","VaultStorageLocked","WoodCrate_DZ","Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"]

Then it's just a modification to player_selfActions.sqf so they can tag the appropriate objects.  I'll be modifying it further so a player can re-load the sqf objects into the database to modify them and then re-process the conversion to player content for the next restart.  So all of this is automated, the only manual component is for the player to tag their objects in-game.  Note, it's a custom hive and I've had to modify the object_data table to varchar(256).

 

Cheers,

 

Jamie

Link to comment
Share on other sites

Thanks Jamie.

 

Would you mind wrapping spoiler tags around the code.

 

Interesting ida and well executed. 

 

Do you have indestructable bases enabled as I would guess these items moved in to player contend would just respawn on server restart even if previously destroyed or removed by owner.

 

I see the notag exclusions are the objects that can be changed (upgraded, inventories changed etc).  It is only destruction and player / owner removal that this would seem to stop a player doing.  All other functions should work just fine.  Nice.

Link to comment
Share on other sites

Where did you get that link from please ?.

 

Update: Oh, that is the link for the Epoch server files.

 

The Github files in Master are modified for the next release which is not currently (and possibly will not be ever) ready.  For the Epoch Github you have to take the Epoch 1.0.5.1 branch of files.

Link to comment
Share on other sites

Hi RimBlock, quick update.... we have had v2.34 with the modified sleep lines on our test box for about 3 or 4 days now, have been doing a lot of take ownership and then running the SQL to check for dupes and none have shown up. What we can't test is how this works under load until we roll up onto our live server.

 

Our other concern was the door codes getting set to zero and we felt this may have been linked to the skin change bug in 105 where characters stop updating sometimes after a skin change. We know that when someone is hit by this bug their character ID is set to 0 until they relog. I have implemented f3CUK's fix on the test box but can still recreate the issue 100% of the time by placing a partially used magazine in the backpack and leaving the backpack on when changing skin. So, we're worried about that. I have posted on f3CUK's thread and am waiting for an answer. However, if you are hit by the bug, the options on the plot don't come up anyway so, you can't remove it, replace it or take ownership....

 

So, based on this, we're going to try and deploy again anyway and see what happens. Maybe the improvements on the 2 areas of code will have solved the issue anyway.

 

I'll post back either way with what happens.

Link to comment
Share on other sites

Wow your wanting us to replace / override current files that are already edited for other modifications, instead of just editing?  Too much crazy work for me to consider this.  There has to be a better way.

 

Nope, I don't want you to do anything.

 

If you wish to use my mod that has taken many hours to put together and that I am giving to the community for free then yes, you have to actually do a bit of work.   If you use diffmerge the process is fairly simple and Raymix has produced a video guide which actually includes a older version of this mod as an example. 

 

Why not write some instructions yourself to share with the community, you know, giving something back.  Strangely, of the few people who have commented there is not a step by step guide, no one has made the effort to actually create one in order to help others when I have suggested it.

 

Me, I am spending my spare time (the time not spent working in my regular job, or doing stuff with my wife and kids).

Bug fixing issues reported.

Adding improvements for the next two versions for this mod, testing and releasing.

Writing and Releasing other scripts / mods.

Helping others here, on Skype and via PM with various problesm, quite a few of them having nothing to do with this mod.

Working on our A3 Dominion mod (most mod makers stop with the A2Epoch mods when they move to working with A3.  I have not done that).

Link to comment
Share on other sites

Hi, I've had Snap Plot Pro 1.4.1, Build Vectors V3, and Precise Base Building 1.0.4.  I'm thinking about upgrading Build Vectors to V4 and also want to install Plot Pole for Life, and Plot Management.

 

Given that Github has PP4L v2.3.5 with Snap Pro 1.4.1, and I already have those, and more, installed, how should I modify the PP4L installation so as to not break Snap Pro, Build Vectors, and Precise Base Building that I already have running?

 

Thanks,

Bob

Link to comment
Share on other sites

In the list of mods you say you have installed, you do not have A Plot for Life.  In the second paragraph you seem to be saying you do have A Plot for Life.  Note really clear which one you mean.

 

I would wait for A Plot for Life v2.4 which should be out in a week or so as it will remove some of the complexity (not checks to see if it is turned on or off in every file as it is now on all the time).  Just need some more testing before releasing.

 

I always advise installing A Plot for Life on a clean server first as it modifies a lot of files and you get Snap Build Pro included.  Afterwards, add precise and vector build and then the other mods.

 

Alternatively use diffmerge to checkout the changes in each file included with A Plot for Life and merge them in.  For Plot Management you will need to ask Zupa or wait for A Plot for Life v2.5 which is planned to have an action menu system  for management (mouse scroll wheel).

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
×
×
  • Create New...