Kooby Posted July 21, 2017 Share Posted July 21, 2017 Sorry i made another thread, but i REALLY want to finish this. So basically, i made an item, and its animation is completely missing when held, This is the code that might hold relevancy on it on the prefab: Spoiler local assets = { Asset("ANIM", "anim/giita.zip"), Asset("ANIM", "anim/swap_giita.zip"), Asset("ATLAS", "images/inventoryimages/giita.xml"), Asset("IMAGE", "images/inventoryimages/giita.tex"), } local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_giita", "swap_giita") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local function fn() inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) end There is more code besides that, it's just what it seems to be related to the animation And this is the compiled file for it swap_giita.zip Anyone know if anything's wrong? Link to comment Share on other sites More sharing options...
ZupaleX Posted July 21, 2017 Share Posted July 21, 2017 (edited) There is a tutorial on this forum to create a swappable item. If you follow it exactly, without neglecting any step or be like "that cannot matter that much" this is failproof. My first guess would be a scml file which is not done properly. Edited July 21, 2017 by ZupaleX Link to comment Share on other sites More sharing options...
Kooby Posted July 22, 2017 Author Share Posted July 22, 2017 5 hours ago, ZupaleX said: There is a tutorial on this forum to create a swappable item. If you follow it exactly, without neglecting any step or be like "that cannot matter that much" this is failproof. My first guess would be a scml file which is not done properly. If you mean this one It's the one i used, and i followed it step-by-step (although, i changed all instances of myitem to the name of the item). If it's not this one, can you link me that one? Link to comment Share on other sites More sharing options...
ZupaleX Posted July 22, 2017 Share Posted July 22, 2017 It is and if it doens't work then there must be something you overlooked (I failed as well the very first time I did it and had to start again from the beginning to realize which step I missed). Link to comment Share on other sites More sharing options...
Kooby Posted July 23, 2017 Author Share Posted July 23, 2017 On 22/7/2017 at 1:50 AM, ZupaleX said: It is and if it doens't work then there must be something you overlooked (I failed as well the very first time I did it and had to start again from the beginning to realize which step I missed). I redid it like 5 times already, and it never seems to work. Link to comment Share on other sites More sharing options...
ZupaleX Posted July 23, 2017 Share Posted July 23, 2017 Could you link your complete project? Link to comment Share on other sites More sharing options...
Kooby Posted July 23, 2017 Author Share Posted July 23, 2017 (edited) 47 minutes ago, ZupaleX said: Could you link your complete project? The whole mod? or the .scml/prefab? Edited July 23, 2017 by Kooby Typo Link to comment Share on other sites More sharing options...
ZupaleX Posted July 23, 2017 Share Posted July 23, 2017 Just zip everything I guess Link to comment Share on other sites More sharing options...
Kooby Posted July 24, 2017 Author Share Posted July 24, 2017 5 hours ago, ZupaleX said: Just zip everything I guess Hirasawa Yui.rar There's also a character in it, as it's part of a mod i had finished some time ago. The prefab an all files related to the item are labelled as giita. Also ignore the code that is commented out of the prefab, it's some code i'm currently disabling untill i get the graphic to work. Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 (edited) You will have to play with the size because I assume it is too small right now but here it is. Your scml file needs to be in a folder named whatever but the png needs to be in a folder named swap_[youritemname]. I just created a new folder named "swap_giita" where the scml file was and moved the png in the new folder. Updated the scml so spriter knows where to find the png (since it moved) and voilà. You just did not follow 5 times in a row the tutorial, step 1 where it tells you how to setup your folders. EDIT: even though I agree it is not easy to read now, the formatting has been a bit ****** up Edited July 24, 2017 by ZupaleX Link to comment Share on other sites More sharing options...
Kooby Posted July 24, 2017 Author Share Posted July 24, 2017 1 minute ago, ZupaleX said: You will have to play with the size because I assume it is too small right now but here it is. Your scml file needs to be in a folder named whatever but the png needs to be in a folder named swap_[youritemname]. I just created a new folder named "swap_giita" where the scml file was and moved the png in the new folder. Updated the scml so spriter knows where to find the png (since it moved) and voilà. You just did not follow 5 times in a row the tutorial, step 1 where it tells you how to setup your folders. I DID move the folder like a hundred times, both into it's own folder and into a folder with everything, lemme try again (guess i'll also resize it while i'm at it) Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 Don't forget to delete the current anim which has been generated by DST autocompiler. And each time you move the png/change folder structure, you need to update your scml project. Link to comment Share on other sites More sharing options...
Kooby Posted July 24, 2017 Author Share Posted July 24, 2017 (edited) 20 minutes ago, ZupaleX said: Don't forget to delete the current anim which has been generated by DST autocompiler. And each time you move the png/change folder structure, you need to update your scml project. Mind telling me what was the folder structure you used? I tried "exported/giita/swap_giita" "exported/swap_giita/swap_giita" and "exported/swap_giita", and neither seem to work Edit: It doesn't seem to even want to be compiled now Edited July 24, 2017 by Kooby Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 I just created swap_giita folder where your current swap_giita.scml is. I moved the swap_giita.png inside this folder. I opened the scml to update the png location. Saved, deleted the compiled anim so the autocompiler regenerate them. And that's it. Link to comment Share on other sites More sharing options...
Kooby Posted July 24, 2017 Author Share Posted July 24, 2017 13 minutes ago, ZupaleX said: I just created swap_giita folder where your current swap_giita.scml is. I moved the swap_giita.png inside this folder. I opened the scml to update the png location. Saved, deleted the compiled anim so the autocompiler regenerate them. And that's it. I still can't seem to get it to work, all the files are on "exported/giita/swap_giita/swap_giita", i even checked if the .scml still has the .png loaded, and it does, yet, still doesn't appear in-game. Did you do something else to the .scml? Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 You should not move the scml. It should look like this exported/ |-> giita/ |-> swap_giita/ |-> swap_giita.scml |-> swap_giita/ |-> swap_giita.png Link to comment Share on other sites More sharing options...
Kooby Posted July 24, 2017 Author Share Posted July 24, 2017 3 minutes ago, ZupaleX said: You should not move the scml. It should look like this exported/ |-> giita/ |-> swap_giita/ |-> swap_giita.scml |-> swap_giita/ |-> swap_giita.png Currently trying that, the compiler doesn't seem to like it and gives me an error "Missing PNG", despite the Spriter showing it up just fine Link to comment Share on other sites More sharing options...
Kooby Posted July 24, 2017 Author Share Posted July 24, 2017 Actually scratch that, got it to work! Now i'll just play around with size untill it looks fine. Thanks! Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 When I moved the png spriter complained about a missing png which is the expected behaviour. If it doesn't there is something wrong. Link to comment Share on other sites More sharing options...
lucas_risada Posted July 25, 2017 Share Posted July 25, 2017 How did you get it to work? I followed the same guide and I have the same problem Link to comment Share on other sites More sharing options...
ZupaleX Posted July 25, 2017 Share Posted July 25, 2017 Check my answers, I bet you made the same mistake Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now