• Announcements

    • JoeW

      UPDATED - Studio Note & Rhymes with Play Streams Temporarily Canceled.   03/06/2020

      UPDATE (3/19/20): Just a quick note regarding the team at Klei Entertainment. As noted previously, everybody at Klei Entertainment is working from home due to the Covid-19 outbreak. Many of us have been working especially hard to help maintain operations as we all move out of the office and into our homes and with everything being done online, extra time must be spent in organizing conversations and trying to maintain communication. As some of you may know, we have a very open office and we are almost always in contact with each other as we go about our days. Some of us work across multiple teams and that work has become a bit more challenging for everybody.   That being said, at this time the transition has not caused any major disruption in our operations, but it would be overly optimistic to expect that we won't have any delays at all. We're going to have to be especially mindful about this in the coming weeks and make sure we don't take on too much work so we can keep things running smoothly.  We will let you know as we see how these changes affect our timelines.  Thanks UPDATE (3/10/20):
      The test yesterday went well. We got the whole office (mostly) to work from home without significant issue. As a result, Klei Staff that can work from home have been asked to do so until further notice.  This means that we will have to cancel the Rhymes with Play stream until we are all back in the office. This shouldn't affect anything else at least in the short term, but if things change I will update you all here.  Original Post: Hey everybody,  This Tuesday March 10th, 2020 the entire staff at Klei will be working remotely for 1 day in an effort to prepare the studio to work remotely for a little while if the need arises.  Klei is already set up pretty well to allow for working remotely, however we are going to have a one day "dry run" with the whole studio so that we can identify and avoid any issues or downtime that may arise should choose to implement a work from home policy due to COVID-19 outbreak concerns. Unfortunately this does mean that we will be canceling the “Rhymes with Play” Art stream this coming Tuesday, however unless the situation changes we expect everything at the studio to be back to normal Wednesday and we’ll continue our regular stream schedule Thursday March 12th. If the situation changes at all, we'll let you know. Thanks for your understanding.
       

4 Screenshots

About This File

This is an example of a hat. This example requires the PC version of the 'Don't Starve Mod Tools'.

  • Like 2
  • Thanks 1



User Feedback

Recommended Comments

Can you make an updated version of this that better allows for multiple hats to be added at once i.e. separate folders for each hat prefab?Or, could you clarify how to set up the anim for a  custom hat from scratch? 

Share this comment


Link to comment
Share on other sites

Can you make an updated version of this that better allows for multiple hats to be added at once i.e. separate folders for each hat prefab?Or, could you clarify how to set up the anim for a  custom hat from scratch? 

I'm thinking you just take this example, and swap your files with your stuff. I'm going to use the extended charecter template for reference and try it,

Share this comment


Link to comment
Share on other sites

To clarify, I can't just take this out of the box, rename the folder and scml files, and corrosponding script files for it to work can i?

Share this comment


Link to comment
Share on other sites
On 14.01.2018 at 11:59 PM, orlyx said:
On 14.01.2018 at 11:59 PM, orlyx said:

What i doing wrong? 

image.thumb.png.b287dc545e7726cbb9a5fe4fc7148a8c.png

hat2.rar

 

I have This problem too,  please explain to me how to fix it

unknown (6).png

unknown (5).png

Share this comment


Link to comment
Share on other sites

For anyone getting the "my face disappeared!" issue in DST:
go into hat > scripts > prefabs > hat_bee_bw and change all of this:

Spoiler

local function fn()

    local function OnEquip(inst, owner) 
        owner.AnimState:OverrideSymbol("swap_hat", "hat_bee_bw_swap", "swap_hat")
        owner.AnimState:Show("HAT")
        owner.AnimState:Show("HAT_HAIR")
        owner.AnimState:Hide("HAIR_NOHAT")
        owner.AnimState:Hide("HAIR")
        print('A')
        if owner:HasTag("player") then
            print('B')
            owner.AnimState:Hide("HEAD")
            owner.AnimState:Show("HEAD_HAIR")
        end
    end

    local function OnUnequip(inst, owner) 
        owner.AnimState:Hide("HAT")
        owner.AnimState:Hide("HAT_HAIR")
        owner.AnimState:Show("HAIR_NOHAT")
        owner.AnimState:Show("HAIR")

        if owner:HasTag("player") then
            owner.AnimState:Show("HEAD")
            owner.AnimState:Hide("HEAD_HAIR")
        end
    end

to this:

Spoiler

 local function OnEquip(inst, owner, symbol_override)
        local fname = "hat_bee_bw_swap" 
        local skin_build = inst:GetSkinBuild()
        if skin_build ~= nil then
            owner:PushEvent("equipskinneditem", inst:GetSkinName())
            owner.AnimState:OverrideItemSkinSymbol("swap_hat", skin_build, symbol_override or "swap_hat", inst.GUID, fname)
        else
            owner.AnimState:OverrideSymbol("swap_hat", fname, symbol_override or "swap_hat")
        end
        owner.AnimState:Show("HAT")
        owner.AnimState:Show("HAIR_HAT")
        owner.AnimState:Hide("HAIR_NOHAT")
        owner.AnimState:Hide("HAIR")

        if owner:HasTag("player") then
            owner.AnimState:Hide("HEAD")
            owner.AnimState:Show("HEAD_HAT")
        end

        if inst.components.fueled ~= nil then
            inst.components.fueled:StartConsuming()
        end
    end

    local function OnUnequip(inst, owner)
        local skin_build = inst:GetSkinBuild()
        if skin_build ~= nil then
            owner:PushEvent("unequipskinneditem", inst:GetSkinName())
        end

        owner.AnimState:ClearOverrideSymbol("swap_hat")
        owner.AnimState:Hide("HAT")
        owner.AnimState:Hide("HAIR_HAT")
        owner.AnimState:Show("HAIR_NOHAT")
        owner.AnimState:Show("HAIR")

        if owner:HasTag("player") then
            owner.AnimState:Show("HEAD")
            owner.AnimState:Hide("HEAD_HAT")
        end
    end 

This fixed the problem for me.

Share this comment


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