jimmeh57 Posted October 31, 2013 Share Posted October 31, 2013 So I have recently gotten to making a new mod, and this involves creating an item. I followed this tutorial, and came across a problem. When I spawn in my item, it is invisible when dropped, and it doesn't seem to be recognized; I can only pick it up using space-bar. But when it is in my inventory, it works fine, the image and inspect and stacking all works. Now, I was looking through the Link mod, trying to compare my item to some in there, and I found one thing, most every item there has a file in the prefab.zip called "anim.bin". I looked through the tutorial several times, and it didn't mention this file. So I am wondering, is this what I need? Is this the root of my problem? And if so, how do I create this? I feel that I should also mention that the item isn't equippable or interactable, it will only be used for crafting. Thanks! Link to comment Share on other sites More sharing options...
TRENTOMINOUS Posted October 31, 2013 Share Posted October 31, 2013 So I have recently gotten to making a new mod, and this involves creating an item. I followed this tutorial, and came across a problem. When I spawn in my item, it is invisible when dropped, and it doesn't seem to be recognized; I can only pick it up using space-bar. But when it is in my inventory, it works fine, the image and inspect and stacking all works. Now, I was looking through the Link mod, trying to compare my item to some in there, and I found one thing, most every item there has a file in the prefab.zip called "anim.bin". I looked through the tutorial several times, and it didn't mention this file. So I am wondering, is this what I need? Is this the root of my problem? And if so, how do I create this? I feel that I should also mention that the item isn't equippable or interactable, it will only be used for crafting. Thanks!Yea you need that file. Don't ask me though, I have no idea how to mod. Link to comment Share on other sites More sharing options...
TheDanaAddams Posted November 1, 2013 Share Posted November 1, 2013 You need the anim.bin from the base file.So, take the .zip from the anim folder, and decompress it.Use the .tex converter software to convert the atlas-0.tex file found within to png - this will give us a template to work against. Just as you did with the character art, create the art for your new item, convert it to tex, and rename it to atlas-0.Rename the build, just as you did before - I should note that anyone using the hex edit method should be sure to replace any extra characters with hex value 00.In my example, I have taken "bunnyhood" and changed it to "cutehat" - but at first, I was left with "cutehatod" and had to replace the extra 'o' and 'd' with hex values of 00.Replace the files in your duplicated-and-renamed base prefab anim .zip with your new stuff, and add the new .zip to the 'anim' folder of your mod.You should be duplicating the base anim.zip, renaming it, then adding your altered files to that, and putting it in your mod folder. Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 1, 2013 Author Share Posted November 1, 2013 You need the anim.bin from the base file. You should be duplicating the base anim.zip, renaming it, then adding your altered files to that, and putting it in your mod folder.This is what I did: I took the base anim.zip, then renamed the build.bin. Then I changed the atlas-0.tex with my own tex file, and renamed it back to atlas-0.tex. But now I am left with anim.bin, and I do not know what to do with it. Link to comment Share on other sites More sharing options...
TheDanaAddams Posted November 1, 2013 Share Posted November 1, 2013 Anim.bin remains unchanged - it just needs to be in there. Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 1, 2013 Author Share Posted November 1, 2013 Anim.bin remains unchanged - it just needs to be in there.Oh okay, then I'm not quite sure what is wrong, perhaps something to do with these lines? inst.AnimState:SetBank("moditem") inst.AnimState:SetBuild("myprefab") inst.AnimState:PlayAnimation("idle") Link to comment Share on other sites More sharing options...
TheDanaAddams Posted November 1, 2013 Share Posted November 1, 2013 Are you using the sample mod item as your base?If so, you need to change the name in SetBuild to the build name you used. If you're not using the sample mod item as your texture base, then you also have the wrong bank, and possibly (but not entirely likely) the wrong animation name. Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 1, 2013 Author Share Posted November 1, 2013 Are you using the sample mod item as your base?If so, you need to change the name in SetBuild to the build name you used. If you're not using the sample mod item as your texture base, then you also have the wrong bank, and possibly (but not entirely likely) the wrong animation name.I started out with the sample prefab, but I deleted the "base" and "exported" folders because I never found them in any other mods, so I thought they weren't necessary. Should I paste them back in? Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 1, 2013 Author Share Posted November 1, 2013 And I have a different SetBuild name, I just replaced it with "myprefab". Link to comment Share on other sites More sharing options...
TheDanaAddams Posted November 1, 2013 Share Posted November 1, 2013 I believe those are just for converting Spriter assets, so they're not necessary. If your anim.zip has the three files - your new atlas.tex, your updated build.bin, and the anim.bin - and you have the correct build in that part of the code, and you're pointing to the correct asset... then I'm not sure at what point you've done something wrong.It's really not a difficult process... you may have just missed a step. Try following the guide again. Really all I can suggest. Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 1, 2013 Author Share Posted November 1, 2013 I believe those are just for converting Spriter assets, so they're not necessary. If your anim.zip has the three files - your new atlas.tex, your updated build.bin, and the anim.bin - and you have the correct build in that part of the code, and you're pointing to the correct asset... then I'm not sure at what point you've done something wrong.It's really not a difficult process... you may have just missed a step. Try following the guide again. Really all I can suggest.Okay, I'll keep on looking, thanks for helping! Link to comment Share on other sites More sharing options...
Developer Cheerio Posted November 1, 2013 Developer Share Posted November 1, 2013 Okay, I'll keep on looking, thanks for helping!If you upload your mod, I can take a look. Link to comment Share on other sites More sharing options...
Malacath Posted November 1, 2013 Share Posted November 1, 2013 Wouldn't it be about time someone wrote a very basic spriter tutorial for stuff like that. The process of creating assets completely new is way less error-prone in my experience. Link to comment Share on other sites More sharing options...
Developer Cheerio Posted November 1, 2013 Developer Share Posted November 1, 2013 Agreed except it's windows only. If the tools worked on osx and linux I would be writing a tutorial but till then, if I have free time I'll probably work on porting Link to comment Share on other sites More sharing options...
simplex Posted November 1, 2013 Share Posted November 1, 2013 Agreed except it's windows only. If the tools worked on osx and linux I would be writing a tutorial but till then, if I have free time I'll probably work on porting Link to comment Share on other sites More sharing options...
Malacath Posted November 1, 2013 Share Posted November 1, 2013 Agreed except it's windows only. If the tools worked on osx and linux I would be writing a tutorial but till then, if I have free time I'll probably work on porting That sounds great even if irrelevent for me directly : PBut the tools will work basically the same on osx or linux when they are ported so if someone makes a tutorial now it will be just as useful later, or won't it? Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 2, 2013 Author Share Posted November 2, 2013 If you upload your mod, I can take a look.Ofcourse! itemupgrades.zip Link to comment Share on other sites More sharing options...
Developer Cheerio Posted November 2, 2013 Developer Share Posted November 2, 2013 Ofcourse! itemupgrades.zipDo your build and anim files both come from the sample prefab? Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 2, 2013 Author Share Posted November 2, 2013 Do your build and anim files both come from the sample prefab?Yes. Link to comment Share on other sites More sharing options...
Developer Cheerio Posted November 2, 2013 Developer Share Posted November 2, 2013 Yes.I would give you the same advice as Dana then. I just tried the sample prefab and it worked fine but I'm not sure what step you missed in your mod. Link to comment Share on other sites More sharing options...
ColeenMcCleod Posted November 2, 2013 Share Posted November 2, 2013 In modmain, are you declaring your atlas assets? Kinda like this? Assets = { Asset("ANIM","anim/sugarskull.zip"), Asset("IMAGE","images/inventoryimages/sugarskull.tex"), Asset("ATLAS","images/inventoryimages/sugarskull.xml"), } If not, your mod might not know where to look for them? Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 2, 2013 Author Share Posted November 2, 2013 In modmain, are you declaring your atlas assets? Kinda like this? Assets = { Asset("ANIM","anim/sugarskull.zip"), Asset("IMAGE","images/inventoryimages/sugarskull.tex"), Asset("ATLAS","images/inventoryimages/sugarskull.xml"), } If not, your mod might not know where to look for them?Actually, I haven't done this, I declared those in my prefab's lua file... this may be it! I'll let you know if this works! Link to comment Share on other sites More sharing options...
jimmeh57 Posted November 2, 2013 Author Share Posted November 2, 2013 In modmain, are you declaring your atlas assets? Kinda like this? Assets = { Asset("ANIM","anim/sugarskull.zip"), Asset("IMAGE","images/inventoryimages/sugarskull.tex"), Asset("ATLAS","images/inventoryimages/sugarskull.xml"), } If not, your mod might not know where to look for them?So.. there's another issue. I copied the way you coded your sugar skull with my prefab, yet... it won't even spawn into the game now. It says it needs to be a local prefab, or something along the lines of that. In your code, you don't have "local Assets", yet I was able to spawn in your item. Link to comment Share on other sites More sharing options...
1337gamer15 Posted November 2, 2013 Share Posted November 2, 2013 I'm actually having the exact same problem here with Tiny Tina's bombs. The inventory icons appear, but not when I drop them in the world. I've made double extra sure that they have the asset line for the proper zip. Link to comment Share on other sites More sharing options...
ColeenMcCleod Posted November 2, 2013 Share Posted November 2, 2013 Hm, well, in my prefab for the item I only have it declared as Asset, not local Asset. I mean, I'm probably doing it some wonky archaic way, but so far it's worked. I DL'd what you posted and have been checking it out... I'll stew on it some more and see what I can dig up. Link to comment Share on other sites More sharing options...
Recommended Posts
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.