Jump to content

Recommended Posts

Hi. I am making a "purple gem axe" as my first mod. After playing around with stuff for a few hours, I managed to get a working axe into the game, complete with a recolored texture (pretty sure it's purple), double the durability of a golden axe and it's own recipe. The problem is, when I hold it in hand or drop it, it becomes invisible. I took "axe.zip" and "swap_axe.zip" from "anim", renamed them, recolored the .tex files and renamed the builds of the build.bin files, but it still doesn't work. Fine, the "animation" of the axe stuck in the ground is easy enough to remake with Spriter, so I did just that and it worked (that means my code is fine), but remaking the animation of the swinging axe would be nearly impossible, especially since I'm not very artistic. Did I miss something? Thanks!

Did you put them in assets of the custom axe prefab file? The game won't load custom textures unless they are put in an asset table.

--taken from Axe.lua as a example
local assets =
{
    Asset("ANIM", "anim/axe.zip"),
    Asset("ANIM", "anim/goldenaxe.zip"),
    Asset("ANIM", "anim/swap_axe.zip"),
    Asset("ANIM", "anim/swap_goldenaxe.zip"),
}

You also might want to share your mod here, so we can help find the issue. 

 

Either you need to have all your anim made with spriter (and with a "purplegemaxe" as a name

OR
You just rename the build and you need the purplegemaxe file and also the line given by DarkKingBoo and a "inst.AnimState:SetBank("goldenaxe")"

As far as i understand how things are working :

Bank determine the base anim. Build determine the graphic. For example, a "rabbit" bank will be used for the rabbit build, winter_rabbit build and beard_monster build. Same anims, different graphics.

When you change only the tex and build name, the anim file are still related to the original file, so you need to tell the game that this anim is used (so here bank = goldenaxe, and that you use custom build (the custom build+tex you made).

When you edit the anim with spriter, you can rename the anim to whatever you want, so you can tell the game "bank = custom anim", since you are creating a new file when the anim will be "linked" to the build/tex

Here you are doing both. I'm sure it's possible to tell game "i use this with custom anim and this with custom build+text linked to old anim" but it will probably require more work.

Hope it's clear and not too wrong.

11 minutes ago, Lumina said:

Either you need to have all your anim made with spriter (and with a "purplegemaxe" as a name

OR
You just rename the build and you need the purplegemaxe file and also the line given by DarkKingBoo and a "inst.AnimState:SetBank("goldenaxe")"

As far as i understand how things are working :

Bank determine the base anim. Build determine the graphic. For example, a "rabbit" bank will be used for the rabbit build, winter_rabbit build and beard_monster build. Same anims, different graphics.

When you change only the tex and build name, the anim file are still related to the original file, so you need to tell the game that this anim is used (so here bank = goldenaxe, and that you use custom build (the custom build+tex you made).

When you edit the anim with spriter, you can rename the anim to whatever you want, so you can tell the game "bank = custom anim", since you are creating a new file when the anim will be "linked" to the build/tex

Here you are doing both. I'm sure it's possible to tell game "i use this with custom anim and this with custom build+text linked to old anim" but it will probably require more work.

Hope it's clear and not too wrong.

I'm still very much a newbie at this, so I didn't get most (if anything) of what you were trying to say. The part that is most confusing, is that "axe.zip" (a stationary image of an axe stuck in the ground) contains an "anim.bin" file, but "swap_axe.zip"  (the full animation of a swinging axe) doesn't. What?...

The anim.bin is what contains the animations for axe and swap axe. Also I noticed that this is a DS mod, not a DST mod. This is the DST modding forum. 

I don't see anything that could prevent it from showing, but I don't do a lot of DS modding. I'll keep looking for a little while longer, but you should probably move this over to the DS modding forums.

 

 

11 minutes ago, DarkKingBoo said:

The anim.bin is what contains the animations for axe and swap axe. Also I noticed that this is a DS mod, not a DST mod. This is the DST modding forum. 

I don't see anything that could prevent it from showing, but I don't do a lot of DS modding. I'll keep looking for a little while longer, but you should probably move this over to the DS modding forums.

 

 

Well, this mod "works" analogically in DST too, so it doesn't really matter (you just have to remove the function that attemps to give the player an axe from "modmain.lua"). I plan to develop mods for DST mainly in the future, but I don't see much difference between DS and DST modding. If I'm wrong, please correct me.

DST has a more updated API and code that is used for DS is altered drastically or completely absent in DST.  I'm sure someone else will be able to tell you more accurately whats all different, but you usually want to build mods for one or the other.

4 hours ago, DDomjosa said:

I'm still very much a newbie at this, so I didn't get most (if anything) of what you were trying to say. The part that is most confusing, is that "axe.zip" (a stationary image of an axe stuck in the ground) contains an "anim.bin" file, but "swap_axe.zip"  (the full animation of a swinging axe) doesn't. What?...

Sorry, english isn't my native langage so sometime it's hard to be clear.

Here i can only guess that there is a special thing about the swap part. It probably use the same anim file than the axe file, but i don't know how to make it work with spriter. I know that hat (using also a swap thing) are a little tricky too.

6 hours ago, Lumina said:

Sorry, english isn't my native langage so sometime it's hard to be clear.

Here i can only guess that there is a special thing about the swap part. It probably use the same anim file than the axe file, but i don't know how to make it work with spriter. I know that hat (using also a swap thing) are a little tricky too.

I see, so I basically just picked the wrong thing to fiddle with. I'll drop it (or try to recreate the animation, I don't know), thanks!

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
×
  • Create New...