Jump to content

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


Recommended Posts

 

:) .  If you take a look back in the thread, you will see it took me a bit to work that one out as well.

 

From the Wiki on addaction

 

  • Parameters array passed to the script upon activation in _this variable is: [targetcallerIDarguments]
  • target (_this select 0): Object - the object which the action is assigned to
  • caller (_this select 1): Object - the unit that activated the action
  • ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction)
  • arguments (_this select 3): Anything - arguments given to the script if you are using the extended syntax

 

 

Yeah there was just something in the back of my head and I knew I was skipping something I already knew.

Link to comment
Share on other sites

I have not edited the file it says there is an error with, not sure why it's giving me this?  Could anyone help please?

 

This is what my report file says for all the vehicles on my server:

5:15:06 "Deleting object JetSkiYanahui_Case_Yellow with invalid ID at pos [14700.8,9810.27,176.458]"
 5:15:06 "Deleting object SUV_Red with invalid ID at pos [9875.82,10318.6,0.029007]"
 5:15:06 "Deleting object SUV_Red with invalid ID at pos [9875.82,10318.6,0.0523376]"
 5:15:07 "Deleting object PBX with invalid ID at pos [13636.8,7795.63,64.106]"
 5:15:07 "Deleting object Mi17_DZE with invalid ID at pos [4870.91,4752.14,0.53125]"

