Jump to content
RimBlock

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

Recommended Posts

Plot Pole Authorised Builder management - Proposed sucessor project.

 

Overview.

Tie owner and people who the owner authorises to build in a plot poles area to the plot pole.  Authorised builders will be managed via the plotpole and not via the tagfriendly system.  Depending on performance issues searching through all the authorised builder PlayerUIDs, the number of authorised builder could equal the number of players on the server and beyond.

 

Phases.

  1. Basic mechanics via mouse scroll wheel (much like the vehicle repair option leading to sub options).
  2. Possible window popup for builder management.

Phase 1 Suggestions.

  • Add an authorised builder (like tagging).
  • Remove an authorised builder (via plot pole).
  • Record builders PlayerUID & Name when added (Players can change names easily but not PlayerUIDs without a new game serial). 
  • Anything else ?.

Phase 2 Suggestions.

  • Move to a gui menu
  • Update builders names based on their PlayerUID when they login so if they change their name between logins it will be caught on the builders menu.

 

Feedback, suggestions or additional ideas most welcome. 

 

After the tagfriendly is sorted out on this release I will kick off the Plot Pole Builder Manager Mod project and possibly move it to its own thread.

 

RB

Share this post


Link to post
Share on other sites

Ok, strange.

 

My tagging seems to be doing what I want with my original code (correct number is going in the correct place in the hive) on the new built server.

 

The contents of my player_tagfriendly.sqf is

private["_target", "_caller", "_callerID", "_targetID", "_friendlies", "_rfriendlies"];
_target = _this select 0;
_caller = _this select 1;

call fnc_usec_medic_removeActions;
r_action = false;

_callerID = [_caller] call convertPlayerUID; 
_targetID = [_target] call convertPlayerUID; 

_friendlies = _caller getVariable ["friendlies", []];
_friendlies set [count _friendlies, _targetID];
_caller setVariable ["friendlies", _friendlies, true];

_rfriendlies = _target getVariable ["friendlies", []];

if !(_callerID in _rfriendlies) then {
    titleText [(localize "STR_EPOCH_ACTIONS_8"), "PLAIN DOWN"]; //To Caller
    /* PVS/PVC - Skaronator */
    PVDZE_send = [_target,"tagFriendly",[_target]]; //To Target
    publicVariableServer "PVDZE_send";
};

If your version is saving a single character in the currentstate column in the DB after installing the update then check the file above with what you have.

 

I have tested twice to double confirm mine is working.

 

The recognition of friendlies is not working as expected so friendlies cannot build.  Debugging that now.

 

RB

 

Share this post


Link to post
Share on other sites

Ok, I think I have found the issue.

 

In custom\ConvertpUID\convertpuid.sqf

 

Find

_number_string = getPlayerUID _player; 

Change to

_number_string = getPlayerUID _playertemp ;  

The bug was resulting in the players UID always being sent back.  Good some of the time but if you wanted the UID of your target (e.g. for tagging) it would send the wrong UID back.

 

Not able to test as the person I am testing with is now asleep but that is likely to be the source of the issue.

 

Will verify when home tomorrow.

 

RB

Share this post


Link to post
Share on other sites

Quick question. 

 

Anyone want the ability to turn on the plot outline (the circle of red and white sticks you get on building a plot pole) back on from the plot pole anytime you want ?.

 

"Should" be pretty easy to add in and it is a real pain not knowing where the boundaries are when building :) .

 

Any interest.  If so I will give it a go tonight.

 

RB

Share this post


Link to post
Share on other sites

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\\ConvertpUIDplayer_tagFriendly.sqf", [], 0, false, true, "", ""]; 
 

 

 On the change to the directory has a double slash ;)

 

SGCDayZ Server Management

Jonas

Share this post


Link to post
Share on other sites

Show Plot Boundary is now working from the Plot Pole menu.

 

I will put the install instructions together and post them up.  This one is very simple to do.

 

