Jump to content

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


Recommended Posts

Thanks for taking the time to look at the mod and solutions for people using infinistar.  Unfortunately the standard Epoch hiveext.dll does not allow updates that would allow me to just add ownership to the objects so I have to delete and recreate.

 

 

hmm, Why not just use the following like upgrade?

PVDZE_obj_Swap 
Link to comment
Share on other sites

Hi Guys.

 

I have this script running on my server, and the Snap system is perfekt.

But the plot pole for life is a nother story, when i set a plot pole, i can offcause start build. But if i foreksample set a cinderblock wall, then i can upgrade it cause there is a Plot pole hearby, then i have to remove the blot pole and then i can upgrade, but then i cant build anymore, so have to set the plot pole again to keep build, then take it away again if i will upgrade.
Anybody that has any ide ore a fix for this??

Thanks

Link to comment
Share on other sites

I recommand a change on line 114 of your compiles from

DZE_snap_build_file = 		"Custom\Snap_Pro\snap_build.sqf"; // Set as a global variable as it is also referenced in snapbuild.sqf

To

if(isNil "DZE_snap_build_file")then{
   DZE_snap_build_file = 		"Custom\Snap_Pro\snap_build.sqf"; // Set as a global variable as it is also referenced in snapbuild.sqf
};

since u use it as an DZE variable which are mainly configurable for users ( meant to be?)

 

The snap build variable is used for the snap build mod.  Ideally it should only be defined in one place.  Sure it could be over ridden in the init.sqf but for what ?.  Just change it in the compiles.sqf.

 

The variable could go in the variables.sqf file but I put it here so it would only be defined if DZE_modularBuild was set to true (i.e. it was needed or snap build pro).

 

edit: For the version I will probably be pushing to the Epoch Git, I will be setting it up as a !isnull as you suggest as the core files will not be easy to edit.

 

 

hmm, Why not just use the following like upgrade?

PVDZE_obj_Swap 

 

Check out server_swapobject.sqf (called with the PV you mentioned).  It deletes and publishes.  Update object would be good but the call that updates the worldspace works by objectID and that is only populated on server reboot so any objects built after the last server reboot would not be updated.

 

I spent many hours cursing and swearing trying to get this working with standard calls and finally having to write a slight variation of the publish object as the standard one would not let you publish with an inventory.

Link to comment
Share on other sites

Hi Guys.

 

I have this script running on my server, and the Snap system is perfekt.

But the plot pole for life is a nother story, when i set a plot pole, i can offcause start build. But if i foreksample set a cinderblock wall, then i can upgrade it cause there is a Plot pole hearby, then i have to remove the blot pole and then i can upgrade, but then i cant build anymore, so have to set the plot pole again to keep build, then take it away again if i will upgrade.

Anybody that has any ide ore a fix for this??

Thanks

 

Do you have any other mods installed ?.

 

Do you have any errors in the client or server .rpt file ?.

 

Something is not implemented correctly with your install.  I have no issues building, upgrading and downgrading.

Link to comment
Share on other sites

I am a few other mods yes. Admin tools, action Menu, Debug pannel, and thats all.

 

i can only find in RPT fil, and it has this txt. 

 

",dayz_playerName,r_player_blood,round _hu>
14:39:03   Error position: <dayz_playerName,r_player_blood,round _hu>
14:39:03   Error Undefined variable in expression: dayz_playername
14:39:03 File mpmissions\DayZ_Epoch_24.Napf\custom_monitor.sqf, line 20
14:39:04 Wrong text element 'null'
14:39:04 Wrong text element 'null'
14:39:04 Wrong text element 'null'
14:39:04 Wrong text element 'null'
14:39:04 Error in expression <'center'>BFT Epoch Madness</t><br/>
 
",dayz_playerName,r_player_blood,round _hu>
14:39:04   Error position: <dayz_playerName,r_player_blood,round _hu>
14:39:04   Error Undefined variable in expression: dayz_playername
14:39:04 File mpmissions\DayZ_Epoch_24.Napf\custom_monitor.sqf, line 20
Link to comment
Share on other sites

