Jump to content

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


Recommended Posts

  On 8/5/2014 at 10:47 AM, RimBlock said:

sorry but it is the way you have installed the script that is causing the issue.  

 

The script does not do anything with the players logins.

 

The problem is most likely related to the the amendments you have done to the files.  I would suggest Either installing this mod first and then installing your other mods or fixing the issues you already had before installing the script before installing.  One missed ";" or a bracket in the wrong place can cause issues for the whole script that will manifest in strange unconnected errors.

 

You could also try downloading the Dropbox rar files and comparing them with what you have using something like WinDiff which may show up issues with the inserted code.

 

I also do not see any info in the RPT file to confirm you are running an updated server_monitor.sqf .  This may cause a lot of problems if not linked in correctly.

 

As you have not listed the other mods and you are already getting errors before installing this mod, even if the server appears to work, it is not really working as it should.  This mod works fine on Vanilla Epoch and I cannot really support servers with other customisations as it is only developed on Vanilla Epoch.

Installed vanilla epoch, players can connect. Installed your script, players cannot connect. You need to update your first post with the fixes from other members here. I found several errors in your post that cause issues that were fixed by people in this thread.

Link to comment
Share on other sites

  On 8/5/2014 at 1:52 PM, f3cuk said:

Found it.

In fn_damageActions.sqf

Find

 

_playerUID = 	getPlayerUID _player;
Replace with

 

_targetUID = 	getPlayerUID _unit;
Find

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

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

 

Thanks,

 

Will amend and re-upload later today.

Link to comment
Share on other sites

  On 8/5/2014 at 10:59 PM, Gravvy said:

Installed vanilla epoch, players can connect. Installed your script, players cannot connect. You need to update your first post with the fixes from other members here. I found several errors in your post that cause issues that were fixed by people in this thread.

 

The step by step instructions have not been put together by myself.  There is also a note of issues with them and a link highlighting the issues.

 

I have said I will not be providing install instructions as I am concentrating on getting the mode working so it can be turned on or off and included in to the Epoch core build, although I seem to get sidetracked helping people with install issues.

 

I have created a rar file with the correct amended files in it which can be downloaded and placed in the correct places and works fine.  These files do not cause player login issues and would be the quickest and easiest way to install the mod.  There are two small amendments that would be needed afterwards.  The one above for tag friendly and the one with the vault upgrade / downgrade ownership (highlighted in the version history).  The second is fixed in the files on Github and the first will also be fixed today.  None of these files cause player login issues.

 

As stiflersM0M is the only person who has so far been willing to write a step by step guide, it may be better to contact them and ask them if they will be updating their guide and making the corrections or writing a better one yourself which I will be happy to include.

Link to comment
Share on other sites

  On 7/18/2014 at 2:58 AM, StiflersM0M said:

 

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

 

The tutorial Required that you allready have a custom compiles.sqf, if you dont have one just search in google how to made one its pretty simple.

 

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.

  Reveal hidden contents
  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
  17. Player_buildingmaint.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:

  Reveal hidden contents

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

  • fn_damageActions.sqf

  Reveal hidden contents

Find at the private variables at the top:

and replace it with:

Find:

Replace with:

Find:

Replace with:

Find:

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

Done!

  •  Fn_sefactions.sqf

  Reveal hidden contents

Find (again the private section at the top):

and add this behind it

Find:

and add directly above it:

Find:

Replace with:

Directly under this add:

Find:

and add above it:

Find 2 times:

and replace it with:

Find:

and replace it with:

Find 2x times:

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

Find:

Replace with:

 

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

 

Find:

Replace with:

Find:

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

Find:

and add directly under this:

FInd:

Replace with:

Find:

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

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

Find:

Replace with:

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

  •  player_packtent.sqf

  Reveal hidden contents

Lets start with player_packTent.sqf

 

Add at the top the private variables:

Find:

Replace with:

Find:

and add directly under it:

 

Find:

Replace with:

That was fast we are done with playerpacktent.

  • player_packVault.sqf

  Reveal hidden contents

add to the private variables at the top:

Find:

replace with:

Find:

add directly under this:

 

Find:

replace with:

Find:

Replace with:

Find:

add directly under it:

Done.

  • player_unlockVault.sqf

  Reveal hidden contents

Add to the private variables at the top:

