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



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:

 

http://www.imagemagick.org/script/install-source.php#unix

 

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 :grin:

 

If "part" of the installation failed it was probably aborted and nothing was installed. Just install ImageMagick using apt-get. sudo apt-get install libmagick++. You're making the whole process way too hard on yourself, it shouldn't take more than a couple apt-gets to get all the dependencies and compile/install the ktools (except possibly for the cmake installation, since you're using an old Ubuntu release with a rather old cmake package, as discussed before).

Link to comment
Share on other sites

Okay, I did try to uninstall and reinstall with apt-get but I was doing apt-get install imagemagick, not libmagic ++, but I got libmagick++ w/ apt-get, tried ./configure && make, and I'm still getting the same "can't find imagemagick" error as before. 

 

And you're right, I'm making this too hard, but I've only had Ubuntu for a few months and I'm still learning new tricks.

Link to comment
Share on other sites

Okay, I did try to uninstall and reinstall with apt-get but I was doing apt-get install imagemagick, not libmagic ++, but I got libmagick++ w/ apt-get, tried ./configure && make, and I'm still getting the same "can't find imagemagick" error as before. 

 

And you're right, I'm making this too hard, but I've only had Ubuntu for a few months and I'm still learning new tricks.

Ah, sorry, the package you need is libmagick++-dev. libmagick++ only installs runtime stuff, not things required for compiling programs using Magick++.

I had a notice explaining that the package libmagick++-dev should be installed in Debian based distros (such as Ubuntu) in the ktech README (a project which was made part of the ktools). I really should put this notice as I had it before, sorry about that.

Link to comment
Share on other sites

Sorry for my leave, I got Garry's Mod and forgot about life in general :p Got libmagick++-dev fine, did ./configure && make and here's what happened:

 

will@will-OptiPlex-GX620:~$ cd Desktop/ktools-4.1.1
will@will-OptiPlex-GX620:~/Desktop/ktools-4.1.1$ ./configure && make
-- Detected CPU: generic
-- Found ImageMagick: TRUE 
-- checking for module 'Magick++'
--   found Magick++, version 6.8.9
-- Looking for floor in m
-- Looking for floor in m - found
-- Looking for C++ include cstddef
-- Looking for C++ include cstddef - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for C++ include strstream
-- Looking for C++ include strstream - found
-- Looking for C++ include strstream.h
-- Looking for C++ include strstream.h - not found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Check size of long long
-- 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 done
-- Generating done
-- Build files have been written to: /home/will/Desktop/ktools-4.1.1
Scanning dependencies of target ktool_common
[  4%] Building CXX object CMakeFiles/ktool_common.dir/src/common/ktools_common.cpp.o
In file included from /home/will/Desktop/ktools-4.1.1/src/common/ktools_common.cpp:1:0:
/home/will/Desktop/ktools-4.1.1/src/common/ktools_common.hpp:23:20: fatal error: config.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ktool_common.dir/src/common/ktools_common.cpp.o] Error 1
make[1]: *** [CMakeFiles/ktool_common.dir/all] Error 2
make: *** [all] Error 2
will@will-OptiPlex-GX620:~/Desktop/ktools-4.1.1$ ^C
will@will-OptiPlex-GX620:~/Desktop/ktools-4.1.1$ 
 
What needs to be taken care of next, sir?
Link to comment
Share on other sites

Awesome linux tool. I personally had some dependency issues with cmake and libmagick++. Anyone having those problems should do the following (will only work on Ubuntu or distros with aptitidue but same general idea applies):

sudo apt-get install cmake libmagick++-dev
Link to comment
Share on other sites

I just use the krane.exe in windows7 64bit:

E:\ktools-4.1.1>krane.exe ./build.bin ./

 

it show errors:

Build has unsupported encoding version 5.

Error:Build has unsupported encoding version.Skipping build file.

Discarded.

Error:No build found in the input files.

 

I don't know why.Plese help me. thanks a lot.

Link to comment
Share on other sites

I just use the krane.exe in windows7 64bit:

E:\ktools-4.1.1>krane.exe ./build.bin ./

 

it show errors:

Build has unsupported encoding version 5.

Error:Build has unsupported encoding version.Skipping build file.

Discarded.

Error:No build found in the input files.

 

I don't know why.Plese help me. thanks a lot.

That's because you're trying to decompile an old build, and the currently uploaded Windows binaries don't have support for it, even though I already implemented support for it in the code. So you can either compile krane yourself from the GitHub repository, or you can wait for me to upload the new krane version (which shouldn't take long).

Link to comment
Share on other sites

I've done everything like you wrote, sudo make install was done without any errors on my mac, ktech command on 'wilson.tex' converted to .png without any errors too, but then I can not open the .png file, it says that it's 'broken' (I was trying with Photoshop as well as Preview and even chrome). Was searching for answer in comments, help and readme and I couldn't find any answers, so I ask you if you know what is the case of broken png?

 

