Jump to content

Custom Hat, Armor & Handslot Item Templates


PanAzej
 Share

Recommended Posts

Hi!

There are no good item templates that I know of, so I made a few for hat, armor and handslot item.

 

You will need Don't Starve Mod Tools on Steam to compile your artwork and a text editor (preferably Notepad++) to edit the code.

Basically all the stuff that you already know if you ever attempted to make a custom character.

 

If you have any questions that my comments in the code do not cover, do let me know.

 

Download below, or workshop link:

https://steamcommunity.com/sharedfiles/filedetails/?id=2536268729

 

custom_hat.thumb.png.55e9fd76aa46586154392ebb88a41993.png

custom_handitem.thumb.png.ff96926dac8f5de849a52ca9b3ed7a73.pngcustom_armor.thumb.png.2a8901410140fa16e23050c27ddfe66e.png20210704004350_1.thumb.jpg.f90b91080ed472db42acb3d8d00db155.jpg20210704004717_1.thumb.jpg.979e8ec83ad5493fc2639b273532ea74.jpg20210704004925_1.thumb.jpg.fc3d176c6826806db4c860603e40f285.jpg

Enjoy.

custom_item_templates.zip

Edited by PanAzej
workshop link
  • Like 3
  • Thanks 6
  • Health 2
  • Big Ups 2
  • Potato Cup 2
Link to comment
Share on other sites

This template is great thank you sm for posting! It was a real life saver!

I just wanted to mention for anyone who wanted their body item to have the sprite when facing upwards and minding a rock and jumping in the air, you should add it to the image swap_body_11. For me I had to have it upright instead of sideways like the ESC template, and moved the pivot point down just below the image and slightly off center. 

bf11941100197744e684d0d4f7d79bfe.png

[You can add the image to the canvas, edit the pivot, right click to replace the point, and then you can deleted it off the canvas and it'll still have the pivot edited]

Link to comment
Share on other sites

I hope that we can get a video done on how to do these things. I'm looking through the coding right now, and as a beginner, it's still so far above my head. I don't know what does what. 
I have managed to make my character's sprite based off a video tutorial. I now want to give her a bat as a weapon, but I don't know how to code that still.
Basically
-I am completely new to reading lua files
-How do I link the character and handheld item together to where it's inside a character's mod?
-How do I make it a weapon?
-How do I edit the damage?
-How am I supposed to give its own crafting recipe? (I imagine it would appear in the war tab like Wigfrid's)

I don't want to grab outdated code or grab snippets that I have no idea what the function of it is.
I feel like this is a step in the right direction, but I'm still pretty lost on how to go any further than skinning characters only.

Link to comment
Share on other sites

--I was able to open the files and code to tinker with the handslot item.
--I removed the armor and hat completely from being referenced in mine since I'm only interested in crafting a weapon
--I am struggling with the xml and tex files being generated as well as the zip files
--I don't know which zip files to keep or which ones to delete. I know if I delete them, all of them don't get zipped again, but it also does not overwrite them for me.
--I got as far as being able to craft the weapon and have it show up in my inventory, but when my character holds the hand-slot weapon, it doesn't show up. I have images wherever there needs to be one, but I don't know if it's an xml and tex issue or a zip issue. Please help.

dst_not_showing_item.png

Edited by Moracalle
I wanted to include the image that shows pretty much what I'm talking about.
Link to comment
Share on other sites

On 7/3/2021 at 11:58 PM, PanAzej said:

Hi!

There are no good item templates that I know of, so I made a few for hat, armor and handslot item.

 

You will need Don't Starve Mod Tools on Steam to compile your artwork and a text editor (preferably Notepad++) to edit the code.

Basically all the stuff that you already know if you ever attempted to make a custom character.

 

If you have any questions that my comments in the code do not cover, do let me know.

 

Download below, or workshop link:

https://steamcommunity.com/sharedfiles/filedetails/?id=2536268729

 

custom_hat.thumb.png.55e9fd76aa46586154392ebb88a41993.png

custom_handitem.thumb.png.ff96926dac8f5de849a52ca9b3ed7a73.pngcustom_armor.thumb.png.2a8901410140fa16e23050c27ddfe66e.png20210704004350_1.thumb.jpg.f90b91080ed472db42acb3d8d00db155.jpg20210704004717_1.thumb.jpg.979e8ec83ad5493fc2639b273532ea74.jpg20210704004925_1.thumb.jpg.fc3d176c6826806db4c860603e40f285.jpg

Enjoy.

custom_item_templates.zip 2.9 MB · 155 downloads

wow, your art is really professional. THERE CAN BE ONLY ONE!!!!

Link to comment
Share on other sites

Thank you for these templates.

I have one question: I'm looking at the image files in the exported folder. I'm not sure what to do with the folder called wilson. I suspect maybe it only exists to show Wilson in Spriter to help with scale/location of the mod item images. Should I remove the wilson folder before compiling? If I don't, what keeps an extra Wilson from being attached to my item at all times?

I'm making my first mod and I'm just trying to understand the relationship between the various image files.

Link to comment
Share on other sites

The Wilson is indeed there only to show how the item will look while held.  The Wilson won't show up in game since the game will only show the "symbols", or images that you tell it to in lines like inside the item's OnEquip() function.

owner.AnimState:OverrideSymbol("swap_object", "swap_spear", "swap_spear")

The Wilson IS technically there, although it's invisible and would never be enabled or even detectable under normal circumstances.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

On 9/29/2022 at 1:16 AM, TheSkylarr said:

The Wilson is indeed there only to show how the item will look while held.  The Wilson won't show up in game since the game will only show the "symbols", or images that you tell it to in lines like inside the item's OnEquip() function.

owner.AnimState:OverrideSymbol("swap_object", "swap_spear", "swap_spear")

The Wilson IS technically there, although it's invisible and would never be enabled or even detectable under normal circumstances.

Understood. Thanks for explaining how that works for me.

Link to comment
Share on other sites

I finally got it to work. Apparently somewhere along the process of editing or downloading the mod I created a copy of it. I think the game was loading the original while I was editing the copy. But I renamed the mod in the modinfo.lua of the copied version and when I checked the mods the copy showed up, but it wasn't being applied. So I unapplied the original version and applied the version that I renamed and the edits showed up.

Point is, It works now.

Link to comment
Share on other sites

On 7/3/2021 at 5:58 PM, PanAzej said:

Hi!

There are no good item templates that I know of, so I made a few for hat, armor and handslot item.

 

You will need Don't Starve Mod Tools on Steam to compile your artwork and a text editor (preferably Notepad++) to edit the code.

Basically all the stuff that you already know if you ever attempted to make a custom character.

 

If you have any questions that my comments in the code do not cover, do let me know.

 

Download below, or workshop link:

https://steamcommunity.com/sharedfiles/filedetails/?id=2536268729

 

custom_hat.thumb.png.55e9fd76aa46586154392ebb88a41993.png

custom_handitem.thumb.png.ff96926dac8f5de849a52ca9b3ed7a73.pngcustom_armor.thumb.png.2a8901410140fa16e23050c27ddfe66e.png20210704004350_1.thumb.jpg.f90b91080ed472db42acb3d8d00db155.jpg20210704004717_1.thumb.jpg.979e8ec83ad5493fc2639b273532ea74.jpg20210704004925_1.thumb.jpg.fc3d176c6826806db4c860603e40f285.jpg

Enjoy.

custom_item_templates.zip 2.9 MB · 383 downloads

Hice mi propio personaje mod, y gracias a esto ya tiene arma, armadura y casco :D muchas graciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiias :3

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