Jump to content

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


Recommended Posts

Plot For Life v2.5 with Snap Pro v1.4.1 & Precise Base Building 1.0.4 (Built for Epoch 1.0.5.1)
 
Current Version
Note:
If you are also going to use other building mods (Vector build etc) then please check the other mods have been updated to work with v2.5 before installing.  If they have not then please use A Plot for Life v2.35 which can be downloaded from the links further down this post.
 
 
V2.4 -> 2.5 upgrade.
 
 1. Download and replace the following files in MPMissions\[Mapname]\Custom\Compile.
2. Download and merge (see the diffmerge tutorial links further down) the server files found in $SERVERHOME\custom (changes are fairly minimal).
 
That is it.
 
New features.
  1. Merged in Precise Base Building from his kind permission.  Please show your appreciation to him as well.

 
Core Features.
  • The whole system is is switchable between characterID and PlayerUID by setting a variable.
  • All items built after the mod is installed with have the PlayerUID and the characterID stored for ownership checking (locked buildables will only have the PlayerUID stored as the characterID field is used for the lock code).
  • Includes the 1.0.5.2. code to allow either SteamID or BIS PUID (written by icomrade).
  • You can turn on the plot boundary from the plot pole and remove it.  Currently I am using the road cones with lights on top which are also visible at night.  They can be changed.
  • Take Ownership is available from the plot pole to the plot poles owner and allows them to take ownership of all buildables in range excluding  locked storage (safes / lockboxes), tents, locked doors.  This can be changed as it is all controlled via variables.  The core idea is that this will align peoples bases to the new system for steamID storage on legacy bases.  It also means that raiders can raid a base, replace the plot pole, take ownership and not get full access to locked areas but not have 6 cycles to remove stuff etc after taking over.  Depending on the size of the base, number of objects etc this could put a bit of load on the server / DB.  It is also turn off or on-able via a variable so you can set it only to allow players to realign their bases and then disable the option.
  • New function to check ownership or friendly status of a given object.
  • Merged with Snap Pro and Modular build framework with permission from Raymix Please show you appreciation to Raymix as well).
  • Uses the modular build system.

  • New functions to reduce instances of common code in the building system.  Both are small and precompiled.

    1. fn_check_owner.sqf to check ownership and friendly status

    2. fn_find_plots to get all nearby plot poles and return a count and the nearest alive one (if one exists).

  • Optimised code changing nearestobjects to nearEntities.

  • Added delay in the Take Ownership function so the Hiveext / DB does not get spammed when taking ownership of large bases.

  • Player_build.sqf is no longer used at all and had been removed from the distribution.

  • Optimised code what has saved between 20k & 30k in the mission package size.

 
Install Instructions are in the zip file (A Plot for Life v2.5).
 
Guides on how to use Diffmerge and how to integrate scripts together.
 
Please backup your databases and thoroughly test before putting live.
 
Report any bugs / suggestions in the thread.
 
 
Outstanding issues
  • None reported.

Next Version: 3.0

  • Include a action menu (scroll wheel menu) for plot options and builder / owner management ()

 

Beta Testing

As it seems theres no with an interest to do any beta testing I need to sweeten the deal.  Anyone who helps with beta testing will get access to boobytrapping doors 4 weeks before it is released publicly.  The 4 weeks will start from the v2.4 release date and will include any bug fixing period.  

 

Boobytrapping Doors - If you have a hand grenade then you can upgrade a locked door to boobytrap it.  If the incorrect door code is entered then the hand grenade will be dropped at the position the player was when they boobytrapped the door (make sure you are on the correct side of the door when setting the trap  ;) ).

 

 

Releases
 
Naming convention
 

 
Naming convention is v(Major Change).(Functional addition).(Bugfix) 
 
(Major Change) = i.e. Changing how the ownerUID is stored or an overhaul to allow this mod to exist with Epoch and be turned on or off.

(Functional addition) = i.e. add building maintenance to the mod.

(Bugfix) = Any bug fix releases.

 

 

Previous releases (Majors)

 

 

v2.0 (ARMA II OA 125548 with SteamID - Epoch 1.0.5)

  • Now works with full length SteamID.  
  • Works with safes, tents as well as Epoch buildables.
  • Stores SteamID and characterID - currently only verifies against SteamID.
  • Should be compatible with snap build mods etc.

v1.0

Kudos to WGC GeekGarage for the original concept in his release and all the work tracking down where the changes needed to be made.  That must have been a lot of hard work and I in no way envy the task.
 

 
Use and Distribution License details.
 
This mod is licensed under the DayZ Mod License Share Alike (DML) license.
 
Usage
For people wishing to use the mod for their own servers, please use away.  If advertising the mod as a feature of your servers then a shoutout and a linkback to here would be appreciated but is not a requirement.
 
Distribution
For people wishing to modify and distribute my code for this mod, the requirements are different.
1. You contact me and ask (common courtesy really).
2. You make it clear who the original creator is and provide a link to this thread.
 
Included mods.

A Plot for Life v2.35 (Rimblock). <- is fine.

 

Included mods.

A Plot for Life

 

"credits to each addon / script creator" <- is not.

 

3. The person distributing the mod explicitly states that they are responsible for any issues with their modified version of the mod and not the original creator (i.e. me).

 

4. Any other requirements under the  DayZ Mod License Share Alike (DML) license.

 

Link to comment
Share on other sites

Error in your compiles.sqf instructions:

 

fnc_usec_damageActions = compile preprocessFileLineNumbers "custom\fn_damageActions.sqf";

 

Should be

 

fnc_usec_damageActions = compile preprocessFileLineNumbers "custom\ConvertpUID\fn_damageActions.sqf";

 

I'm setting up a new server and am installing this now. 

Link to comment
Share on other sites

Error in your compiles.sqf instructions:

 

fnc_usec_damageActions = compile preprocessFileLineNumbers "custom\fn_damageActions.sqf";

 

Should be

 

fnc_usec_damageActions = compile preprocessFileLineNumbers "custom\ConvertpUID\fn_damageActions.sqf";

 

I'm setting up a new server and am installing this now. 

 

 

Good spot.

 

Thanks for the heads up.  

 

Install instructions have now been amended..

 

RB

Link to comment
Share on other sites

Find (Epoch)
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
Find (Otternas or  WGC GeekGarage Snapto release)
_object setVariable ["CharacterID",dayz_characterID,true]; 
Change to  (Epoch)
_object setVariable ["CharacterID",_playerUID,true];
Change to (Otternas or  WGC GeekGarage Snapto release)
_object setVariable ["CharacterID",_playerUID,true];
 

 

Are the change to meant to be the same ? And I should also add that I have Epoch yet I had _object not _tmpbuilt

(I have snap build installed)

 

 

_callerID = _caller getVariable "CharacterID";
_targetID = _target getVariable "CharacterID";
Change to 
_caller = [_caller] call convertPlayerUID; 
_targetID = [_target] call convertPlayerUID; 

 

 Shouldn't it be change to _callerID ? Or is the ID dropped on purpose ? ??

 

Any help greatly appreciated.

 

SGCDayZ Server Management

Jonas

 

EDIT:

 

Also when you say edit fn_selfAction.sqf I'm presuimg you meant fn_selfActions.sqf

 

Also when you say find :

s_player_downgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_REMLOCK",_text], "\z\addons\dayz_code\actions\player_upgrade.sqf",_cursorTarget, -2, false, true, "",""];

 

I'm presuming that the file path is meant to say player_downgrade.sqf not upgrade since this is the downgrade action not the upgrade ;P

Edited by SGCDayZ
Link to comment
Share on other sites

Thanks.

 

It is good to have a second set of eyes going over the instructions.  Late nights copying and pasting and typos are gonna creep in somewhere  :( .

 

All apart from the tagfriendly were instruction typos.  The tagfriendly mistake was also a mistake in my code I am running and explains why I could not tag someone on my server (hopefully :) ).

 

All changes made to the first post.

 

RB

Link to comment
Share on other sites

Thanks.

 

It is good to have a second set of eyes going over the instructions.  Late nights copying and pasting and typos are gonna creep in somewhere  :( .

 

All apart from the tagfriendly were instruction typos.  The tagfriendly mistake was also a mistake in my code I am running and explains why I could not tag someone on my server (hopefully :) ).

 

All changes made to the first post.

 

RB

 

What changes do I make? I already have it installed.

Link to comment
Share on other sites

What changes do I make? I already have it installed.

 

 

The items listed by SGCDayZ above.  Changes in bold & underline in the quote box (rather than the code box as code boxes do not allow me to format the text).

 

 

