Jump to content

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


Recommended Posts

v2.3 - Available for Alpha testing - This is the version to be included in the Epoch core build and can be turned on and off.

See the first post for details.

Post here or PM me if you want to take part in testing.

Congrats RimBlock! :)

I had my fingers crossed that you would make the cut! Well done.

Link to comment
Share on other sites

An updated server pbo and dayz pbo are available here.

 

Note these are Epoch v1.0.5.1 pbos with 1.0.5.2 amended files and an addition to the compiles.sqf for the playerUID function introduced in 1.0.5.2 and the modular building system Raymix has put together.

 

I have not tested the code yet.

Link to comment
Share on other sites

 I went to your GIT and don't see v2.3 download

 

Make sure you have selected the A Plot for Life branch from the dropdown box.  That should take you here.  I would suggest taking a look at the files posted in the dropbox link in the post above for a quick drop in solution but that also needs testing.

 

Place wall -> die -> attempt to upgrade wall = fail. Plot pole nearby.

Does anyone know what could be causing this?

 

Some more fundamental info would be helpful.  What version are you using for example.

Link to comment
Share on other sites

An updated server pbo and dayz pbo are available here.

 

Can't see that path, asked me to log in first, then just gave me error that path does not exist. Think that one is not shared.

Hope it wasn't too difficult to integrate into modular 

Link to comment
Share on other sites

Make sure you have selected the A Plot for Life branch from the dropdown box.  That should take you here.  I would suggest taking a look at the files posted in the dropbox link in the post above for a quick drop in solution but that also needs testing.

 

 

Some more fundamental info would be helpful.  What version are you using for example.

Latest version, and RayMix's custom player_build. https://gist.github.com/raymix/51828217334b93b8ff42

Link to comment
Share on other sites

Can't see that path, asked me to log in first, then just gave me error that path does not exist. Think that one is not shared.

Hope it wasn't too difficult to integrate into modular 

 

 

I have defaulted my fork of the Epoch repo to the A Plot for Life branch I am working on.  Please take a look and see if that works.  I don't see anywhere where access is restricted at all in the GitHub settings.

 

Only two files needed to be amended for the modular build set, one for checking the plot pole ownership and one for publishing.  Worked out fairly easy ;) .  Of course I then had to merge in your other commits that you keep on applying to the Epoch upstream :D .

 

Latest version, and RayMix's custom player_build. https://gist.github.com/raymix/51828217334b93b8ff42

 

Ok, so there is version 2.2.6 which is the live mod and there is v2.3 which is in Alpha-2 testing.  I am guessing you are trying v 2.2.6.

 

I have never heard of building resulting in death unless there is an antihack running which may cause this but the A Plot for Life code is fairly simply integrated in and should not cause any issues especially as there are no new script files or global variables being passed around.

 

If you can perform these actions again and then post the RPT files in spoiler tags (see Raymixs sig for how to use them) and take a screen shot of the DB entries for the plot pole you are building near then I may be able to give a bit of direction.

Link to comment
Share on other sites

I added to my test server and i cant unlock / type combo lock on safes i believe it because i dont own it but i want anyone to use a safe how would i change this i think it somewhere in the fn_selfaction.sqf

 

Version installed ?.

 

Check for "//Allow owner to unlock vault" in the fn_selfactions.sqf file.

 

Anyone should be able to unlock via the keypad. 

 

Another option could be an error further up the file which is causing the script to exit without getting to that part (most likely).

 

------------

 

On another note.  I have put an item up on the Epoch Git for tracking progress of the 2.3-Alpha builds for inclusion in to the Epoch core distribution here.

Link to comment
Share on other sites

A quick update on the v2.3 development.

 

I am actually currently testing with the Epoch 1.0.5.1 base code but with Epoch 1.0.5.2-RC buildables as there were issues pboing the 1.0.5.2-RC files.  I will upload the updated dayz_code.pbo when I have got all of the snap build pro parts included for others to test. 

 

