Jump to content

Help - Creating wearable items


Recommended Posts

I want to add a custom hat and shirt item for my character, but I can't find any sort of template for sprites to be used with the auto-compiler, and I wouldn't really know where to begin making and animating these from scratch. Are there any resources available like that? I saw the hand-equippable guide but it doesn't seem to be quite what I'm after.

Link to comment
Share on other sites

These work the same way but require different sprites.

Use krane to decompile stuffs like the miner hat and the grass armor. These should contains the sprites you need to produce as well as the name you need to give them.

I did it myself a while ago. You can find here the decompiled wood armor

https://www.dropbox.com/sh/0lcioz6tgulxk0k/AAA5W67qpbLy4G90dIU03c6Ga?dl=0

sprites 9 to 12 are missing, and I am unsure what they are used for. My advise would be to use empty sprites for these until you figure out what it is and see it it causes an issue. They might be for the straps of the backpacks.

I do not have the miner hat decompiled anymore unfortunately but I can do it for you if you have issues using krane.

EDIT: I decompiled the miner hat so I'll have it if I ever need it

https://www.dropbox.com/sh/hqimqwfuukrih7y/AAAT1N1Up8ZrVxsFBYNeUxr2a?dl=0

EDIT2: the sprites swap_body-09.png and swap_body-10.png are present for the backpack but still no trace of 11 and 12

EDIT3: I decompiled some amulet to check if it was in there. It's not, but amulet have sprites numbered 14 and 15...

Edited by ZupaleX
Link to comment
Share on other sites

Would it be possible for you to decompile the rain coat? I'm having a bit of trouble interpreting some of the textures for the log suit and having something with a more clearly defined front and back would be really helpful

Link to comment
Share on other sites

I had a few questions regarding how temperature works in the game. Would wearing something that insulates you from cold, such as  the Puffy Vest, cause you to overheat faster in higher temperatures, and would wearing something that protects you from heat, such as the Floral shirt, cause you to freeze faster in colder temperatures?

Additionally, would having both types of insulation on a custom item cancel each other out, or would they work in applicable temperatures?

Link to comment
Share on other sites

As far as i know you can't have both at the same time. Maybe you can have a condition or a test to have both on the same item but not working on the same time ? Like testing the season or something ?

Link to comment
Share on other sites

I decided to simply keep one type of insulation, in retrospect it didn't make sense to have both.

Also, ZulapeX, would it be possible for you to export a different hat for me with krane, such as the winter hat? I don't really know how to work around having two different states.

Link to comment
Share on other sites

It's actually pretty easy to use krane:

Download the latest version in case you have an outdated one.

Then just extract the .zip of the item you want to decompile.

Go to the directory where you extracted the build.bin and anim.bin and open a windows powershell in admin mode (or command prompt in admin mode).

Copy the path to krane.exe and paste it in the console. Then complete with what you can see on this screenshot

skwXqofCTs2qBrC74hHtQA.png

And voilà.

 

 

Link to comment
Share on other sites

It's the same. All the items need a swap_ anim for when they are worn and one for when they are on the ground. The same way that you made 2 files when making an equippable hand item, you had one file for the swap and one for the ground item.

Link to comment
Share on other sites

Well techincally you don't NEED 2 files. You can put the ground anim in the swap but you have to be extra careful when you give names and structure your folder.

It's safer to just make 2 files, less risk to mess things up.

Link to comment
Share on other sites

The equipped versions are not showing? The ground are not showing? None are showing?

 

EDIT: I downloaded your file and glanced at it quickly. The ground animation could not show because you do PlayAnimation("idle") which does not exist. The anim you put inside your whoopcap.scml is called "anim".

Edited by ZupaleX
Link to comment
Share on other sites

The equipped version shows, but the ground version doesn't.

For reference, the equipped versions lack the swap_ prefix, but the ground versions have it.

When my friend removed the swap_ prefix, the ground versions showed up, but the equipped versions disappeared. I'm guessing it's just not calling for the swap files, but I don't know why that is.

Link to comment
Share on other sites

I am not sure what you are talking about.

I see only one whoopcap folder which contains only 1 scml called whoopcap and a subfolder swap_hat with the png.

So If you open the zip file you have build.xml and anim.xml

It tell you your build is called "whoopcap" and the symbol is "swap_hat"

Then the scml you can see you named your bank "whoopcap" and the available anims inside this bank are

"anim"

and that's it.

So calling in the OnEquip function

owner.AnimState:OverrideSymbol("swap_hat", "whoopcap", "swap_hat")

should work as intended. You want to override the symbol "swap_hat" (first argument) with something in the build "whoopcap" (second argument) using the symbol "swap_hat" from that build.

Now for the ground you set your build and bank properly but then ask to PlayAnimation("idle") which does not exists.

Try to just replace that with PlayAnimation("anim").

 

I think for clarity sake I would have made separate files for the ground and worn versions but you should be able to get it to work like that as well (if the autocompiler is designed to work when you do it in such a way).

 

It indeed works

RyCHH7sOSvGUvZtWooG5Lg.png

Edited by ZupaleX
Link to comment
Share on other sites

Did you download the more recent version? I do have separate files for the ground and equip versions, the former being labeled ground_whoop(item) and the latter being labeled simply whoop(item). Here's a fresh package of it in  case I somehow messed up the attachment before.

Whoopee.rar

Link to comment
Share on other sites

I just have one more question, not related to the clothing items. I'd like to make it so that Whoopee doesn't get as much benefit from his own food items, while everyone else gets the standard ones. How would I go about making a separate set of stats for an individual character?

Link to comment
Share on other sites

Naively I would override Whoopie's eater component to check the food he's getting. If he gets food with a specific tag that you can add to all his won food item, you can divide the bonus he gets from it.

Link to comment
Share on other sites

If you have SW in classic DS you could maybe look at Warly to see how it works. It's a little different since he has a list of food, but i guess you could check the function about bonuses of the food. Or maybe search a warly mod on workshop.

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