Jump to content
Zupa

[Release] 2.1 Plot Management - UPDATED Object Counter

Recommended Posts

Hey Guys,

 

Not sure why, but when i maintain at a plotpole, its takes the full amount, however only maintains a single item. I have to maintain for each item, being charges the full amount each time. not sure if this is something which i've done :/

 

I'm using the Single Currency version of PM.

private ["_newWealth","_missing","_missingQty","_proceed","_itemIn","_countIn","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_option"];
disableSerialization;

if (DZE_ActionInProgress) exitWith { cutText [(localize "STR_EPOCH_ACTIONS_2") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

player removeAction s_player_maintain_area;
s_player_maintain_area = 1;
player removeAction s_player_maintain_area_preview;
s_player_maintain_area_preview = 1;

_target = cursorTarget;

_objectClasses = DZE_maintainClasses;
_range = DZE_PlotPole select 0;
_objects = nearestObjects [_target, _objectClasses, _range];

_objects_filtered = [];
{
    if (damage _x >= DZE_DamageBeforeMaint) then {
        _objects_filtered set [count _objects_filtered, _x];
   };
} count _objects;
_objects = _objects_filtered;

_count = count _objects;

if (_count == 0) exitWith {
			_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7012);
			_result =  format["Objects to maintain: %1" , _count];
			_ctrl ctrlSetText   _result;
		
			_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7013);
			_result =  format["Price to maintain: %1 %2" , 0, CurrencyName];
			
			_ctrl ctrlSetText   _result;	
	DZE_ActionInProgress = false;
	s_player_maintain_area = -1;
	s_player_maintain_area_preview = -1;
};

_theCost = _count * 100;
_requirements = [[CurrencyName,_theCost]];


_option = _this select 0;
switch _option do {
	case "maintain": {
		
		_wealth = player getVariable["headshots",0];
		_missing = "";
		_missingQty = 0;
		_proceed = true;
		{
			_itemIn = _x select 0;
			_countIn = _x select 1;
			if (_wealth < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _wealth); _proceed = false; };
		} count _requirements;

		if (_proceed) then {
			_newWealth = (_wealth - _countIn);
			player playActionNow "Medic";
			[player,_range,true,(getPosATL player)] spawn player_alertZombies;

			player setVariable["headshots",_newWealth,true];

			PVDZE_plr_Save = [player,(magazines player),true,true];
			publicVariableServer "PVDZE_plr_Save";
			
			PVDZE_maintainArea = [player,1,_target];
			publicVariableServer "PVDZE_maintainArea";
			
			
			cutText [format[(localize "STR_EPOCH_ACTIONS_4"), _count], "PLAIN DOWN", 5];			
			
			_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7012);
			_result =  format["SUCCESS : Objects maintained: %1" , _count];
			_ctrl ctrlSetText   _result;
		
			_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7013);
			_result =  format["SUCCESS : Price maintained: %1 %2" , _theCost, CurrencyName];
			_ctrl ctrlSetText   _result;	
				
		} else {
			_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7012);
			_result =  format["FAILED: Objects to maintain: %1" , _count];
			_ctrl ctrlSetText   _result;
		
			_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7013);
			_result =  format["FAILED: Price to maintain: %1 %2" , _theCost, CurrencyName];
			_ctrl ctrlSetText   _result;	
			
			cutText [format[(localize "STR_EPOCH_ACTIONS_6"), _missingQty, CurrencyName], "PLAIN DOWN"];
		};
	};
	
	case "preview": {
		_cost = "";
		{
			_itemIn = _x select 0;
			_countIn = _x select 1;
			if (_cost != "") then {
				_cost = _cost + " and ";
			};
			_cost = _cost + (str(_countIn) + " " + CurrencyName);
		} count _requirements;
			
		cutText [format[(localize "STR_EPOCH_ACTIONS_7"), _count, _cost], "PLAIN DOWN"];
			
		_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7012);
		_result =  format["Objects to maintain: %1" , _count];
		_ctrl ctrlSetText   _result;
		
		_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7013);
	    _result =  format["Price to maintain: %1 %2" , _theCost, CurrencyName];
		_ctrl ctrlSetText   _result;								
	};
};

DZE_ActionInProgress = false;
s_player_maintain_area = -1;
s_player_maintain_area_preview = -1;

