Jump to content
  • The forum downloads section will be removed on Jan 1st 2023. Players may still download mods that are currently hosted, but new submissions are no longer being accepted. Mod makers are advised to relocate their mods to alternative hosting solutions.

ktools: Cross-platform modding tools for Don't Starve 4.4.0


About This File

IMPORTANT: Starting with version 4.3.0, the Windows binary release requires Microsoft's Visual C++ 2013 Redistributable Package (previously, the 2010 one was required). See the bottom of this description for more information.

 

ktools is a set of cross-platform (Linux, Mac and Windows) modding tools for Don't Starve. It consists of the following command-line tools:

  • ktech: a bidirectional converter between TEX texture and PNG;
  • krane: a anim.bin/build.bin decompiler, whose output is a Spriter project.

More detailed information about these tools may be found in the README, in the project's GitHub repository.

ktools primary release format is as source code, compilable under every platform using CMake, as per the instructions in the README. A Windows binary release is also included (the ZIP ending with "-win32").

When compiling from source, if libzip is found then the ktools are compiled with zip support, so that zip archives may be given as input in the same way directories may. The binary Windows release does not have zip support.

If you have issues running the Windows binary release, make sure you have Microsoft's Visual C++ 2013 Redistributable Package (the 32 bit version, that is, download the file called vcredist_x86.exe). It's very likely already installed, but in case of any errors first make sure that is in fact the case.


What's New in Version 4.4.0   See changelog

Released

  • (krane) Added proper support for animations with more than 4 sides.
  • Like 20
  • Thanks 4

User Feedback

Recommended Comments



Danke schön! I was going to ask if you could send me this so I could do stuff easier. 

 

Simplex, you beautiful b******!

 

However, I should be able to use the .exe alone? I do have Cmake and ImageMagick, but the window instantly closes as soon as it loads. Sorry if I sound like a wumbo dumbo.

Link to comment
Share on other sites

I don't think I fully understand krane's usefulness. Then again, I'm not familiar with spriter projects. It looks like krane only decompiles so is it for importing Don't Starve's sprite assets into other games that utilize spriter projects?

I like the prospects of --mark-atlases but it still needs an atlas-0.tex file, even though the readme says, "When this option is given, only a build file should be given as input".

When I run:

$ krane --mark-atlases ./build.bin ./
I get:

ERROR: the path `./atlas-0.tex' does not exist.
Is this a bug or is the build file only part of the atlas? On the same topic, can krane be used in some way to edit the atlas? Using already existing, uneditable atlases is very restricting so krane seems promising in this way.

I also like that I can rename the builds without using wine but it says it needs the anim.bin file. What happens if there is no related anim.bin file? I also can't rename the build without a tex/png file, which is a minor annoyance but is the tex/png file necessary for renaming builds?

I hope this doesn't come across as hyper critical. Your work is always greatly appreciated and I can't wait to see how far this tool can go. I'm just having trouble grasping it's current purpose.

Link to comment
Share on other sites

Can you make a multiplatform version of Matt's Build Renamer? Or do mods not work that way anymore?

Link to comment
Share on other sites

Can you make a multiplatform version of Matt's Build Renamer? Or do mods not work that way anymore?

I wrote a Perl script doing that. Since both Linux and Mac come with Perl preinstalled, using it is quite straightforward: download it (click on "Raw" and save the page), make it executable and run.

Link to comment
Share on other sites

Ooohhh.....interesting. Like everything else you make, Simplex. Useful in some way, shape or form. You are a backbone of the mod community.

Link to comment
Share on other sites

How to use the decompiler?

For a more in-depth explanation, check the README linked to in the description. But the basic usage scenario is passing as the first argument the directory with the build.bin, anim.bin and atlas-0.tex and as the second argument the path to the directory where you want to place the resulting Spriter project (which gets created if it doesn't exist). So, for example, if you have unzipped researchlab.zip into a folder researchlab/, and wants to put the project into researchlab_scml/, you'd do

krane researchlab researchlab_scml
  • Like 1
Link to comment
Share on other sites

it won't allow me to convert wod's anim to an scml project :L

What is the error you get?

And make sure the build has not been renamed with Matt's build renamer, since it strips a part of the build file necessary for decompiling.

And either way, decompiling Wilson's anims would be preferable. But even then, not recommended. The recompiled build is usually not compatible with the anims in the original bank, so you'd have to decompile all anims in the "wilson" bank.

Link to comment
Share on other sites

Sorry to be a bother, but how do I decompile entities that have the _build with no anim.bin and then the different animation files?

E.g:

warg_actions

warg_basic

warg_build

 

Is there a way to decompile just the build and have it use the same animation bank as the Varg?

One of my custom creatures uses the same animations but it needs a larger lower jaw and horns.

Link to comment
Share on other sites

Sorry to be a bother, but how do I decompile entities that have the _build with no anim.bin and then the different animation files?

Is there a way to decompile just the build and have it use the same animation bank as the Varg?

One of my custom creatures uses the same animations but it needs a larger lower jaw and horns.

You can unzip each of the zips (the build one and the animation ones) in a separate folder and pass all of them as arguments. If these files have more than one bank or anim, you can specify which build/bank you want by

$ ktech --build build_name --bank bank_name build_folder anim_folder1 anim_folder2 output_folder
Link to comment
Share on other sites

You can unzip each of the zips (the build one and the animation ones) in a separate folder and pass all of them as arguments. If these files have more than one bank or anim, you can specify which build/bank you want by

$ ktech --build build_name --bank bank_name build_folder anim_folder1 anim_folder2 output_folder

That worked for my Vilgoat, but now the Varg is rather...

http://s29.photobucket.com/user/Mr_Tiddles/media/ohboy_zps7ca2a768.png.html

...Odd.

 

EDIT: I think I found a fix. Could it be because the new .zip is replacing the default Varg bank and messing it up? I'm fixing up the animations a bit (Because making it an scml caused some issues) and about to give it a new bank name. Might fix it, yeah?

 

ANOTHER EDIT: Yep, I was right. Just had to go into spriter and change the bank name.

Link to comment
Share on other sites

could someone make a video on setting this up and actually decompiling an anim file then recompiling? maybe just using wilsons as an example? The instructions really arent that clear..and alot of people would probably benefit from visual instructions?..
Thanks in advance

Link to comment
Share on other sites

could someone make a video on setting this up and actually decompiling an anim file then recompiling? maybe just using wilsons as an example? The instructions really arent that clear..and alot of people would probably benefit from visual instructions?..

Thanks in advance

I could do a kind of ****y video later.

Link to comment
Share on other sites

I could do a kind of ****y video later.

As long as it can show me the basics of setting this up I would be 1000000x greatful! I have a really decent character mod idea..and i really need this to start making the new items and character of course!

Link to comment
Share on other sites

Simplex, I'm trying to install ktools on my ubuntu 12.04 system, and I'm having some issues. I've got the latest version of image magick, which seems to have downloaded perfectly, as well as the latest version of cmake, which I got as a tarball, converted to .deb with alien, and installed from the software center. The issue that I'm having is when I get into the ktools directory (I just put the folder on my desktop and use cd Desktop/ktools-4.1.1, which works fine), and then I do ./configure && make, it returns this:

 

./configure: 3: exec: cmake: not found
 
Just to experiment, I typed in ccmake, and the terminal returned this:
 
The program 'ccmake' is currently not installed.  You can install it by typing:
sudo apt-get install cmake-curses-gui
 
I did that, it said some packages couldn't be installed, and it returned this:
 
The following packages have unmet dependencies:
cmake-curses-gui : Depends: cmake (= 2.8.7-0ubuntu5) but 3.0.0-2 is to be installed
 
I tried ccmake again but the same thing happened. Any resolve for this?
 
Thank you!
 
 
Link to comment
Share on other sites

Okay, so then I stayed in the Desktop/ktools-4.1.1 directory and did

 

cmake

 

and the terminal returned

 

The program 'cmake' is currently not installed.  You can install it by typing:
sudo apt-get install cmake
 
so I do sudo apt-get install cmake, and it says that cmake is already the newest version...
 
I try cmake again and it does the exact same thing. I've done it a couple of times now, but it's an infinite loop of pain.
 
Help please!
Link to comment
Share on other sites

Okay, so then I stayed in the Desktop/ktools-4.1.1 directory and did

 

cmake

 

and the terminal returned

 

The program 'cmake' is currently not installed.  You can install it by typing:

sudo apt-get install cmake

 

so I do sudo apt-get install cmake, and it says that cmake is already the newest version...

 

I try cmake again and it does the exact same thing. I've done it a couple of times now, but it's an infinite loop of pain.

 

Help please!

It seems there's something wrong with your custom cmake installation. Uninstall it and then install it from the official repositories, via sudo apt-get install cmake. cmake-curses-gui is not required. Then change the first line of CMakeLists.txt (in the ktools/ directory) fromm

cmake_minimum_required (VERSION 2.8.8)
to

cmake_minimum_required (VERSION 2.8.7)
If that doesn't work (I don't quite recall why I required 2.8.8 as a minimum, but I think I just need it for packaging a release tarball), just install the latest cmake version directly from its tarball, instead of converting it to a deb package. You don't need to do a system-wide installation of cmake if you don't want to, instead just doing

export PATH=$HOME/bin:$PATH
before the './configure && make' line (assuming, in this example, that the cmake executable is in ~/bin).
Link to comment
Share on other sites

Okay, we're getting somewhere, but now it's saying that it can't find image magick:

 

will@will-OptiPlex-GX620:~$ cd Desktop/ktools-4.1.1
will@will-OptiPlex-GX620:~/Desktop/ktools-4.1.1$ ./configure && make
-- Detected CPU: generic
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find ImageMagick (missing: ImageMagick_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindImageMagick.cmake:175 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:58 (FIND_PACKAGE)
 
 
-- Configuring incomplete, errors occurred!
will@will-OptiPlex-GX620:~/Desktop/ktools-4.1.1$
 
I followed the imagemagick instructions that were right on their website, and when I installed it DID say that it failed to install a couple brushes... These are the exact instructions I followed:
 
 
I try to use ktech and the terminal says it can't find the command.
 
Thanks for all your help! If I get this up and running, you'll be credited in my steam workshop :D
 
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...