Firstly I would sort out the issue you have with mpmissions\DayZ_Epoch_24.Napf\custom_monitor.sqf

 

Secondly it sounds like the player_build.sqf is not setting the ownerUID variable on the newly build object (it will be set on the server start as the objects load hence it working after a restart).

 

Are you also using the modular build system (part of this mod but needs to be turned on) ?.

Link to comment
Share on other sites

 

Check out server_swapobject.sqf (called with the PV you mentioned).  It deletes and publishes.  Update object would be good but the call that updates the worldspace works by objectID and that is only populated on server reboot so any objects built after the last server reboot would not be updated.

 

I spent many hours cursing and swearing trying to get this working with standard calls and finally having to write a slight variation of the publish object as the standard one would not let you publish with an inventory.

 

u telling me that an object doesnt have an objectID when it's build after a restart? until the next restart?

 

Thats hard to believe :o

_objectID = _object getVariable ["ObjectID","0"];

Shouln't that be set??

 

and force the update with a publicvariableserver handler which calls this?

 

client sided:

PVDZE_P4L_Claim= [_object,_object2,_object3];
publicVariableServer "PVDZE_P4L_Claim"; // add to battleeye exception

in server functions:

"PVDZE_P4L_Claim" addPublicVariableEventHandler {
_object = _this select 1; // select 0 is the name of the handler
{
[_x,"all",false] call server_updateObject;
}count _object;
};
Link to comment
Share on other sites

omg, just looked into the code, and u are right -.- no objecid

Yep objectid is an auto increment db field. The hiveext.Dll does not read the db set value back after saving the object which is why the code uses objectuid as well.

That was a fun few hours of restarts trying to work that one out.

Link to comment
Share on other sites

I fixed the issue of being banned for taking ownership.  

 

Open your AH.sqf, and search for limit = 5.  Change 5 to whatever number you want (I have mine at 200).  

 

Yes it means a person could delete 200 items on your server; but you can take over bases.  I have vigilant admins, so I am not worried.

 

Nice. If infinistar holds that number in a server side variable then there is probably the potential to whitelist someone taking ownership so this value is increased for them for that action (script) only and thus not exposing the rest of the server.

 

Thanks for posting the information for others.

Link to comment
Share on other sites

For some reason on my server after restart you have to replace the plot-pole to build again... any ideas?

 

Thanks,

 Matt.

 

 

Oddly enough, I"m having this problem too... I'm trying to figure it out

 

Guys,

 

The mod works out of the box on vanilla Epoch.  Most issues are either with other mods not being merged correctly or with anti-hack.  The mod also has a number of options to turn various parts on and off.  For people to help we really need the full picture.

 

What other mods do you have installed ?.

What A Plot for Life options have you turned on (the variables you set in the mission init.sqf) ?.

Any errors in your server or client .rpt files (please use the spoiler tags if you are going to paste examples) ?.

 

@evilosmosis

Different build sqf files are used for different options, so whilst it sounds like the ownerUID is not being set on the newly created game world object, which of the building files to check is still a mystery.

 

@PixelatedWolve

Sounds like the plot pole is not being built with the correct information saved in to the worldspace of the DB record or there is an issue in the server_monitor.sqf file.

Link to comment
Share on other sites

Nice. If infinistar holds that number in a server side variable then there is probably the potential to whitelist someone taking ownership so this value is increased for them for that action (script) only and thus not exposing the rest of the server.

 

Thanks for posting the information for others.

 

 

Not a problem.  I know it's just a bandaid fix, but for now it's working.

 

Question to you sir.  My players and I cannot tag as friendly.  I mean, we can, but we cannot build in each others bases.  Any thoughts on where to look?

Link to comment
Share on other sites

Not a problem.  I know it's just a bandaid fix, but for now it's working.

 

Question to you sir.  My players and I cannot tag as friendly.  I mean, we can, but we cannot build in each others bases.  Any thoughts on where to look?

 