Link to comment
Share on other sites

I've done everything like you wrote, sudo make install was done without any errors on my mac, ktech command on 'wilson.tex' converted to .png without any errors too, but then I can not open the .png file, it says that it's 'broken' (I was trying with Photoshop as well as Preview and even chrome). Was searching for answer in comments, help and readme and I couldn't find any answers, so I ask you if you know what is the case of broken png?

That's the first time I heard of an issue like that. Could you upload the png?

Link to comment
Share on other sites

https://www.dropbox.com/s/vx0a7kotle9tas1/wilson.png?dl=0 So this is the file, sory for late answer 

(Don't know if there is a way to upload via this forum, If don't want to download by my dropbox I can change it to something).

The png contents are certainly wrong, it's mostly filled by zero bytes. This looks like an error with your ImageMagic installation, since that's what converts the raw image data decompressed from the .tex to .png. How did you install ImageMagick, via MacPorts? Could you try reinstalling it?

Link to comment
Share on other sites

I've installed it by source, now I've type in "identify -version" and here's what I got: Screen%20Shot%202014-12-13%20at%2021.53.

I decided to uninstall it and install it again, from source. Everything went without any errors, but then I checked it with "make check" and result wasn't that perfect...:Screen%20Shot%202014-12-13%20at%2022.23.

fails are:
 FAIL: tests/wandtest.tap 1
 
FAIL: Magick++/demo/demos.tap 6

I was trying to fix it, but nothing workd as far as I know what I can do, so I uninstalled it and installed it by automatic installation program, but it went the same way as by the source. My last shot was to instal it by MacPorts. And after that, when I try to 'ktech wilson.tex' the output message is:
"dyld: Library not loaded: /usr/local/lib/libMagick++-6.Q16.5.dylib

  Referenced from: /usr/local/bin/ktech

  Reason: image not found

Trace/BPT trap: 5". Really don't know what to do :/

Link to comment
Share on other sites

I've installed it by source, now I've type in "identify -version" and here's what I got: Screen%20Shot%202014-12-13%20at%2021.53.

I decided to uninstall it and install it again, from source. Everything went without any errors, but then I checked it with "make check" and result wasn't that perfect...:Screen%20Shot%202014-12-13%20at%2022.23.

fails are:

 FAIL: tests/wandtest.tap 1

 FAIL: Magick++/demo/demos.tap 6

I was trying to fix it, but nothing workd as far as I know what I can do, so I uninstalled it and installed it by automatic installation program, but it went the same way as by the source. My last shot was to instal it by MacPorts. And after that, when I try to 'ktech wilson.tex' the output message is:

"dyld: Library not loaded: /usr/local/lib/libMagick++-6.Q16.5.dylib

  Referenced from: /usr/local/bin/ktech

  Reason: image not found

Trace/BPT trap: 5". Really don't know what to do :/

Since you reinstalled ImageMagick by another method, you should recompile (and then reinstall) the ktools. Based on what you told me, you'll probably have no issues after that.

However, I plan on uploading the new 4.1.2 version of ktools still today (this is the same version that's on GItHub, so if you got the sources from there ignore this remark), so since you're recompiling you may prefer to wait for it. The only change in version 4.1.2 is support for legacy textures and builds/animations (from before the Don't Starve Caves update), so if you're not interested in that there's no gain in using 4.1.2 instead of 4.1.1.

Link to comment
Share on other sites

I've downloaded it from here, I may find a use of this update, thanks and great work :) I've recompile it like you said, but there was still a problem with the "dyld: Library not loaded: /usr/local/lib/libMagick++-6.Q16.5.dylib". So i searched for this file in my entire disk, found that whole ImageMagic is in other place then "/user/local/lib", copied it there and now finally ktools work perfectly :) don't know if it was a best way to do it, but definitely one of possible to make it run :p 

Link to comment
Share on other sites

I've downloaded it from here, I may find a use of this update, thanks and great work :-) I've recompile it like you said, but there was still a problem with the "dyld: Library not loaded: /usr/local/lib/libMagick++-6.Q16.5.dylib". So i searched for this file in my entire disk, found that whole ImageMagic is in other place then "/user/local/lib", copied it there and now finally ktools work perfectly :-) don't know if it was a best way to do it, but definitely one of possible to make it run :razz:

Hmm, this sounds like your original ImageMagick installation (the one by hand) wasn't cleanly uninstalled, so the system still thinks it's there. The ideal would be to run a 'sudo make uninstall' from the ImageMagick source directory (the one you used to build the first installation), but either way, your solution shouldn't cause any issues.

Link to comment
Share on other sites