Currently this version is Alpha-1.21.

 

Parameters

A Plot for life:off

Modular Building system: off

Snap Build: off

 

This is the vanilla config to confirm it still works wilth all options off.

 

Tested

Place / remove plot pole: Working

Place / remove buildable: Working

Place / remove tent: Working

Place / unlock / lock / remove safe: Working

Upgrade / Downgrade: Not yet tested.

 

Overall results

Working fine with the new code using the vanilla characterID based ownerships.  OwnerUIDs are being saved in the worldspace field as expected even with APfL turned off enabling it to be turned on and work at a future time without messing with the database.

 

-----------------

 

Parameters

A Plot for life:off

Modular Building system: ON

Snap Build: off

 

This is the vanilla config with the new modular build system Raymix put together and now part of Epoch 1.0.5.2-RC.

 

Tested

Place / remove plot pole: Working

Place / remove buildable: Working

Place / remove tent: Working

Place / unlock / lock / remove safe: Working

Upgrade / Downgrade: Not yet tested.

 

Overall results

Working fine with the new code using the vanilla characterID based ownerships and the new modular build system. OwnerUIDs are being saved in the worldspace field as expected.

 

-----------------

 

Next round will be

 

Parameters

A Plot for life:ON

Modular Building system: off

Snap Build: off

 

Issues to be resolved.

 

Fully merge Raymixs snap build pro in to the dayz_code.pbo I am using.

Some way of converting historical buildables and possibly handling BIS PlayerUID -> SteamID conversions on object load. 

Link to comment
Share on other sites

I apologize I should have been more clear, I mean when players are tagged as friends and are building with a plot pole. When one of them dies and comes back they cannot upgrade or downgrade anything. A message comes up that a plot pole is near by. One the plot pole is replaced he can upgrade again. Thanks for the awesome script btw, I cant imagine how much work went into this!

Link to comment
Share on other sites

Np :) .

 

Ok, so this only affects the up/down grade and not building new items ?.

 

I don't think tag friendly carries over to new characters as they are ... well... new character records in the DB :) .  If they re-tag friendly can they then build ?.

 

There is also a requirement of having to look at the plot poles owner after logging in before being able to build on their plot.  I suspect this is trying to restrict people tagged as friendly building on the owners plot without them being around.

 

In essence, I would;

Check the currentstate field for the new character with the previous characters currentstate field in the DB.

Get the new character to look at the owner before building.

See if the new character can tag friendly before building.

 

Failing that I would expect there to be an issue in the script files around the plot pole check section.  Have a look for "if(_ownerID in _friendlies) then {" in both files and check there are no errors around that section.

 

Did you edit the files or download the mod from dropbox and do you have any other mods installed ?.

Link to comment
Share on other sites

Np :) .

 

Ok, so this only affects the up/down grade and not building new items ?.

 

I don't think tag friendly carries over to new characters as they are ... well... new character records in the DB :) .  If they re-tag friendly can they then build ?.

 

There is also a requirement of having to look at the plot poles owner after logging in before being able to build on their plot.  I suspect this is trying to restrict people tagged as friendly building on the owners plot without them being around.

 

In essence, I would;

Check the currentstate field for the new character with the previous characters currentstate field in the DB.

Get the new character to look at the owner before building.

See if the new character can tag friendly before building.

 

Failing that I would expect there to be an issue in the script files around the plot pole check section.  Have a look for "if(_ownerID in _friendlies) then {" in both files and check there are no errors around that section.

 

Did you edit the files or download the mod from dropbox and do you have any other mods installed ?.

Hey Rimblock,

Thanks for your work. Players can build new items after tagging and death. They just cannot upgrade or downgrade existing buildables. The only modification I made was to put the files in a "APFL" folder inside my "Scripts" folder. Also our server is loaded with mods/scripts.

Link to comment
Share on other sites

Sounds like you will need to throw in some diag_log lines to get variable values dumped to the client RPT file.  Have a look at the ones already in the scripts and you should be able to work out how they work.

 