Share this post


Link to post
Share on other sites

For some reason with plot management anybody is able to remove any non-locked doors even if they are not on the plot pole or the one who placed the object

 

Also for some reason when my plot pole is maintained it does not reset the damage in the database

Share this post


Link to post
Share on other sites

For some reason with plot management anybody is able to remove any non-locked doors even if they are not on the plot pole or the one who placed the object

 

 

I am getting this issue too. People are able to remove any modular object on the server, owner or not, on the plot pole or not.

 

We are using snap pro and vector building, not sure if one of these has an issue.

Share this post


Link to post
Share on other sites

so I'm a little confused on the practical difference between plot management and plot for life. In this script if you add yourself to the management group then you retain your plot poles after you die correct. 

 

So why would you even need the plot for life?

Share this post


Link to post
Share on other sites

OK updated to 2.2

 

Instructions updated on place 5C and 6 to support the removing of objects correctly.

 

OPTIONAL FOR YOU

 

Replace your Defines.sqf and plotManagement.hpp from your folder with the ones from github to have a visual update. 

 

The visual update wil make the buttons into blue buttons like the following dialog:

 

7xKeniR.jpg

Share this post


Link to post
Share on other sites

so I'm a little confused on the practical difference between plot management and plot for life. In this script if you add yourself to the management group then you retain your plot poles after you die correct. 

 

So why would you even need the plot for life?

 

PlotManagement runs the best ON plot 4 life. ( but can be used individually if preferred)

 

  1. You don't need to put yourself on the plot (P4L) - You will always be the biggest boss on the plot ( even when a friend removes u)
  2. You can delete your walls that are not in plotradius ( P4L)
  3. Claim Plot ( P4L)

 

P4L is not just a script for only plotpoles, it affects any object in game where other scriptwriters can take advantage of ^^

Share this post


Link to post
Share on other sites

PlotManagement runs the best ON plot 4 life. ( but can be used individually if preferred)

 

  1. You don't need to put yourself on the plot (P4L) - You will always be the biggest boss on the plot ( even when a friend removes u)
  2. You can delete your walls that are not in plotradius ( P4L)
  3. Claim Plot ( P4L)

 

P4L is not just a script for only plotpoles, it affects any object in game where other scriptwriters can take advantage of ^^

Ahh. ok. Think i understand now thank you zupa. This will be my next upgrade so i wanted to get it clear in my head first.

Share this post


Link to post
Share on other sites

ooh I didn't notice the fancy appearance update until now, but I was going to note that what you had suggested about the change to items count worked perfectly and cars, zombies, players and loot piles are no longer being counted against the build limit. :D

 

I was also wondering if there was a specific method of doing a damage action on items for a decay of indestructible bases that would work best with plot/door management, or if it really makes any difference at all how I choose to do it?

Share this post


Link to post
Share on other sites

Hey Zupa I got this problem:

Got SC2.0v0.4 and Vector Build + Snap Pro installed (no P4L)
Placed some buildables to test snap build .. all working, I get remove option (important) looking at the things.
After I installed plot management on top of that I cant seem to be able to remove things anymore, I do not get any options for removal.

Tried adding me to the plotpole, nothing, restarted server, nothing aswell.
This is kinda weird, why isn't working, I dont want to have to use P4L, because with P4L for my earlier missionfile it worked always flawlessly.

Share this post


Link to post
Share on other sites

Hello,

After installing I'm having problems connecting to the server at all - I get stuck on 'wait for host'.

Using Snap Pro, DZGM, Epoch Admin Tools, and a few others..

I've already got a define.hpp file declared in description.ext from DZGM as well as 'dialog.hpp' from I'm not really sure how to combine them, or if they can exist simultaneously.

 

Here is the define.hpp from DZGM

 

class W_RscText {

idc = -1;

type = 0;

style = 0x00;

colorBackground[] = { 1 , 1 , 1 , 0 };

colorText[] = { 1 , 1 , 1 , 1 };

font = "Zeppelin32";

sizeEx = 0.025;

h = 0.25;

text = "";

};

class W_RscStructuredText

