Jump to content
  • 0

Base Decay Question


LoadingSA

Question

So here's what I want to do. I want to make it so players on my server don't need plot poles to build but do need to use them to maintain their base every 10 days.

 

I want to change it so the area maintain their base from a plot pole but it needs to effect a bigger area, say 100m.

 

I also want to edit it so it's "free" to use the maintain option.

 

I also use CPC godmode for buildings so I don't know if that will effect the maintain option.

 

anyone know how I can do this?

Link to comment
Share on other sites

Recommended Posts

  • 0

I've added the following so far and removed CPC base god mode

 

DZE_GodModeBase = true;
DZE_maintainRange = 100;
DZE_requireplot = 0; //cahnges requirements for plot polls
DZE_PlotPole = [100,100];

 

I will make an event on the DB server for

CREATE EVENT setDamageOnAgeMaintain
    ON SCHEDULE EVERY 5 DAY
    DO
      UPDATE `object_data` SET `Damage`=0.11 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
;

So this should make it so that players will get a 100m area maintained with the plot pole and that plot poles have a 100M area around and a 100m are above correct?

 

 

edit:

 

I moved the maintain_area.sqf to my mission folder (custom\playerbuild) and then called the path in fn_selfactions would I then just need to remove this block of code?

_requirements = [];
switch true do {
	case (_count <= 10):  {_requirements = [["ItemGoldBar10oz",1]]};
	case (_count <= 20):  {_requirements = [["ItemGoldBar10oz",2]]};
	case (_count <= 35):  {_requirements = [["ItemGoldBar10oz",3]]};
	case (_count <= 50):  {_requirements = [["ItemGoldBar10oz",4]]};
	case (_count <= 75):  {_requirements = [["ItemGoldBar10oz",6]]};
	case (_count <= 100): {_requirements = [["ItemBriefcase100oz",1]]};
	case (_count <= 175): {_requirements = [["ItemBriefcase100oz",2]]};
	case (_count <= 250): {_requirements = [["ItemBriefcase100oz",3]]};
	case (_count <= 325): {_requirements = [["ItemBriefcase100oz",4]]};
	case (_count <= 400): {_requirements = [["ItemBriefcase100oz",5]]};
	case (_count <= 475): {_requirements = [["ItemBriefcase100oz",6]]};
	case (_count <= 550): {_requirements = [["ItemBriefcase100oz",7]]};
	case (_count <= 625): {_requirements = [["ItemBriefcase100oz",8]]};
	case (_count > 700):  {_requirements = [["ItemBriefcase100oz",9]]};
};
Link to comment
Share on other sites

  • 0

Also, remember to add sandbags, wire fencing, tank traps and all items not crafted through Epoch's modular building system if you don't want them to dissapear!  :)

 

the SQL should set dmg to those as well I think. I just need to know how to removed the cost from maintaining area.

Link to comment
Share on other sites

  • 0

So I pushed the changes that I posted in the above but when I go to do maintain area it just says "2 objects maintained". I am doing this to a base that has a min of 60 objects and tested it again at a base with at least that many and it said the same thing.

Link to comment
Share on other sites

  • 0

No it's having some issues like I talked about above, it's not maintaining the entire base for whatever reason but it is working for "free" so that's good. I sent a PM to AxeMan as he was the one who wrote the function, so I hope he might have some idea of where I have gone wrong.

Link to comment
Share on other sites

  • 0

hi, to make the maintain area for free it should work if you just remove the switch block, but leave the "_requirements = [];" in there! (in case you removed that, too)

 

that should be all really, your config looks good to me, but keep in mind the maintain area will only maintain objects that are damaged via the event or otherwise. so if you get a message that only 2 objects have been maintained maybe the other objects were not damaged or not on the list ob maintainable objects?

Link to comment
Share on other sites

  • 0

hi, to make the maintain area for free it should work if you just remove the switch block, but leave the "_requirements = [];" in there! (in case you removed that, too)

 

that should be all really, your config looks good to me, but keep in mind the maintain area will only maintain objects that are damaged via the event or otherwise. so if you get a message that only 2 objects have been maintained maybe the other objects were not damaged or not on the list ob maintainable objects?

 

 

It's made of standard building components from epoch (cinder walls, wood floors, metal panels...) Do you know where I can find the "ob maintainable objects" ?

Link to comment
Share on other sites

  • 0

It's made of standard building components from epoch (cinder walls, wood floors, metal panels...) Do you know where I can find the "ob maintainable objects" ?

DZE_maintainClasses is a global variable with the default items that can be maintained (that is also used by the maintain area script).

defined in the file dayz_code/init/variables.sqf:

DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ"];

you can add your own objects to that array i you want. e.g in your init.sqf (must be after the variables.sqf is loaded):

DZE_maintainClasses = DZE_maintainClasses + ["Hedgehog_DZ", "Sandbag1_DZ"];