In player_buildingDowngrade

find

// check if friendly to owner
Change to
// check if friendly to owner
diag_log format["Player_buildingDowngrade: [ownerID: %1] [Friendlyto: %2]", _ownerID, _friendlies];

You will also need 

DZEdebug = true;

in the init.sqf as well.

 

I would also clarify that you are calling my files for upgrade and downgrade especially with other mods installed.  If you are referencing the files more than once in the compiles.sqg (or other files called from it) then you may be overwriting the link to my files.

Link to comment
Share on other sites

 

==================================Step by Step guide================================

I have alot of custom scripts and files in my server, so i decided to look into the custom scripts from RimBlock and search what he has changed so i can make a step by step guide for guys who have the same problem like me. But ok lets start now.

 

Required:

-Time about an hour

-Custom compiles.sqf

-A general knowledge about scripting and formating

-Brain.exe

 

At first here is a file list compare it with your custom folder if some files are missing get them from the DayZ_Code.pbo.

  1. compiles.sqf
  2. fn_damageActions.sqf
  3. fn_selfActions.sqf
  4. player_build.sqf (If you have any kind of snap building, just added the player_build.sqf in the snap building folder)
  5. player_buildingDowngrade.sqf
  6. player_lockvault.sqf (not needed, it was in the folder but RimBlock did no changes to the file, so its equal to the original one)
  7. player_packtent.sqf
  8. player_packvault.sqf
  9. player_tagfriendly.sqf
  10. player_unlockvault.sqf
  11. player_updategui.sqf
  12. player_upgrade.sqf
  13. remove.sqf
  14. server_monitor.sqf (Note dont take the file from the dayz_code.pbo go into your dayz_server.pbo and search for server_monitor.sqf and copy it out)
  15. tent_pitch.sqf
  16. vault_pitch.sqf 

If you checked theese list and maked sure that you have every file, you can start with the compiles.sqf

Remeber, i use my own file path´s, if you have another folder who is not named "Custom" you need to change the path´s to fit your folders.

I also call the custom compiles.sqf twice, so first the original one then the custom one, so my compiles.sqf looks like this:

if (!isDedicated) then {
fnc_usec_damageActions =        compile preprocessFileLineNumbers "Custom\fn_damageActions.sqf";
fnc_usec_selfActions =            compile preprocessFileLineNumbers "Custom\fn_selfActions.sqf";
player_packTent =            compile preprocessFileLineNumbers "Custom\player_packTent.sqf";
player_packVault =            compile preprocessFileLineNumbers "Custom\player_packVault.sqf";
player_unlockVault =            compile preprocessFileLineNumbers "Custom\player_unlockVault.sqf";
player_removeObject =            compile preprocessFileLineNumbers "Custom\remove.sqf";
player_lockVault =            compile preprocessFileLineNumbers "Custom\player_lockVault.sqf";
player_updateGui =            compile preprocessFileLineNumbers "Custom\player_updateGui.sqf";
player_tentPitch =            compile preprocessFileLineNumbers "Custom\tent_pitch.sqf";
player_vaultPitch =            compile preprocessFileLineNumbers "Custom\vault_pitch.sqf";
player_build =                compile preprocessFileLineNumbers "Custom\player_build.sqf";
};

So, now we came to the changes in every file:

  • fn_damageActions.sqf

Find at the private variables at the top:

"_charid"

and replace it with:

"_playerUID"

Find:

_charID =		_unit getVariable ["CharacterID", 0];

Replace with:

_playerUID = 	getPlayerUID player;

Find:

