DayZ
291 ratings
Zens Firewood Piles
2
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
File Size
Posted
Updated
35.814 KB
21 Oct, 2022 @ 2:51am
9 Jan, 2024 @ 4:09am
4 Change Notes ( view )

Subscribe to download
Zens Firewood Piles

Description
What Is This?

This mod adds the ability to harvest firewood from static wood piles and reserves.

You can harvest firewood with your hands, but it takes longer and has the chance to cut you if you're not wearing gloves.

Using a tool like an axe or hatchet is much faster, doesn't have a chance to cut you, but will damage your tool over time.

Wood piles have a limited supply that can be configured by server owners. Once that supply is exhausted, the wood pile cannot be harvested anymore.

How It Works (For Server Owners):

The mod spawns invisible objects on every wood pile on the map based on the objects you define in the json config.

By default the mod will automatically detect the static object types that contain these words in their classname: _woodreserve, _woodpile_forest, _woodpile1, _woodpile2

For each wood pile object type you can configure the chance of bleeding, the minimum & maximum wood quantity you can harvest before the pile turns rotten, the damage done to gloves and the damage done to tools (axes etc). You can also configure the message sent to players when the wood pile is exhausted (so you can translate it to other languages).

Note: When you run your server for the first time after installing the mod, the mod will take some time to automatically detect all the wood piles and save them to the json config located in profiles/Zenarchist/ZenFirewoodConfig.json.

Depending on the map and how many wood piles are on it, I recommend waiting at least a couple of minutes for the json config to update. Once it has updated, you may want to restart your server one more time as the server seems to lag out for a while after detecting all the objects initially.

Once the mod has analyzed the map and detected all the firewood piles it will save their locations to the json config and the next restart will not lag out at all. Set DebugOn to 1 in the json config to see the firewood objects visually - by default they spawn invisible, but changing this to 1 will spawn them in as red rectangles so you can confirm they are working.

If you add new wood piles or have some other reason to want to re-scan the map for wood piles, set DumpObjectLocations to 1 in the json config file. And if you want to temporarily disable the wood piles for any reason, set SpawnFirewoodObjects to 0.

It works with the vanilla static objects and any bldr_ objects placed with the DayZ Editor or spawned in with the json/init.c/etc methods.

This means you can place fire wood piles out on the ice on Namalsk for example, and you can create fires out of wood piles at military bases etc.

The technique used in this mod to automatically detect static objects can be used to detect and interact with almost any other object in the game, such as creating dynamic street lighting (a separate mod I will release in the future).

So check out the source code if you're wanting to add dynamic interactions to other static objects other than fire wood piles.

Installation Instructions:

Install this mod like any other mod - copy it into your server folder and add it to your mods list. Make sure to copy the .bikey into your server keys. There is no types file.

Repack & Source Code:

Unfortunately due to lack of time I can't maintain all of my mods all of the time. I do my best, but these mods are offered as-is. If there's a problem, you have the source code and my permission to fix it yourself and upload a fixed version to the workshop without any credit necessary. It's all free.

You can repack this mod if you like, and do anything else you want with it for that matter. The source code is on my GitHub at www.zenarchist.com

Buy Me A Coffee:

All my mods are free and open source, but it takes an enormous amount of time to put some of these mods together. If I've helped you out, please consider helping me buy my next coffee! I don't expect it, but I very much appreciate it.

https://buymeacoffee.com/zenarchist

Enjoy!
43 Comments
Lex Talionis 28 Jun @ 10:46am 
@violent__nomad, Yep, works great.
violent__nomad 26 Jun @ 11:46am 
Does this still work?
Samy FIGUEROA 17 Feb @ 1:49am 
@c0verfire Thank youuuu
Gamb1t 21 Jan @ 9:52am 
@Hordeski yes it does
Butcher 28 Nov, 2024 @ 4:19pm 
Hey i have got a bug and no clue why, in the json debug is of but for some reason the invisible box is not invisible anymore its looks like a black and white square any idea how to fix it?
Hordeski 24 Nov, 2024 @ 6:02pm 
Does this work for Sakhal? If not is there any plans for updating? would be perfect for the map.
PapaOurs009 18 Nov, 2024 @ 8:34am 
I'm surprised Zenarchist hasn't addressed this yet or at least told us he's working on it.
Antnommer 31 Oct, 2024 @ 3:31pm 
I'm also unable to get prompts for firewood. Same with the chicken coop mod, no prompt for feathers. This was working before 1.26.
c0verfire 22 Oct, 2024 @ 3:27am 
@Samy Silva - yes there is an older mod called Lumber Yard *i think* does what you are looking for. I used it a while back, not sure if it still works or is maintained.
c0verfire 22 Oct, 2024 @ 3:25am 
I get the same issue, It processes and discovers all of the wood objects ( I can enable ESP and see the zen_woodpiles spawned marker and the enable the debug option and see them marked red) but there is no option to check for wood.