• Content Count

  • Joined

  • Last visited

 Content Type 




Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by ViewtifulDom

  1. @DarkKingBoo @RedHairedHero Thanks for taking the time, guys.  I figured it was probably being overridden after masterpostinit, and I don't know where else to call it without using a messy DoTaskInTime.  To clarify, RedHairedHero, my goal is for the character to start the game looking like a different model.  Is there perhaps some sort of "OnSpawn" event or function I could use?  That would actually solve several other problems I'm having as well.

  2. @DarkKingBoo I tried it once with two custom character anims.  When both character anims were present, and testchar1's build was set to testchar2 in masterpostinit, it would simply default to testchar1's build.  When I removed testchar1's anim, and again set its build to testchar2 in masterpostinit, it would turn invisible.  Both character anims had been tested elsewhere and worked fine.  Like you, whenever I create a custom mob, I can set the build, bank, and stategraph in masterpostinit with no problem.  For some reason, any character I create always seems to default to the anim that share's its prefab name despite changing it's build in masterpostinit.  It must get overridden even after masterpostinit?

  3. Thanks for all your effort @SuperDavid, but it doesn't solve my problem.  Like I said, I can change the character's build without issue in the console, so changing it in on the "equip" event doesn't help me.  I need the character's build to be changed on its initialization, like the Playable Pets mod does.  As for testchar_none.lua and the ghost build, I'm aware they're missing, but they're unnecessary for this particular test.

  4. @Lumina @SuperDavid Thanks guys.  The problem isn't with the anim files themselves, they both work fine on their own.  I simply can't seem to reassign a prefab's build to anything other than the anim that shares its name.  Perhaps, since I'm doing it in master_postinit, the game overwrites my change before it starts?  I can change the character's build with no issue if I use SetBuild in the console, so it may just be a matter of when I'm calling it.  I'll link the latest version of the mod, where I try to get the "testchar" prefab to use Wendy's build.


  5. 8 minutes ago, Lumina said:

    I don't know if you can use this method for custom character, or if you can use the build one, but maybe it's why it's not working ? Maybe you should look for another mod with custom build ? I think @SuperDavid made a mod like this if i remember well.

    Thanks @Lumina.  I actually did reference a mod that uses my example, on top of also having skins for the characters.  I'm afraid if I cheat and use a skin to change the character, I'm limiting myself to not also being able to add skins to my character.

    The mod I referenced was Leonardo Coxington's Playable Pets mod.  As an example, the playable Bearger character's prefab is called "bearplayer", and then sets its build as follows:


    The build name is different from the prefab name, and it still functions. (The mod then goes on to offer several skins for the Bearger character, as well as others), so I'd still  like to try to get it to work this way.

  6. I'm trying to create a character that uses a build that doesn't share its prefab name.  Normally, a character called "example" would default to using the anim file called "", unless instructed otherwise.  I can't seem to convince it to use any build other than its own, however.  I've read that the proper way to do this is to assign a new build using:


    however, it doesn't seem to work.  The character defaults to the anim file with the same name, or simply becomes invisible if the anim with the same name is not provided.  Here's the full prefab:

    local MakePlayerCharacter = require "prefabs/player_common"
    local assets =
    	Asset("ANIM", "anim/"),
    	Asset("ANIM", "anim/"),
    local common_postinit = function(inst) 
    local master_postinit = function(inst)
    return MakePlayerCharacter("domo", prefabs, assets, common_postinit, master_postinit)

    Both build files are standard character builds, compatible with the standard player stategraph.  Can anyone fill me in on what I'm doing wrong, or anything I'm missing?  Thank you so much!

  7. Download: Domo's Don't Starve Character Creator

    Hey friends, I've got a brand new Don't Starve modding tool to share with all of you!  It's a character creation script that allows you to draw your character in-pose, and then easily export the .scml file and all its assets directly to your mod folder.  This method doesn't require adapting a template mod, and allows you to create assets without any size restrictions.

    There is a SMALL catch - this tool is an extension for Adobe Flash.  Hear me out!  Wilson and all his friends were originally drawn in Flash by Klei themselves, and it works quite well with Don't Starve's aesthetic.  If you still prefer to use alternative software, you can import your character's assets into Flash and use the tool to create an .scml file.

    Here's how it works:

    Step 1: Open a new document.  Open Window > Other Panels > DSCC.  In the DSCC window, enter your character's name and click 'New'.  Your character's assets will be created and appear in the document's library.

    Step 2: Click your character's name in the list and click 'Load'.  Your character's assets will be loaded into the document.  Once there, you can open each one and draw the appropriate body part.  Alternatively, you can import external images if you'd prefer not to draw in Flash.

    Step 3: Once your character is finished, click its name in the list and click 'Export'.  Navigate to your mod's 'exported' folder and click 'Okay'.  Flash will process your character for about a minute, and after that, you're done!  Once you start Don't Starve, it will automatically be compiled into an anim file for your character.

    My hope is for this tool to streamline the character creation process and make it easier for modders to publish their work.  Please post here with any feedback you have about DSCC, as I plan to keep it updated and add some new features and fixes.  If there are any questions about these instructions, please post them, as well.  With your help, I can make this a real asset to you and the Don't Starve modding community.  Thanks everyone!  Also be on the lookout for Domo's Don't Starve Speech File Creator in the future!

    • Like 2

  8. @DarkXero


    Hey, so I've encountered an error in this code afterall:

    AddComponentPostInit("edible", function(self)    local old = self.GetHunger    self.GetHunger = function(self, eater)        return old(self, eater) * ((eater.prefab == "domo" and .75) or 1)    endend)

    It seems to work properly with all the characters, Domo takes less hunger from food and Wilson does not, but as soon as you try to feed something to a pig, it breaks down.

    [00:00:53]: [string "../mods/domo/modmain.lua"]:9: attempt to index local 'eater' (a nil value)LUA ERROR stack traceback:    ../mods/domo/modmain.lua:9 in (method) GetHunger (Lua) <8-10>    scripts/prefabs/pigman.lua:65 in (field) onaccept (Lua) <55-86>    scripts/components/trader.lua:113 in (method) AcceptGift (Lua) <90-125>    scripts/actions.lua:732 in (field) fn (Lua) <726-735>    scripts/bufferedaction.lua:23 in (method) Do (Lua) <19-33>    scripts/entityscript.lua:1199 in (method) PerformBufferedAction (Lua) <1191-1209>    scripts/stategraphs/SGwilson.lua:2971 in (field) fn (Lua) <2970-2972>    scripts/stategraph.lua:562 in (method) UpdateState (Lua) <530-574>    scripts/stategraph.lua:601 in (method) Update (Lua) <593-621>    scripts/stategraph.lua:123 in (method) Update (Lua) <107-146>    scripts/update.lua:205 in () ? (Lua) <146-219>

    It's apparently losing track of the eater component at some point, but I can't figure out why or where.  Any idea why it's getting hung up?

  9. I'm creating a character with the following perk:


    *Eats a lot, but not often.


    For this, I have doubled the characters max hunger and decreased the hunger rate by 25%.  To compensate, I want him to receive 25% less hunger from anything he eats.  I've tried the following ways to accomplish this:

    • The 'oneat' function (doesn't affect the actual eating, just fires when performed)
    • Editing the GetHunger function (affected all characters despite the clause) see: http://forums.kleien...etables-values/
    • Editing the 'Eat' function.  I'm not sure how sensible that was in the first place.

    Looking for advice or tutelage on the subject.  More information can be provided if necessary.  Thank you!


    - Dominic