Find:

Replace with:

and add directly under it:

Find:

replace with:

Find:

 

Replace with:

Find:

 

and add directly under it:

 

Done.

  • remove.sqf

  Reveal hidden contents

Add to the private variables at the top:

 

Find:

replace with:

and add directly above it:

 

Find:

Replace with:

Find:

Replace with:

Find:

replace with:

Done.

  • player_updateGui.sqf

  Reveal hidden contents

Find:

Replace with:

Find:

replace with:

Find:

replace with:

Find:

Replace with:

Find:

replace with:

Find:

replace with:

Done.

  • tent_pitch.sqf

  Reveal hidden contents

Add to the private variables at the top:

Find:

and add directly under it:

Find:

and add directly under it:

FInd:

replace with:

Done.

  • vault_pitch.sqf

  Reveal hidden contents

add at to the private variables at the top

Find:

and add directly under it:

Find:

 

and add directly under it:

Find:

replace with:

Done.

  • player_build.sqf

  Reveal hidden contents

add to the private variables at the top:

Find:

 

and add under it:

Find:

replace with:

Find:

and replace it if you want to enable the debug,

Find:

replace with:

 

Find:

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

Find 2x:

 

and add directly under it 2x:

 

Find:

 

Replace with:

Find:

 

Replace with:

Done.

 

  • Player_buildingmaint.sqf

  Reveal hidden contents

add to the private variables at the top:

Find:

 

and add directly under it:

Find:

 

replace with:

Find:

 

replace with:

 

Find:

and add directly under it:

Find:

And add under it:

Find:

replace with:

Done.

  • player_tagfriendly.sqf

  Reveal hidden contents

Find:

replace with:

Find:

Replace with:

add above this 2 entries:

add below this 2 entries:

Done.

  • player_upgrade.sqf

  Reveal hidden contents

Find:

Replace with:

add directly under it:

Find:

replace with:

Find:

add under it:

Find:

Add under it:

Find:

Replace with:

Done.

  • Server_monitor.sqf

  Reveal hidden contents

open it and find:

directly under it add:

 

Find:

Directly under it add:

 

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.

 

 

Nice tut. Evry thing is working server is live but a verry inportent issue 

  • Player_buildingmaint.sqf

Is not working also i can not fint the stuf what you are saying your tut. Is there enny one out there that has this working. Please help me out. Buildings starting to decay and some buildings are already gone. Because the can not building maint.

 

This is the origenal 

  • Player_buildingmaint.sqf
