Project Zomboid

Project Zomboid

Make Hay
15 Comments
Snake 15 hours ago 
can't seem to get this to work anymore. V42.11 the new large drying frame UI only allows 1/10 and no matter what I try can;t seem to figure out how to add more to get to 10
Huntermas31 4 Jul @ 6:18am 
is good, can it also be a sleeping hay ?
i try wilderness survival so is better than sleeping on the ground
ctiberious 1 Jun @ 12:31pm 
I like the updates, but have a couple comments. Firstly, in other cases when you bundle something, you reduce the weight by some amount (mostly seems around 20%), presumably to show that the bundle is easier to manage.
Second, your recipes require that you use actual rope. You can't use SheetRope. I'm assuming you did that because you didn't want to write multiple recipes, but if you add "OnCreate = Recipe.OnCreate.CreateLogStack," to the bundle recipe, and "OnCreate = Recipe.OnCreate.SplitLogStack," to the unbundle recipe, it uses the same built in code for stacking logs, which "remembers" what type of rope you used so you get that type back when you unbundle.
Bender  [author] 29 May @ 2:27am 
Mod updated. I apologize for the time it took me to do this.
A big thank you to Engager6 and everyone for your feedback.:spiffo:
JT1527 26 May @ 11:49am 
not sure if its intended, but i turned 160 or so grass cuttings into almost 900 hay. i used the large and small plant drying rack.
ctiberious 19 May @ 9:08am 
@engager6 The scripts you mention would be a very cool edition to this mod. However, grass and hay are considered "food" and your script example results in 200 "Hunger" worth of grass or hay being bundled, while unbundling creates 200 individual grass or hay. You need to include "flags[ItemCount]" in the bundling scripts in order to take 200 individual items. I.E.

item 200 Base.GrassTuft flags[ItemCount],

Otherwise, these scripts are pretty nice.
Herbert 10 May @ 6:22am 
A dryer is a structure you can build out of sticks.
dangel 8 Apr @ 1:34am 
Sorry I'm thick. What's a dryer? Is it a clothes tumble dryer? Thanks
engager6 14 Feb @ 5:23pm 
No credit is needed bro. Code works, just insert it properly. Good luck.
Bender  [author] 14 Feb @ 10:20am 
Hello bro,

Thank you very much for your contribution, I will integrate it and test it and add it if you allow me by adding you credit of course :Dave_thumb2::spiffo:
engager6 11 Feb @ 10:43pm 
I've already placed those into the game and they are working. Feel free to use as you see fit. Will save a lot of performance for those winter farming days. Good luck.
engager6 11 Feb @ 10:41pm 
craftRecipe StackSawGrass
{
timedAction = Making,
Time = 100,
Tags = InHandCraft;Packing,
category = Packing,
inputs
{
item 200 [GrassTuft] flags[AllowFavorite;InheritFavorite] mode:destroy,
item 1 [Base.Rope] mode:destroy,
}
outputs
{
item 1 Base.GrassTuftStacked,
}
}
craftRecipe UnbundleSawGrass
{
timedAction = Making,
Time = 100,
Tags = InHandCraft;Packing;CanBeDoneInDark,
category = Packing,
inputs
{
item 1 [Base.GrassTuftStacked] flags[AllowFavorite;InheritFavorite] mode:destroy,
}
outputs
{
item 200 Base.GrassTuft,
item 1 Base.Rope,
}
}
}
engager6 11 Feb @ 10:41pm 
And the recipes "recipes_haystack.txt" under B42MakeHay\42\media\script, with those lines:

module Base
{
craftRecipe StackHayGrass
{
timedAction = Making,
Time = 100,
Tags = InHandCraft;Packing,
category = Packing,
inputs
{
item 200 [Base.HayTuft] flags[AllowFavorite;InheritFavorite] mode:destroy,
item 1 [Base.Rope] mode:destroy,
}
outputs
{
item 1 Base.HayTuftStacked,
}
}
craftRecipe UnbundleHayGrass
{
timedAction = Making,
Time = 100,
Tags = InHandCraft;Packing;CanBeDoneInDark,
category = Packing,
inputs
{
item 1 [Base.HayTuftStacked] flags[AllowFavorite;InheritFavorite] mode:destroy,
}
outputs
{
item 200 Base.HayTuft,
item 1 Base.Rope,
}
}
engager6 11 Feb @ 10:39pm 
Good little mod. Can i suggest an improvement? Add ability to stack grass cuttings and hay, if you are going to stockpile those for the winter that will be thousands and thousands of units, and this will bring game performance to it's knees. I would suggest to create two new items, those are simply stacks for storage and recipes to bundle / unbundle them. I've already written the code for you: create file "stacked_grass.txt" under B42MakeHay\42\media\scripts\items. With this content:

module Base
{
item HayTuftStacked
{
DisplayName = Stack of Hay,
DisplayCategory = Material,
Type = Normal,
Weight = 20,
Icon = Haytuft,
WorldStaticModel = HayTuft,
}

item GrassTuftStacked
{
DisplayName = Stack of Cuttings,
DisplayCategory = Material,
Type = Normal,
Weight = 20,
Icon = Grasstuft,
WorldStaticModel = GrassTuft,
}
}
Patoris 22 Jan @ 6:27pm 
This is Homer Simpsons butt. (Good mod though)