Jump to content
RimBlock

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

Recommended Posts

I so want to install this, but just know the second I get it working 1.5 will come out.

 

Haha, I know your pain.  The stuff I am spending hours on at the moment I am just hoping will not become obsolete when 1.0.5 is out (doubt it for the refueling stuff though).

 

I will amend this for 1.0.5 if needed though so no need to worry too much.

 

I will look at packaging it up as a download tonight.  Have been saying I would for a while but have never got round to it as I have to build another test server in order to do it which is a fiar bit of work / time.  Will give it priority and get the historicals update SQL sorted out so it ignores locakbles as well.

 

RB

Share this post


Link to post
Share on other sites

 

 

Hi MGM,

 

I use MySQL Workbench as it comes with the MySQL install (inc. the free community version) and is pretty powerful (although still far from perfect).  It also gives a baseline as everyone has it, just like vi on UNIX servers.

 

My suspicion is that NaviCat is not seeing the direct delimeter as the start of a code block and is therefore complaining at the end delimeter.

 

Suggestions

You could try MySQL Workbench and it should work without issue.

Run the first "drop" command and then run the second "create" block of code without the delimeters around it (take out the "DELIMITER | " at the start and the "| DELIMITER ; " at the end).  Worst that will happen is that it will not create the function.  If it fails try adding a ";" after the "END".

 

I am not near a MySQL server so cannot test for you so this is a bit of testing by proxy ;) .

 

Let me know which way you have tried and the result and we can go from there.

 

Thank you very much sir, in the light of your direction it took me 0.002 ms to sort it out (timing comes from MySQL :D).

I simply split the code into two and removed delimiter declaration in between - below it is for any other players who might have the same issue:

 

 

Part A

DROP FUNCTION IF EXISTS text2digits;

Part B

CREATE FUNCTION text2digits( str CHAR(32) ) RETURNS CHAR(32) 
BEGIN 
  DECLARE i, len SMALLINT DEFAULT 1; 
  DECLARE ret CHAR(32) DEFAULT ''; 
  DECLARE c CHAR(1); 
  SET len = CHAR_LENGTH( str ); 
  REPEAT 
    BEGIN 
      SET c = MID( str, i, 1 ); 
      IF c BETWEEN '0' AND '9' THEN  
        SET ret=CONCAT(ret,c); 
 else
SET ret=CONCAT(ret,"9");
      END IF; 
      SET i = i + 1; 
    END; 
  UNTIL i > len END REPEAT; 
  RETURN ret; 
END

And as expected I do not have any issues with charID-to-playerID conversion - proceeding with installation step #1 now.

Share this post


Link to post
Share on other sites

And as expected I do not have any issues with charID-to-playerID conversion - proceeding with installation step #1 now.

 

Cool.

 

Hold off the historic realignment sql at the end of the install if you have more than 99 characterIDs in the character_data table.  Locked doors use 3 digits and so you can have an overlap if you have valid characterIDs of XXX.  I need to amend the code to exclude lockables which I will do tonight.  The rest of the install is good though and will work fine. 

Share this post


Link to post
Share on other sites

Cool.

 

Hold off the historic realignment sql at the end of the install if you have more than 99 characterIDs in the character_data table.  Locked doors use 3 digits and so you can have an overlap if you have valid characterIDs of XXX.  I need to amend the code to exclude lockables which I will do tonight.  The rest of the install is good though and will work fine. 

Just came here to report installation success and read your message, thanks for the warning but I have only 4 players so far on this test server so no probs.

 

Having just completed installation on an Epoch 1.0.4.2a Server with a few scripts (self-BB, snap build, refuel/repair/rearm) with success, here is my feed back:

 
Installation Time/ZIP release:
It's a very useful piece of code so time is not an issue but it took 45 mins to update the files carefully + 15 mins to test, so this a good one hour investment. I think it would be ideal if you can finally get around to publishing your ZIP for standard Epoch latest version users so that they can simply unzip this :)
 
Instructions Comment #1:
In this step >> PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];and replace
I suggest you update the search string as >> PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname]
(because simple copy & paste & search will then work)
 
