Jump to content

[SOLVED] Custom Start Item Causing Crashing


Recommended Posts

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 by Eranthis
Link to comment
Share on other sites

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 by Eranthis
Link to comment
Share on other sites

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 by popitup
Link to comment
Share on other sites

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

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

wevweve.png

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 by Eranthis
Link to comment
Share on other sites

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

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 by Eranthis
Link to comment
Share on other sites

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 by Eranthis
Link to comment
Share on other sites

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 by popitup
Link to comment
Share on other sites

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

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