Sign in to follow this  
Malacath

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

Recommended Posts

Wildin    2

@RedRock911 : Thanks so much, I hope I get to help people to later down the line! I really appreciate you taking the time :)

@Corrosive : oh wow, that's a boogey of screw up xD As for the spelling 'error' I'm actually well aware of that ;) Thanks for taking the time to help me out :]

  • Like 1

Share this post


Link to post
Share on other sites
Wildin    2

Okay guys, super stumped. the mod is working. However, I cannot get my swap_item to display correctly. 

Instead of my image, it is still showing the wand and with the unset pivot point. The game seems to be ignoring my files. The image it is displaying doesn't even exist in the mod folder...

What happened? 

Really appreciate the help guys and gals.

 

shepard.zip

Share this post


Link to post
Share on other sites
RedRock911    36

I did xD On Shepard the shepherd cane. Instead the wand image is still mysteriously coming up from the example.

Remember to save the project in spriter, or it will just put the previous image back in.

Edited by RedRock911

Share this post


Link to post
Share on other sites
Kzisor    1060

@Wildin, here is the working version. The reason why you can't compile is the compiler is throwing an error out before it gets to your file. I've talked to PeterA about it and he said it's on his list to fix; we just need to be patient now.

 

For now if you run into these problems again, please delete all mods in both mod folders (Don't Starve and Don't Starve Together) except for your mod and relaunch Don't Starve or Don't Starve Together. Both versions of the game will compile both version mods.

 

Edited by Kzisor

Share this post


Link to post
Share on other sites
TheOoKiller    0

I'm a little confused...

 

Is It : exported ->myitem -> ground_myitem , myitem.scml , swap_myitem and swap_my item.scml 

all in the SAME FILE right?? or do we need to SEPERATE it? 

 

HELP PLZ THANKS

 

Share this post


Link to post
Share on other sites
TheJumbaco    0
HELP PLZ THANKS
 The way I did it is that you should have

 

myitem and swap_myitem right after exported;

 

in the myitem folder the myitem.scml, a modified .zip file, and a second folder named myitem with a picture of the ground animation

 

in the swap_myitem folder, pretty similarly: a swap_myitem.scml with a mofidied .zip file, and a second folder named myitem with the swap animation. 

Share this post


Link to post
Share on other sites
TheJumbaco    0

Now can anybody tell/help me with the layout for the actual animations? I've been browsing around the actual files of the original game, and I need my item to actually have function animations. From the .tex files I can see there are 5 different angles of an item (ie swap_axe.zip), but there isn't a tutorial on that on Klei yet. Anybody know the layout of that so I can autocompile it into a working swap anim zip file? 

Share this post


Link to post
Share on other sites
Corrosive    162

@TheOoKiller,

.....what?

 

@TheJumbaco,

 

Animations have been discussed at length by me and a host of other people on the forums.  I mean.... You're in the thread of a tutorial that explains how to create a swap item and you're asking how to create a swap item.  I'm not entirely sure what you mean by layout though.

 

In any case, Klei uses Flash to create their animations, but the autocompiler works with spriter files, so your process will be different than Klei's.  (Klei wasn't feeling generous enough to spend a couple hundred bucks on every customer to buy them their own copy of Flash ;))

 

The folder that contains your .scml file is the "root" of that animation.  Any subfolder is considered by the autocompiler to be a "Symbol."  swap_object is actually a symbol that is a part of most player animations.  It is just empty by default.  When you use SymbolOverride(), you are swapping in your own build(i.e. sprite) into the swap_object symbol/layer of the animation.

 

The axe animation specifically resides in anim/player_actions_axe.zip.  In it, the swap_object (in addition to the other player character layers) is animated appropriately so that when the swap_axe build is loaded, it all falls into place.  Here is what the swap_axe build looks like decompiled:

 