Instructions Comment #2:
In this step >> call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
I suggest you update the search string as >> call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
(same reason - simple copy & paste & search will then work) (whitespaces you copy & paste are shortened by the forum that's why)
 
 
 
 
I also have a question:
Having installed this, and tested it by killing myself and seeing my new char is still able to remove locks from doors, so I assume it is working fine, I still have a small issue.
If you check the screenshots below, when I'm looking at the plot pole and also when I'm in a completely different part of the map, I still have several "Show Plot Boundary" mouse wheel options - is this intended? If it's not, any clue what mistake did I make during the installation?
 
Thanks again for your great contribution to the community!

 

 

 

Nw5Aqsi.jpg

 

GtOEDYa.jpg

Share this post


Link to post
Share on other sites

Check your fn_selfactions.sqf file as the part of the "show plot boundary" code that handles the removal of the menu item appears to be misconfigured so it is not being removed.

 

The option should be removed fromthe list when you look at another object.  If you do not look at another object (i.e. you always look at the floor) then the option will remain.  This is a limitation of the way it is coded and also affects the maintain area options as well.  Check out post in this thread for a detailed explainantion on how the items appear and disappear from the menu.

Share this post


Link to post
Share on other sites

Zip file added to first post.  That has pre-modified sqf files and directories for use on a clean install of vanilla Epoch (may overwrite other mods otherwise).l

 

Sorted out a coupe of lines in the install instructions that had "and replace" appended to them (issue with the forum editor).

 

Will look at the historical alignment sql tomorrow.

 

The zip downloaded was sanity tested with

  • Placing a plot pole
  • Building a half cinder wall
  • Upgrading the cinder wall
  • removing the cinder wall
  • removing the plot pole

 

Have not tested tagging in the zip file but should be fine.

 

Enjoy.

Share this post


Link to post
Share on other sites

Works wonderfully by the way. Only issue is that it broke elevators as they still look for charachter Id. I'm having issue adjusting the code so it can see the changes.

_canBuildOnPlot = false;


_distance = DZE_PlotPole select 0;
_needText = localize "str_epoch_player_246";
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
_findNearestPole = [];


{
if (alive _x) then {
_findNearestPole set [(count _findNearestPole),_x];
};
} foreach _findNearestPoles;


_IsNearPlot = count (_findNearestPole);


if(_IsNearPlot == 0) then {
_canBuildOnPlot = true;
} else {
// Since there are plots nearby we check for ownership and then for friend status
// check nearby plots ownership and then for friend status
_nearestPole = _findNearestPole select 0;
// Find owner
_ownerID = _nearestPole getVariable["CharacterID","0"];
// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
// check if friendly to owner
if(dayz_characterID == _ownerID) then { //Keep ownership
// owner can build anything within his plot except other plots
_canBuildOnPlot = true;
} else {
_friendlies = player getVariable ["friendlyTo",[]];
// check if friendly to owner
if(_ownerID in _friendlies) then {
_canBuildOnPlot = true;
};
};
};
if(!_canBuildOnPlot) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };

_args = _this select 3;
_option = _args select 0;
switch (_option) do {
case "build": {
_obj = _args select 1;
_id = [_obj] call ELE_fnc_generateElevatorId;
if (_id == "") exitWith { cutText ["invalid elevator ID generated", "PLAIN"] };
if ((ELE_RequiredBuildTools call AC_fnc_hasTools) && {ELE_RequiredBuildItems call AC_fnc_checkAndRemoveRequirements}) then {
["Medic", ELE_MaxRange] call AC_fnc_doAnimationAndAlertZombies;
ELE_elevator = [_obj, _id] call AC_fnc_swapObject;
titleText ["Elevator Built", "PLAIN"];
};
};
case "build_stop": {
_obj = _args select 1;
if (isNil "ELE_elevator") exitWith { cutText ["no elevator selected", "PLAIN"] };
_dist = _obj distance ELE_elevator;
if (_dist > ELE_MaxRange) exitWith { cutText [format["Elevator Stop is to far away from Elevator (%1 > %2)", _dist, ELE_MaxRange], "PLAIN"] };
_id = [ELE_elevator] call ELE_fnc_getNextStopId;
if (_id == "") exitWith { cutText ["Elevator Stop already exists or to many (max. 9 per Elevator)", "PLAIN"] };
if ((ELE_RequiredBuildTools call AC_fnc_hasTools) && {ELE_RequiredBuildStopItems call AC_fnc_checkAndRemoveRequirements}) then {
["Medic", ELE_MaxRange] call AC_fnc_doAnimationAndAlertZombies;
_elevatorStop = [_obj, _id, ELE_StopClass] call AC_fnc_swapObject;
titleText ["Elevator Stop Built", "PLAIN"];
};
};
};

DZE_ActionInProgress = false;
s_player_elevator_upgrade = -1;
s_player_elevator_upgrade_stop = -1;

Share this post


Link to post
Share on other sites

Works wonderfully by the way. Only issue is that it broke elevators as they still look for charachter Id. I'm having issue adjusting the code so it can see the changes.

 

 

