Jump to content

Hat AnimState, how is it made?


Somnei

Recommended Posts

@SophieTheDog, same thing as DeathDisciple says, without seeing the project we can't really do anything. That said I didn't experience the problem with the project you uploaded a few days ago. Are you sure you are not modyfing the smcl? You know that everytime you start the game the scml gets recompiled if it was changed since last time?

 

My autocompiler doesn't work, so it doesn't recompile it upon each launch. I have to manually compile it myself, using cmd and inputting the correct paths. Could that be an error? I mean, it's not like it's breaking my other mods, because it can't recompile anything haha

And yeah, it worked back then I think. Except for some animations not working. But then it broke and didn't display anything.

I'll upload it, any preferred download-sites?

Link to comment
Share on other sites

Does that really create a reference to the already existing object? I would suspect it only creates a copy of that object, which would still yield the same problem.

 

If you use copy paste on actual scene object in spriter between different frames, it adds key to the same timeline. The problem with duplicates is that you/they were dragging the file into other frames, which is causing duplicates as it turns into separate timeline. You can see I'm right if you try both approaches while looking at the timeline list at the bottom of spriter screen.

Link to comment
Share on other sites

My autocompiler doesn't work, so it doesn't recompile it upon each launch. I have to manually compile it myself, using cmd and inputting the correct paths. Could that be an error? I mean, it's not like it's breaking my other mods, because it can't recompile anything haha

And yeah, it worked back then I think. Except for some animations not working. But then it broke and didn't display anything.

I'll upload it, any preferred download-sites?

 

 

What's the problem with attaching a zip of it right here? You can always remove the uploaded files from your profile 'somewhere' (I'm too lazy to check)

Link to comment
Share on other sites

@DeathDisciple, @Malacath,  

here is the link: http://forums.kleientertainment.com/files/file/1048-spider-companion-animation-fail-sample/

 

I really hope this doesn't all come down to compiler errors.

 

Ok, I'm going to clean up duplicates and see if I can reproduce some of the issues, but I want to mention a few imminent things.

 

First, you're not renaming the animation (it's still called 'spider', as default ds one), just build. In theory, it should've overwritten base one, but it had led to some funny effects to me in the past - the most annoying being random CTDs to some people that I couldn't even reproduce. So I would suggest always renaming both if you're going to ship both. It is likely that is what caused it to 'stop working' for you at random.

 

Also, hats have 3 'sides' and by providing just 1 reference link you will always get just front - you likely already know that.

 

EDIT I'll just temp upload the whole thing.The only things I really changed is scml file and inst.AnimState:SetBank("spiderchan_build") (as I renamed the anim), but I'll provide the whole thing in case you need reference if autocompiler somehow fails on your side. I've also removed some hat positioning while clearing up, sorry about that but my chances of screwing over the scml file while manually editing raise exponentially with the amount of stuff I have to change, so I've decided to just keep the first coord. on all but first attack ones.

 

Custom_Mod_2.zip

 

Link to comment
Share on other sites

Ok, I'm going to clean up duplicates and see if I can reproduce some of the issues, but I want to mention a few imminent things.

 

First, you're not renaming the animation (it's still called 'spider', as default ds one), just build. In theory, it should've overwritten base one, but it had led to some funny effects to me in the past - the most annoying being random CTDs to some people that I couldn't even reproduce. So I would suggest always renaming both if you're going to ship both. It is likely that is what caused it to 'stop working' for you at random.

 

Also, hats have 3 'sides' and by providing just 1 reference link you will always get just front - you likely already know that.

 

EDIT I'll just temp upload the whole thing.The only things I really changed is scml file and inst.AnimState:SetBank("spiderchan_build") (as I renamed the anim), but I'll provide the whole thing in case you need reference if autocompiler somehow fails on your side. I've also removed some hat positioning while clearing up, sorry about that but my chances of screwing over the scml file while manually editing raise exponentially with the amount of stuff I have to change, so I've decided to just keep the first coord. on all but first attack ones.

 

attachicon.gifCustom_Mod_2.zip

 

Thank you! Really appreciate it, I'll take a look at it once I'm home <: <3

 

Edit: ...or in school. It looks good, totally working like it should. For future reference, where do I rename the animation which was set to "spider"? I thought I had renamed everything, but like I said before this is my first time attempting to edit anything in spriter.

I used the anim.bin from ds_spider or w/e it's called, is it there somewhere? Thanks!

Link to comment
Share on other sites

When you compile spriter animation, the filename (spiderchan_build.scml in your case) defines build name, but the 'entity name' in spriter defines bank name, as it's called in code. When you decompile assets the default names are exact same as original, so you had spider as entity name. That one would've been the same no matter which spider-compatible anim.bin you used. Now, since all the animations inside have same names as ones in anim.bin from DS itself, one can expect them to 'override' the defaults. But as you saw, it doesn't always work properly (or at all), besides, it's unlikely you wanted to override animations for all spiders either way (or so was my impression).

Link to comment
Share on other sites

@DeathDisciple, yeah, that wasn't my intention haha

Thank you for explaining it to me!

I see now, upon investigating my spriter project, what I did wrong.

I realize that I only have one hat reference, but how do I reference the other sides of the hat? I've looked through the prefab for hats, but I only see "swap_hat" being referenced there. Do I use other images for these animations, and in that case, what would they be named to be properly displayed in game? My guess would be "swap_hat_side" and "swap_hat_back" or something, but guesses usually don't cut it.

 

Edit: Also, how do you clear up the duplicates? Simply by renaming them all to the same name? What is the proper way of inputting it? Pasting to all frames?

