-
Notifications
You must be signed in to change notification settings - Fork 6
ZenPersistentTrees
NOTE: This mod is included in my modpack and can be enabled/disabled via ZenPersistentTrees in ZenModPackConfig.json

This small and simple mod adds persistent trees to DayZ.
Requires Community Framework mod to work.
Whenever a player cuts down a tree or bush, the server will save that info to a JSON config file when the server shuts down.
Upon the next restart, the script will cut down any trees that were cut down on the previous session.
You can specify how long a tree or bush takes to respawn (in seconds) in the JSON config. By default it's set to 3 real-life days.
Depending on your server type and population, you might want to increase or decrease this respawn period if the JSON file gets too large and you experience issues like slow shut-downs/start-ups when the mod is saving or loading the config file. I run a 1 week respawn on my servers without any issues.
You can also specify whether or not to save hard trees, soft trees, hard bushes and/or soft bushes.
The mod saves the "health" of each tree/bush, so for example, if a tree gives out 2 logs and a player cuts 1 log, the tree will be saved as 50% health. Then if a player cuts the tree before the respawn time is reached (3 days by default), they will only get 1 log before the tree falls down.
If a tree or bush is cut down completely, then on the next restart it will be cut down again.
When the server starts up it checks the timer for each saved tree, and if the timer has expired, it removes the entry from the config file and the tree will not be touched (essentially "respawning" it).
This mod is intended for hardcore servers, it makes basebuilding and survival a little more challenging and interesting by not being able to farm all the trees around your base after each restart making logs, planks and firewood a more valuable resources in some circumstances. And just makes the world feel more "lived in" across server restarts.
Only catch is you can no longer use cut-down trees or bushes to track players, but if a player leaves sticks/logs/firewood behind then you know it was cut down recently as these do not spawn when my mod cuts down the trees.
Config file: profiles/Zenarchist/ZenPersistentTreesConfig.json
{
"ConfigVersion": "1.29.1", // Don't touch
"TimeToRespawn": 259200, // Time in seconds until a tree respawns
"TreeHard": 1, // 0/1 turns off/on large trees
"TreeSoft": 1, // 0/1 turns off/on small trees
"BushHard": 1, // 0/1 turns off/on heavy bushes
"BushSoft": 1 // 0/1 turns off/on light bushes
}All my mods are open-source and published under the Mozilla Public License Version 2.0. Any mods based on my code must be open-source - no obfuscation!
You can modify/reupload/repack my mods if you like, but please credit any original authors/3D model/3rd-party asset creators, and keep in mind any future updates I make will not be automatically applied to repacked mods so make sure to check back from time to time for bugfixes and improvements.
If you find my mods useful, please consider buying me a coffee - it's not expected but very much appreciated: https://buymeacoffee.com/zenarchist
- General Setup Guide
- Core Mod Setup Guide
- ZenModPack Master Config
- Various Info
- Known Bugs & Issues
- Report Bug
My utility style mods for debugging etc.
Mods which affect game mechanics:
- ZenAlcohol
- ZenAllowMapBagSlot
- ZenAntiCombatLogout
- ZenAutoConvertStash
- ZenAutoStackItems
- ZenAutoWinterDetect
- ZenAutoRun
- ZenBasebuildingConfig
- ZenBatteryPASPersistence
- ZenBetterChatFont
- ZenBrokenGlasses
- ZenBuildingDescription
- ZenCarAttachments
- ZenCarBatteryIcon
- ZenCarCompass
- ZenCarGlovebox
- ZenCarsCutDownTrees
- ZenCanteenTablets
- ZenCatchRain
- ZenCauseOfDeath
- ZenChickenCoops
- ZenCraftingSounds
- ZenCraftRagHands
- ZenComboLocks
- ZenCombineJSON
- ZenDropRuinedClothing
- ZenDynamicZoneLoot
- ZenEarPlugs
- ZenFireFuel
- ZenFireWood
- ZenFireplaceStick
- ZenFishingConfig
- ZenFixCarAttachmentGUI
- ZenGraves
- ZenGroundCleaning
- ZenHideGearInCars
- ZenHints
- ZenHologram
- ZenHologramControls
- ZenImmersiveChatHUD
- ZenImmersiveLogin
- ZenInformWeaponStateBug
- ZenInventoryAnimation
- ZenKnifeGardens
- ZenLeftovers
- ZenLogPiles
- ZenMagObfuscation
- ZenMap
- ZenMicCheck
- ZenNotifications
- ZenOpenCansRock
- ZenPainting
- ZenPimpMyRide
- ZenRadioPlugin
- ZenRebuildableWells
- ZenRepairJSON
- ZenRepairPumps
- ZenRepairWells
- ZenServerGUI
- ZenShove
- ZenSplitUI
- ZenSleep
- ZenStaminaSlope
- ZenTerritories
- ZenWeaponEngrave
- ZenWoodHealth
- ZenZombieDoors
Mods which add gear to the game:
- ZenArtillery
- ZenBackwardsCaps
- ZenBookshelf
- ZenBunnyMasks
- ZenCamoCamp
- ZenCarWorkbench
- ZenChess
- ZenChristmasTreeCraft
- ZenConcussionGrenade
- ZenDoubleArmbands
- ZenFlask
- ZenFlint
- ZenGhillie
- ZenJameson
- ZenLadders
- ZenMusic
- ZenNotes
- ZenRaidAlarm
- ZenRaybans
- ZenRunes
- ZenStaticObjects
- ZenSwissKnife
- ZenTimeBomb
- ZenTireRack
- ZenTreasure
- ZenTreehouse
- ZenVikingAxe
- ZenZippoLighter
Mods which run purely server-side:
- ZenBloodDrips
- ZenCampSites
- ZenDynamicZoneLoot
- ZenLootCyclingDetection
- ZenNightConfig
- ZenPersistentTrees
- ZenShelterCargo
- ZenTreesplosions
- ZenZombieController
- ZenZombieConfig
- ZenJameson
My standalone mods