• Content Count

  • Joined

  • Last visited

 Content Type 




Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by bobmittens

  1. 16 minutes ago, K1NGT1GER609 said:

    Think your missing this line:

    inst.components.inventoryitem.atlasname = "images/inventoryimages/meaperroll.xml"


    That fixed it, and i checked and there doesn't seem to be any chest or backpack related crashes. I think that just making so that other players can't pickup items is enough to get the idea across. any player who goes through a complicated process of moving it into their own backpack and giving it to another probably wouldn't want to play a simple character like mine anyway. So thank you K1NGT1GER609 and Ultroman. Im going to set this thread as solved but ill make sure to ask you if i find any other issues. Thank you again.


  2. 11 minutes ago, K1NGT1GER609 said:

    think its like this:

    inst.components.inventoryitem.onputininventoryfn = function(inst, player)
        local owner = inst.components.inventoryitem:GetGrandOwner()
        if owner.components.inventory and owner.prefab ~= "star" then
            inst:DoTaskInTime(0.1, function()
            owner.components.talker:Say("It seems to slip right out of my hands!")

    So this worked except now the item's inventory icon is invisible so almost there. Here is the current lua file. meaperroll.lua

  3. 8 minutes ago, Ultroman said:

    This post at the bottom of the thread you posted has a better solution, using GrandOwner. It still has some problems, though, but you might have an easier time fixing those (personally, I'd just make it not be able to be in containers, and/or make the item automatically drop out of the backpack it's in if the backpack is dropped or given to another player.

    So attempting to use that set of code hits me with an error. Maybe i set it up wrong in the lua file could you take a look?meaperroll.lua


  4. 59 minutes ago, K1NGT1GER609 said:

    I use to implement that code into my mods but I later found out that it would crash the game if you put that item in a chest/chester and/or someone else tried to get it (or something like that). I could help you out with another way of achieving character specific items (and without the crash) but its a little complicated. If not i'd recommend changing the code to

    inst.components.inventoryitem.onputininventoryfn = function(inst, player)
        if not player:HasTag("wisia")  then
        inst:DoTaskInTime(0.1, function()
        player.components.talker:Say("It slips right out of my hands.")

    while having this in your character lua file:

    local common_postinit = function(inst) --PLEASE READ THIS NOTE, its reference on where it goes
        inst:AddTag("wisia")--add this line of code, its usually implemented on new character templates

    but you'll have that crash you'll encounter later on. Otherwise your call if you want to try the alternative route.

    So i've done this and its fixed my issues. But you are correct, attempting to place the item back in a chest or Chester instant crashes the game. SO if you'd be willing, id like to know more about this alternate option. Something else i should add is that implementing this code also made the inventory icon for the item become invisible. 

  5. I have been making a mod character and have made the item I want to be character specific (a bedroll.) I tried looking around in the vanilla game's scripts for other character specific items, but they don't seem to have much. So I began reading through a thread, which I linked below. I decided to start where the original poster in that thread started by using the script he originally posted and tailoring it to my character with the idea that I could trouble shoot any problems the same way the users in the thread did. Although the script doesn't crash my game and does cause characters to be unable to hold the item, it makes all characters including my own drop it. I tried a couple things mostly going to the (if player.prefab ~= "wisia" then) code and changing what is set in the quotation marks. What i found is that when the prefab name is set to that of my character, they won't spawn with the item or say the text for being unable to hold the item, but if the value is set to something else such as "wilson" I will start with the item dropping off my character and them saying the appropriate text. 

    The short of it is, does any one know how to fix this issue, or a better set of code that would garner the same results without the hassle? Thank you for your time.


    I also added the item's prefab if you want to poke around in there. My friend wanted me to hurry up making the mod like 6 months back and got someone who knew what they were doing to write the bed roll code since i was having trouble so i can only kind of guess and assume what each part of the code does but not why or how it affects other parts. meaperroll.luameaperroll.lua

    	inst.components.inventoryitem.imagename = "meaperroll"
    	inst.components.inventoryitem.atlasname = "images/inventoryimages/meaperroll.xml"
    	inst.components.inventoryitem.cangoincontainer = false  
        inst.components.inventoryitem.onputininventoryfn = function(inst, player) 
        if player.prefab ~= "wisia" then 
            inst:DoTaskInTime(0.1, function()
            player.components.talker:Say("It seems to slip right out of my hands!")


  6. 1 minute ago, ZupaleX said:

    I remembered reading about something similar so I did a bit of a search and it seems like you're not the only one with sync issue when it comes to the hairfront symbol. Unfortunately I did not see anyone getting around it.

    Either this symbol is broken with the autocompiler, either the extended character build doesn't have the proper amount of sprites.

    Alright, welp maybe one day when its fixed i can do more advanced hair sprites but for now ill just have to do my work around for it. Thank you SO MUCH for all your help allot of people don't stick around and help for this long and it means allot.

  7. 18 minutes ago, ZupaleX said:

    I am not sure I understand what you mean. The extended character template do have a hairfront folder with 2 sprites in. I'm just wondering if maybe it is missing some.

    The symbol is hairfront btw, not hair_front. But your project has it right.

    Ohh you're right i just checked the normal esc_template does have it.

  8. 12 minutes ago, ZupaleX said:

    I am puzzled by the fact that the sprite for hairfront is animated in the idle animation but is not for anything else. I cannot think of what could cause this behaviour. Did you look for other thread on the frum from people who used the hairfront symbol successfully? I'm wondering if there is not supposed to be more than 2 sprites and somehow it's just missing when it has been decompiled (not the first time that would happen) and that could create this kind of undefined behaviours..

    I have not checked other places on this forum yet for this specific problem (i have checked for similar ones) but in the character template files there is no Hair_front file and it seems to have been added in when i compiled my files for the first time.


    9 minutes ago, ZupaleX said:

    Spriter can mess a project in ways you can't even imagine. That combined with the autocompiler = headaches.

    But that's something I've never seen before. Usually it's more a sprite not showing at all or displaying something else entirely.

    Did you modify ALL the hair_front with the appropriate sprites? Maybe you should post the entire project that would be easier.

    There is hair_front 0 which is what I edited and that goes on the facing the screen sprite and then hair_front 1 goes on the sideways sprite so i left that blank I have added the .zip for my current version so you can check there.

  10. 10 hours ago, Lumina said:

    Did you add the item to the prefab list in modmain ?

    Should be something like this :

            PrefabFiles = 


    I had something similar but the post that i was using as a tutorial might have had it formatted wrong.

    edit* I put this code in my modmain but to no avail. I have a feeling the issue either lies in my file pathing, (I don't know how much don't starve needs to rely on file paths) or the actual mod item's lua code isn't working because of what i put in (probably the issue.) 

  11. 2 hours ago, Lumina said:


    First, i would suggest to make your custom roll item using the existing animation, and making your custom code. When the code will work fine, then move to make custom anim (or resking of existing anim). Of course, this way to do will work only if your item is close enough of the existing rolls, not totally different.

    This will probably be easy to test, and you could ask help for the different steps.

    For now i just simply want to make the item work as a straw roll with infinite uses.  I have attempted to edit the straw_roll.lua for my mod (renaming all instances of straw and straw_roll to my item name) and it didn't crash my game. But I also couldn't spawn the item in... For now i'm just using the straw roll art assets and such but i'm not 100% sure where they should go in the item file.  

  12. Lumina posted this in the other thread i made that the moderators closed because I forgot there was a mod's section of the forums. oops

    "I don't know more updated tutorial. But you can try to explain what is wrong and people will try to help you.

    What kind of item do you want to create ? Weapon ? Simple item ? Something else ?"

    I am attempting to make a straw/fuzzy roll type item, essentially something you sleep on.