Check the character_data -> currentstate field to make sure the SteamIDs are being saved.  There is a max of 5 tagged friendlies allowed in Epoch.  Friendlies have to look at the plot owner after logging on before they can build on their plot.  Check the .rpt files (client and server) to see if you are getting any errors.

 

Have a play around with that and let me know if it is still an issue and I will try to help suggest where you can dig a bit deeper.

Link to comment
Share on other sites

Hey

 

Seem to be having a problem where base items are disappearing after installing this mod.

 

I have been using one of the old systems of p4l since my server went online so thought this would be a straight forward upgrade.

 

When players take ownership of their items, all works good, but then items start dissappearing, this seems to happen at varied intervals, usually wihtin a day or so or can happen after a restart.

 

I have CleanupPlacedAfterDays = -1 in hive.ini (have tried at 16 also)  and my sql script is set to delete items after 16 days never had this issue before with old system.

 

Any ideas on what the problem could be.  (should players not have to use take ownership since we used the old version of this since day 1 and if so can I remove the option for it).

 

****EDIT****

 

Doh have just found this

 

DZE_PlotOwnership = true;

 

Will set at false and see what happens

Link to comment
Share on other sites

This one is a bit baffling .

 

Random deletions should not occur.

 

When you say old verion, do you mean v1 or v2 old version ?.

 

The Take Ownership have two main uses.

Allow people who were not using A Plot for Life or who were using v1 of A Plot for life to align their bases to the new system.

Allow base raiders to destroy the original plot pole and place a new on and then take ownership of non-ocked buildables so they can do what they want (which seems reasonible).

 

It is set as an option so it can be turned on for base ownership realignment and then turned off again for Servers wehre the admins do not want base takeover to be available.

 

I would check your DB and look at the damage field to see if it is anything othere than 0.  The maintenance function may be 'degrading' the buildables and theny they are deleted when the server cleanup is run or when the server restarts.

 

Try taking control of a base (pref on a test server) and checking all the base buildables have got the new SteamID in the worldspace field or if some of them are missing.

 

If it is locked items that are vanishing it may be because they are deliberately excluded from the take ownership functionality to make it so base raiders do not automatically get access to locked doors (although they can remove the walls around the locked doors after taking ownership).

Link to comment
Share on other sites

This one is a bit baffling .

 

Random deletions should not occur.

 

When you say old verion, do you mean v1 or v2 old version ?.

 

The Take Ownership have two main uses.

Allow people who were not using A Plot for Life or who were using v1 of A Plot for life to align their bases to the new system.

Allow base raiders to destroy the original plot pole and place a new on and then take ownership of non-ocked buildables so they can do what they want (which seems reasonible).

 

It is set as an option so it can be turned on for base ownership realignment and then turned off again for Servers wehre the admins do not want base takeover to be available.

 

I would check your DB and look at the damage field to see if it is anything othere than 0.  The maintenance function may be 'degrading' the buildables and theny they are deleted when the server cleanup is run or when the server restarts.

 

Try taking control of a base (pref on a test server) and checking all the base buildables have got the new SteamID in the worldspace field or if some of them are missing.

 

If it is locked items that are vanishing it may be because they are deliberately excluded from the take ownership functionality to make it so base raiders do not automatically get access to locked doors (although they can remove the walls around the locked doors after taking ownership).

 

I have been using V2.2.1 since my server went live 3 months ago.

 

Its not just locked items that vanish, its walls also

 

I will play about with it some more on the test server and post back with any findings.

Link to comment
Share on other sites

In that case, I cannot think of anything to do with this mod that would cause it.  The mod only deletes objects when taking ownership (it then recreates with the new owner) and on a player choosing to remove the object.

 

Check your server RPT file for any object deletions.

 

Let us know what you find and myself or someone else will try to help getting to the bottom of this.

 

The Take Ownership is a new feature, hence is not so mature and will get more priority from me to make sure any issues are ironed out.

 

