Eranthis Posted March 2, 2018 Share Posted March 2, 2018 (edited) A followup to this tutorial I've scripted a custom item for a character to start with and I'm receiving errors when I attempt to put the character into a newly generated world. Hopefully someone can identify a problem when I provide the files. helpzip.rar Edited March 4, 2018 by Eranthis Link to comment Share on other sites More sharing options...
Cunning fox Posted March 3, 2018 Share Posted March 3, 2018 Can you leave a log? 1 Link to comment Share on other sites More sharing options...
Eranthis Posted March 3, 2018 Author Share Posted March 3, 2018 (edited) 9 hours ago, Cunning fox said: Can you leave a log? I can't seem to generate a logĀ file. The game won't even allow me to start a game for it to crash. Unless log files are generated when the game gives an error. Edited March 3, 2018 by Eranthis Link to comment Share on other sites More sharing options...
Eranthis Posted March 3, 2018 Author Share Posted March 3, 2018 (edited) I finally got a crash so here's a log file from that The game ended with this as the last line: [00:01:35]: ..\source\animlib\animmanager.cpp(504) :: Tried to add build [backpack] from file [anim/backpack.zip] but we've already added a build with that name! Ā client_log.txt Edited March 3, 2018 by Eranthis Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 3, 2018 Share Posted March 3, 2018 (edited) You have buildname collision with backpack. You should decompile healthkit.zip from anim folder with krane.exeĀ Than rename project file as healthkit.scml and replace all "backpack" strings inside it with "healthkit" After that you should rename all files that mention backpack in their names. And finally compile it with scml.exe from Don't Starve Mod Tools Or you can just swap healthkit.zip in anim folder with mine, but it will be better if you do it by your own. If you have intention to make custom item then first thing you should do is take a look into another mod that already have similar item. healthkit.zip Edited March 3, 2018 by popitup Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 16 hours ago, popitup said: You have buildname collision with backpack. You should decompile healthkit.zip from anim folder with krane.exeĀ Than rename project file as healthkit.scml and replace all "backpack" strings inside it with "healthkit" After that you should rename all files that mention backpack in their names. And finally compile it with scml.exe from Don't Starve Mod Tools Or you can just swap healthkit.zip in anim folder with mine, but it will be better if you do it by your own. If you have intention to make custom item then first thing you should do is take a look into another mod that already have similar item. healthkit.zip Um okay well how? Every time I open up Krane.exe, a cmd window flashes and disappears. Dragging the zip file doesn't work either. Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 (edited) Copy files fromĀ healthkit.zip to the folder with krane.exe Open command line and than drag into it: 1)krane.exe 2)anim.bin 3)build.bin 4)Output folder (result will be located there) Press Enter How to open command line: https://www.lifewire.com/how-to-open-command-prompt-2618089 Edited March 4, 2018 by popitup Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 (edited) 1 hour ago, popitup said: Copy files fromĀ healthkit.zip into folder with krane.exe Open command line and than drag into it: 1)krane.exe 2)anim.bin 3)build.bin 4)Output folder (result will be located there) Press Enter How to open command line: https://www.lifewire.com/how-to-open-command-prompt-2618089 Alright thanks, that did the trick for the healthkit alone but I'm getting an error for the swap variant. ..\source\animlib\animmanager.cpp(504) :: Tried to add build [swap_backpack] from file [anim/swap_backpack.zip] but we've already added a build with that name! And when using the same method, I get this error: C:\Users\"name">C:\krane\krane.exe C:\krane\build.bin C:\krane\healthkit Loading build from `C:\krane\build.bin'... Loading atlas from `C:\krane\atlas-0.tex'... ERROR: No animation found in the input files. Obviously there's no anim.bin but since it doesn't exist, what do I do? Edited March 4, 2018 by Eranthis Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 Try to decompile backpack from my mod(anim.bin included) and than rename it as you want. swap_trainerbag.zip Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 11 minutes ago, popitup said: Try to decompile backpack from my mod(anim.bin included) and than rename it as you want. swap_trainerbag.zip Alright that worked. The character loads in and the items not giving me issues loading in. Seems to start into the inventory but now my next issue is that the item, when dropped, is completely invisible. Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 (edited) It must be this line from healthkit.lua Ā inst.AnimState:SetBank("backpack1") Try Ā inst.AnimState:SetBank("healthkit1") And make sure that you have "healthkit1" in healthkit.scml instead of "backpack1" Edited March 4, 2018 by popitup Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 (edited) 21 minutes ago, popitup said: It must be this line from healthkit.lua Ā inst.AnimState:SetBank("backpack1") Try Ā inst.AnimState:SetBank("healthkit1") And make sure that you have "healthkit1" in healthkit.scml instead "backpack1" Found the code and it worked but there's one issue with the dropped sprite. The healthkit scml has the actual drop sprite from the swap_body folder (swap_body-0) BUT the swap_healthkit'sĀ swap_body-0 is the straps from the front side of the player sprite. So now the dropped sprite is just those straps instead of the bag image. Edited March 4, 2018 by Eranthis Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 3 minutes ago, popitup said: Please, provide current healthkit.scml andĀ healthkit.lua Ā files.rar Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 (edited) Well... try to decompile and rename that instead of standart backpack trainerbag.zip Edited March 4, 2018 by popitup Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 (edited) 25 minutes ago, popitup said: Well... try to decompile and rename that instead of standart backpack trainerbag.zip No dice. Now the drop sprite is using the side view backpack sprite "swap_body-10" instead. Also just to specify, if the drop sprite is going to be using any of the swap sprites, it should beĀ swap_body-13 Edited March 4, 2018 by Eranthis Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 (edited) in swap_healthkit.scml <entity id="0" name="healthkit"> instead try <entity id="0" name="healthkit1"> Ā In case if method above fails try to change Ā inst.AnimState:SetBank("healthkit1") to Ā inst.AnimState:SetBank("healthkit") and in healthkit.scml <entity id="0" name="healthkit1"> to <entity id="0" name="healthkit"> in swap_healthkit.scml also should be <entity id="0" name="healthkit"> i.e. <entity id="0" name="healthkit"> is name of bank Edited March 4, 2018 by popitup Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 15 minutes ago, popitup said: in swap_healthkit.scml <entity id="0" name="healthkit"> instead try <entity id="0" name="healthkit1"> Ā In case if method above fails try to change Ā inst.AnimState:SetBank("healthkit1") to Ā inst.AnimState:SetBank("healthkit") and in healthkit.scml <entity id="0" name="healthkit1"> to <entity id="0" name="healthkit"> Nothing. Regardless of what theĀ inst.AnimState:SetBank is set to or what the entity id is named, the sprite will either be a side preview or spriteless. Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 My last shot (It works perfectly fine while I incorporated it in my mod) Desktop.rar Link to comment Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Author Share Posted March 4, 2018 23 minutes ago, popitup said: My last shot (It works perfectly fine while I incorporated it in my mod) Desktop.rar Alright, using your template was the easier way to go and now everything works. Thanks for sticking around this long for the help. Link to comment Share on other sites More sharing options...
Hunger Artist Posted March 4, 2018 Share Posted March 4, 2018 Nice artwork btw =) 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