{

access = 0;

type = 13;

idc = -1;

style = 0;

colorText[] = {0.8784,0.8471,0.651,1};

class Attributes

{

font = "Zeppelin32";

color = "#e0d8a6";

align = "center";

shadow = 1;

};

x = 0;

y = 0;

h = 0.035;

w = 0.1;

text = "";

size = 0.03921;

shadow = 2;

};

class W_RscList

{

type = 5;

style = 69;

idc = -1;

text = "";

w = 0.275;

h = 0.04;

colorSelect[] = {1, 1, 1, 1};

colorText[] = {1, 1, 1, 1};

colorBackground[] = {1,1,1,1};

colorSelectBackground[] = {0.40, 0.43, 0.28, 0.5};

colorScrollbar[] = {0.2, 0.2, 0.2, 1};

arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";

arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";

wholeHeight = 0.45;

rowHeight = 0.04;

color[] = {0.7, 0.7, 0.7, 1};

colorActive[] = {0,0,0,1};

colorDisabled[] = {0,0,0,0.3};

font = "Zeppelin32";

sizeEx = 0.023;

soundSelect[] = {"",0.1,1};

soundExpand[] = {"",0.1,1};

soundCollapse[] = {"",0.1,1};

maxHistoryDelay = 1;

autoScrollSpeed = -1;

autoScrollDelay = 5;

autoScrollRewind = 0;

class ScrollBar

{

color[] = {1, 1, 1, 1};

colorActive[] = {1, 1, 1, 1};

colorDisabled[] = {1, 1, 1, 1};

thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";

arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";

arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";

border = "\ca\ui\data\ui_border_scroll_ca.paa";

};

};

class W_RscPicture

{

idc = -1;

type = 0;

style = 48;

font = "Zeppelin32";

sizeEx = 0.023;

colorBackground[] = {};

colorText[] = {};

x = 0.0; y = 0.2;

w = 0.2; h = 0.2;

text = "";

};

class W_RscButtonBase {

idc = -1;

type = 16;

style = 0;

w = 0.183825;

h = 0.104575;

color[] = {0.95, 0.95, 0.95, 1};

color2[] = {1, 1, 1, 0.4};

colorBackground[] = {1, 1, 1, 1};

colorbackground2[] = {1, 1, 1, 0.4};

colorDisabled[] = {1, 1, 1, 0.25};

periodFocus = 1.2;

periodOver = 0.8;

class HitZone {

left = 0.004;

top = 0.029;

right = 0.004;

bottom = 0.029;

};

class ShortcutPos {

left = 0.004;

top = 0.026;

w = 0.0392157;

h = 0.0522876;

};

class TextPos {

left = 0.05;

top = 0.025;

right = 0.005;

bottom = 0.025;

};

animTextureNormal = "\ca\ui\data\ui_button_normal_ca.paa";

animTextureDisabled = "\ca\ui\data\ui_button_disabled_ca.paa";

animTextureOver = "\ca\ui\data\ui_button_over_ca.paa";

animTextureFocused = "\ca\ui\data\ui_button_focus_ca.01.paa";

animTexturePressed = "\ca\ui\data\ui_button_down_ca.paa";

animTextureDefault = "\ca\ui\data\ui_button_default_ca.paa";

textureNoShortcut = "";

period = 0.4;

font = "Zeppelin32";

size = 0.023;

sizeEx = 0.023;

text = "";

soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1};

soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1};

soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1};

soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1};

action = "";

class Attributes {

font = "Zeppelin32";

color = "#E5E5E5";

align = "left";

shadow = "1";

};

class AttributesImage {

font = "Zeppelin32";

color = "#E5E5E5";

align = "left";

};

};

