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



Windows 8.1

Since you're on Windows, you can just download the precompiled binaries. It's the ktools-4.1.2-win32.zip download.

Link to comment
Share on other sites

Thank you so much for your help. But it seems like I have some missing DLL-files which are causing an error whenever i try to decompile with krane :(

Or is the error caused by anything else?

 

error0g6lha15o8.jpg

Link to comment
Share on other sites

Thank you so much for your help. But it seems like I have some missing DLL-files which are causing an error whenever i try to decompile with krane :(

Or is the error caused by anything else?

Is the file IM_MOD_RL_rgb_.dll in the same directory as krane.exe? That's the file it's complaining about being missing.

If it is, try doing a "cd" to the ktools-4.1.2 directory and running krane.exe from there, but this really shouldn't be necessary.

Link to comment
Share on other sites

Thank you so much for your help. But it seems like I have some missing DLL-files which are causing an error whenever i try to decompile with krane :(

Or is the error caused by anything else?

Actually, this is probably a conflict with your previous attempt of installing ImageMagick yourself. Try uninstalling ImageMagick.

Link to comment
Share on other sites

I uninstalled ImageMagick already. Still same prob...

 

 

Yes, the file is in the same folder as krane.exe. How do i do a "cd"? Im not very experienced... I made a new folder within the ktools.4.1.2-file and put the krane.exe into it. But when i try to open krane.exe it says that files are missing. Pretty sure this is not the definition of doing a "cd". Forgive my noobiness u.u

Link to comment
Share on other sites

Should add a note that the repo version of CMake can not build this. You need to manually upgrade CMake to version 3.0

Link to comment
Share on other sites

Should add a note that the repo version of CMake can not build this. You need to manually upgrade CMake to version 3.0

 

There's a multitude of repos, and a multitude of distros, so no, I won't add that remark.

 

What I should do soon however is remove the requirement for CMake 3.0+, since it's not a hard dependency.

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

 

I'm trying to mod the umbrella with a friend, and while umbrella.zip has an anim.bin, I noticed almost none of the swap_*.zip have any anim.bin, and I can't find them anywhere else either. Decompiling swap_umbrella by plopping the anim.bin from umbrella appears to work, but then running scml.exe on the result gives

WindowsError: [Error 2] The system cannot find the file specified: "C:\\Program

Files (x86)\\Steam\\steamapps\\common\\Don't Starve Mod Tools\\mod_tools\\..\\..

\\temp\\swap_umbrella\\animation.xml"

ERROR: Command failed!

Any clue as to how to do this?

Link to comment
Share on other sites

I build ktools on windows8 with CMake.

But I don't know how to fill the var (likes ImageMagick_EXECUTEABLE_DIR)

Can some one give me a screenshot about how to config the var at CMake gui

Link to comment
Share on other sites

@simplex,

 

after installing xcode, cmake, imagemagick and ktools. I am having this error when converting a .png to .tex:

 

Error: ktech: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/501

 

When i convert .tex to .png, the resulting .png is always unreadable.

What could have been wrong?

Link to comment
Share on other sites

It looks like there is an issue with decompiling walls. Maybe it is due to the update from yesterday? Whenever I try, krane tells me that there is an 

ERROR: Duplicate anim 'fullA' in bank 'wall'

Link to comment
Share on other sites

when i run ./configure, show this:

-- Check size of long long - done-- Looking for snprintf-- Looking for snprintf - found-- Check size of mode_t-- Check size of mode_t - done-- Performing Test HAVE_RESTRICT-- Performing Test HAVE_RESTRICT - Failed-- Performing Test HAVE___RESTRICT-- Performing Test HAVE___RESTRICT - Success-- Configuring incomplete, errors occurred!
it says HAVE_RESTRICT - failed
i check the cmakelists.txt
CHECK_CXX_SOURCE_COMPILES (  "int test (void *restrict x); int main (void) {return 0;}"HAVE_RESTRICT) if(NOT HAVE_RESTRICT)CHECK_CXX_SOURCE_COMPILES ( "int test (void *__restrict x); int main (void) {return 0;}"HAVE___RESTRICT) if(NOT HAVE___RESTRICT)CHECK_CXX_SOURCE_COMPILES ( "int test (void *__restrict__ x); int main (void) {return 0;}"HAVE___RESTRICT__) endif()endif()

what can i do? please help me! thx!

 
Link to comment
Share on other sites

this program is to dangerous for those who do not know how to use bianary, if a mistake is made the user's whole computer could be completely wiped out, I suggest the Ktools be updated to an .exe as that won't only be safer but more user friendly.

Edited by Andreasgamming
Link to comment
Share on other sites

@simplex

I am having a hard time building the program. I don't have much experience with coding but it seems like the error is:

error C2065: 'ssize_t': undeclared identifier in the lines? (19), (20), (21), (22), and (23).

 

And I guess this bit is also need?:

C:/.../ktools-4.4.0-source/binaries/CMakeFiles/CheckTypeSize/SSIZE_T.c:
#include <sys/types.h>
#include <stdint.h>
#include <stddef.h>


#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#endif

#define SIZE (sizeof(ssize_t))
char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
  ('0' + ((SIZE / 10000)%10)),
  ('0' + ((SIZE / 1000)%10)),
  ('0' + ((SIZE / 100)%10)),
  ('0' + ((SIZE / 10)%10)),
  ('0' +  (SIZE    % 10)),
  ']',
#ifdef KEY
  ' ','k','e','y','[', KEY, ']',
#endif
  '\0'};

#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
  int require = 0;
  require += info_size[argc];
  (void)argv;
  return require;
}

I think that's all the important stuff, if I'm missing anything do let me know and I'll post it. I'm using the windows CMake 3.6.0 and Visual Studios and ImageMagick Display following the directions listed on the ktools github README.

Link to comment
Share on other sites

The krane.exe cannot extract the Sapling.

ERROR: Duplicate anim 'empty_90s' in bank 'sapling'

Link to comment
Share on other sites

I get weird resut when decompiling cactus

All animations name are suffixed with _90s and i think some animations are lost

Link to comment
Share on other sites

I installed the ktools won't run on my computer   Ktools I installed in my computer won't run on my computer is 86 bit

Link to comment
Share on other sites

<.<

>.>

I've attached some old version I had left on my harddrive, should work on WinXP, but krane will not decompile the anim.bin 100% correctly (More precisely, many rotated symbols will be mirrored or otherwise wrongly rotated. View the other changes using the changelog on this webpage).

This software is still developed by simplex, I am merely re-uploading this version.

ktools-4.1.1.zip

  • Like 1
Link to comment
Share on other sites

Had the same idea as this post.

Looked at HandsomeMatt/dont-starve-tools first.  The author said to use the official tools.

Didn't find anything in the official mod tools to help with "text" -> "png" conversion.

Found ktools.  Saw some binary releases from random people (NOT the repo...), but not of the latest version.  Started trying to build the most recent version (4.4.0) on Windows 10 with Cygwin / *nix-based utilities such as make and gcc/g++.

Got confused trying to use cmake instead of just plain make.  This first led me down a similar path as TheSquirrel23.

Tried installing any more ImageMagick-, libmagic-, and *-dev packages I could find in the Cygwin setup program.  Had the same problem.

Found the ImageMagick Binary Releases page which has packages for Unix and Cygwin (This might help, idk)!  Installed the Cygwin one, followed the instructions to set-up the variables.  Magick wasn't there, but the others were.

After some more strange cmaking that 'worked' but didn't give me any exectuables, realized I need to run the ol' configure and make.

Did so, used it on a sample avatars.tex file, it worked!

Realized that Google Drive link from Maris might have a more up to date version than 4.4.0??

 

If you want my versions, here they are attached.

krane.exe

ktech.exe

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...