The boundary does not stay shown past reboot (same as the initial boundary doesn't when you first build a plot pole) but you can just turn it on again after.

 

RB

Share this post


Link to post
Share on other sites

Version changed to v1.1

 

Added "Show plot boundary" to the plot pole which will turn on the plot pole boundary markers again.  They will vanish on server reboot but can be turned on again from the plot pole if needed.

 

Install details at the bottom of the first post.

Share this post


Link to post
Share on other sites

Ok when i do the prechecks i get temp.character table doesn't exist?

 

Fixed.

 

I tested with temp_character_data as a table.  Have changed it back to character_data in the first post.  Checked the post install SQL (historical realignment of buildables) and they seem fine.

 

Have found two new issues.  Neither particularly big.

 

1. The Show Plot Boundary menu item does not disappear but stays on the scroll menu wherever you look.

  • Should be fairly easy to resolve.  Will look tomorrow as it is now midnight here.  (Non issue.  works fine on re-testing).

2. Friendly builders cannot build on another friendly owners plot until they look at the owner first (yep you hear that right :wacko: ).

  • This is part of the original (DayZ / Epoch) code and not anything I have added.

 Looking at the plot owner sets the "friendlyTo" variable if both are tagged as friendly to each other but the variable is not persistent.  I am having trouble understanding the logic for it rather than just checking the friendly variables of both the builder and owner but this is the way it is currently.

 

At this point I can

  • Leave it
  • Change it to check the friendlies value which is saved in the hive and is persistent.

If anyone has any background on why the friendlyTo variable is being used, I would love to hear.

 

Let me know your preferences for how to handle and I will go with the majority.   To change it is minor work but is in multiple files (already edited for this mod).

 

RB

Share this post


Link to post
Share on other sites

There is version info at the top of the first post.

 

v1.0 -> v1.1 only has the addition of the plot pole boundary which can be done independently if desired so has its own install section at the bottom of the first post.

 

Bug fixes are in individual posts when found and fixed with info on what needs to be changed based on the main install so people with it installed already just need to make those small changes.  The first post is also updated to reflect the bug fix for new installers.

 

The issue posted above with the plot pole boundary menu item not disappearing is a non-issue.  It is working just fine.  Just takes a few seconds if the menu is up and you turn away before it vanishes from the options.

 

RB

Share this post


Link to post
Share on other sites

To make it simple for new server builders, I will be packaging a release of this mod for download.

 

This package will only be for installing on new Epoch server builds as it will overwrite key files that other mods may be dependant on.

 

Will post with a link when the package is ready for download.

 

RB

Share this post


Link to post
Share on other sites

Ok, will take a look.

 

I don't believe tagging affects opening packs as non-friendlies stealing from people while they are trading seems to be an issue on servers.  It may be something to think about though.

 

Do you have any other mods installed ?.

 

Glad the tagging for building is verified.

 

Thanks

Share this post


Link to post
Share on other sites

I am using an Anti Backpack access from a post from Cen i believe in a old thread somewhere. It worked fine before where you could tag someone and be able to access their bag. It won't allow me after adding this? Odd

 

Thanks

Share this post


Link to post
Share on other sites

That is probably the reason.

 

The old tagging used the charID.  The new tagging used the PlayerUID converted in to a number (some playerUIDs can have letters as well).

 

The conversion needs to be done on anything that used the tagging to check.

 

If you are able to direct me to the post or post the code up here I can probably advise on the changes that need to be made.  They are probably pretty simple.

 

RB

Share this post


Link to post
Share on other sites

I think i found it and looks easy enough.

 

fn_gearmenuchecks i have this

// IN SAFE ZONE
if( !canbuild ) then
{
	if( isPlayer cursorTarget and alive cursorTarget and vehicle cursorTarget == cursorTarget ) then
	{
		_friendlies = player getVariable ["friendlyTo",[]];
		_ownerID = cursorTarget getVariable ["CharacterID", "0"];

		_friend = _ownerID in _friendlies;

		// check if friendly to owner
		if( !_friend ) then {
			cutText["\n\nBag access is restricted in safe trader zones except with those tagged as friendly.", "PLAIN DOWN",0];
			_display closeDisplay 1;
		};
	};
};

I changed CharacterID to playerUID and added it to the private array at the top, this should fix it correct?

Share this post


Link to post
Share on other sites

Just tested on my server, works fine! :)

Thank you for the release!

 

 

Thanks, it is always good to hear it is working as expected.

 

I think i found it and looks easy enough.

 

fn_gearmenuchecks i have this

// IN SAFE ZONE
if( !canbuild ) then
{
	if( isPlayer cursorTarget and alive cursorTarget and vehicle cursorTarget == cursorTarget ) then
	{
		_friendlies = player getVariable ["friendlyTo",[]];
		_ownerID = cursorTarget getVariable ["CharacterID", "0"];

		_friend = _ownerID in _friendlies;

		// check if friendly to owner
		if( !_friend ) then {
			cutText["\n\nBag access is restricted in safe trader zones except with those tagged as friendly.", "PLAIN DOWN",0];
			_display closeDisplay 1;
		};
	};
};

I changed CharacterID to playerUID and added it to the private array at the top, this should fix it correct?

 

Almost.

 

As some PlayerUIDs can have characters and the ids are being stored in a numberic field (object_data -> characterID) for the buildables, we need to convert, where needed, to numeric.

 

