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



Excuse me, I have a 0xc000007b error, I have the MV 2013 libraries, this is just with the 4.4.4 version, I also have the 4.1.2 version but that one doesn't work, I don't even get a error message with it. I used this tool some time ago but my machine got broken, now I can't use any version

Link to comment
Share on other sites

I tried to open it but it told me that a file called VCOMP120.DLL is missing from my computer and that I should try to reinstall the program (it didn't work, off course). What does it means, and what do I need to do?

thanks

Link to comment
Share on other sites

It decompiled the anim of a hat just fine. The textures are all there. The SCML loads just fine. Recompiled it with the autocompiler, the hat is invisible.

Link to comment
Share on other sites

Why my cmake cannot find those

the ImageMagick_Magick++_ARCH_INCLUDE

ImageMagick_MagickCore_ARCH_INCLUDE

ImageMagick_MagickCore_INCLUDE_DIR

ImageMagick_MagickCore_LIBRARY

ImageMagick_MagickWand_ARCH_INCLUDE_DIR

ImageMagick_MagickWand_INCLUDE_DIR

ImageMagick_MagickWand_LIBRARY.

 

 

 

I put the imagemagick files in here:      D:/Program Files/ImageMagick-7.0.5-Q16.

 

 

 

 

Link to comment
Share on other sites

Could you just put a ktools for win64 there, cause i find it too hard to use imagemagick i download from that website.

Link to comment
Share on other sites

On 2017-3-2 at 5:06 AM, Mrzhimu said:

Why my cmake cannot find those

the ImageMagick_Magick++_ARCH_INCLUDE

ImageMagick_MagickCore_ARCH_INCLUDE

ImageMagick_MagickCore_INCLUDE_DIR

ImageMagick_MagickCore_LIBRARY

ImageMagick_MagickWand_ARCH_INCLUDE_DIR

ImageMagick_MagickWand_INCLUDE_DIR

ImageMagick_MagickWand_LIBRARY.

 

 

 

I put the imagemagick files in here:      D:/Program Files/ImageMagick-7.0.5-Q16.

 

 

 

 

Try using older version of imagemagick (6.9.whatever). I didn't detect my installation of v7 either.

Link to comment
Share on other sites

@simplex, how is the --atlas generator in ktech expected to work? I thought it would find the first/last row/column to have a pixel with non-zero opacity, but instead it just always generates values that are very close to 0 or 1 (delta is <0.001).

Link to comment
Share on other sites

can 't conver all png to tex , error :

 

ktech  myitem.png                                     
Loading non-TEX from `myitem.png'.
Error: ktech: Invalid geometry argument

 

anyone help ?

 

i am install it via aur on archlinux  [https://aur.archlinux.org/packages/ktools-git/]

Edited by blambin
Link to comment
Share on other sites

2 hours ago, blambin said:

can 't conver all png to tex , error :

 

ktech  myitem.png                                     
Loading non-TEX from `myitem.png'.
Error: ktech: Invalid geometry argument

 

anyone help ?

 

i am install it via aur on archlinux  [https://aur.archlinux.org/packages/ktools-git/]

From the README:

Quote

To convert some/path/to/a.png to mymod/modicon.tex:


$ ktech some/path/to/a.png mymod/modicon.tex
Link to comment
Share on other sites

15 minutes ago, myxal said:

From the README:

yes , i known . but the full command  has issuse too ;

ktech ./myitem.png ./myitem.tex                
Loading non-TEX from `./myitem.png'.
Error: ktech: Invalid geometry argument

 

when i add switch  " --no-mipmaps " in it ,it exec success. but the tex file not we want.

ktech --no-mipmaps ./myitem.png ./myitem.tex    ──(Fri,Mar02)─┘
Loading non-TEX from `./myitem.png'.
Compressing 64x8 image into KTEX...
Compressed.
Dumping KTEX to `./myitem.tex'...

 

 

Link to comment
Share on other sites

Why is krane unable to see the files? Am I using it wrong?

Here is my console

 

PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof> ls


    Directory: C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-----        12/31/1600  11:00 PM      14334 anim.bin
-----        12/31/1600  11:00 PM        788 atlas-0.tex
-----        12/31/1600  11:00 PM        251 build.bin


PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof> krane . .
ERROR: No input files.
PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof> krane anim.bin build.bin .
Input path `anim.bin' does not exist, skipping...
Input path `build.bin' does not exist, skipping...

ERROR: No input files.
PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof>

  • Sad 1
Link to comment
Share on other sites

On 17/3/2018 at 1:36 PM, fsih said:

Why is krane unable to see the files? Am I using it wrong?

Here is my console

 

PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof> ls


    Directory: C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-----        12/31/1600  11:00 PM      14334 anim.bin
-----        12/31/1600  11:00 PM        788 atlas-0.tex
-----        12/31/1600  11:00 PM        251 build.bin


PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof> krane . .
ERROR: No input files.
PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof> krane anim.bin build.bin .
Input path `anim.bin' does not exist, skipping...
Input path `build.bin' does not exist, skipping...

ERROR: No input files.
PS C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim\bee_poof>

I got this issue too, I used it before and now I can't, even with the file that I already decompiled before, something changed? I don't even changed the way to use it

Link to comment
Share on other sites

I used to be able to build this several months ago with ImageMagick 6 installed, but now I'm on a new system where it fails to build (both cases were on Linux).

I had ImageMagick 7 installed, which isn't compatible with ktools. But even after replacing it with ImageMagick 6, it still failed to build for some reason I couldn't be bothered to deal with.

So I went and read how to port from 6 to 7 (https://imagemagick.org/script/porting.php) then tried to port ktools to ImageMagick 7 so I could use it. I was able to port then build it and it turned out fine. And through some tests, I couldn't find any difference in output from the original. Though, note that to compare it to the original, I've used the windows binary release through WINE, which probably won't affect anything.

From left to right:

  • Initial image prior to any conversion
  • Converted to KTEX with original ktools, converted to PNG with original ktools
  • Converted to KTEX with ported ktools, converted to PNG with ported ktools
  • Converted to KTEX with original ktools, converted to PNG with ported ktools
  • Converted to KTEX with ported ktools, converted to PNG with original ktools

example.png.e0f1b1c31f7cabb5a6aadfca6a1a4d8d.pngexampleOO.png.d77e79361aefaf0eec4b171654c73b16.pngexamplePP.png.2d4568945698e100124b399513d971ea.pngexampleOP.png.6ed9e4fa389015cc89c75526794c23a6.pngexamplePO.png.75d211389fd52459ca9c4ef1ad457214.png

Basically, if anybody else couldn't install from source with ImageMagick 6 for whatever reason, hopefully this can help you:
https://github.com/JohnWatson78/ktools

Edited by JohnWatson
  • Like 1
Link to comment
Share on other sites

On 9/22/2018 at 9:53 PM, JohnWatson said:

I used to be able to build this several months ago with ImageMagick 6 installed, but now I'm on a new system where it fails to build (both cases were on Linux).

I had ImageMagick 7 installed, which isn't compatible with ktools. But even after replacing it with ImageMagick 6, it still failed to build for some reason I couldn't be bothered to deal with.

So I went and read how to port from 6 to 7 (https://imagemagick.org/script/porting.php) then tried to port ktools to ImageMagick 7 so I could use it. I was able to port then build it and it turned out fine. And through some tests, I couldn't find any difference in output from the original. Though, note that to compare it to the original, I've used the windows binary release through WINE, which probably won't affect anything.

From left to right:

  • Initial image prior to any conversion
  • Converted to KTEX with original ktools, converted to PNG with original ktools
  • Converted to KTEX with ported ktools, converted to PNG with ported ktools
  • Converted to KTEX with original ktools, converted to PNG with ported ktools
  • Converted to KTEX with ported ktools, converted to PNG with original ktools

example.png.e0f1b1c31f7cabb5a6aadfca6a1a4d8d.pngexampleOO.png.d77e79361aefaf0eec4b171654c73b16.pngexamplePP.png.2d4568945698e100124b399513d971ea.pngexampleOP.png.6ed9e4fa389015cc89c75526794c23a6.pngexamplePO.png.75d211389fd52459ca9c4ef1ad457214.png

Basically, if anybody else couldn't install from source with ImageMagick 6 for whatever reason, hopefully this can help you:
https://github.com/JohnWatson78/ktools

It works for me! thanks.

Link to comment
Share on other sites

When i decompile a character from anim.bin, build.bin, atlas-0.tex, atlas-1.tex to sprite so i can edit for some reason it changes all the "sprites"(face,hands,legs,tail,head...) to random sizes. Am I doing something wrong?

I have a *.bat file with this code in it (to run it faster):"krane anim.bin build.bin output_dir"

Link to comment
Share on other sites

Used to work fine, now all I get is 0xc000007b error while trying to use it, I guess reinstalling windows due to file corruption was a bad idea then, huh

Edited by FuffledBeeQueen
Link to comment
Share on other sites

when i trying to decompile files i getting this error

ERROR: krane.exe: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/706

Link to comment
Share on other sites

Hi!
I have a question:

I want to extract the build.bin and the anim.bin separately, but the krane don't allow that

Like, I want to extract a "general build" with all swap objects, hats and etc from the "build.bin" of Wolfgang
But since there is any file for the "swap_body" inside used in the animation, the "place" for this images is not written inside the extracted "scml", even they existing inside the build
But this "place" for image is necessary for situations like, "you equip an armor"

There is anyway to extract only the complete bin to scml folder structure?

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