if ((isPlayer _unit) && !(_charID in _friendlies)) then {

Replace with:

if ((isPlayer _unit) && !(_playerUID in _friendlies)) then {

Find:

"\z\addons\dayz_code\actions\player_tagFriendly.sqf"

and replace it with your own path which point to your custom player_tagFriendly.sqf for me it looks like this:

"Custom\player_tagFriendly.sqf"

Done!

  •  Fn_sefactions.sqf

Find (again the private section at the top):

"_attached"

and add this behind it

,"_playerUID","_characterID"

Find:

_isMan = _cursorTarget isKindOf "Man";

and add directly above it:

_playerUID = getPlayerUID player;

Find:

_ownerID = _cursorTarget getVariable ["CharacterID","0"];

Replace with:

_ownerID = _cursorTarget getVariable ["ownerPUID","0"];

Directly under this add:

_characterID = _cursorTarget getVariable ["CharacterID","0"];

Find:

//Allow player to delete objects

and add above it:

diag_log format["fn_actons: [PlayerUID: %1] [_ownerID: %2] [_isModularDoor: %3] [typeOfCursorTarget: %4]",_playerUID, _ownerID, _isModularDoor, _typeOfCursorTarget];
diag_log format["[_isDestructable:%1 ] [_isWreck: %2 ] [_isRemovable: %3 ] [_isWreckBuilding: %4 ]",_isDestructable, _isWreck, _isRemovable, _isWreckBuilding];

Find 2 times:

(dayz_characterID == _ownerID))

and replace it with:

(_playerUID == _ownerID))

Find:

if(!_isMan && _ownerID != "0" && !(_cursorTarget isKindOf "Bicycle")) then {

and replace it with:

if(!_isMan && _characterID != "0" && !(_cursorTarget isKindOf "Bicycle")) then {

Find 2x times:

"\z\addons\dayz_code\actions\remove.sqf"

and replace it with your own path pointing to your custom remove.sqf for me it looks like this:

"Custom\remove.sqf"

Find:

_hasKey = _ownerID in _temp_keys;
_oldOwner = (_ownerID == dayz_playerUID);

Replace with:

 

_hasKey = _characterID in _temp_keys;
_oldOwner = (_characterID == dayz_playerUID);

Find:

_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _ownerID))], 2, true, true, "", ""];

Replace with:

_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _characterID))], 2, true, true, "", ""];

Find:

