Jump to content

Anim name convention for SixFaced and EightFaced


Recommended Posts

Hello,

 

does someone knows the naming conventions for the SixFaced and eightFaced prefabs? The FourFaced is quite easy to get by just decompiling with krane the anim file of a FourFaced prefab.

However krane cannot decompile any SixFaced orEightFaced prefab anim file because it complains about duplicate anim name in the file.

So if someone knows the conventions to use for the Six and EightFaced anim that would be much appreciated.

 

Thanks!

Link to comment
Share on other sites

Ok so I digged in some files and I found the one handling conversion from spriter project to the animation .bin files (Don't Starve Mod Tools\mod_tools\tools\scripts\buildanimation.py)

 

It is quite interesting how there is just 4 directions which are recognized in this file :

FACING_UP, FACING_DOWN, FACING_RIGHT, FACING_LEFT.

 

Then you can see that this script looks for specific strings in the animation file

 

        name = anim_node.attributes["name"].value.encode('ascii')
        
        dirs = (re.search("(.*)_up\Z", name),
                re.search("(.*)_down\Z", name),
                re.search("(.*)_side\Z", name),
                re.search("(.*)_left\Z", name),
                re.search("(.*)_right\Z", name))
        
        facingbyte = FACING_RIGHT | FACING_LEFT | FACING_UP | FACING_DOWN
        
        if dirs[0]:
            name = dirs[0].group(1)
            facingbyte = FACING_UP
        elif dirs[1]:
            name = dirs[1].group(1)
            facingbyte = FACING_DOWN
        elif dirs[2]:
            name = dirs[2].group(1)
            facingbyte = FACING_LEFT | FACING_RIGHT
        elif dirs[3]:
            name = dirs[3].group(1)
            facingbyte = FACING_LEFT
        elif dirs[4]:
            name = dirs[4].group(1)
            facingbyte = FACING_RIGHT
 
 
You can notice how the other directions are absent.
 
Does that imply that it is currently impossible for modders to create SixFaced and EightFaced prefabs?
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...