Jump to content

Krane not working properly [Solved]


Recommended Posts

So I was working on a character mod with a custom "backpack", but I needed to edit the individual image files rather than the single tex file so I decompiled it into an scml. I was running into lots of issues that didn't seem to have a real clear source, until I decided to test decompiling the character itself using Krane. Turns out Krane was decompiling wrong so that might be why everything was messed up. Here's how it decompiles the character for example:

mMzi5HA.png

I've been using Krane for this since I can't seem to find any way to get an scml of the item I'm editing so is there an alternative to Krane for decompiling I can use or a way to get an scml for items and such that I can work off of?

Edited by bluecube
Link to comment
Share on other sites

I believe krane is still the best option to decompile. Also I've come across this issue before and I wanted to share my own understanding of it (so it may not be right).

So to explain it I got the extended sample character and decompiled it as you did to recreate the same issue and this is the result, it is the same if all the extra parts are taken away

1.thumb.PNG.062142c6b80bc27d1693c998235df4cf.PNG

My thinking is that when it is compilied and all the empty spaces around the texture are removed and when this is then used to decompile again, those clipped images are being stretched to equal the same size to what the original png did.

I then copied all the png folders from the original extended sample character and replaced the ones with the messed up image above, so leaving the spriter animation file still there. Now when I view the same spriter file it displays correctly because those images were not compiled/clipped off/stretched out and were the size/look spriter had used.

1a.thumb.PNG.98f8816f177d0c5fa432e37e814d1106.PNG

I know that when taking a mod from the workshop and decompiling that doesn't mess it up, but perhaps if that decompiled version is then compiled and then decompiled again then this issue would most likely occur

edit: take the pigtails for example, one of the more noticeably stretched images. The original png comes with a lot of empty space but viewing the compiled png in comparison you see that it seems cropped and stretched. However even though they look messed up in spriter perhaps in-game they will display fine, I haven't tested that.

11.PNG.e84cd3cbc13f73562f9e00459f035218.PNG

Edited by maliblues
Link to comment
Share on other sites

I do have another issue with Krane now though. I've decompiled a mod item and then without editing anything, recompiled it and tested and it looks completely wrong ingame (it looked fine before). I tried replacing the anim.bin and tex with the original ones before the decompiling and its still messed up so I assume its not the animations themselves. I'm not sure whether Krane or the autocompiler is causing the issue however, or how to fix it.

Edited by bluecube
Link to comment
Share on other sites

I've been trying to figure it out too but I don't know how to solve this, if even possible. The cape from the mod works fine, then my decompiled then compiled copy of it is also messed up. So only the straps show, no cape. I guess the only way it would work is with the original files from the author. I've not decompiled things from the workshop before so don't have experience with issues like this :(

Link to comment
Share on other sites

@maliblues 

Small update in case this helps point to the problem. It appears that the cape isn't loading the animations AT ALL, or at least is simply loading just a single texture, body-swap-0 (which is the same thing that would happen if I loaded the build from rubycape rather than swap_rubycape). I tested this by removing the anim.bin completely which resulted in no changes visually. Also, its using a single texture at all times with no animation.

 

At this point though, I'm just gonna move on and either try another method of building a custom backpack or toss the idea, so no worries if no fix is found. I'm guessing its just not possible to properly recompile a decompiled build. :T

Edited by bluecube
Link to comment
Share on other sites

2 hours ago, bluecube said:

@maliblues 

Small update in case this helps point to the problem. It appears that the cape isn't loading the animations AT ALL, or at least is simply loading just a single texture, body-swap-0 (which is the same thing that would happen if I loaded the build from rubycape rather than swap_rubycape). I tested this by removing the anim.bin completely which resulted in no changes visually. Also, its using a single texture at all times with no animation.

 

At this point though, I'm just gonna move on and either try another method of building a custom backpack or toss the idea, so no worries if no fix is found. I'm guessing its just not possible to properly recompile a decompiled build. :T

For your case I would suggest trying to work off the game files, so using just the backpack and the code for it. I decompiled it and made your cape texture fit a png and made canvas size bigger to make it fit. I tested this in-game and it seems to work when wearing, it needs some adjustment though but it would be best to make adjustments with your character.

It is a good start, I didn't notice any issue... yet. I would try to aviod making any changes in spriter and just keeping checking texture in-game instead. I can make the cape fit better tomorrow if you aren't able to. Also, if you do get any issues I would look at the code because for the overrride symbol code I wasn't sure if or when it's reffering to the build or the spriter project folder since names are the same. I knew for certain that there isn't a "swap_backpack" png folder so there it is reffering to a build so I set it to "swap_cape" for your cape build there and it shows now. But the others I didn't touch as I wasn't sure but after more testing we will know if those need changing.

cape.zip

Edited by maliblues
Link to comment
Share on other sites

I had just tried using the default backpack and decompiling/recompiling that and it worked for me as well. And yeah, I was having trouble discerning what was what with the names which made finding any problems difficult.

Thanks so much for the help, I really appreciate it.

Quick question, how did you resize the cape image? Did you just simply change the canvas size? I thought that would end up offsetting or stretching it since the size is set differently in the scml.

Link to comment
Share on other sites

No problem, glad I could help.

and yes, I just changed the canvas size and this hasn't caused me any issues before. I suspect the scml changes to fit the new size.

You could simply use one of the textures I added as a template, so just put your texture for that particular cape view over it, allowing you to line it up better compared to having nothing there. Also saves you having to set a canvas size. Then just delete layer with my texture and save with correct name.

Link to comment
Share on other sites

1 minute ago, maliblues said:

No problem, glad I could help.

and yes, I just changed the canvas size and this hasn't caused me any issues before. I suspect the scml changes to fit the new size.

You could simply use one of the textures I added as a template, so just put your texture for that particular cape view over it, allowing you to line it up better compared to having nothing there. Also saves you having to set a canvas size. Then just delete layer with my texture and save with correct name.

I tried doing this to swap_body-0 (the part that goes in front) by doubling the canvas size from the center and it gets shifted down and to the right. I guess I can only really change the canvas size vertically?

Link to comment
Share on other sites

I know its recommended to not change the pivots in the scml, however I adjusted them according to the new image sizes and it re-centered the part.

3L0gqqy.png.

If there's a better way around the offset issue I'll go with that but the edited pivots seem to work fine with the animations so far. 

Link to comment
Share on other sites

6 hours ago, bluecube said:

I know its recommended to not change the pivots in the scml, however I adjusted them according to the new image sizes and it re-centered the part.

3L0gqqy.png.

If there's a better way around the offset issue I'll go with that but the edited pivots seem to work fine with the animations so far. 

I would have tested changing the pivots at this stage, if all is working fine now I would stick with those changes :D

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