if (_ownerID == dayz_characterID) then {

Replace with:

if (_ownerID == _playerUID) then {

Find:

if(_ownerID == dayz_combination || _ownerID == dayz_playerUID) then {

Replace with:

if(_characterID == dayz_combination || _ownerID == _playerUID) then {

Find:

if(_ownerID != dayz_combination && _ownerID != dayz_playerUID) then {

Replace with:

if(_characterID != dayz_combination && _ownerID != _playerUID) then {

Find:

if(_typeOfCursorTarget in DZE_UnLockedStorage && _ownerID != "0" &&

Replace with:

if(_typeOfCursorTarget in DZE_UnLockedStorage && _characterID != "0" &&

Find:

if(_ownerID == dayz_combination || _ownerID == dayz_playerUID) then {

Replace with:

 

if(_characterID == dayz_combination || _ownerID == dayz_playerUID) then {

Find:

if (s_player_packvault < 0 && (_ownerID == dayz_combination || _ownerID == dayz_playerUID))

Replace with:

if (s_player_packvault < 0 && (_characterID == dayz_combination || _ownerID == dayz_playerUID))

Find:

"\z\addons\dayz_code\actions\player_upgrade.sqf"

And replace it with your path pointing to player_upgrade:sqf for me it looks like this:

"Custom\player_upgrade.sqf"

Find:

} else {
		player removeAction s_player_upgrade_build;
		s_player_upgrade_build = -1;
	};

and add directly under this:

	diag_log text "============================================";
	
	diag_log format["fn_actons: [PlayerUID: %1] [_ownerID: %2] [DZE_Lock_Door: %3] [_characterID: %4] [typeOfCursorTarget: %5]",_playerUID, _ownerID, DZE_Lock_Door, _characterID, _typeOfCursorTarget];
	diag_log format["[s_player_downgrade_build:%1 ] [s_player_lastTarget: %2 ] [_isRemovable: %3 ] [_isWreckBuilding: %4 ]",s_player_downgrade_build, s_player_lastTarget, _isRemovable, _isWreckBuilding];
	

FInd:

&& (DZE_Lock_Door == _ownerID)) then {

Replace with:

&& (DZE_Lock_Door == _characterID)) then {

Find:

"\z\addons\dayz_code\actions\player_buildingDowngrade.sqf"

Replace it with your own path pointing to your custom player_buildingDowngrade.sqf for me it looks like this:

"Custom\player_buildingDowngrade.sqf"

Find:

if(_isTent && _ownerID == dayz_characterID) then {

Replace with:

if(_isTent && _ownerID == _playerUID) then {

Find:

if (_isDog && _isAlive && (_hasRawMeat) && _ownerID == "0" &&

Replace with:

if (_isDog && _isAlive && (_hasRawMeat) && _characterID == "0" &&

Find:

if (_isDog && _ownerID == dayz_characterID && _isAlive) then {

Replace with:

if (_isDog && _characterID == dayz_characterID && _isAlive) then {

Find:

_ownerID = "0";

Replace with:

_characterID = "0";

Find:

if (!isNull cursorTarget) then { _ownerID = cursorTarget getVariable ["CharacterID","0"]; };

Replace with:

if (!isNull cursorTarget) then { _characterID = cursorTarget getVariable ["CharacterID","0"]; };

Find:

if (_canDo && !_inVehicle && alive _dog && _ownerID != dayz_characterID) then {

Replace with:

if (_canDo && !_inVehicle && alive _dog && _characterID != dayz_characterID) then {

Wow we are done with the Fn_selfactions, this file alone take 1 hour for me :)

  •  player_packtent.sqf

Lets start with player_packTent.sqf

 

Add at the top the private variables:

"_playerUID"

Find:

_ownerID = _obj getVariable["CharacterID","0"];

Replace with:

_ownerID = _obj getVariable["ownerPUID","0"];

Find:

_objectUID	= _obj getVariable["ObjectUID","0"];

and add directly under it:

 

_playerUID = getPlayerUID player;

Find:

if(_ownerID != dayz_characterID)

Replace with:

if(_ownerID != _playerUID)

That was fast we are done with playerpacktent.

  • player_unlockvault.sqf

add to the private variables at the top:

,"_characterID"

Find:

_ownerID = _obj getVariable["CharacterID","0"];

replace with:

_characterID = _obj getVariable["CharacterID","0"];
_ownerID = _obj getVariable["ownerPUID","0"];;

Find:

if ((_ownerID == dayz_combination) || (_ownerID == dayz_playerUID)) then {

replace with:

 

if ((_characterID == dayz_combination) || (_ownerID == dayz_playerUID)) then {

Find:

_holder setVariable ["OEMPos", _pos, true];

add directly under it:

_holder setVariable ["ownerPUID", _ownerID , true];

Find:

 

_holder setVariable["CharacterID",_ownerID,true];

Replace with:

_holder setVariable["CharacterID",_characterID,true];

Done.

  • remove.sqf

Add to the private variables at the top:

 

,"_playerUID"

Find:

_objOwnerID = _obj getVariable["CharacterID","0"];

replace with:

_objOwnerID = _obj getVariable["ownerPUID","0"];

and add directly above it:

 

_playerUID = getPlayerUID _activatingPlayer;

Find:

_isOwnerOfObj = (_objOwnerID == dayz_characterID);

Replace with:

_isOwnerOfObj = (_objOwnerID == _playerUID);

Find:

_ownerID = _nearestPole getVariable["CharacterID","0"];

Replace with:

_ownerID = _nearestPole getVariable["ownerPUID","0"];

Find:

if(dayz_characterID != _ownerID) then {

replace with:

if(_playerUID != _ownerID) then {

Done.

  • player_updateGui.sqf

Find:

"_charID","_rcharID"

Replace with:

"_playerUID","_rplayerUID"

Find:

_charID = player getVariable ["CharacterID", "0"];

replace with:

_playerUID = getPlayerUID player;

Find:

_rcharID = _humanityTarget getVariable ["CharacterID", "0"];

replace with:

_rplayerUID = getPlayerUID _humanityTarget;

Find:

if ((_rcharID in _friendlies) && (_charID in _rfriendlies)) then {

Replace with:

if ((_rplayerUID in _friendlies) && (_playerUID in _rfriendlies)) then {

Find:

if !(_charID in _rfriendlyTo) then {

replace with:

if !(_playerUID in _rfriendlyTo) then {

Find:

_rfriendlyTo set [count _rfriendlyTo, _charID];

replace with:

_rfriendlyTo set [count _rfriendlyTo, _playerUID];

Done.

  • tent_pitch.sqf

Add to the private variables at the top:

,"_playerUID"

Find:

_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;

and add directly under it:

_playerUID = getPlayerUID player;

Find:

_object setVariable ["CharacterID",dayz_characterID,true];

and add directly under it:

_object setVariable ["ownerPUID",_playerUID,true];

FInd:

PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];

replace with:

PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location, _playerUID],_classname];

Done.

  • vault_pitch.sqf

add at to the private variables at the top

,"_playerUID"

Find:

_location = player modeltoworld [_offset_x,_offset_y,_offset_z];

and add directly under it:

_playerUID = getPlayerUID player;

Find:

 

_tent setVariable ["CharacterID",_combination,true];

and add directly under it:

_object setVariable ["ownerPUID",_playerUID,true];

Find:

PVDZE_obj_Publish = [_combination,_tent,[_dir,_location],"VaultStorageLocked"];

replace with:

PVDZE_obj_Publish = [_combination,_tent,[_dir,_location, _playerUID],"VaultStorageLocked"];

Done.

  • player_build.sqf

add to the private variables at the top:

,"_ownerPUID", "_playerUID"

Find:

 

_inVehicle = (_vehicle != player);

and add under it:

_playerUID = getPlayerUID player;

Find:

_ownerID = _nearestPole getVariable ["CharacterID","0"];

replace with:

_ownerID = _nearestPole getVariable ["ownerPUID","0"];

Find:

// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];

and replace it if you want to enable the debug,

diag_log format["Player_build start: [PlayerUID = %1]  [OwnerID = %2]", _playerUID, _ownerID];

Find:

if(dayz_characterID == _ownerID) then {  //Keep ownership

replace with:

 

if(_playerUID == _ownerID) then {  //Keep ownership

Find:

// owner can build anything within his plot except other plots

and if you want to enable the debug add directly under it:

diag_log text "Player is owner";

Find:

_tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; 

and add directly under it:

_tmpbuilt setVariable ["ownerPUID",_playerUID,true];

Find:

 

_tmpbuilt setVariable ["CharacterID",_combination,true];

and add directly under it:

 

_tmpbuilt setVariable ["ownerPUID",_playerUID,true];

Find:

 

PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];

Replace with:

PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];

Find:

 

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];

Replace with:

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];

Done.

 

  • player_buildingDowngrade.sqf

add to the private variables at the top:

,"_playerUID"

Find:

 

_needText = localize "str_epoch_player_246";

and add directly under it:

_playerUID = getPlayerUID player;

Find:

 

_ownerID = _nearestPole getVariable["CharacterID","0"];

replace with:

_ownerID = _nearestPole getVariable["ownerPUID","0"];

Find:

 

if(dayz_characterID == _ownerID) then {

replace with:

 

if(_playerUID == _ownerID) then {

Find:

_objectCharacterID 	= _obj getVariable ["CharacterID","0"];

and add directly under it:

_ownerID = _obj getVariable["ownerPUID","0"];

Find:

// Set location
_object setPosATL _location;

And add under it:

		// Set Owner.
		_object setVariable ["ownerPUID",_ownerID,true];
		
		diag_log format["Player_buildingdowngrade: [newclassname: %1] [_ownerID: %2] [_objectCharacterID: %2]",_newclassname, _ownerID, _objectCharacterID];

Find:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,player];

replace with:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID],_classname,_obj,player];

Done.

  • player_tagfriendly.sqf

Find:

_callerID = _caller getVariable ["CharacterID", "0"];

replace with:

_callerID = getPlayerUID _caller;

Find:

_targetID = _target getVariable ["CharacterID", "0"];

Replace with:

_targetID = getPlayerUID _target;

add above this 2 entries:

diag_log format["[_target: $1] [_caller: %2]", _target,_caller];

add below this 2 entries:

diag_log format["[_targetID: $1] [_callerID: %2]", _targetID,_callerID];

Done.

  • player_upgrade.sqf

Find:

_ownerID = _nearestPole getVariable["CharacterID","0"];

Replace with:

_ownerID = _nearestPole getVariable["ownerPUID","0"];

add directly under it:

_playerUID = getPlayerUID player;

Find:

if(dayz_characterID == _ownerID) then {

replace with:

if(_playerUID == _ownerID) then {

Find:

_objectCharacterID 	= _obj getVariable ["CharacterID","0"];

add under it:

_ownerID = _obj getVariable["ownerPUID","0"];

Find:

			// Set location
			_object setPosATL _location;

Add under it:

			// Set Owner.
			_object setVariable ["ownerPUID",_ownerID,true];
			

Find:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,player];

Replace with:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location, _ownerID],_classname,_obj,player];

Done.

  • Server_monitor.sqf

open it and find:

		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};

directly under it add:

 

		// Realign characterID to OwnerPUID - need to force save though.
		
		if (count _worldspace < 3) then
		{
			_worldspace set [count _worldspace, "0"];
		};		

		_ownerPUID = _worldspace select 2;
		
		// diag_log format["Server_monitor: [ObjectID = %1]  [ClassID = %2] [_ownerPUID = %3]", _idKey, _type, _ownerPUID];
		

Find:

_object setVariable ["ObjectID", _idKey, true];

Directly under it add:

 

_object setVariable ["OwnerPUID", _ownerPUID, true];

Done.

 

Now go to your init.sqf

and find:

_serverMonitor = 	[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";

and replace it with your custom path pointing to your custom folder in my case it looks like this:

 

_serverMonitor = 	[] execVM "custom\server_monitor.sqf";

For me everything is working, i dont test the script before, i doed exact the same like above and its working for me with vanilla epoch and with my normal MPmission where i have about 22 custom files from the dayz_code.pbo.

#Edit: fixxed some synatx errors in my instruction

 

 

 

Well, no changes to packVault.sqf ?

Link to comment
Share on other sites

Hi Rimblock quick question, I'm running PP4L and SBP everything works as intended. However, when someone builds a non-locking storage (Gunracks, wooden crates, sheds etc) the builder cannot place items inside it. They can open the gear but cannot move items into it. 

 

As far as I can tell other people can use it as normal but the builder can't without re-logging first. Any ideas what could cause this? I've compared files and can't find the error anywhere. 

 

Edit:

 

The only significant change is I changed unlock vault to characterID from OwnerID because players could not access their safes. 

 

and for some reason the addaction for plot boundary doesn't delete. I had it working so guess I broke it when trying to find a fix for the storage issue.

Link to comment
Share on other sites

I have just installed this through the step by step process of editing all the files.  I followed every instruction to the letter.  

 

I am not able to: unlock safes or locked boxes.  I am also not able to build after death (tested by placing a plot and wall, killing myself, and trying to build another wall).

 

The only deviation I had to change was using _object instead of _tmpbuilt due to my player_build.sqf being from Build Snapping.  How could this cause errors with my safes?  I changed everything from the tutorial as instructed.

 

Edit: I found one or two errors, but still can't build after death.

Link to comment
Share on other sites

Hi Rimblock quick question, I'm running PP4L and SBP everything works as intended. However, when someone builds a non-locking storage (Gunracks, wooden crates, sheds etc) the builder cannot place items inside it. They can open the gear but cannot move items into it. 

 

As far as I can tell other people can use it as normal but the builder can't without re-logging first. Any ideas what could cause this? I've compared files and can't find the error anywhere. 

 

Edit:

 

The only significant change is I changed unlock vault to characterID from OwnerID because players could not access their safes. 

 

and for some reason the addaction for plot boundary doesn't delete. I had it working so guess I broke it when trying to find a fix for the storage issue.

 

Make sure you have the latest version and the safes have the steamID in the worldspace field in the DB.  I have provided SQL linked from the first post to help with aligning already built items with the system used in A Plot for Life.  That is probably what is causing the issue with the safes.

 

I have never come across the issue with not being able to put items in any storage container.  It should not be related to this mod unless there is a missing ";" somewhere causing a script to abort or something like that.  Try setting "DZEdebug = true;" in the init.sqf and use -showscripterrors in the command line when calling ARMA2OA and it should show errors with scripts either whilst playing and / or in the client RPT file or server RPT file.

 

 

I have just installed this through the step by step process of editing all the files.  I followed every instruction to the letter.  

 

I am not able to: unlock safes or locked boxes.  I am also not able to build after death (tested by placing a plot and wall, killing myself, and trying to build another wall).

 

The only deviation I had to change was using _object instead of _tmpbuilt due to my player_build.sqf being from Build Snapping.  How could this cause errors with my safes?  I changed everything from the tutorial as instructed.

 

Edit: I found one or two errors, but still can't build after death.

 

Were the safes already built before installing this mod (see above) ?.

 

If you cannot build after death it sounds like the DB saves are not recording the SteamID correctly.  Check the DB and see if the worldspace field in the object_data table for your plot pole just build has a large number at the end.

Link to comment
Share on other sites

Update for A Plot for Life v2.3 (Epoch core merge build).

 

A Plot for life on / off

Modular building on / off

Snap Building on / off

 

Build and remove modulars: Working

Build / unlock / lock / pack safes: Working

Build / unlock / lock / pack tents: Working

Upgrade cinder walls: working.

 

Switching between A Plot for life off -> on kept ability to build on the same plot for plots / items build after the mod was added.

 

All files are in the dayz_code.pbo file so the mission file is just 50+k.

 

I am just updating my Git with the last couple of bug fixes and I will make my dayz_code.pbo available so people can just drop it in to the server and client @dayzEpoch/addons  mod folder.

 

You will need to turn off verifySignatures = 0; in the config.cfg but as this is only intended for beta testing it should only be deployed on test servers.

 

The dayz_code.pbo is from 1.0.4.2 with the building stuff from the 1.0.5.2 RC files.

 

Core things to test along with the items above are tag friendlies, upgrade / downgrade doors with locks, dying and making sure you can build again (or not build if A Plot for Life is turned off).

 

I also added the following to the mission init.sqf

 

DZEdebug = true; // See debug messages in the rpt files.


DZE_BuildingLimit = 300; // Build upto 300 items around a plot pole
DZE_StaticConstructionCount = 1; // Only one animation to build


DZE_APlotforLife = true; // A plot for Life on (true) or off (false)
DZE_modularBuild = true; // Modular build framework on (true) or off (false).  This is a coding framework and has no in game effect but also includes snap build pro.

I will put the links up in the first post when uploaded.

 

Update: first post updated with download and config details.  Enjoy.

Link to comment
Share on other sites

I do have an undefined variable in the fn_selfactions but its related to a vehicle animation, unfortunately no other errors report themselves in the client or server rpt. 

 

The building modifications (PP4L, SBP, Vector and Precise) all seem to be working as intended with no errors. Will revert the safe changes back to your latest and see if they pop an error. 

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