Link to comment
Share on other sites

To reference other sides you first need to add 2 extra placeholders into swap_hat folder of your spriter project, it doesn't matter how you call them. Then you would either link them into the file section of the scml, or just drag them into your project and save it so spriter adds them. Second file you drag in will be used as side image, 3rd file as back image. The mapping is based on order in which they are listed in scml not names.

 

I cleared duplicates by manually editing scml file and removing extra timelines/references to them, and then either adding keys onto the timeline of first reference or simply doing copy/paste to all keys in spriter afterwards. It's just a xml file, once you know what and how is being used it's usually easier fixing it manually than fighting through spriter interface. You could remove duplicates by selecting them and hitting remove from all frames, but I 'think' that will still leave unused junk on timelines, which is something I wanted to avoid. It probably wouldn't cause any ingame issues tho. You can't rename them to the same name as spriter enforces uniqueness on object names, and to the best of my knowledge there is no way to move them into the different timeline either.

Link to comment
Share on other sites

@DeathDisciple, alright, I see. Thank you for clearing it up! (And for manually editing my scml, ugh)

 

Haha, yeah I tend to do certain things the non-conventional way, but in this case there is a good reason (or at least was). It used to be quite a gamble to do any significant number of additions/deletions in Spriter in one session, as it would either crash or get corrupted half of the time, so I got used to hack my changes directly instead whenever possible. At least that way I'd know what broke it. It went quite a long way as far as stability is concerned, but I'm not dropping my habits that easily :) But at least the habit of making backups still comes in handy.

Link to comment
Share on other sites

@DeathDisciple, I've just decided that the compiler is what I hate the most. Like, my changes are working fine. I edit my scml and recompile. Then all of a sudden my changes aren't displayed any more, and I'm just starting to get real worried. But I know I haven't repeated my old mistakes, no weird names that don't match with what I'm referencing and no duplicates or mis-deleted files. 

So I get my friend to compile it for me and it totally works. Woo-hoo.

Link to comment
Share on other sites

@DeathDisciple, I've just decided that the compiler is what I hate the most. Like, my changes are working fine. I edit my scml and recompile. Then all of a sudden my changes aren't displayed any more, and I'm just starting to get real worried. But I know I haven't repeated my old mistakes, no weird names that don't match with what I'm referencing and no duplicates or mis-deleted files. 

So I get my friend to compile it for me and it totally works. Woo-hoo.

 

Hmm perhaps compiler decided it doesn't need to rebuild for some reason, are you sure it actually updated the anim.zip of it?

Link to comment
Share on other sites

Hmm perhaps compiler decided it doesn't need to rebuild for some reason, are you sure it actually updated the anim.zip of it?

 

Yeah, I removed the zip-file to make sure it actually recompiled it. (Which it did) Still didn't update. The path I used for the scml-file is the same folder I zipped and sent to my friend - which means that it should have made a proper compilation. It's really a mystery to me and I hope I'll find out why this happened one day far from now. lol

 

Edit: Same thing happened to my friend after compiling it successfully twice. This is so weird...

Link to comment
Share on other sites

Nope. And also, since my autocompiler doesn't work I am inputting the exact path to make it compile so there could be no errors like that.

Upon investigating my scml-file I noticed this:

           <timeline id="14" name="swap_hat_000">                <key id="0" spin="0">                    <object folder="6" file="0" x="2.020202" y="41.414141" angle="0"/>                </key>            </timeline>

for the animation it won't display.

If I've understood correctly, there is only one frame for this animation with hat in it - while there are like 20+ for every other asset.

Is it not saving correctly? I've spent like half an hour making the hat have the right position in each frame, but it looks like they don't even exist within those frames?

 

huge edit: actually forcing it to save it as a new spriter project by selecting save as... and inputting a new name made it create all the keys on the timeline that it was missing! So I just renamed it afterwards and it worked! still hate spriter though

spiderchan_build_scml.zip

Link to comment
Share on other sites

Nope. And also, since my autocompiler doesn't work I am inputting the exact path to make it compile so there could be no errors like that.

Upon investigating my scml-file I noticed this:

           <timeline id="14" name="swap_hat_000">                <key id="0" spin="0">                    <object folder="6" file="0" x="2.020202" y="41.414141" angle="0"/>                </key>            </timeline>

for the animation it won't display.

If I've understood correctly, there is only one frame for this animation with hat in it - while there are like 20+ for every other asset.

Is it not saving correctly? I've spent like half an hour making the hat have the right position in each frame, but it looks like they don't even exist within those frames?

 

Hmm, what are exact folder paths to your don't starve directory and mod tools directory? Autocompiler not working is usually related to directory names/positions as it 'assumes' default steam structure, so if it can't locate don't starve mods directory in ../../dont_starve/mods it won't do anything (well new patch to it includes DST dirs, but they are irrelevant to this discussion). And no, there are no config files to tune it up either...

 

As for your question, timeline 14 has just 1 key, wether that key is being loaded on multiple frames depends on wether it's referenced on mainline's key lists or not. But if my search is correct, the case you're looking at (sleep_pst) has reference to the key in every mainline frame, so it should show, just show exact same. If you added/changed positions they indeed disappeared somehow.

 

(Well that is not entirely correct either, as you have seen with your duplicate issue, if it's referenced at mainline x and removed at some mainline frame later, it will be shown ingame until the end - unless you have it at alpha<0.5 anyway, but spriter will not show it)

 

EDIT Now I read your last edit lol. I suppose you found a spriter bug after all.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...