class W_RscButton : W_RscButtonBase {

w = 0.183825;

h = 0.0522876;

style = 2;

color[] = {1, 1, 1, 1};

color2[] = {1, 1, 1, 0.85};

colorBackground[] = {1, 1, 1, 1};

colorbackground2[] = {1, 1, 1, 0.85};

colorDisabled[] = {1, 1, 1, 0.4};

class HitZone {

left = 0.002;

top = 0.003;

right = 0.002;

bottom = 0.016;

};

class ShortcutPos {

left = -0.006;

top = -0.007;

w = 0.0392157;

h = 0.0522876;

};

class TextPos {

left = 0.002;

top = 0.014;

right = 0.002;

bottom = 0.005;

};

animTextureNormal = "\ca\ui\data\igui_button_normal_ca.paa";

animTextureDisabled = "\ca\ui\data\igui_button_disabled_ca.paa";

animTextureOver = "\ca\ui\data\igui_button_over_ca.paa";

animTextureFocused = "\ca\ui\data\igui_button_focus_ca.paa";

animTexturePressed = "\ca\ui\data\igui_button_down_ca.paa";

animTextureDefault = "\ca\ui\data\igui_button_normal_ca.paa";

animTextureNoShortcut = "\ca\ui\data\igui_button_normal_ca.paa";

class Attributes {

font = "Zeppelin32";

color = "#E5E5E5";

align = "center";

shadow = "1";

};

};

 

Is it possible to just copy the relevant parts from Plot Management's define.hpp and paste it into my existing one?

Also I made a custom copy of 'server_monitor.sqf' and redirected it in 'init.sqf', do I have to do the same for 'server_updateObject.sqf' ? If so, where do I enter the new file path (couldn't find in init)?

I've already changed the filepaths for player_upgrade, player_buildingDowngrade and player_build.

 

EDIT: Fixed - went through the .rpt file and looked at the errors individually.

 

What did you do to fix the error with the admin tools looked in the define.hpp and the plotman. and tools dialog.hpp use the class RscShortcutButton. 

 

 

 

NEVER MIND just merged the two and no errors now.

Share this post


Link to post
Share on other sites

Has anybody gotten their mantain to work properly? Mine for some reason will maintain the items but will not reset my damage, thus not updating the items in the database, which then get deleted for not being updated, so now I have a prevent cleanup SQL running to update them automatically, but of course after a while abandoned bases pile up

Share this post


Link to post
Share on other sites

Hey guys ive tried to fix this for like 3 hrs now finally broke down and cant take no more lol. please help !

 

its working fully now but soon as server restarts it forgets all plotfriends  and have to replace the plothole if owner died still and re add everyone so kind of defeats the purpose lol

 

Am i missing something where it stores the data ?

 

much <3 great mod

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 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 Joseph Thompson
      Hello all,
      My name is Joseph. I am looking for active members on Arma 2-Overpoch to join a Team. You must have some knowledge in playing the game and  you must have a working mic (No Echo).
      We will be playing on a server that has recently started up but has big hopes for its self. The staff/Admins are really helpful and have helped to create other servers in the past.
      We will be working together as a team to attend and capture missions also Helping with base building ECT. How you play is entirely up to you if you (this meaning if you want to be a bandit or a hero)
      You must be over the ages of 16 and have a strong sense of humor.
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Please ensure you have one of the following programs:
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Team-speak
      Skype
      Discord
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Please fill in this form if you are interested in joining us.
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Age-
      Name
      SteamName-
      SkypeName-
      DiscordName-
      Playtime-
      And last one: Are you from the UK?-
      ------------------------------------------------------------------------------------------------------------------------------------------------
      If you would like to contact me
      Discord: Joseph_Richards#3973
       
       
    • By Mattiman338
      Hi all, doing up a server for myself and a few friends but am having one issue which I am clueless as to why it is happening. It doesn't really affect game play but does make it difficult navigating through certain tasks.
      The issue arises with ZSC and Virtual Garage dialogs only as far as I have tested. Certain buttons within dialogs do not show, such as the deposit and withdraw buttons for the bankers and the store vehicle button in the Virtual Garage dialog.
      I am running InfiSTAR admin tools and antihack and as far as I know, that could be the culprit with these problems but I have checked the servers .RPT and checked for errors with ZSC and the Virtual Garage with nothing coming up.
      There are InfiSTAR logs showing though and one refers to a dialog. 
       
      In-game screens
      And my .RPT from the last restart to when I tested the dialogs to gather screenshots
       
       
      All help is appreciated as I can't find anything to do with infiSTAR in the script installs.
      Thanks all!
    • By Forrest
      I am looking for a friend or group that can be on from 7-10 am GMT. I want to build a base. My email is [email protected], Skype is Forrest Perkins, steam is forrestmikeperkinskirk. I may be on from 10- 16 am GMT on the 18th of July, 2017 but I'm always looking for friends I can trust.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...