/*
	DayZ Base Building Maintenance
	Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_objectCharacterID"];

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_52") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

player removeAction s_player_maint_build;
s_player_maint_build = 1;

// get cursortarget from addaction
_obj = _this select 3;

// Find objectID
_objectID 	= _obj getVariable ["ObjectID","0"];

// Find objectUID
_objectUID	= _obj getVariable ["ObjectUID","0"];

if(_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_maint_build = -1; cutText [(localize "str_epoch_player_50"), "PLAIN DOWN"];};

// Get classname
_classname = typeOf _obj;

// Find display name
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");

// Find next maintain
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "maintainBuilding");

if ((count _upgrade) > 0) then {
	_requirements = _upgrade;
} else {
	_requirements = [["PartGeneric",1]];
};

_missingQty = 0;
_missing = "";

_proceed = true;
{
	_itemIn = _x select 0;
	_countIn = _x select 1;
	_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
	if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
} forEach _requirements;

if (_proceed) then {
	[1,1] call dayz_HungerThirst;
	player playActionNow "Medic";
	[player,20,true,(getPosATL player)] spawn player_alertZombies;

	_temp_removed_array = [];
	_removed_total = 0;
	_tobe_removed_total = 0;
	
	{
		_removed = 0;
		_itemIn = _x select 0;
		_countIn = _x select 1;
		// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
		_tobe_removed_total = _tobe_removed_total + _countIn;

		{					
			if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
				_num_removed = ([player,_x] call BIS_fnc_invRemove);
				_removed = _removed + _num_removed;
				_removed_total = _removed_total + _num_removed;
				if(_num_removed >= 1) then {
					_temp_removed_array set [count _temp_removed_array,_x];
				};
			};
	
		} forEach magazines player;

	} forEach _requirements;

	// all parts removed proceed
	if (_tobe_removed_total == _removed_total) then {

		cutText [format[(localize "STR_EPOCH_ACTIONS_4"), 1], "PLAIN DOWN", 5];
		PVDZE_maintainArea = [player,2,_obj];
		publicVariableServer "PVDZE_maintainArea";

	} else {
	
		{player addMagazine _x;} count _temp_removed_array;
		cutText [format[(localize "str_epoch_player_145"),_removed_total,_tobe_removed_total], "PLAIN DOWN"];
	
	};
} else {
	_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
	cutText [format[(localize "str_epoch_player_146"),_missingQty, _textMissing], "PLAIN DOWN"];
};


DZE_ActionInProgress = false;
s_player_maint_build = -1;

Greets Mike

Link to comment
Share on other sites

Hi Mike,

 

Use the original buildingmaint script.  This mod should not change that as there is nothing in that script that deals with or checks ownership.

 

Check the link at the top of the instructions of issues with the instructions and corrections.  

Link to comment
Share on other sites

Hi Rimblock, 

 

quick question, the script is working however I have lost the ability to access safes. If I revert the fn_selfactions file to the default values regarding unlocking the safe etc it works although when accessing other peoples safes I can't re-lock them again, enter combo--> UI --> enter code nothing happens. 

 

Any ideas what the issue could be? As far as I can tell I've not modified the safe code anywhere else. 

Link to comment
Share on other sites

hey got an error....

everything is working fine till you look to a wall or every modular item,

 

then this error happens:

Error in expression <rTarget];

if(_isModular && (_playerUID == _ownerID)) then {
if(_hasToolbox && ">
Error position: <== _ownerID)) then {
if(_hasToolbox && "
>
Error ==: Typ Array, expected number,string,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location
File mpmissions\__CUR_MP.Chernarus\Custom\fn_selfActions.sqf, line 236

 and you cant unlock anything anymore.

 

i use the original fn_selfaction which was provided.... anyone have a fix for me ?

Link to comment
Share on other sites

  On 8/9/2014 at 10:11 PM, StiflersM0M said:

hey got an error....

everything is working fine till you look to a wall or every modular item,

 

then this error happens:

Error in expression <rTarget];

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

if(_hasToolbox && ">

Error position: <== _ownerID)) then {

if(_hasToolbox && ">

Error ==: Typ Array, expected number,string,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location

File mpmissions\__CUR_MP.Chernarus\Custom\fn_selfActions.sqf, line 236

 and you cant unlock anything anymore.

 

i use the original fn_selfaction which was provided.... anyone have a fix for me ?

Having the same problem as you ^^^^^^^

Link to comment
Share on other sites

What is ownerID set as higher up in the file ?.

 

It should be around line 166

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

On line 244 should be 

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

That will generate quite a lot of messages in the rpt file but it will tell you what is being passed in the _ownerID variable.

 

It may be that the server_monitor.sqf has an issue and is not populating the ownerPUID variable correctly.

 

Post up the result of that diag line and I may be able to point you to the issue.

 

RB

Link to comment
Share on other sites

Okay so I wanted to get A Plot for life + Snap Building Pro working together. I used PryMary's instructions and files from here:

 

I do everything as told, but as I get in game, the items don't snap. Everything else seems to work, I can rotate items 45 degrees, drop them down/pick up and so on, but the snapping does not work. Also the plot pole does not recognize the owner after the server has restarted.

 

In my init.sqf I have these lines to call the complies.sqf's:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
call compile preprocessFileLineNumbers "custom\compiles.sqf";

My custom\complies.sqf looks like this:

  Reveal hidden contents

 

(As seen in the last line, I pointed towards the snap_pro's player_build.sqf instead of P4L's)

And the player_build.sqf I use is the one PryMary posted.

 

Also note that I used the easy installation method since I don't have a lot of mods. Atleast I'm pretty sure they aren't effected by P4L.

 

 

 

Also on another question, if I were to follow the step-by-step guide, I don't understand where exactly do you change the files? StiflersM0M listed a bunch of files at the beginning of his guide here: 

Are these the files that are like scattered around the folders that I have to search for and edit individually? So if I were to look up these files and change them individually, why is he making a separate compiles.sqf file where he includes all those files? The whole guide seems slightly too messy, or just maybe too advanced for someone average.

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