Sign in to follow this  
bobmittens

I need a tutorial on how to create a custom item.

Recommended Posts

bobmittens    12

I have been attempting to use this tutorial by Dana Adams but its nearly 5 years old and very difficult to follow if you are using more updated tutorials for character making like this one by dleowolf. Does anyone know of a more straight forward or updated tutorial?

Share this post


Link to post
Share on other sites
Soulk    144

you can also join the discord server, let me see if i find it and edit the post for it, there is a lot of coders and ppl that could help you or point you in the rigth direction, there is also written info there

Share this post


Link to post
Share on other sites
bobmittens    12

Lumina posted this in the other thread i made that the moderators closed because I forgot there was a mod's section of the forums. oops

"I don't know more updated tutorial. But you can try to explain what is wrong and people will try to help you.

What kind of item do you want to create ? Weapon ? Simple item ? Something else ?"

I am attempting to make a straw/fuzzy roll type item, essentially something you sleep on. 

Edited by bobmittens

Share this post


Link to post
Share on other sites
Lumina    2153

Ok.

First, i would suggest to make your custom roll item using the existing animation, and making your custom code. When the code will work fine, then move to make custom anim (or resking of existing anim). Of course, this way to do will work only if your item is close enough of the existing rolls, not totally different.

This will probably be easy to test, and you could ask help for the different steps.

Share this post


Link to post
Share on other sites
bobmittens    12
2 hours ago, Lumina said:

Ok.

First, i would suggest to make your custom roll item using the existing animation, and making your custom code. When the code will work fine, then move to make custom anim (or resking of existing anim). Of course, this way to do will work only if your item is close enough of the existing rolls, not totally different.

This will probably be easy to test, and you could ask help for the different steps.

For now i just simply want to make the item work as a straw roll with infinite uses.  I have attempted to edit the straw_roll.lua for my mod (renaming all instances of straw and straw_roll to my item name) and it didn't crash my game. But I also couldn't spawn the item in... For now i'm just using the straw roll art assets and such but i'm not 100% sure where they should go in the item file.  

Share this post


Link to post
Share on other sites
Lumina    2153

Did you add the item to the prefab list in modmain ?

Should be something like this :

        PrefabFiles = 
        {

			"mystrawroll",
		}

 

Share this post


Link to post
Share on other sites
bobmittens    12
10 hours ago, Lumina said:

Did you add the item to the prefab list in modmain ?

Should be something like this :


        PrefabFiles = 
        {

			"mystrawroll",
		}

 

I had something similar but the post that i was using as a tutorial might have had it formatted wrong.

edit* I put this code in my modmain but to no avail. I have a feeling the issue either lies in my file pathing, (I don't know how much don't starve needs to rely on file paths) or the actual mod item's lua code isn't working because of what i put in (probably the issue.) 

Edited by bobmittens

Share this post


Link to post
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
Sign in to follow this