Ok, so the part of the code that checks the players id and the items owner id is this

// Find owner
_ownerID = _nearestPole getVariable["CharacterID","0"];
// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
// check if friendly to owner
if(dayz_characterID == _ownerID) then { //Keep ownership

OwnerID gets the characterID of the object (currently changed to the PlayerUID after conversion to just numbers).

 

dayz_characterID is a variable sert elsewhere to match the players characterID.  It is this one we need to replace and it should all fall in to place.

 

Add a new variable in the Private line at the top of the file called .

find 

Private ["_

At the end of the line before the closing '];' add

,"_playerUID" 

Find

_findNearestPole = [];

Change to

_findNearestPole = [];
_playerUID = [player] call convertPlayerUID; 

Find 

if(dayz_characterID == _ownerID) then { //Keep ownership

Change to

if(_playerUID == _ownerID) then { //Keep ownership

That should be it (based on the code snippet you provided).

 

You may need to check AC_fnc_swapObject and I would search all of the code for dayz_characterID and use the mothod above to get and replace dayz_characterID with _playerUID (same technique as above).  Axemans elevator script seems to be using a set of functions for common tasks (medic action and call zombies for example) which is by far the smarter way to do it but as they are non standard I have no visibility.

 

Hope this helps. 

Share this post


Link to post
Share on other sites

Trying this out on 1.0.5 here in a few. So far nobody I know has been able to get it work but I don't have any more info than that sadly.

Edit:

One thing on the instructions... all "and" are now "&&". Just finished the install time time test.

Edit2:

Going to double check my install but it uses my charid instead of uid.

Share this post


Link to post
Share on other sites

Trying this out on 1.0.5 here in a few. So far nobody I know has been able to get it work but I don't have any more info than that sadly.

Edit:

One thing on the instructions... all "and" are now "&&". Just finished the install time time test.

 

The && was introduced in ARMA II OA 1.62 so changing 'and' to '&&' is just a code update to the most recent, and hopefully faster, method of doing the same thing.

 

I downloaded the mod last night but will need to windiff the old and new versions of all the files this mod touches to find the differences and then find the best way to account for them.

Share this post


Link to post
Share on other sites

The && was introduced in ARMA II OA 1.62 so changing 'and' to '&&' is just a code update to the most recent, and hopefully faster, method of doing the same thing.

 

I downloaded the mod last night but will need to windiff the old and new versions of all the files this mod touches to find the differences and then find the best way to account for them.

 

Hope you get time to do this soon! Don't really want to update without this great mod!

Share this post


Link to post
Share on other sites

Just replaced my Razer Blackwidow keyboard with an Armageddon Black Hornet after a spillage put the former out of action.  Since then I have been seeing some strange issues (repeating keys sometimes but not always, in Epoch the gear menu switches from working normally to opening and then instantly closing, in WIndows explorer shift locks on now and again - not caps lock etc) so I was looking at a rebuild of my desktop but I noticed last night that there is  raptr.exe (or something like it) crashing on shutdown and I suspect some old Razer software may be running in the background still causing issues with the new keyboard so may be able to track it down and just remove.

 

Tl;Dnr - Old keyboard software affecting new keyboard causing testing of Epoch modes to be problematic.

 

If that is it and it is fairly easy to resolve then I can take a look at sorting this mod out tonight but it may take a day or two as there are quite a high number of changes over multiple files.  I will probably release a test copy asap and once validated will put out the full version.

Share this post


Link to post
Share on other sites

This working fine for 1.0.5 Rimblock and will you update the zip with the new files?

 

Thanks

 

Do you mean that this is already working fine or when this is working fine ?.

 

I will do an additional zip file for 1.0.5 so people running either can still use this mod.

Share this post


Link to post
Share on other sites

Ok, after a quick check for differences I have found nothing significant so far.

 

The following files have differences between 1.0.4.2 and 1.0.5 in areas that affect this mod but the differences are pretty minor (as noted above the 'search for' needs "and" changed to "&&") and should be easy to sort out;

tagfriendly

player_updategui

fn_damageactions

fn_selfactions

 
I will put together a 1.0.5 zip file now for people to test on a new Epoch 1.0.5 install without other mods (or just install first).
 
I will update the install instructions probably over the weekend.

Share this post


Link to post
Share on other sites

I've gotten it to the point where built objects write to the database with playerUID, but I can't upgrade anything or remove anything as the plot pole isn't seeing me as the owner.

 

So check out remove.sqf and player_upgrade.sqf

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