If you were using A Plot fr Life v2.xx onwards and all buildables were built from new after A Plot for Life was installed then you will not need to take ownership of bases to align to the new system although the take ownership option will realign all buildables to the plot owner regardless of who built them ;) .

Link to comment
Share on other sites

HI Rimblock,

 

First off, could this potentially be a fix for the plot ownership being displayed even if disabled...

diff --git a/server/custom/fn_selfActions.sqf b/server/custom/fn_selfActions.sqf

index c09c764..f477880 100755

--- a/server/custom/fn_selfActions.sqf

+++ b/server/custom/fn_selfActions.sqf

@@ -250,7 +250,7 @@ if (!isNull cursorTarget && !_inVehicle && !_isPZombie && (player distance curso

};

};

if (s_player_plot_take_ownership < 0) then {

- if (DZE_APlotforLife) then {

+ if (DZE_APlotforLife && DZE_PlotOwnership) then {

_isowner = [player, _cursorTarget] call FNC_check_owner;

If (( _isowner select 0 )) then{

s_player_plot_take_ownership = player addAction ["Take plot items ownership", "custom\A_Plot_for_Life\Action\plot_take_ownership.sqf", "", 1, false];

 

 

On the ownership note...

* I logged in, placed a plot pole, built a metal floor

* Logged out, logged in, all ok

* Got eaten by a zom

* Logged back in, all ok, built another metal floor

* Server restarted, not ok

 

 

Here is the DB contents ... (looks good to me, did not change while testing)

(1570, 371901450676358, 11, 'MetalFloor_DZ', '2014-10-01 08:03:03', '2014-10-01 08:03:03', 583, '[358.275,[3718.97,14506.7,0.624],"76561198020199247"]', '[]', '[]', 0.00000, 0.00000),

(1571, 372391450678360, 11, 'MetalFloor_DZ', '2014-10-01 08:40:19', '2014-10-01 08:40:19', 608, '[359.583,[3723.94,14506.7,0.783],"76561198020199247"]', '[]', '[]', 0.00000, 0.00000),

(1743, 37204145011094, 11, 'Plastic_Pole_EP1_DZ', '2014-10-04 07:07:56', '2014-10-04 07:07:56', 626, '[94.16,[3720.37,14501.1,0],"76561198020199247"]', '[]', '[]', 0.00000, 0.00000);

 

 

I added this debugging...

diff --git a/server/custom/fn_selfActions.sqf b/server/custom/fn_selfActions.sqf

index 68a6855..3fba64d 100755

--- a/server/custom/fn_selfActions.sqf

+++ b/server/custom/fn_selfActions.sqf

@@ -223,7 +227,7 @@ if (!isNull cursorTarget && !_inVehicle && !_isPZombie && (player distance curso

                } count dayz_fuelsources;

        };

 

-       // diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID));

+       diag_log ("OWNERID = " + _ownerID + "; CHARID = " + dayz_characterID + "; PLAYERID = " + _playerUID);

        

        // logic vars

        _player_flipveh = false;

 

Here is the client-side log...

"OWNERID = 76561198020199247; CHARID = 626; PLAYERID = 76561198020199247"

"OWNERID = 76561198020199247; CHARID = 626; PLAYERID = 76561198020199247"

"OWNERID = 76561198020199247; CHARID = 626; PLAYERID = 76561198020199247"

...

 

After server restart however, check this ...

"OWNERID = 0; CHARID = 626; PLAYERID = 76561198020199247"

"OWNERID = 0; CHARID = 626; PLAYERID = 76561198020199247"

"OWNERID = 0; CHARID = 626; PLAYERID = 76561198020199247"

...

 

I am going to dig deeper.

 

As for mods run, it works fine on vanilla epoch, but not with the codebase we're running. Including modified versions of infistar, wai, dzms, sar_ai, mf-tow, self-blood-bag and vehicle-repair. Infistar is the only one which appears to contain code that mucks around with the players ID.

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