Jump to content

Need more help with custom character animations


Recommended Posts

*inhales* OOOkayy so asides from custom sound, getting animations to look right for mods seems to be a bit of a challenge for me. Reskinning things that only need a slight visual change are easy enough, but actually modifying the animations slightly is a bit of a challenge.

  • I was trying to create a character mod for a cyclops. The images for his face needed different dimensions, and tweaking all the character animations or doing them all from scratch don't seem to be practical or viable options
  • custom items appear on the ground, but are invisible when equipped
  • I edited bird animations to give one of my custom birds a longer tail, but it still uses the base bird anim files and the tail resets to normal
  • another character mod I'm working on requires the arm_lower to be above the arm_upper for aesthetic reasons.

does anyone know a way I can fix any of these?

lunasmart.zip

 

Edited by mf99k
Link to comment
Share on other sites

1) if you need different dimensions for a specific part and the rest untouched, no way around that.

2) sounds like a common mistake, the forum is full of this kind of post. My best guess is that you messed up the folder and subfolder structure in your exported folder.

3) Sounds like you have an issue with the build. When you said that the tail resets to normal, do you mean that you see the longer tail at some point but then during the animation it switch back to normal tail?

4) There is a function member of AnimState which allow for symbol swapping. I do not remember the exact name but it is easy to find out, just print the __index field from the AnimState of any entity in game (put your cursor on any entity, open the console and type "for k, v in pairs(getmetatable(c_select().AnimState).__index) do print(k) end")

Link to comment
Share on other sites

43 minutes ago, mf99k said:

custom items appear on the ground, but are invisible when equipped

Either you didn't give the right name in the swap structure, you forgot to add the swap build to the asset anim list, or your spriter project is wrong.

 

You need

local assets =
{
    Asset("ANIM", "anim/myprefab.zip"),
    Asset("ANIM", "anim/swap_myprefab.zip"),
}

local function onequip(inst, owner) 
    owner.AnimState:OverrideSymbol("swap_object", "swap_myprefab", "swap_mybank")
    owner.AnimState:Show("ARM_carry") 
    owner.AnimState:Hide("ARM_normal") 
end

("mybank" is usually "myprefab", but could be different if, for example, you use a base game anim)

    inst.AnimState:SetBank("mybank")
    inst.AnimState:SetBuild("myprefab")
    inst.AnimState:PlayAnimation("idle")

(same here for "mybank")

If all here is ok, then the problem is probably with your spriter project.

 

Link to comment
Share on other sites

15 hours ago, ZupaleX said:

2) sounds like a common mistake, the forum is full of this kind of post. My best guess is that you messed up the folder and subfolder structure in your exported folder.

3) Sounds like you have an issue with the build. When you said that the tail resets to normal, do you mean that you see the longer tail at some point but then during the animation it switch back to normal tail?

4) There is a function member of AnimState which allow for symbol swapping. I do not remember the exact name but it is easy to find out, just print the __index field from the AnimState of any entity in game (put your cursor on any entity, open the console and type "for k, v in pairs(getmetatable(c_select().AnimState).__index) do print(k) end")

multiversesword.zip This is the unexported spriter stuff , and these swap_multiversesword.zip multiversesword.zip are the anim files I'm currently using

phoenix.zip this is the bird spriter stuff. The tail doesn't reset, it just stays the regular size. I want to replace the crow anim stuff with the phoenix's custom anim

how would I use that coding for animstate to switch the layer order?

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