Jump to content

Short guide to updating builds and adding missing PNGs


-Variant
 Share

Recommended Posts


This is a short/simple guide to updating builds to include new images and restoring missing images when decompiling one of Klei's builds.

I don't usually write guides, so if I need to explain something a bit more, please do let me know! I haven't found many guides on this topic, and I tire of repeating myself many times, so I figured a guide would help the masses more in an easy to share format.

Introduction:

Occasionally, Klei will sometimes update their character builds with new images, such as faces. I'll be using the new side-talking sprites as an example for this post.
In the Host of Horrors beta, 2 new images were added to default characters and their skins, these being side view talking images.
These images are 40 and 41.
face-40.png.7379223d808e834a4e53c18b63d9f269.pngface-41.png.bcc03086819a2eb3d99198e2e471e770.png

Without these, your modded characters face will disappear when talking on a chair, facing the side.
The fix is thankfully rather straightforward!
You can start by making two copies of your original side face, that being face-4, then making small changes so the mouth is open a smidge, and then open fully. You can go off Maxwell's face, above.

(Note: If you wish to find another characters sprite for reference, don't use their included ZIP file, those are outdated. You'll want to find your character of choice's .DYN file, and rename it to .ZIP, and then decompile like usual. Their builds should be in a 'dynamic' folder. That should be it! DLC characters like Wormwood and Wanda are currently off limits, however.)

After editing the two images, your folder should look like this. 
image.thumb.png.06dff27e79937eba0d44076bfe0d9cbc.png

First thing you'll notice is that it jumps from 33 to 40. This is important as you'll want to compensate for this! I'll go over that next.

Registering your new PNGs

Now that you've got your PNGs made, we'll want to register them! There's two main ways you can do this!

Firstly, you can open your SCML project, and drag and drop your PNGs into any of your animations and then save your project. Don't forget to set their pivots correctly, they should remain the same as your original side sprite!

Otherwise, you can edit the SCML directly, which I prefer to do. You can open them with a sprite editor, you'll see something like this.
image.thumb.png.3688156fbc92dc694d3b2f98037bce2c.png
You'll quickly notice that the IDs here are mismatched, namely that ID 34 is attached to PNG 40. This is a quirk of decompiling an existing build! 
When you're adding new images to a build that has unused/missing, you'll want to make sure they're accounted for. From what I've learned, there' two ways to do this as well. The simplest is just correcting the IDs to match the PNG numbers.
Like so:

Quote

        <file id="34" name="face/face-40.png" width="87" height="125" pivot_x="0.612751" pivot_y="0.5588" />
        <file id="35" name="face/face-41.png" width="87" height="132" pivot_x="0.612751" pivot_y="0.580032" />

To

Quote

        <file id="40" name="face/face-40.png" width="87" height="125" pivot_x="0.612751" pivot_y="0.5588" />
        <file id="41" name="face/face-41.png" width="87" height="132" pivot_x="0.612751" pivot_y="0.580032" />

This comes with the minor drawback that you'll need to repeat this step each time you edit your SCML, as it'll reset to adjust for the 'missing' images.*
There's another way to go about this that's a bit more work, but will prevent the relapse.

*I have been told this is how the SCML relapses, I don't use the method of dragging PNGs into the SCML file, so I cannot say for certain if this is the case. I have opted to included it on the chance it is.

You can fill in each of the unused images with 'dud' PNGs. Essentially empty PNGs that will make up for images 34-39. 
I make mine 1x1 transparent images to save space in my atlas. Once you've done that, you can fill in the missing IDs in your SCML.
It should look like this when you're done!

Quote

        <file id="33" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="34" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="35" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="36" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="37" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="38" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="39" name="face/face-33.png" width="87" height="116" pivot_x="0.612751" pivot_y="0.521121" />
        <file id="40" name="face/face-40.png" width="87" height="125" pivot_x="0.612751" pivot_y="0.5588" />
        <file id="41" name="face/face-41.png" width="87" height="132" pivot_x="0.612751" pivot_y="0.580032" />

The IDs should be follow the numerical order, the PNGs use the last non-empty id for missing things in-between, thus they should all be 33.

And here's an example of my 'duds' in place.
image.thumb.png.3a1061062a6d1061f4014e4fbde8ea6e.png

Follow Up

And this should be all! With everything set in place, you should be able to safely compile your build and see your talking sprites in-game! Don't forget to set their pivots, too!

I will follow up with an edit going over adding the new eating sprites for Hound builds, since I've gotten requests about that lately. It'd be another fun example to add since I know Hounds are one of the more popular mods to reskin!

The hounds and you

EDIT: This new portion will go over another example, this being updating outdated Hound builds so they can make use of their new eating animations!

I'll be using an old custom build a friend made for my examples this time.
The process is mostly the same! Like before, you can start by decompiling a hound's latest build and animation, you'll notice there's new art inside. Namely the hound_cheek folder.
image.png.bcb7f404b646d54bc0e9e83ba4b0050b.png

Since Hounds are mostly the same in proportions, you can actually get away with copy and pasting this entire folder into your custom build, like so. Just don't forget to edit them to fit!
image.thumb.png.bf66cde9bbfb238eb08dab36651df952.png

Now, as above, you'll need to register this. Since there's only the one PNG in this folder, you can get away with the simple method of merely dragging the art into your SCML window.

Otherwise, as I prefer again, you can edit your SCML too! You can simply open Klei's hound SCML, copy the folder and cheek lines, and paste them into your custom SCML. Make sure the folder ID is correct! I like to put my folders at the bottom, so if your last folder was say, '4', you'll want to change this to a 5 where it says 'folder ID='.
image.thumb.png.af23c76800b59753e1de486da45ad490.png

And... that should be all! It's a simple process, compile and you should see your cheeks appear when they try to eat food now!
If not, leave a message and I'll try to get back to you as quick as I can.

Edited by -Variant
Corrected mistake in ID naming segment.
  • Like 2
  • Thanks 3
  • Health 2
  • Big Ups 1
Link to comment
Share on other sites

1 hour ago, -Variant said:

You'll quickly notice that the IDs here are mismatched, namely that ID 34 is attached to PNG 40. This is a quirk of decompiling an existing build! 
When you're adding new images to a build that has unused/missing, you'll want to make sure they're accounted for. From what I've learned, there' two ways to do this as well. The simplest is just correcting the IDs to match the PNG numbers.

So that was why decompiling Wilson's build and using that as a reference didn't fix my issue. Good to know. (I am screaming.)

You just saved me a gigantic headache. Thank you for taking the time to write this.

  • Health 1
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...