To run the conversion we use (<> denotes a value you need to put in, without the "<>".

<result variable> = [<object>] call convertPlayerUID;

<Result variable> = The variable you need the converted PlayerUID placed in.

<object> = The input object that have the PlayerUID you need to convert.

 

For your case I would try.

 

FInd

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

Change to

_ownerID = [cursorTarget] call convertPlayerUID;

RB

Share this post


Link to post
Share on other sites

Thanks.

 

I have tried to make it as [copy] -> [find] -> [copy] -> [paste] as possible.

 

I will get round to releaseing a package which people can then just extract to a vanilla Epoch server and be good to go.  Probably will get this done over the weekend.

 

Good to hear it has stood up well with such numbers.  This solution will work for now and I have tried to build in some longevity by allowing it to convert any characters in the PlayerUID rather than just known combinations that exist today as other mods have but I will get out a much more robust solution soon(ish) after I finish my Better Refueling project.  The better solution will not use any conversion so the PlayerUIDs will always be unique and buildables will be linked to the plot poles rather than the players.  Plot pole owners and authorised builders will be saved with the plot pole data. 

 

@Line2.lv : Any luck with that script ?.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By vbawol
      Open world survival mod set just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.
      Features
      Powerful persistence framework for Arma 3 with native Windows and Linux dedicated server support. Fully configurable script based security checks. Base Building re-envisioned for Arma 3 PhysX. Persistent secure and insecure storage devices. Upgradeable locking doors. Barter based economy and trading systems backed a single currency ¤ called "Krypto". Hostile Environment with several different types of antagonists, Air and Water temperature extremes, and Earthquakes. Hunting, Fishing, Tame Dogs, Explore & Loot: Wrecked ships, Abandoned vehicles and buildings, Perform task based missions and more! Open source APL-SA Epoch Survival MP gamemode. Open source APL-SA Modders resource configs and Class List. Assets can be used as a mod dependency on Steam workshop.
    • By McLovin
      NOTICE: Duplicate of another question posted in the wrong section.
       
      So I've been playing this server that has a number of mods installed. I've been playing it for quite a while with the only errors I've been getting are regarding a 45 round RPK mag being missing, but other than that I've had no errors or any issues loading. Upon trying to place a plot pole, nothing happens; absolutely nothing, like no preview shows up, no prompt saying "starting construction" or anything like that, just blankness. When I try to do it again it says "building already in progress" and I can't do anything, not even lock my vehicle. Is there anything that can be done, or that can explain this phenomenon? To further the understanding of how this came to be, I bought a plot pole from the trader in Trader City Stary and tried placing it near Stary, but not too near it (near a thicket of bushes in the distance). Upon right clicking and hitting the build option, that's when I face my issue.
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
    • By totis
      Hi
      This is a restriction to vehicle seat according to humanity.
      It may be handy to PVE servers out there.
      Special thanks to Juandayz with his fantastic skills and salival. Both sometimes working unseen for the benefit of this community.
      Step 1.
      Make a new file, Name it veh_hum.sqf with the below contents and put into dayz_epoch/addons folder. If you dont have addons just create one.
      In this example we have a hero superhero and agenthero traders with 20k/40k/60k humanity respectively. Adjust according to your needs.
       
      private ["_vehicle","_inVehicle","_driver","_humanity","_txt"]; while {true} do { _vehicle = vehicle player; _inVehicle = (_vehicle != player); if (_inVehicle) then { _driver = driver (vehicle player); if (({(isPlayer _driver) && (alive _driver)} count (crew _vehicle) > 0)) then { _humanity = _driver getVariable["humanity",0]; if (typeOf _vehicle in DZE_heroHumanity && _humanity <= 20000 || (typeOf _vehicle in DZE_superHeroHumanity && _humanity <= 40000) || (typeOf _vehicle in DZE_agentHumanity && _humanity <= 60000)) then { player action ["getOut", (vehicle player)]; titleText ["","WHITE IN"]; _txt = "<img image='addons\vehicon.paa' /><br/><t size='0.7' color='#ea2828' align='center'>prohibited vehicle</t>"; [_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText; }; }; }; sleep 3; };  Step 2: Download this file http://www.mediafire.com/file/bdpt5d96o5cttk3/vehicon.rar
      Unzip and put paa file into addons folder.
      Step 3: Edit your custom variables file    dayz_code/init/variables.sqf
      Put the vehicles you want to restrict below call dayz_resetselfactions; ike this:
      // Custom below s_givemoney_dialog = -1; s_bank_dialog = -1; s_player_checkWallet = -1; s_bank_dialog1 = -1; s_bank_dialog2 = -1; s_player_copyToKey = -1; s_player_claimVehicle = -1; s_collect_heli = -1; }; call dayz_resetSelfActions; DZE_heroHumanity = ["Mi17_rockets_RU","Mi24_D","UH1Y_DZE"]; DZE_superHeroHumanity = ["Mi24_V","Mi24_P","Ka52"]; DZE_agentHumanity = ["AV8B2","AV8B","A10","F35B"]; DZE_safeVehicle = DZE_heroHumanity + DZE_superHeroHumanity + DZE_agentHumanity +["ParachuteWest","ParachuteC"]; Step 4: Edit your init file to exec the script. Above the   (false,12)execVm.... like below
          [] execVM "addons\veh_hum.sqf";
          //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
      Thats it. Enjoy!
        Hide contents
    • By Kovicson
      Hi Folks!
      I was wondering if theres a way to stop players from removing plot poles that aren't theres?
      Using a toolbox, crowbar and Etool players can remove Plot poles that dont belong to them, anyway to fix and remove that option?
       
      Thanks :)
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...