Jump to content

Tutorial: Drying Racks

Recommended Posts

So this is going to be a quick and dirty tutorial, though I'll come back and clean it up later.

With the release of Turn of Tides (and now Hook Line and Inker), Klei have added in new functions to the dryable component that make modded drying rack items super easy.

For example:

Beautiful fish jerky.

We achieve this with the following postinit:

local function DriedFishbiteInit(inst)
  	if inst.components.dryable then	
      if CurrentRelease.GreaterOrEqualTo("R09_ROT_HOOKLINEANDINKER") then
        inst.components.dryable:SetDriedBuildFile("meat_rack_food_faf") -- We wrap this function because it only exists in the beta

if CurrentRelease.GreaterOrEqualTo("R09_ROT_HOOKLINEANDINKER") then
  AddPrefabPostInit("fishmeat_small", DriedFishbiteInit) -- Again, this prefab only exists in the beta

AddPrefabPostInit("fish", DriedFishbiteInit)

Of course, you can also do this with new brand new items by adding the dryable component in the usual way.

When creating your builds in spriter you're going to need two swap symbols; one for the ingredient and one for the product. The drying rack uses the ingredient and product prefab names to fetch these symbols, so make sure they're correct. You can see here how it's set up for a prefab called "pasta_wet" that turns into "pasta_dry".


You don't actually need to set up the animation like this, but it helps to visualise. The important thing is that you set up the pivot correctly, as this will be where the rope connects with your item. From my testing, you still need to make a dummy anim with the same prefab name as the symbol (though I could be mistaken).

Typically, both your ingredient and product symbols had to be in the exact same build file, but that has changed with the latest beta. Now you're able to set a separate build file for the product with the following function (which is wrapped to make sure it only runs on the beta):

if CurrentRelease.GreaterOrEqualTo("R09_ROT_HOOKLINEANDINKER") then

Nice and simple!

Edited by Tosh
Forgot to add in the SetDryTime function
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

  • Create New...