7. Copy over "Client_PBO\dayz_code\actions\player_tagFriendly.sqf" to your custom folder and open it up.

 
Find
_callerID = _caller getVariable "CharacterID";
_targetID = _target getVariable "CharacterID";

Change to 

 

_callerID = [_caller] call convertPlayerUID; 

_targetID = [_target] call convertPlayerUID; 

 

 

 

10. Copy over "Client_PBO\dayz_code\actions\player_build.sqf" to the "custom\ConvertpUID\" folder and open it.

 

Find (Epoch)
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];

Find (Otternas or  WGC GeekGarage Snapto release)

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

Change to  (Epoch)

 

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

 

 

Change to (Otternas or  WGC GeekGarage Snapto release)

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

12. Copy over "Client_PBO\dayz_code\actions\fn_selfActions.sqf " to the mission folder and open it.

 

Find

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

 

Change to 

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

Number 7. is important as it will probably break friendly tagging.

 

Number 10. is important if you are not using the Snap Build releases from Otternas or  WGC GeekGarage

 

The others are typo in what to search for rather than what to replace it with.

 

Hope this is a bit clearer.

 

RB

Link to comment
Share on other sites

Great glad we got that cleared up unfortunately late last night we discovered another problem now I'm not sure if it's due to our installation or not but after a server restart players we unable to access there plot poles it didn't recognize them as the owner. This being quite a serious issue arguably more so than the tagging since out server restarts every four hours I have uninstalled this addon, however while it was installed it was received greatly by the players despite it's flaws so I'm hoping this can be resolved as quickly as possible.

 

Also in the last SQL bit is char2nine meant to be text2digits. I have very little experience with SQL so I'm just asking as a general question as it only worked when i used text2digits which might be why it's not working

 

Thanks for any help

 

SGCDayZ Server Management

Jonas

Link to comment
Share on other sites

Great glad we got that cleared up unfortunately late last night we discovered another problem now I'm not sure if it's due to our installation or not but after a server restart players we unable to access there plot poles it didn't recognize them as the owner. This being quite a serious issue arguably more so than the tagging since out server restarts every four hours I have uninstalled this addon, however while it was installed it was received greatly by the players despite it's flaws so I'm hoping this can be resolved as quickly as possible.

 

Also in the last SQL bit is char2nine meant to be text2digits. I have very little experience with SQL so I'm just asking as a general question as it only worked when i used text2digits which might be why it's not working

 

Thanks for any help

 

SGCDayZ Server Management

Jonas

 

That is exactly the issue for the plot pole ownership.  Should be text2digits in the post install sql.  

 

Have been working on the tagging to try and find out the problem but have not found it yet.  On my server, the friendlies are still being saved as characterID rather than the converted playerUID.

 

If someone could check their character_data table for players that have tagged after the install and check the currentstate field.

 

The last set of brackets are the friendlies IDs.

eg.

= [Current weapon, current action, current temp, [friendlies]]

["MakarovSD","",42,["3"]]

 

So the friendlies would be characterID 3 in this case.

 

There seems also to be a limitation in the tag friendlies implementation in that after you tag 5 friendlies, if you tag another it will overwrite the last friendly you tagged (i.e. the first 4 remain the same but the 5th changes).  This is not related to my release, it is standard in Epoch.

 

Not being able to untag friendlies also poses the issue of falling out with a friendly and them still being able to build on your plot.  This is standard Epoch but can be reset by dying and a new character being created.  With this mod there will be no reset.  I may have to look in to better friendlies management as a future enhancement.

 

RB   

Link to comment
Share on other sites

All player on my server have a friendly state of [], basically no one has any friendly.

 

Another admin on our server has asked if it would be possible to add a menu to plot poles so that when you scroll on it it shows 'Plot Pole Settings' and it would open a gui like your gear where you could select what players are friendly and who aren't. Just an idea.

 

SGCDayZ Server Management

Jonas

Link to comment
Share on other sites

All player on my server have a friendly state of [], basically no one has any friendly.

 

Another admin on our server has asked if it would be possible to add a menu to plot poles so that when you scroll on it it shows 'Plot Pole Settings' and it would open a gui like your gear where you could select what players are friendly and who aren't. Just an idea.

 

SGCDayZ Server Management

Jonas

 

Sounds like your players are a fan of CCG :D

 

FYI If someone does make that public (as i can't code) Then that would be great

Link to comment
Share on other sites

All player on my server have a friendly state of [], basically no one has any friendly.

 

Another admin on our server has asked if it would be possible to add a menu to plot poles so that when you scroll on it it shows 'Plot Pole Settings' and it would open a gui like your gear where you could select what players are friendly and who aren't. Just an idea.

 

SGCDayZ Server Management

Jonas

 

Would be good if some of your players could tag each other as friendly and then take a look at what has been recorded.  It would help eliminate if the tagging issue is related to my own setup or the release.  Spending a number of hours testing last night I currently see no reason for it not to work so am leaning towards something in my own setup.  I will build a second server and see if that has the same issue.  I may also open it up so I can at least get some basic user data 'from the wild'.

 

I was also thinking about tying the valid builders to the plot pole, storing the builders playerUID in the plot poles inventory and then providing an option at the plot pole of removing them.  The limitation is that someone would have to remember which PlayerUID related to which player as the players can always change names.

 

As the tag friendly uses the characterstate column which has a max length of 200 characters including the other info stored, storing in a 11 character playerUID rather than a characterID of a few digits is more likely to cause issues in the long run.  The inventory column is longtext with a max of 4.2 billion characters.

 

Popping up another box to manage the builders will take more time and i may look at that after builder management from the plot pole is done.  Note that I am very open to collaboration especially with others who have some artistic skills for icons etc as I am no artist. 

 

I will also put up a proposed list of enhancements in the first the tagging has been resolved in this release.

 

RB

Link to comment
Share on other sites

Someone has just confirmed that the tagfriendly is also not working on the release this one was optimised from.

 

That means I can target the debugging to the methadology rather than my release instructions or optimisations.

 

I have a thought on what it may be and will hopefully be able to confirm, or not, later today.

 

RB

Link to comment
Share on other sites

Have just been through a complete build from scratch and have found another amendment to the install instructions.  Install instructions int he first post have been amended.

 

Player_build.sqf (step 10)

 

Find (Epoch)
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];and replace
Find (Snapbuild mod)
PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];and replace

Change to (Epoch)

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

Change to (Snapbuild mod)

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

If you have installed the mod without this change and people have built then you can just run the post install SQL to realign the objects to the playerUID when you do this change on the server. 

 

RB

Link to comment
Share on other sites

Checkout install section 4.

 

Compiles redirect to selfActions was missing (WGC GeekGarage, I don't see it in your instructions either).

 

The only other changes in that section are for readability and have no other affect if you followed them prior to the change.

 

RB

Link to comment
Share on other sites

On the change to, the file path should be "custom\ConvertpUID\" currently its to "custom\"

 

Don't believe I didn't see this before sadly doesn't fix the problem at least not for me

 

6. Copy over "Client_PBO\dayz_code\compile\fn_damageActions.sqf" to the "custom\ConvertpUID\" folder and open it.

 
Find
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", ""];
Change to 
_action = _unit addAction ["Tag as friendly", "custom\player_tagFriendly.sqf", [], 0, false, true, "", ""]; 
Link to comment
Share on other sites

Have just been through a complete build from scratch and have found another amendment to the install instructions.  Install instructions int he first post have been amended.

 

Player_build.sqf (step 10)

 

Find (Epoch)
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];and replace
Find (Snapbuild mod)
PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];and replace

Change to (Epoch)

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

Change to (Snapbuild mod)

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

If you have installed the mod without this change and people have built then you can just run the post install SQL to realign the objects to the playerUID when you do this change on the server. 

 

RB

 

Please add this to the original post. Also should the finds say "and replace" on the end ?

Link to comment
Share on other sites

On the change to, the file path should be "custom\ConvertpUID\" currently its to "custom\"

 

Don't believe I didn't see this before sadly doesn't fix the problem at least not for me

 

No... and yes :) .

 

No because the instructions say to copy the tagfriendly custom folder not the custom\ConvertUID folder so that path is correct.

 

Yes because with all the other files being copied to the custom\ConvertUID there seems very little reason to not copy that one there as well.  I almost got tripped up with it when I did the fresh install and so I will change it and will also move the fn_selfActions.sqf so that is put in there as well as they were the only two files not in that directory.

Link to comment
Share on other sites

Please add this to the original post. Also should the finds say "and replace" on the end ?

 

The Snapbuild one is up already but the Epoch one is not.  Will add it.

 

Only section 5. has the "Replace with" and for no particular reason.   They should all be change to for consistancy unless you have any other thoughts / concerns ?.

 

Update: All items updated in first post.

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