5:15:18 Error in expression <teWest && !(locked _object)) then {
if (_objectID == "0" && _uid == "0") then
{
>
 5:15:18   Error position: <_objectID == "0" && _uid == "0") then
{
>
 5:15:18   Error Undefined variable in expression: _objectid
 5:15:18 File z\addons\dayz_server\compile\server_updateObject.sqf, line 29
 5:15:18 Error in expression <ntory;
};
case "damage": {
if ( (time - _lastUpdate) > 5) then {
call _object_da>
 5:15:18   Error position: <_lastUpdate) > 5) then {
call _object_da>
 5:15:18   Error Undefined variable in expression: _lastupdate
 5:15:18 File z\addons\dayz_server\compile\server_updateObject.sqf, line 174
 5:15:18 Error in expression <iable ["ObjectUID","0"];

if ((typeName _objectID != "string") || (typeName _uid>
 5:15:18   Error position: <_objectID != "string") || (typeName _uid>
 5:15:18   Error Undefined variable in expression: _objectid
 5:15:18 File z\addons\dayz_server\compile\server_updateObject.sqf, line 21
Link to comment
Share on other sites

 

I have not edited the file it says there is an error with, not sure why it's giving me this?  Could anyone help please?

 

This is what my report file says for all the vehicles on my server:

5:15:06 "Deleting object JetSkiYanahui_Case_Yellow with invalid ID at pos [14700.8,9810.27,176.458]"
 5:15:06 "Deleting object SUV_Red with invalid ID at pos [9875.82,10318.6,0.029007]"
 5:15:06 "Deleting object SUV_Red with invalid ID at pos [9875.82,10318.6,0.0523376]"
 5:15:07 "Deleting object PBX with invalid ID at pos [13636.8,7795.63,64.106]"
 5:15:07 "Deleting object Mi17_DZE with invalid ID at pos [4870.91,4752.14,0.53125]"

5:15:18 Error in expression <teWest && !(locked _object)) then {
if (_objectID == "0" && _uid == "0") then
{
>
 5:15:18   Error position: <_objectID == "0" && _uid == "0") then
{
>
 5:15:18   Error Undefined variable in expression: _objectid
 5:15:18 File z\addons\dayz_server\compile\server_updateObject.sqf, line 29
 5:15:18 Error in expression <ntory;
};
case "damage": {
if ( (time - _lastUpdate) > 5) then {
call _object_da>
 5:15:18   Error position: <_lastUpdate) > 5) then {
call _object_da>
 5:15:18   Error Undefined variable in expression: _lastupdate
 5:15:18 File z\addons\dayz_server\compile\server_updateObject.sqf, line 174
 5:15:18 Error in expression <iable ["ObjectUID","0"];

if ((typeName _objectID != "string") || (typeName _uid>
 5:15:18   Error position: <_objectID != "string") || (typeName _uid>
 5:15:18   Error Undefined variable in expression: _objectid
 5:15:18 File z\addons\dayz_server\compile\server_updateObject.sqf, line 21

 

Check out your server_monitor.sqf.  Sounds like it is not sending object details to the server_updateObject.sqf function.

 

Everything is working ok for me only problem i do have is with the mod to turn on plot pole markers.

 

They work fine only the option does not get removed from the scroll menu even when your not near the plot pole

 

Funnily enough I have been looking at this today.  Trying to find a way to turn them off on demand as well as on.  Still a WIP but for the menu item not disappearing.

 

Open fn_damageactions.sqf

 

Find

} else {
//Engineering

Change to 

} else {
//Engineering
player removeAction s_player_plot_boundary;
s_player_plot_boundary = -1;

Give that a try.  Not tested but may well fix the problem.

Link to comment
Share on other sites

Cool.  Np.

 

Little update...

 

I have spent a bit of time working on the plot boundary markers and have created the ability to turn on and off the plot markers from the plot pole.  The downside is that this seems not to be possible for the current plot sticks as nearestObjects cannot see them (suspect something to do with the config files for them).

 

To this end I have changed the objects to road cones which works quite well although they are collision aware so can be hit / knocked out of place / fall over etc.  Another option would be coloured balls like those used in Snap Build Pro (thanks Raymix for sharing the code).  In theory anything can be used and I have even thought about using barrels.  Having a number of fire barrels lit around the plot site at night would probably look pretty good but we need to be mindfull of the impact to the engine and possible free advantage some items may give players.

 

What I will probably do is setup the plot marker as a variable along with some recommended class names for them.  Obviously some objects will be just silly but it is up to the server owners to decide what they would like to use.  I will also add in a variable for frequency to enable people to have larger gaps between markers.

 

When created, the plot markers have ppMarker put in their inventory and on removal, all items matching the markers defined object class are checked to see if they have ppMarker in their inventory before removal.  THis should stop removal of any items of the same class on the plot that are not part of the plot marker ring.

 

------

 

Update: Have found a few example of lightpoint scriots which may enable me to make flashing lights on to of the road cones (for example).  I may even do a funky disco light show just for fun and set a variable so server owners can choose to turn it on or not, maybe for admin events, or even give the option to admins so they can turn it on from any plot pole.

 

Will finalise the code, get it up on GitHub and package a release.  The code should be pretty simple to implement.

 

Oh and for those asking why I am bothering with this....

 

1. Technical exercise and to see what can be done with lights.

2. As a warm up for a 'Take ownership' option on the plot pole for plot owners.  A number of the methods used for this will be used for that function as well.

Link to comment
Share on other sites

Thank you for the mod.

I do have snap_build plugin installed and so I am using that player_build.sqf

 

Within this file I do not have some of the lines of code you said to replace.

 

_tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; 
_tmpbuilt setVariable ["CharacterID",_combination,true];
PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
 
 
If someone could take a look at my player_build.sqf I'd appreciate it.
Thank you!
 
 
This is my RPT file.  Server loads near 100% but then stops.
 
4:15:01 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 0)! MoveName: amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon
14:15:01 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl
14:15:04 Warning: z\addons\dayz_communityassets\models\compass.p3d:0 Error while trying to generate ST for points: 863, 853, 852
14:15:05 "DayZ Epoch: PRELOAD Functions\init [[<No group>:0 (FunctionsManager)],any]"
14:15:05 "DayZ Epoch: MPframework inited"
14:15:07 Error in expression <t_removeNearby.sqf";
 
player_tagfriendly.sqf = compile preprocessFileLineNumbe>
14:15:07   Error position: <.sqf = compile preprocessFileLineNumbe>
14:15:07   Error Missing ;
14:15:07 File mpmissions\DayZ_Epoch_11.Chernarus\custom\compiles.sqf, line 33
14:15:07 Error in expression <t_removeNearby.sqf";
 
player_tagfriendly.sqf = compile preprocessFileLineNumbe>
14:15:07   Error position: <.sqf = compile preprocessFileLineNumbe>
14:15:07   Error Missing ;
14:15:07 File mpmissions\DayZ_Epoch_11.Chernarus\custom\compiles.sqf, line 33
14:15:07 "Res3tting B!S effects..."
14:15:09 "Initiating SafeZones"

 

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

I followed the instructions to the letter and everything looks ok.   I need some help please :)

Link to comment
Share on other sites

Alright so I tried a few things and everything is working with your script other than Lockboxes and Safes.  Players are able to place them without a problem, but they cannot access the scroll wheel options to unlock or open unless and admin unlocks the safe for them.  I've been through this thread and tried the different suggestions to no avail.  I am running Zupa's Single Currency along with Snap Build Pro and P4L. 

 

fn_selfActions:

http://pastebin.com/6B2Z4EyH

 

Any help would be greatly appreciated!!

 

Disregard this post, I made an error in my fn_selfActions.

Link to comment
Share on other sites

 

 

_tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; 
_tmpbuilt setVariable ["CharacterID",_combination,true];
PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
 
 

 

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

I followed the instructions to the letter and everything looks ok.   I need some help please :)

 

When searching, try changing _tmpbuilt to _object in those 4 lines.

Link to comment
Share on other sites

Just an update.  I am currently working on the "Take Ownership of items" option for the plot pole which will grant the pole owner the right to own all buildables on their plot.

 

I will possibly include an exclusions variable so safes are ignored, for example.

 

My new "Show / remove" plot boundary is working although not with the original plot markers.  I have been testing with road cones ;)  , which are ok but fall over if on a hill :) .  The lights seem to work of a fashion.  I have each cone with a flashing light attached but suspect I have hit an issue with the number of light sources that can be displayed at any one time which is a shame.  A partial ring of flashing road cones looks quite nice.  A full ring would be great, although probably not do much good for the server performance :P  ...

 

I can change it to coloured balls easily (without light sources).  If anyone has any other object suggestions then let me know (fire barrels would be cool but the light source restriction would probably play a part again and they would give an advantage as they could be used for other purposes without having to buy them).

Link to comment
Share on other sites

Ok, seems like the take ownership is working.  

 

Have also functionised the ownership and friendlies check (provide owner object to check for , provide object whos ownership you want to check and it returns is owner true/false, is friendly true/false).  

 

Also works with or without A Plot for Life installed.  Will be adding it to the pull request to get A Plot for Life in to Epoch 1.0.5.2.  Just need to finalise some cross ownership testing.  I may also offer it as an addon for plot poles in 1.0.5.1.

 

Lockables and tents cannot have their ownership changed by default although this can be overwritten if desired.

Link to comment
Share on other sites

Thanks for you work on this.  Gonna try it out tomorrow.  I think i did find a typo should you so wish to correct it

 

 

in player_unlockVault note the extra semicolin.  

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

Link to comment
Share on other sites

Thanks for you work on this.  Gonna try it out tomorrow.  I think i did find a typo should you so wish to correct it

 

 

in player_unlockVault note the extra semicolin.  

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

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

 

 

Thanks for letting me know.  I shall amend and re-upload the file tonight.

Link to comment
Share on other sites

Hi,

I have reports of my playerbase that ore veins and supplycrates cant be removed. I have Plot4Life, Snap Pro, Build Vectors, and Plotmanagement on my server that mess with stuff that is related to removing structures. My guess is that the IDs dont match up and the server thinks youre trying to remove something that is not yours.

Anybody had a problem like this before? Was anybody able to fix it, and if yes how?

Link to comment
Share on other sites

I would take a look at Plot Management as it disables the ability of a non-owner to remove objects (AFAIK).

 

They may be able to help over there or have a solution already.

 

A Plot for Life uses the standard Epoch removal mechanics and so you can remove anything but if you are not the owner or a friendly then it will take longer with more chance of breaking tools when doing so.

Link to comment
Share on other sites

On 9/6/2014 at 3:58 PM, Powell said:

How much stress does this mod cause on a server ?

 

Minimal.  It just looks at a different field when loading items from the DB and then does the same sort of compares when deciding if the player is the owner or friendly to the owner.

 

tent_pack.sqf just calls player_packTent (defined in compiles.sqf).

Link to comment
Share on other sites

Now when you say minimal. Is that with 25+ players or just with a few? By the sounds of it the mod would increase a lot of server stress with more players online. If so anyway to cut down on the stress it is causing?

 

Minimal compared to what vanilla Epoch is doing with like for like player numbers.

 

It does more or less the same as vanilla Epoch but gets the ownership data from a different variable.  

 

Server restart may be a little bit slower but that is likely to be the only difference that would possibly be noticeable.

Link to comment
Share on other sites

Minimal compared to what vanilla Epoch is doing with like for like player numbers.

 

It does more or less the same as vanilla Epoch but gets the ownership data from a different variable.  

 

Server restart may be a little bit slower but that is likely to be the only difference that would possibly be noticeable.

 

Okay, just trying to find the root of my problem as my server will start to bog down when I get 25+

Link to comment
Share on other sites

Hey guys just a quick question, when I build in my base it says I need a plot pole. When I go to build somewhere new and place my plot pole, it disappears instantly and says "cancelled build". Any ideas?

 

FIXED, was an error in my player_build.sqf

Edited by Tricks
Link to comment
Share on other sites

I would like to add this to my server, however I am feeling a little daunted with the task.

We currently have the following mods installed and I am unsure as to which installation I need.

 

Logistic towing.

Self BB

Safezone - infistar

Deploy bike/mozzie

 

I believe that is all.

I did not setup the server, I was asked to help move it forward.

 

If anyone could help that would be great.

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