Search the Community
Showing results for tags 'krane'.
-
Hello. I have learned how to use Ktools by accident. Maybe I am so bad at everything that I didn't find solution for my issue in main Ktools topic, or whatever. If you have the same problem you probably click "krane.exe" twice and nothing happens. You can use Krane to decompile "anim.zip" into folders with images and .scml file from Spriter. Tutorial Part 1. Extract files from "ktools-4.4.4-win32.zip" to desktop. It should create folder called "ktools-4.4.4", rename it to "ktools". It must look like this after opening. Part 2. Open path marked with red color (your game directory) and follow up to anim folder. It will be full of .zip files. Let's find an "axe" for instance. Then open it ... ...and copy all 3 file types into your "ktools" folder in the desktop. Part 3. Press Windows (key on your keyboard) + R, then type "cmd" (console should pop up) Type "cd desktop/ktools", press "Enter" key Type "krane anim.bin build.bin name" [name -> name of folder you want your files to be decompiled into] After while you will see this Part 4. Open "ktools" folder and your "name" folder will be waiting for you. Open it. You will see .scml file and folder. That's it. I hope someone might find it useful. New community members for instance, without knowledge and experience in all this stuff. (I can't delete this picture below. Just ignore it.)
-
Hello there! This is going to be my first ever tutorial, so apologies if anything is unclear (though let me know if it is and I'll try to update this/help out!) or, in worst case, flat out incorrect. Let's jump in! EDIT: Just wanted to clarify, this guide is only for extracting the sprites. It does not cover the process of recompiling the assets back into the game. I have linked the Steam post guide for that down further into the guide. Sorry, I just don't know how to do that personally and I apologize if anyone feels this guide is useless because of that lack of information. So I've noticed a lot of people lately (including myself) struggling to do this, for one of 2 reasons (possibly more): First, Krane's intended command prompt usage simply doesn't work, no matter how you do it Second, the desired graphics/animations don't come with a corresponding anim.bin file I have solutions to both of these problems (though maybe not perfect ones), so hopefully anyone else looking to do this and running into the same issues will be able to accomplish what they want to do. Alright, let's get started! You'll need: -KTools -TEXTool -A program that can open/extract .zip archive files -An image editing program that supports transparency (this is really important) 1. First, you want to make sure you have KTools. Without this, you won't be able to extract any graphics or animations. The downloaded folder for KTools can be saved anywhere (though I recommend renaming the folder to simply "ktools". E.g. "ktools-4.4.4" changes to just "ktools") to avoid any errors. Also be sure you've downloaded the Microsoft Redistributable Package linked on KTools' download page to avoid errors as well. 2. Now you'll need TEXTool, which comes with Handsome Matt's set of tools. With this, you can extract the .tex files themselves in their "raw" state, just in case KTools doesn't extract the sprites correctly and you have to take the sprites from the texture atlas itself (more on that later). 3. Time to look for the sprites/animations you want to extract from the game. This works for both Don't Starve and Don't Starve Together, so it will work the same for whichever one you need. In this example, we'll want to go to [disk drive that has your Steam folder in it]\Steam\steamapps\common\Don't Starve Together\data\anim. So in my case, it would be D:\Games\Steam\steamapps\common\Don't Starve Together\data\anim, though it may be under C:\Program Files\Steam\steamapps\common\Don't Starve Together\data\anim for most people. 4. So, say you want to extract Wolfgang's sprites/animations. You would go to Wolfgang's .zip file (simply called wolfgang) located under the "anim" folder we just navigated to. Open that or extract the contents using whatever archive-opening program you have (I have WinRAR for example), You'll notice that it contains an "atlas-0.tex" and a "build.bin" file. Extract these directly into your ktools folder. ...But the .zip file doesn't have an "anim.bin" file! We need that in order for Krane to be able to extract the sprites and animations for us, so what do we do? Well, I discovered a solution to this through trial and error. 5. Now, we'll go to the player_idles.zip file, extract the anim.bin from that and place it, again, directly into the ktools folder along with your atlas-0.tex and build.bin files we just extracted from Wolfgang's archive. 6. Next thing we want to do will ensure that we can actually use Krane in the first place, because, as some of us know, trying to run it through command prompt simply doesn't work. So, we'll want to open our text editor (I use Notepad++, but plain old Notepad should work just fine) and create a new file. It can be named whatever you want (I named mine "slurtle" because I started testing this with Slurtle's files), but make sure that this exact code is pasted into the very first line of the text file: krane anim.bin build.bin output_dir And that's it! All we have to do now is save that text file as a .bat file in the ktools folder, again. This is a Windows Batch File which will run Krane as if it were an executable file. What that means is, we can simply double-click this .bat file and it will run Krane without having to go through command prompt! How exciting! 7. Now that all that's done, our folder structure should look exactly like this: ...with "slurtle" being our .bat file. Now, double-click on your new .bat file, and watch the magic happen! Look! It's not closing immediately like it would if you had simply tried opening Krane itself. Now, look what happened... 8. That "output_dir" folder has all our newly extracted assets in it! Let's look inside... Hooray! If you made it to this point, you should now have your sprites in proper animation order! 9. ...But hold up. We looked in Wolfgang's "torso" and "torso_pelvis" folders, and something's not right here... They look kinda blurry and stretched, don't they? And they're the only sprites like that! Why did that happen? Well, to tell you the truth, I don't know why this happens. It just does with certain assets, even for entities that DO have all three matching anim, atlas, and build files. How do we fix it then? Well, I don't know of a "proper" fix yet, but I do know a workaround. It will involve TEXTool that I had you download earlier. 10. Go to where you downloaded and saved your folder for Handsome Matt's tools. You should see TEXTool and TEXCreator in there. TEXTool is what we want. Now, once you open TEXTool, click the little folder icon to browse to where you saved your atlas-0.tex file. We will load this into TEXTool. So, once we load Wolfgang's .tex file, it will look like this: It looks like a total nightmare, doesn't it? Well, this is how the game stores its graphical assets. Good thing Krane automatically cuts these sprites out for us. So, we won't actually be doing much here aside from clicking the little floppy disk icon to save this texture atlas to wherever we want, as a .png file. Now comes the slightly tedious part. 11. Now, if you don't already have one, acquire that image editing program I mentioned. I personally recommend Paint.NET as it is free, supports transparency, and it suits all our purposes here just fine. Just please make sure you don't use MS Paint. So, let's open our new atlas-0.png file in our image editing program. As you can see, the atlas is quite a large image. This is all the sprites for Wolfgang at their proper resolution. Now, here comes the tedious part (though it's not that hard): If using Paint.NET, you'll first want to click the paint bucket tool. Why? It'll just make our lives a bit easier when we go to pick the sprites we need out of the atlas. We aren't keeping this atlas anyway (unless you intend to change the actual sprites and put them back into the game, but that's not what this guide is for). Now, pick a gaudy color that sticks out from the sprites but won't burn your eyes. We'll pick a nice shade of pink for this. Now, the left and right arrows point to the paint bucket tool and color palettes, obviously. But what's this middle part? That would be the Flood Mode, Fill Type, Tolerance, and Anti-Aliasing toggle. What does all this mean? I'll tell you! First, make sure Flood Mode looks like an empty lightbulb as I have it (aka don't set it to "global"). "Fill" basically just changes the pattern you want to use for the paint bucket tool. So if you want it to only fill a grid pattern with our chosen pink, change that option. But for this purpose, keep it on Solid Color. Next, make sure Tolerance is all the way down at 0%. This is very important, because if it's at any number above that, it could mess up our sprites. Sampling isn't important and is difficult to explain, so for now let's just keep it on Layer. This next one is also very important. Right after the Sampling setting, make sure the little "connect the dots" icon is jagged like I have it in the screenshot, not curvy and smooth. This basically means, if you hover over it and it says that the paint bucket is set to "anti-aliasing enabled", then the pink color will blend into our sprites, and we do not want that. Now, having all our settings the way we want them,, let's actually do it. Select the paint bucket tool with our color chosen and click in any space that has the white and gray checkerboard pattern. This is the image's transparency. It's what lets the sprites "hover" over other sprites and be see-through, without any background or color behind them. Let's see what happens when we do this: Now, if you can still see little transparent "junk pixels" around the sprites, then you did it correctly. Alright, now here actually comes the tedious part. Use your select tool (click the little rectangle icon in the top left, or press the S key once) and carefully click and drag the selection rectangle around the sprite we want. In this case, we'll start with this torso sprite here as it is the first sprite frame in the "torso" folder (be sure to zoom in with ctrl + scroll up on the mouse wheel to make this easier): Now, press shift + s (or click the magic wand tool in your tool box on the left). Then, press alt + left click anywhere on the pink background to "snap" the selection to the exact boundaries of the sprite, like so: Now, press ctrl + X to cut the sprite out of the image. Then press ctrl + alt + V to paste this sprite as a new image. Like this: Save this sprite as a new image with ctrl + S. It will ask you where to save this sprite. You can either save it in another folder or you can overwrite the blurry export. Compare the difference between the sprites: The bottom one from the atlas is the correct version of the sprite. Now you have to do this same process for the rest of the sprites that came out wrong (in Wolfgang's case, only the torso and pelvis came out wrong), using the blurry exports as reference for the animation order. Always be sure to check the exported sprites closely and, if they look off, compare them with those from the texture atlas itself to make sure they are at the correct resolution. 12. Congratulations! You now know how to export sprites in their correct animation order and, in some cases, fix the sprites that don't come out as they should and use them for whatever you want! Now, bear in mind that this probably won't work if you're trying to edit the sprites and re-insert them back into the game. However, there's a guide on that here. I hope this helped! This is my first guide so I apologize that it's so long and wordy when it probably doesn't need to be. I just wanted to make sure I covered all the bases and didn't under-explain anything. If you encounter any problems or find anything I missed, please let me know and I will try to help as best I can! ~Garamonde EDIT: Sorry about these last two images at the bottom of the post. I can't seem to remove them. They can be safely ignored though. EDIT 2: If anyone has problems getting Krane to run, despite following this guide, try checking out this thread.
-
Basically, it's a batch file (a .bat) that runs Krane, renames the folder created with the name of the spritter project and deletes the files used in the extraction. All created folders are inside the "Output" folder. The only thing you have to do is place the 3 necessary files in the main folder and run the "Extract" file. I hope it helps! Only compatible with Windows. Here the file for download, with Krane, ready to use: Ktools - Krane.zip Don't know what Krane is? Check this topic:
-
So I wanted to turn the DS animations into GIF files I could use in my sh*t posts, and Lordgumby from DS Discord taught me how to do it. The process isn't exactly easy, but once you get the batch file done the rest is more or less a cakewalk. Thought it'd be useful for those who want their own transparent DS gif or more beginner modders who don't know how to extract animation using the Spriter. Brashmonkey's Spriter: https://brashmonkey.com/download-spriter-pro/ Ktools by Simplex(bless his/her soul):
-
Hello all, I'm trying to make a new kind of bush that's basically exactly the same as the berry bush ("berrybush" prefab) only with something other than berries on it. I have the images, Spriter shows the animations work, but in the game itself there is a problem with picking the "berries" off the bush - both before and after picking it, it still shows the same amount of "berries" on it. From looking at the code I saw that there is a setberries() function which determines the amount of berries shown. To do that it shows/hides animations called "berries", "berriesmore" and "berriesmost": local function setberries(inst, pct) if inst._setberriesonanimover then inst._setberriesonanimover = nil inst:RemoveEventCallback("animover", setberries) end local berries = (pct == nil and "") or (pct >= .9 and "berriesmost") or (pct >= .33 and "berriesmore") or "berries" for i, v in ipairs({ "berries", "berriesmore", "berriesmost" }) do if v == berries then inst.AnimState:Show(v) else inst.AnimState:Hide(v) end end end And it seems that the problem is that my animation data doesn't have these three animations. I used Krane to extract the Spriter project from the game files, and the project contains all the animations except those three, it seems. Opening the original bush's anim.bin file in a hex editor shows that these three terms are present in it (at the end of the file), but after extracting it, searching the contents of the extracted files for them yields nothing in any file. I've tried adding these three animations to the project with what I think they should contain, but it made little difference, and what it did do made no sense to me. Can someone please help me understand what's going on here, or at least how I can go about making my own somethingbush? Thanks in advance.
- 1 reply
-
- krane
- animations
-
(and 1 more)
Tagged with:
-
Hi. Is it possible to decompile any .zip file containing only anim.bin or atlas-0.tex with build.bin ?
-
I dedicated today a whole day for making a mod where it changes the texture of woodie's werebeaver to Norbit from angry beavers; I tried placing under mod/anim/werebeaver_build, but the game keeps on having a error less crash. I downloaded krane tools and the program does not work, as soon as I launch it, it closes. I think it is crashing because the textures are not in the correspondant spots inside the actual texture so how I get the scml file? or anything to make werebeaver able to get retextured.
- 2 replies
-
- werebeaver
- texture
-
(and 2 more)
Tagged with:
-
Is there any way to ignore/bypass the "ERROR: Duplicate anim x in bank x"? I'm using ktools 4.4.4 and that problem is present in a lot of anims. I looked around and it looks like older versions didn't have that problem, but I can no longer find those.
-
I'm using Krane from Ktools to decompile some anims I'll need for a mod of mine, I managed to decompile lavae_egg, lavae_egg_tooth, lavae_move_fx and lavae_vomit but the normal lavae doesn't want to decompile! This is the error message that cmd shows: Anyone knows what's the problem and/or what I'm doing wrong?
-
- Lavae
- decompiling
-
(and 2 more)
Tagged with: