Jump to content

[Template/Tutorial] Custom crafting tab and items


Yakuzashi
 Share

Feedback  

59 members have voted

  1. 1. Do you find it useful?

    • Yes
      42
    • No
      10
    • I am not sure
      7


Recommended Posts

Hello everyone. I know there are some tutorials that cover this topic, but in my opinion it might seem to be too hard to follow by fresh members of this amazing forum. In fact I have learnt a lot from those ancient manuscripts, so don't get me wrong. I will try to explain you how to create custom crafting tab and custom items (on head, body, hand slots).

Template is ready to download in attachment section. I think you will spot differences between original ESCTemplate and my version with items, so it's self explanatory. I have described some stuff inside .lua files, but if something will cause you trouble just let me know in the comments and I will explain it further.

I have used already existing armor and hat graphisc, because I am too lazy, but you can do whatever you want. In order to decompile anim from game you can use ktools:

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

and if you don't understand it yet, check this out:

[TUTORIAL] How to use Krane from Ktools

Sources
Work of the Old Masters
--------------------------------

[Tutorial] Using Extended Sample Character Template

[Tutorial] Creating a "handslot-equippable-item" from scratch

Hat Example 1.0

 

I hope you will find it useful my dear Newcomers.

 

Of course I forgot to attach template.

There you go.

Custom items and item tab [tutorial].rar

UPDATED VERSION - Custom items and item tab [template] - updated 21.04.2021.rar

Quote

Help me! My item is invisible in game!

What to do if your game doesn't crash but your custom item is invisible?
1. Make sure that you placed location of .zip file (inside of anim folder) under local assets={} function.

Quote

ex.    Asset("ANIM", "anim/name.zip"),


2. Make sure that you saved Spriter project (.scml) as [name_of_your_custom_item].scml and marked .scml file format.

124.png.6f880662121f44f826b5ccdc01ca73f6.png

Edited by Yakuzashi
Bottom of the tutorial + volume reduction
  • Like 2
  • Thanks 4
Link to comment
Share on other sites

On 2020-02-21 at 4:10 PM, Pinkamena11FazP said:

I do have it but it just refuses to load up

Try using the full path in your commands. For me krane won’t work otherwise even though it’s in my env variables.

Thinking about it now, might help if you move krane higher (closer to first) in your path variables. Referencing it as ‘krane’ might be resolving okay, but you may be getting a dependency (also from path) that windows thinks is identical but isn’t.

Maybe getting the one packaged with krane is why only the direct fullpath method works (assuming it does for you). Let me know what you find out, good luck 

Edited by ry3bread
Typo
Link to comment
Share on other sites

On 2020-03-11 at 2:01 PM, Pinkamena11FazP said:

Is it the location like C:/(name)/ktools/ktools ?

 

Yep wherever you unzipped it to! For me it’s C:/ktools/krane.exe. Depends on whether you ended up with a redundant directory when you unzipped. Whatever the path up to and including krane.exe is.

 

For example my commands look like:

“C:/ktools/krane.exe” anim.bin build.bin .

Notice the period at the end, that’s because I like to cd to the unzipped asset folder before running the command, and the . is where you specify where the dump should go. Often, a dot means the folder where you’re executing the command. If you don’t go that route, you’ll have to type the full paths of the anim and build, and then likely again for the output parameter at the end, so I prefer that way. 

 

If you can verify for me that your krane works, I can send you an “easy krane” tool that I use personally. I think you’ll  like how simple it makes the process. 

Link to comment
Share on other sites

@Yakuzashi can you show me how i can convert an image (.PNG file) to .tex (with a .xml file).

I saw someone mentioned about a autocompiler, TEXTool but i can't find it (sorry).

I want to create a custom craft tab, i found a mod that add a new craft tab, and try to made one by copy that, but i need a image for Image\hud folder (a .xml and .tex file).

I found an image from the internet, don't know how to convert it to the 2 file mentioned above. Can you help me out!!!

eye-of-horus-udjat-right-eye-sun-eye.png

Link to comment
Share on other sites

TEX Creator converts .png into .tex. I always copy .xml file and rename it. As you can see I manually set the filename and element name. I think autocompiler does this stuff for you, but I prefer to be extra sure.
 

<Atlas><Texture filename="craftingtabicon.tex" /><Elements><Element name="craftingtabicon.tex" u1="0.00390625" u2="0.99609375" v1="0.00390625" v2="0.99609375" /></Elements></Atlas>

craftingtabicon.xmlcraftingtabicon.texcraftingtabicon.png.2973f947a782817622a5b973e8e3e1ae.png

If I remember correctly the 128x128 format works without any bugs.

 

My settings for TEX Creator:
https://s3.amazonaws.com/kleiforums/monthly_2020_11/settings.png.9c1a6ba7154503f61886e9f44fc154f5.png

and TEX Tools download link itself:
https://forums.kleientertainment.com/files/file/73-handsome-matts-tools/

Cheers!

Now, excuse me but sleeping pills hit me like a mad beefalo, so it's time for me.

 

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

Thank you very much !!!!

10 hours ago, Yakuzashi said:

copy .xml file and rename it

I though those number behind the u & v are difference for each .tex :D file, and the .xml file was created by the TexTool the same time you convert the .png file.

Again, thank you very much.

As a Copy-paster aka know next to nothing about moding, i can't believe i can pull this off :D new craft tab for my mod char was created and work as intend :D, super happy!!!

At first i didn't notice this:

10 hours ago, Yakuzashi said:

the 128x128 format

Then i checked and saw the original image was 178x178, but your file still work, image kinda bigger than other tab but just a little bit. then i try to scale it down to 128x128, and use Matt's Tex Tool 1.4.1 to convert it to .tex file and replaced the bigger one, unfortunately it's crashed the game, don't know why, so i switch back to your file and called it a day (it's already worked, no need to try hard :D).

P/s: oh, you already resized the image, my bad :D. then maybe there something difference between the resized images, down here is my resized image and yours, if you have time please enlighten me (i already noticed the difference in the color, mine is transparent, yours is black but they are still PNG file).

eye-of-horus-udjat-right-eye-sun-eye 2 128x128.png

craftingtabicon.png

P/s 2: after many try, and still crashed, i searched the forum and found out that the .tex file from TexCreator v1.4.1 is the reason, because when i tried to convert the same file with the TexCreator v1.3.1 it's worked fine.

Ok! now everything worked as it should! again, thank you very much. Sweet dream !!!

Edited by Psychomaniac
  • Like 1
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
 Share

×
×
  • Create New...