Mr. Tiddles

  • Content Count

  • Joined

  • Last visited

 Content Type 




Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by Mr. Tiddles

  1. On 12/23/2019 at 7:38 AM, Leonardo Cox said:

    Yes, they should. We did change a lot of things tho (like how pets get buffed with pet armor) but I think most, if not all mod characters, that were made compatible should work just fine.

    Have confirmed. I had to change a few things for Warfarin but they were all my mistake that just came into effect with Reforged's imrpoved code. :p Most other mods that have Forge support shouldn't need to change though.


    Having a bit of fun as Wortox - kinda funny considering Warf's Forge power was going to be a dagger that let them dash. Though was the removal of the iFrames intentional for balance or simply an oversight due to not being able to take health while the character is invulnerable?

  2. 7 hours ago, ferretjesus said:


    I altered the stats of a character mod whose art was made by another person, and I want to use him in a world with my friend but it won't allow her to join the world since I changed the mod. I don't want to put it on the workshop cause it's essentially the exact same as the original one made by the other person except with different stats. What can I do that will allow her to join my world?


    Upload it and hastily go to its page and mark it as "Friend Only". That oughta do it. Alternatively if you give her the file directly it will work. As long as the modinfo.lua don't conflict, the game will assume they're the same mod and it'll work just fine.

  3. Bit of an odd request, but I was just curious if there's any way to add a distortion affect to entities. Similarly to the effects when the player is insane but all the time and for that specific creature. Wouldn't think so since I haven't found anything in the game that does that, but I thought it was worth the ask in case anyone DOES know how.

  4. On 12/11/2019 at 11:13 AM, bullbro said:

    Sorry for the delay! Graphics card just got back from repairs so I had to make up for lost time playing games. :p It looks like the issue was with the unexported build...well...not wanting to export. I freshened it up by pasting your editted images over the template again and changing its name. That seems to have fixed the issue 


    Another note: You hadn't set his tab to only be usable by him. All other characters can access his crafts


  5. 2 minutes ago, snakeyarts said:

    I tried it but it seems to be giving me an error when I try to run the game sadly


    here's the entire master_postinit section, "local master_postinit = function(inst)" being line 67

      Hide contents


    local master_postinit = function(inst)
        -- choose which sounds this character will play
        inst.soundsname = "willow"
        -- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used
        --inst.talker_path_override = "dontstarve_DLC001/characters/"
        -- Stats   
        -- Damage multiplier (optional)
        inst.components.combat.damagemultiplier = 1 = 1
        -- Hunger rate (optional)
        inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE
        inst.OnLoad = onload
        inst.OnNewSpawn = onload
            --Sanity rate
        inst.components.sanity.custom_rate_fn = sanityfn
        inst.OnLoad = onload
        inst.OnNewSpawn = onload
        --reduced crafting cost
        inst.components.builder.ingredientmod = 0.5

        --sanity food reduction 
        if inst.components.eater ~= nil then
            inst.components.eater:SetAbsorptionModifiers(1, 1, 0)

            inst.components.eater:SetOnEatFn(function(inst, food)
           local delta = food.components.edible.sanityvalue

            if delta > 0 then delta = delta*0.5 end 

    return MakePlayerCharacter("genny", prefabs, assets, common_postinit, master_postinit, start_inv)



    Looks like you accidentally replaced the end needed to finish the master_postinit with the end to finish the "if inst.components.eater" check :p Just adding another end above the return MakePlayer will fix that

  6. 5 minutes ago, snakeyarts said:

    Normally I like to figure things out as much as I can on my own and feel bad for making people write out code specifically for me but this entire ability is getting on my nerves because of how lost I am with everything. I'd highly appreciate any flat out code I'm given for this, I just don't want people going out of their way and wasting their time on writing long passages of code when they could be doing something else with their time.


    No worries! I'll just be sure to explain as much as I can, then

    Firstly I set the modifier to 0 since it's all covered by the function below:

            inst.components.eater:SetAbsorptionModifiers(1, 1, 0)


    All this stuff is rambling that may not make sense because I'm bad at explaining

    Then in the eater component we have this little gem:

    function Eater:SetOnEatFn(fn)
        self.oneatfn = fn

    The (fn) can either be the name of a function elsewhere in the prefab, or actually contain a function is you write it as SetOnEatFn(function(inst, food) THINGS TO DO end)


    This is what matters:

            inst.components.eater:SetOnEatFn(function(inst, food)
           local delta = food.components.edible.sanityvalue
            if delta > 0 then delta = delta*0.5 end 

    The local delta thing is just to make it take up less room. Basically it looks at the sanityvalue, if it's more than 0 it halves it.

    All of that just goes in the master_postinit right below the code from Wortox.





        if inst.components.eater ~= nil then
            inst.components.eater:SetAbsorptionModifiers(1, 1, 0)

            inst.components.eater:SetOnEatFn(function(inst, food)
           local delta = food.components.edible.sanityvalue

            if delta > 0 then delta = delta*0.5 end 



  7. Just now, snakeyarts said:

    Yea! What I wrote to get it to work with reducing both positive and negative sanity from foods was:

            if inst.components.eater ~= nil then
            --No sanity from food
            inst.components.eater:SetAbsorptionModifiers(1, 1, 0.5)

    The setup is largely inspired by Wormwood who I remembered after the initial post only had hunger reduction and then did just that, unless I've somehow done my math wrong while playtesting it does cut both in half, while I was aiming to leave all the sanity she'd lose from any foods alone completely. As I said it is my plan B to just go with that if I can't figure something more specific out. 

    And oh? if that's the case I must have misunderstood completely from reading through it all. I'd still like to see if Ultroman responds to confirm or deny anything but if it is then I'll just end up going with reducing both. Really though thank you for all the help, I really appreciate it! 

    Oh, positives, right. My solution to that would be to listen out for when the character eats something to check for a negative sanity value on the food and then take it off. Which is possible and quite simple! The biggest issue is not just showing the code, since you said you don't just want to be given the answers. Lol.


  8. 11 minutes ago, snakeyarts said:

    Oh I was hoping to only reduce positive sanity gain for all foods if possible, I maybe didn't make that very clear in the post, sorry about that. I was able to work out reducing sanity gain and loss for all foods from your tip with the eater component though and am keeping it as a plan B just in case!

    Gotcha! That's easy:

    In the hunger component you'll find:


    function Eater:SetAbsorptionModifiers(health, hunger, sanity)
        self.healthabsorption = health
        self.hungerabsorption = hunger
        self.sanityabsorption = sanity


    In Wortox's prefab it looks a bit more like this:

        if inst.components.eater ~= nil then
            inst.components.eater:SetAbsorptionModifiers(TUNING.WORTOX_FOOD_MULT, TUNING.WORTOX_FOOD_MULT, TUNING.WORTOX_FOOD_MULT)

    If you look between it and the function from the eater component, you'll see the first value is health, the second is hunger, and the third is sanity. So setting the first two as 1 will just make them default, while less than 1 for the sanity will make it give less.


    Ultroman's code is a bit more complex to specifically make different kinds of food do different things, since surprisingly we don't seem to have the ability to do it too easily at the moment. 


  9. The builder component locate in databundles/scripts/scripts/components has exactly the stats you're looking for under 

    local Builder = Class(function(self, inst)


    Just take a look at all the values and you'll find it. Note that every "self" in the component looks like "inst.components.prefab" when you're actually putting it into the character's prefab. E.g "self.science_bonus = VALUE" should be written as "inst.components.builder.science_bonus = VALUE" (And no that's not the thing you're looking for, I didn't want to spoil it :P)

    I would say look at the staffs prefab for the green staff's code. You could copy that into the prefab of your own item but instead of deconstruct the object, check to see if it's been burnt and set it to not be burnt/replace it with a fresh version.

    As for the hunger, that exact function is also listed in the eater component! Same directory and rules as the builder component. Hope this helps point you in the right direction without being too much! 

  10. 20 hours ago, QuickShot010 said:

    Man, I can't believe it was that simple. I tried it in game and the speed boost seems to work, but for some reason i'm still getting the normal walk animation during the running. Do you think you could help me with that as well? :D


      Hide contents


    It's a self portrait! :D
    Can't wait to have completed this guy!


    I might be able to take a look in a bit, but right now I'm deep in my own projects so I'd say don't wait on me and keep on trying your best! If that fails, I may be able to chip in at some point.

  11. 16 hours ago, lazarus21 said:

    well that's very helpfull! i really don't need to make it so it doesn't change with skins, so the only problem is where i put this line of code.

    and also i would like to have the arm_lower over the arm_upper_skin as well

    Just tested it and saadly it didn't work. The arm behind the character on the side view also shows ontop of it and it seems to force the torso to go behind the pelvis sprite. I don't think there's any way around that.


  12. Hello! Sadly the hierarchy of sprites is dictated by animations and the skinner component, so setting this up would be troublesome. 


    inst.AnimState:SetMultiSymbolExchange( "arm_upper", "torso" ) *may* do the trick, but the problem then is to have it activate whenever a skin is applied-  at least a skin that doesn't replace the arms. Personally if I were making some big bulky shoulders that covered the torso, I'd say putting the shoulders on the torso sprite would be easiest.