note: i'm attempting to use these on mac
so i'm using these programs as they are used in the tutorial that i'm following (can be found here: http://albinofruit.com/2014/08/guide-modding-dont-starve-mac/) and i'm running a command in terminal that 

i believe is supposed to install parts of the ktools in some way (I don't think i have a good understanding of it all) and i'm stumbling across the problem that the command that's installing it is failing as it is failing to find some key files (i.e. ImageMagick_Magick++_LIBRARY, ImageMagick_MagickWand_LIBRARY, ImageMagick_MagickCore_LIBRARY) could you explain why this isn't working or at least recommend a tutorial that would be more foolproof for mac?

Link to comment
Share on other sites

note: i'm attempting to use these on mac

so i'm using these programs as they are used in the tutorial that i'm following (can be found here: http://albinofruit.com/2014/08/guide-modding-dont-starve-mac/) and i'm running a command in terminal that 

i believe is supposed to install parts of the ktools in some way (I don't think i have a good understanding of it all) and i'm stumbling across the problem that the command that's installing it is failing as it is failing to find some key files (i.e. ImageMagick_Magick++_LIBRARY, ImageMagick_MagickWand_LIBRARY, ImageMagick_MagickCore_LIBRARY) could you explain why this isn't working or at least recommend a tutorial that would be more foolproof for mac?

I hadn't seen that tutorial, thanks for that. It's a pretty good tutorial, except it doesn't cover one important part: installing ImageMagick. In my README, I suggest using MacPorts for it, but Homebrew should work just fine as an alternative. Type the following in a terminal:

brew install imagemagick
If it fails, try prepending "sudo " to the above command. Then follow the tutorial starting from the "./configure && make" step.
Link to comment
Share on other sites

Is there anyway to compile a .png and .scml similar to the DST Tools with this? For some reason DST Tools never reads that the anim folder in the mod and just skips compiling it.

Link to comment
Share on other sites

Is there anyway to compile a .png and .scml similar to the DST Tools with this? For some reason DST Tools never reads that the anim folder in the mod and just skips compiling it.

ktech can compile pngs into texs, yes. But scml -> bin compilation is not done. I believe the mod tools only automatically check the singleplayer Don't Starve directory, so you may have to temporarily put your mod folder there to get the assets to compile.

Link to comment
Share on other sites

Hi, thank you for your great work! Unfortunately it doesnt work for me :( Everytime I click on configure in CMake (after setting source and build) i get this error

 

The CXX compiler identification is unknown

CMake Error at CMakeLists.txt:3 (Project):
No CMAKE_CXX_COMPILER could be found.

 

What am I doing wrong? Im trying despretaly to get a scml file for a mod :(((

Link to comment
Share on other sites

Hi, thank you for your great work! Unfortunately it doesnt work for me :( Everytime I click on configure in CMake (after setting source and build) i get this error

 

The CXX compiler identification is unknown

CMake Error at CMakeLists.txt:3 (Project):

No CMAKE_CXX_COMPILER could be found.

 

What am I doing wrong? Im trying despretaly to get a scml file for a mod :(((

This means you system doesn't have a C++ compiler. You need a C++ compiler in order to compile C++ programs. Please check the README.

Link to comment
Share on other sites

I tried to find a solution for my previous problem but now i got this one

 

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find ImageMagick (missing: ImageMagick_Magick++_LIBRARY
ImageMagick_MagickWand_LIBRARY ImageMagick_MagickCore_LIBRARY) (found
version "6.9.0-3")
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindImageMagick.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:59 (FIND_PACKAGE)

 

Would you pls help me?

Link to comment
Share on other sites

I tried to find a solution for my previous problem but now i got this one

 

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):

Could NOT find ImageMagick (missing: ImageMagick_Magick++_LIBRARY

ImageMagick_MagickWand_LIBRARY ImageMagick_MagickCore_LIBRARY) (found

version "6.9.0-3")

Call Stack (most recent call first):

C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)

C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindImageMagick.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)

CMakeLists.txt:59 (FIND_PACKAGE)

 

Would you pls help me?

Again, you're just missing stuff. In this case ImageMagick. This is covered in the README.

What is your OS?

Link to comment
Share on other sites

But i downloaded and installed ImageMagick :(

 

Windows 8.1

 

Im not sure if this a helpful information but when i click on generate i receive this:

 

CMake Warning at cmake/thirdparty/OptimizeForArchitecture.cmake:108 (message):
Your CPU (family 6, model 60) is not known. Auto-detection of optimization
flags failed and will use the 65nm Core 2 CPU settings.
Call Stack (most recent call first):
cmake/thirdparty/OptimizeForArchitecture.cmake:154 (AutodetectHostArchitecture)
CMakeLists.txt:49 (OptimizeForArchitecture)

 

Detected CPU: merom

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find ImageMagick (missing: ImageMagick_Magick++_LIBRARY
ImageMagick_MagickWand_LIBRARY ImageMagick_MagickCore_LIBRARY) (found
version "6.9.0-1")
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindImageMagick.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:59 (FIND_PACKAGE)

 

Configuring incomplete, errors occurred!

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