that will add sandbags and wire fencing to the maintainable objects, but I think they are already covered at least in that list, because sandbars and wire fencing kits are of type "BuiltItems" and that is in the list if I'm not wrong. :)

"ModularItems" are obviously the modular building items, without movable objects (doors), you can verify that in the vehicles config file if you want ^^

Link to comment
Share on other sites

  • 0

Sandbags and hedgehogs are not included in the maintainance script. We learned that the hard way. Modular items is included.

yeah i know there weren't included before, I took that list form the latest Epoch code from GitHub, but there definitely is "BuiltItems" listed which included the "old" building items (unless it's buggy) :D

 

ok I've just checked, it's in the code for the next Epoch release (current master branch):

1.0.4.2

DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ"];

current version

DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ"];

so they've added the items for the next release haha, sorry about the confusion but you can just use the new array and overwrite it in your init.sqf (or use a custom variables.sqf) until the next official patch comes out :)

Link to comment
Share on other sites

  • 0

do those panels need maintenance? the scripts only maintains objects that need maintenance and not everything in range.

check your database or whatever if the panels are damaged (if not that is supposed to show 0 objects in range or whatever)

 

i'm getting sick of explaining that for the 500th time :D

Link to comment
Share on other sites

  • 0

do those panels need maintenance? the scripts only maintains objects that need maintenance and not everything in range.

check your database or whatever if the panels are damaged (if not that is supposed to show 0 objects in range or whatever)

 

i'm getting sick of explaining that for the 500th time :D

I understand, sorry I know what the conditions are for these things to work. I ran the following SQL function:

UPDATE `object_data` SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

but it looks like metal panels and everything have `ObjectUID` so they don't count towards the maintaince.

Link to comment
Share on other sites

  • 0

oh yeah you mean metal PANELS sorry, I thought metal floors (because there are metal floors in your screenshot!?), the metal panels are form the old building system (not the modular stuff), and can be removed by anyone with the right tools, I hope you know that if you place those things everone can come along and "just take them" with a toolbar and crowbar think :D

btt: as far as i can see in the current Epoch version (for the next patch after 1.0.4.2) all build items will be included to the maintainable objects, and also other objects that are missing in the current version. so you can ber sure metal panels, sandbags etc will be officially maintainable with the next epoch patch! :)

Link to comment
Share on other sites

  • 0

OK...let me get this straight because I'm in a similar boat right now and I'm just plain old and slow to catch up...

 

My server right now

Hiveext.ini= CleanupPlacedAfterDays = 30

CPC on. 
Require plot pole = 0
 
If add the above mentioned settings in post# 2 BUT I require that the maintenance is NOT free (using default settings)
1. Need to delete the CPC settings in my files. 
2. Use the above mentioned settings in post 2 - the deletion of the prices
3. Change the Hiveext.ini = 10 days 
 
This should require the playerbase build all they want, BUT if they want to keep their stuff around after 10 days. they will need to
1. Place down a plot pole to update/maintain their buildable items every 10 days or lose it
2. Have to pay the default mentioned amounts once the plot pole is placed.
 
Again slow and aged member here so be easy on me.  
Link to comment
Share on other sites

  • 0

i have this in my server and im getting decay :( metal panels seem to be the first to go

 

I am also having the exact same trouble, can anyone shed some more light on this as i cannot seem to find anything that seems to be in date

Link to comment
Share on other sites

  • 0

I am also having the exact same trouble, can anyone shed some more light on this as i cannot seem to find anything that seems to be in date

nozza i changed the decay rate to 0 by going into my Hiveext.ini and changing this CleanupPlacedAfterDays = -1.. so if u change the option then build something on the map it will never decay :)..stuff build before u changed the option will still decay as it was placed before u changed the option

Link to comment
Share on other sites

  • 0

nozza i changed the decay rate to 0 by going into my Hiveext.ini and changing this CleanupPlacedAfterDays = -1.. so if u change the option then build something on the map it will never decay :)..stuff build before u changed the option will still decay as it was placed before u changed the option

Yeah, you would think, although i have had that setting since the server has been set up, it used to be fine but has changed for some reason and not sure why

Link to comment
Share on other sites

  • 0

nozza i changed the decay rate to 0 by going into my Hiveext.ini and changing this CleanupPlacedAfterDays = -1.. so if u change the option then build something on the map it will never decay :)..stuff build before u changed the option will still decay as it was placed before u changed the option

 

Just re-reading you message you misunderstood my query. 

 

I am referring to post #21.

 

We both already have hive.ext clean up set to -1 yet bases are still decaying

Link to comment
Share on other sites

  • 0
my config in HiveExt.ini working whit no erros
 
;Negative values will disable this feature
;0 means that ALL empty placed items will be deleted every server restart
;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted
 
CleanupPlacedAfterDays = -1       //set negative number to disable it. gerenciar dias para desaparecer edifícios construídos
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...