BILD6
root swap_axe
texture_filename atlas-0.tex
texture_width 256
texture_height 256
symbol{
symbol_name swap_axe
simple_frame{
ndx 0
duration 2
x 43.500500
y -61.924500
w 128.000000
h 200.000000
tex_x 187
tex_y 64
tex_w 43
tex_h 67
}
simple_frame{
ndx 2
duration 1
x 4.500500
y -72.999496
w 76.000000
h 208.000000
tex_x 230
tex_y 64
tex_w 25
tex_h 70
}
simple_frame{
ndx 3
duration 1
x -0.999500
y -18.374500
w 420.000000
h 260.000000
tex_x 0
tex_y 0
tex_w 140
tex_h 87
}
simple_frame{
ndx 5
duration 1
x 28.500500
y -79.999496
w 104.000000
h 232.000000
tex_x 140
tex_y 68
tex_w 35
tex_h 78
}
simple_frame{
ndx 6
duration 1
x 37.875500
y -66.099503
w 140.000000
h 204.000000
tex_x 140
tex_y 0
tex_w 47
tex_h 68
}
simple_frame{
ndx 7
duration 1
x 37.375500
y -60.649502
w 136.000000
h 192.000000
tex_x 187
tex_y 0
tex_w 45
tex_h 64
}
}

Share this post


Link to post
Share on other sites

Hello! I had some problems creating this mod but figured it all out, it was mostly spelling mistakes in the code. Anyhow the only problem I've got now is the fact that my item is invisible while equipped. Yes I've seen the other comments about this and I've tried it out for myself but I can't get it to work, does anyone know what else might be responsible for my invisible handslot item?

Edited by ButteredBehind

Share this post


Link to post
Share on other sites
MrKowa    0

I tried to create a weapon mod (very powerful katana to be exact) but everytime i get "cant find the prefab" when trying to spawn item ingame. I followed read this tutorial, other about character/item and looked into other mod files but can't get into work.

 

http://www.mediafire.com/download/o5vl3yklrehec2z/katana.rar ( i can't put attachment yet)

 

And hello, since it's my first post here.

Share this post


Link to post
Share on other sites
Corrosive    162

@MrKowa,

 

Katana.lua should be lowercase( katana.lua )

 

The next problem you are going to run into is that in your ground_katana scml, you need to name the entity "katana" and the animation "idle"

Share this post


Link to post
Share on other sites
MrKowa    0

@MrKowa,

 

Katana.lua should be lowercase( katana.lua )

 

The next problem you are going to run into is that in your ground_katana scml, you need to name the entity "katana" and the animation "idle"

Changed that but still no change ingame. Tried to use mod Too many items but katana wont show as spawnable item.

 

And mod shows at list as crashed every time i open game (since my first try ingame).

Share this post


Link to post
Share on other sites
Corrosive    162

@MrKowa,

 

Whenever something doesn't work, make sure you check the log.

 

Log.txt (Steam and Standalone)

In order to find your game's log.txt file:

PC: Go to your documents folder at Documents\klei\donotstarve\log.txt 

Mac: Go to your documents folder at ~/Documents/Klei/DoNotStarve/log.txt

Linux: Go to your Klei folder at ~/.klei/DoNotStarve/log.txt

 

You need to add:

forumthread = ""

to your modinfo.lua.

 

Additionally, the API version of the game needs to be 6, not 10 in your modinfo.lua.

 

There are a few more errors, but I'll let you figure those out ;)

Share this post


Link to post
Share on other sites
MrKowa    0

@Corrosive

 

No matter what i do, game can't find prefab (tried spawning ingame)

 

Did some changes you suggested, looked into game files but nothing :/

Share this post


Link to post
Share on other sites
Mobbstar    14063

@Corrosive

 

No matter what i do, game can't find prefab (tried spawning ingame)

 

Did some changes you suggested, looked into game files but nothing :/

 

You're doing this for DST? Head to the DST mod forums!

Else, check your log for the exact error.

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