Jump to content

[Guide] SCake : How to set up animating and import animations for Project Sugar Cake


Recommended Posts

SCake Guide : How to set up animating and import animations for Project Sugar Cake

(This guide is originally available on our Discord via GDrive and on my site at https://www.michaelpstanich.com/article/SCake_HowToMakeAnimsGuide.html - all sources have the same general information but updates will push to the Discord GDrive version first. Just easiest to update.)

 

Last Guide Update : 2024-05-14

 

Update : 2024-04-08 : Updated Step 4 and 5 in “Setting up our UE5 Project” to include a failsafe setting which may be required in some instances. Added a note to “Exporting our New Animation” Step 3 about excluding keyframes to allow in-game physics and animation blending.

 

Update : 2024-05-14 : Updated sections related to JSON files and configuration to show the correct and up-to-date format for the .json files. (JSON formatting was slightly changed in SCake version 0.2.0 DEV but shouldn’t have any major changes from this point forward)

 

Current Project Sugar Cake Thread - https://www.loverslab.com/topic/225549-project-sugar-cake-sex-and-stat-framework-gameplay-mod


-----

 

If you’re unfamiliar with Project Sugar Cake, SCake is an animation framework for Palworld focused on erotic animations. The framework has a lot of options for animators and users that allow the framework to be used for animations ranging from simple to complex with adjustable .json files.

 

This is meant to be a ‘complete’ guide getting you from no knowledge of palworld into making animations for SCake and releasing Animation Packs! Many sections of this tutorial are either extra information are alternate methods and can be skipped entirely, don’t be intimidated by the length! Nearly everything is explain in detail, so if you’re new to Palworld modding this will help catch you up on terms and methods, but if you’re already familiar with modding Palworld you can follow the simple steps outlined without needing to follow every section.

 

Social Links :

Our Discord – The Broken Chatbox – https://discord.gg/h3vB7S4FEw

-v- Donations! -v- =^-^=

SubscribeStar - https://subscribestar.adult/michaelpstanich

 

If you need any additional help or have questions regarding the guide, don’t be afraid to join our discord (linked above)! We’re a creative community and directly endorse SCake, so we are the best equipped to help with SCake directly. You can also ask the Palworld Modding Discord for help with general things, however make sure you follow their rules and content guidelines when asking for help!

 

~ (_) ~ Sections ~ (_) ~

-1. TLDR Version

0. What is this tutorial/guide for?
1. Understanding the Tools and Formats (Palworld with UE5)

2. Understanding and Planning for SCake

3. Extracting the Skeleton/Model

4. Importing into Blender and Animating

5. Exporting our New Animation

6. Setting up our UE5 Project

7. Importing Animations and Configuring for SCake

8. Exporting our Animation Pack and Configuring the JSON

9. Setting up our Animation Pack for Public Release

10. Final Notes

 

Disclaimers :
(0) I’m writing this tutorial for ‘the current state of things’ and there may be better or more fluid workflows for all of this, don’t consider this guide to be the end-all be-all of guides!

(1) I will be linking to the Palworld Modding Wiki ( https://pwmodding.wiki/ ) through-out this guide as a source for other basic guides. This does not mean all the information supplied will be complete or up-to-date. I am not directly affiliated with the palworld modding wiki.

(2) The tools linked here are not affiliated with myself or SCake, nor is their inclusion an endorsement of SCake and its contents. When reaching out for help regarding SCake make sure the parties involved are interested in helping (such as our own community).

 

-1. TLDR Version

This section just lists the steps without any explanations, check each section for more information. This TLDR will help you find where you may want to read more into and what you can skip.

 

0. This guide is for making SCake animation packs

1. Links and Details for the tools we’ll be using

2. SCake registers animations then plays those animations through events which are lists of animations with various parameters, there are also climax variants that can be defined for each animation which plays back dynamically

3. If you already have a model with the appropriate rig to animate, skip this step. If not, find the model you want to animate in FModel and export it.

4. Import into Blender using the io_scene_psk_psa plugin for Blender 4.0 (When using Blender 4.0) with default settings

5. Once done with your animations, export each animation individually into a .fbx file with the displayed settings linked in this section

6. Create a UE5 project for your mod and import Fixed Bone Index Assets for the models you are animating for then create your animation pack’s folder and set-up

7. Import the animations targeting the correct fixed skeleton, create a montage from each asset and set the looping section in the animation if it should loop

8. Export your animation pack as a .pak using UE5’s packaging function, then set up the .json file following the templates provided (section details settings)

9. Test your animation(s) to ensure they work properly in-game, if they do then package up and publish your mod wherever you please!

 

0. What is this tutorial/guide for?

This tutorial is for people wanting to make animations for the Palworld mod ‘Project Sugar Cake’ (SCake), allowing the animation to play in-game through the SCake API. This guide will have a lot of general information about modding Palworld and importing for UE5 mods, however we will be focused on SCake in this guide specifically, linking to other resources to learn about certain aspects that are better handled elsewhere. If you’re already familiar with Palworld modding then this won’t be a problem, but if not I recommend following through each section at your own pace and try not to skip around! By the end of this tutorial you will hopefully have a good starting point for getting Animations into Palworld with full integration with SCake!

 

1. Understanding the Tools and Formats (Palworld with UE5)

Palworld uses UE5 as its engine and the modding community uses general modding tools for UE5 games along with a modkit (Tutorial for its installation here - https://pwmodding.wiki/docs/category/palworld-modding-kit ) created by a community member (localcc), remember to thank them for all their hard work! Palworld using UE5 is actually really beneficial to us since it allows us a lot of power with modding, but it also has some limitations and we have to work with very specific formats in a not always typical fashion. Let’s break down the software and formats we’ll be using.

 

Creation Tools :

Unreal Engine 5.1.1 (Yes, the whole actual engine!)

Resource Link : https://www.unrealengine.com/

This one you’ll install through the Epic Games Launcher, it’s legit just the normal UE5 you’d typically use in game development or CG work. Technically there are packaging methods without using the engine itself, but since we will need to convert imported Animation Sequences into Animation Montages we want the full engine, and specifically we want to get version UE5.1.1 which is the engine version Palworld uses. If you use a different version it may not work as intended or cause issues if you try compiling other types of mods.

 

Palworld Modkit :

Resource Link : https://github.com/localcc/PalworldModdingKit/tree/main

Setup Guide : https://pwmodding.wiki/docs/category/palworld-modding-kit

When doing just animation imports for SCake, the modkit is optional, however if you’re looking to make any Blueprint mods or integrations with SCake it’s required. I will cover both with and without the mod-kit when setting up a project for SCake animation imports, but when we get to integrations or BP methods I will assume you installed the ModKit. (I also find using the modkit to be easier than setting up a project every time I want to import animations, I’ll cover why when we get there)

 

FModel :

Resource Link : https://github.com/4sval/FModel

Guides : https://pwmodding.wiki/docs/asset-swapping/Home > https://pwmodding.wiki/docs/asset-swapping/StartingOut > https://pwmodding.wiki/docs/asset-swapping/ExportingModifying3DAssets

This is a general Unreal Engine asset extraction tool, it’s extremely powerful but has a lot of limitations. For our use case we’ll be interested in extracting the model and skeleton for pals (and maybe textures if that’s something you would also want). If you’re only using models/rigs provided externally and not from the game files, or you already made some yourself, then you may not need Fmodel, but I do recommend it for Bone Index Fixing, which we’ll cover much later in the guide.

 

Blender (4.0+) :

Resource Link : https://www.blender.org/

Blender is a (free and open source) 3D modeling and animation tool. Technically you can use other software but I will be showing blender specifically in this tutorial and guide and we’ll be using a plugin for Blender for imports/exports.

 

io_scene_psk_psa (Blender Plugin v6.2+) :

Resource Link : https://github.com/DarklightGames/io_scene_psk_psa

This is a plugin for Blender that allows us to import Unreal Engine .psk model and .psa animation files. Since we only need this for importing (we export using .fbx which should work by default in Blender 4.0) if you’re not using assets extracted from the game this will be an optional (similar to FModel requirement).

 

UE4SS :

Resource Link : https://github.com/UE4SS-RE/RE-UE4SS

Unreal Engine mod-injection and replacer pak loader. This is required to get SCake running in-game as well as any other script/blueprint mod.

Formats :

.psk/.psa

These are the native formats Unreal Engine uses for Models and Animations. We only deal with these formats if we extract assets directly from the game like when using FModel and we’ll convert them into .blend and .fbx files using Blender.

 

.pak

Packaged assets format for Unreal Engine and what we’ll distribute as the mod so that it can load in-game.

 

.blend

Blender Project Files, we’ll keep a source so we can easily return to fix/change/re-export/ect.

 

.fbx

An open standard for model and animation files, we’ll be exporting .fbx for models and animations then using UE5’s fbx importer to get models/animations into our mod.

 

.uasset

These are the raw unreal asset files. These assets come in 2 forms but are named the same, cooked and uncooked. Uncooked assets are the same as those you save in the editor without any packing or compression, cooked assets are packed and compressed by propitiatory methods and can not be undone or loaded outside of run-time. The SCake API distributes Uncooked .uasset files which you can load in the editor.

 

.json

A simple text file with a specific format specialized in storing data with an easy to edit and read format. SCake as a JSON loader for importing animations (which is the recommended method) and we’ll want to configure a .json file and distribute it with the corresponding animation pack.

 

Additional Resources

CharacterID list

Resource Link : https://pwmodding.wiki/docs/game-data/monster-table

To properly reference various Pals we need the Character ID, this ID is used to reference things not just in-game but is also used in the file structure so having this list is crucial for setting things up properly!

 

Bone Index Corrected Skeletons

Resource Link : https://drive.google.com/drive/folders/1-RwOyqXaZql01ALr5ymq7l23MKpGPmmN?usp=drive_link

We’ll be using these assets for importing animations with the correct Bone Index order. Why and how will be described later in the tutorial. (A tutorial on how to create these assets on your own is in the works)

 

2. Understanding and Planning for SCake

Before we actually get into animating it’s a good idea to quickly cover how SCake works and plays animations so you can appropriately plan your animation to best work with the framework. SCake is fairly flexible, but it is designed around some simple concepts that are expected for Erotic animations specifically. SCake works by registering individual sets of animations where each actor involved in the animations has an associated Animation Montage, these montages are synced up and played at the same time whenever the animation is called. However when actually calling animations to play SCake uses what’s called Animation Events, these events are a configure-able list of those previously mentioned individual animation sets that play in order according to if they are looping and playback time settings. To give a quick example, you may have an scene where a character pets a pal, then gives the pal a hug, then returns to the same ‘petting the pal’ animation. This would be an Animation Event with 3 stages and 2 animations, you would create 1 petting animations, then a hug animation and register those with SCake as Animations, then you would register an Animation Event where you create 3 stages with stage 1 and 3 referencing the petting animation and stage 2 referencing the hugging animation. “Register” in this case would just be configuring the .json file and having it installed correctly (details on this included with SCake). You can also use Stage Order, an advanced setting available for Animation Events where you would just register 2 stages, 1 with the petting animation and 2 with the hugging animation, then just playback stages like “0,1,0” (SCake counts things starting at base 0, this is a technical thing). This will playback the same animation as setting 3 stages, but you only need to register with 2 stages.

 

Additionally since SCake was specifically created with erotic animations in mind it also offers the ability to register orgasm variants of different animations, called “Climax Variants” (or Climax Var for short). If these variants are registered with the animation, when the designated characters orgasm during the animation then it will switch to playing these variants allowing animators to create custom motions and effects based on which animation is playing. This feature is technically optional, but I do encourage animators to give it a shot! If you only feel like making one Climax Variant you can always just reference the same animation for each (You can mix and match however you want). These can also be configured in Animation Events, so users are able to fully customize which animations play. Now with these systems in mind we can move to actually making animations!

3. Extracting the Skeleton/Model

If you already have the Skeleton and Model to start animating then you can skip this step! For the rest of us (or just for those curious) for this step we’re going to be using FModel to extract game assets to use as our basis for animating.

Setting up FModel

1 ) First you’ll need to get FModel, head to their GitHub page - https://github.com/4sval/FModel and click on “Releases” (usually on the right side of the page) and download the latest version labeled “FModel.zip”.

 

2 ) Extract that file and put it wherever you want it (I have dedicated folders for my mod developments), inside the extracted folder you should have FModel.exe, imgui.ini, and a dll file (most likely oo2core_9_win64.dll).

 

3 ) Now you can open the FModel.exe to start up FModel and you should be created with a Directory Selector (if not, go to “Directory” in the top left and click on “selector”), if 2 additional options “Name” and “Directory” are not showing in the lower half, go ahead and click on the double arrow under “ADD UNDETECTED GAME” to open the add game options, from there you’ll want to set the name to something you’ll recognize (I just named my entry as “Palworld”) then find then click the … next to the “Directory” text field and find your palworld installation. If you installed through Steam it should be in your steam library directory (you can right click the game in your Steam library, go to “Manage” then click the “Browse Local Files” button and it will open a file browser to where your game is installed, you can then just copy the address in the top bar to the selector window for FModel. Once you have the Name and Directory set, click the + icon in the bottom right to add it to your Detected Game List. From there change the Detected Game to Palworld and change the UE Versions to “Game_UE5_1 (536870928)” then click “OK” to confirm and select.

 

image.png.0cdba53fbc2512d4c5fae64ba787a07a.png

 

4 ) We’re not quite done with set-up yet because in order to actually pull data from the game we need what’s called a mappings file. This mapping file effectively just tells us how the data is sorted inside the pal, which can then be used by programs like FModel to pull the data properly. I won’t cover how to create your own mappings file (UE4SS is the easiest way if you’re interested in looking it up), instead I’ll link to this specific step in the Asset Swapping guide on the Palworld Modding wiki, which povides a direct download for a mappings file, https://pwmodding.wiki/docs/asset-swapping/Home , should be labeled as “Palworld Mapping File” and will give you the file “Mappings.usmap”.

 

5 ) Next, we’ll go into the “Settings” by clicking the option at the top of FModel, then ensure you’re on the “General” tab. Under “ADVANCED” make sure the Local Mapping File is enabled and then set the “Mapping File Path” to wherever you put the Mappings.usmap file we downloaded in the previous step. (Optionally while here you can also set an Output Directory for where you want exported files to go which can be handy. I just made an Output folder within the FModel folder itself and use that as my Output Directory.)

 

image.png.f7581d7d6fce01295e666629bc8c0a0a.png

 

6 ) (Technically Optional) Next we’ll set things up so we can extract the full skeleton, under the “Models” tab in the settings, near the bottom enable “Handle Skeletons as Empty Meshes”. This option will allow us to extract the full skeleton asset as a single Armature without the mesh and this can then be morphed and weighted on to custom models if the need arises.

7 ) Once you’ve got your settings set up, go ahead and click “OK” at the bottom right to confirm all your changes. If you set up a new Export Directory then you’ll also want to close and start FModel back up so that the new output directory takes effect.
 

Finding/Extracting the assets

Now that we have all the settings configured we can return to the main screen of FModel, you should see various .pak files listed on the left side under “GAME ARCHIVES”. These are the packs loaded into your current install of Palworld, which will also include any mods you have put into the content folder (This will be relevant later when making custom Animation Events for SCake). What we’re interested in is “Pal-Windows.pak” which is the pak file for Palworld’s main assets, go ahead and double click that entry to enter into the pak and see the full file structure. This will now turn the left side into a file/directory tree where we can see everything included in the selected .pak file. Now let’s go grab the model we wish to animation and optionally we can also grab the corresponding skeleton asset.

 

1 ) First navigate to the appropriate folder. All the character models and skeletons are stored in “Pal/Content/Pal/Model/Character” with “Monster” being the folder for pals, “NPC” being the human characters and some boss characters, and “Player” being the playable character assets. All full skeleton assets are stored in the “Skeleton” folder.

 

2 ) For this example I will be grabbing the Lamball assets, which internally the game calls “SheepBall” and associates with its CharacterID, so I navigate into the “Monsters” folder, find “SheepBall” then click the “Packages” tab at the top left which should show 9 assets for this particular folder. This will change the display to showing the assets in that folder and we want to ensure the asset named “SK_[CharacterID].uasset” (would read “SK_SheepBall.uasset” this the Lamball example) is in this folder, otherwise we got the wrong folder and need to find the correct one. This SK asset is the model and associated bones used for this particular character and it’s all we need to start animating. Keep note of the file path as this will be important later when we start importing animations!

 

3 ) So now that we’ve found it, let’s extract it! Right click the appropriate asset and select “Save Model (.psk)”. This will extract the model as a .psk file in the Output folder we optionally set up from before, by default the output folder will also keep the same file path. To navigate quickly to your newly extracted asset you can go to the bottom of FModel where it shows the report log and just click the extracted asset text and it should open a file explorer window where the asset resides. Optionally here you can also extract all the materials/textures if you had any desire to do so but we won’t be bothering with that in this tutorial. (Check tutorials on the Palworld Modding Wiki like the asset swapping tutorial - https://pwmodding.wiki/docs/category/asset-swapping – for more details on that. Textures/Materials are not required to get animations made and imported.)

 

image.png.c021047989ea7c98ed73a97faefe9642.png

 

4 ) Optionally you can do the same thing for the Skeleton asset from the “Skeleton” folder, these assets will have the lable “_Skeleton” appended onto the end of the name used for the model. You will only need this asset if you are trying to create a completely custom model or intend to create your own import assets which we’ll touch on later, if you plan to do this or just want it just-in-case you can right-click and also save this as a .psk file. If the settings were set up correctly it should output a .psk with an armature and an empty mesh, which we can then re-parent to new models.

 

5 ) You can technically do this for animations as well which are in the “Pal/ContentPal/Animations/Character” folder instead. For these you would want to find the animation with the prefix “AS_” which stands for “Animation Sequence” then select the right-click option “Save Animation (.psa)” which will extract the animation as a .psa file we can import into Blender. You would only want to do this if you intended to make an alternative version of the base game’s animation but be aware that extracting .psa files has a lot of issues and things may not extract how you’d think it would. (For most animations you can also extract the AM_ prefixed files instead, which are Animation Montage files, however some have blend profiles and this will cause the export to have distortions and won’t be usable with our current tools.)

4. Importing into Blender and Animating

Once we have models to animation we can import them into Blender and get things moving! This section will be relatively brief, this won’t be a full Blender animation tutorial as there are a ton of great resources for that. Instead I’ll be focusing on just getting the model into Blender and covering some simple quirks with the models/rigs that we should be aware of.

Setting up the import Plugin

If you already have a model/rig properly set up for animating then you can skip this step, otherwise, if you haven’t already, we need to install the io_scene_psk_psa plugin for blender linked in the resources portion so that we can import the .psk model file we exported from FModel.

 

1 ) Head to the github repository ( https://github.com/DarklightGames/io_scene_psk_psa ) and download the latest release compatible with Blender 4.0 (at the time of writing that is Release 6.2.0), you can find releases on the right side of the page under “Releases”. You’ll want the .zip file and DO NOT extract it! To make things easier we want to keep the plugin as a .zip so that Blender can automatically install it for us by just selecting the .zip.

 

2 ) Go ahead and start up Blender 4.0 if you haven’t already and head to the top bar, select “Edit” and then the sub-option “Preferences…”. In the Preferences panel in the left side tabs select “Add-ons” then use the “Install…” button in the top right of the panel and find the .zip file for the plugin we just downloaded in the last step. Once you click and install the Zip it should automatically enter the name in the search field and we just need to click the checkbox to enable it.

 

image.png.42e6a807f1e24beafc794d444de91a2a.png

Import the Model

1 ) Go ahead and open up Blender if you hadn’t already and create a new empty scene, ensure you stick to defaults for the scene set-up to remove any potential variables messing with the importer.

 

2 ) Next we need to import the model we’re looking to animate with the relevant rig. Click “File” in the top bar and select “Import” then the “Unreal PSK (.psk/pskx)” option, this is the plugin we installed and enabled for importing Unreal .psk/.psa files. In the import window navigate to the model you exported from FModel you with to animate and then import it with the default settings. (Most importantly leave scale at 1.00! Some guides will incorrectly tell you to change this, but this will screw things up! Those guides export the FBX incorrectly!)

 

image.png.dfc5c70845e1a8e9852ef0d953802c80.png

 

3 ) Now you have the model and all relevant bones you can animate for it! Just continue like normal! However, I will note that later we will be renaming the armature to “Armature” for importing into UE5, which is a critical step so you may do that now if you wanted. (Optionally this is when you would also import any animation you wanted to, you would click the Armature and then use File > Import > Unreal PSA (.psa) and then navigate to and import the animation you exported with default settings. This will add the animation to the actions list, then it can be altered just like any other animation.)

 

Animation Quirks

There’s a couple of quirks we should touch on here before we continue which will be relevant to animating characters for palworld.

- ) When exporting the skeleton FModel includes the sockets from UE5’s socket system as bones, however these are not actually bones and can safely be deleted. All the sockets will have the prefix “socket_” on them which makes them easy to find. (They don’t even have weights so it’s not like animating them will do anything to the model anyways, and a fixed bone index asset won’t have them)

-) When animating the default models you may notice some strange or sharp weights, this is normal and won’t look nearly as deformed in-game (usually). This is because FModel doesn’t do a perfect job at extracting all the weights correctly so some things will stretch to far or be much sharper than it actually is. Focus on the general shape/motion of the animation and don’t worry too much about trying to fix small deformations, as long as you are animating correctly these shouldn’t look too bad in-game.

- ) In most models the “root” and “pelvis” behave exactly the same, moving/animating the pelvis will move the entire model. You can use some of Blender’s bone/rig locking/limiting tools to help make this less of an issue but remember to apply those modifiers before exporting the animation or else it may not look correctly in-game.

- ) When translating the entire model by shifting the root (or pelvis in most model’s cases) the hit-box of characters will follow the mesh, however the capsule (what’s used for ground and gravity calculations) generally will not. SCake has an option for moving characters but to ensure multi-character animations line up properly we generally want to move the bones in the animation (moving the root/pelvis to where we want the character to be offset) so that they line up and not rely on trying to adjust them in-game, this will help the capsule components line up and apply the same ground position to all actors in the animation. (of course you can play around with this to find whatever works best for your animations ^-^)

 

5. Exporting our New Animation

Ok, got something animated? (Or at least some test animation? I always recommend doing some sort of simple animation first like a waving arm test to get a workflow going!) Now we can take the next technical step, exporting our animation so that Unreal will be able to import it in a way that works in-game and with SCake. There’s a couple of things we need to keep in mind, the Armature must be named exactly “Armature” so that it imports properly, otherwise UE5 messes up the root bone and doesn’t animate in-game. Additionally we want to export each animation as it’s own .fbx so we can adjust and re-import each animation on its own while also being able to import additional animations if needed (in unreal if you re-import an FBX it will just update any animation already imported but won’t add new ones, so we save them individually).

 

1 ) First things first, let’s check and ensure a couple things are set properly. Ensure your armature is named “Armature” (When we import into UE5 the armature must be named exactly “Armature” or else it won’t map to the bones correctly) and your animation is selected in the actions editor (We will be exporting each animation as its own file so we need to select the right animation to export). The currently selected action should show up under the armature in Blender. (For my example I just used the SheepBall petting animation from in-game)

 

image.png.bcc7469b417c2c65d24d9bbbb6a0b859.png

 

2 ) Next ensure you’re in “Object Mode” in the top left, then we need to select the Armature and the associated mesh we are going to export (Use ctrl+click) and click on File in the top left, and under the “Export” Submenu select “FBX (.fbx)”. We will be using the FBX format to import our meshes/animations into UE5.

 

image.png.a7fb0b375c88deab76c91fa47dc1ea24.png

 

3 ) While exporting we need to set some very specific settings to ensure things import correctly, I’ll provide an image of these exact images, but for those that prefer text the settings that diverge from default are… Under “Include, in “Limit to” enable “Selected Objects” and select only the “Armature” and “Mesh” options to prevent garbage data interfering. Under Transform set “Apply Scaling” to “FBX Units Scale”, In the Geometry section set “Smoothing” to “Face” to prevent some strange UE5 errors on import (which can cause shader issues), for “Armature” settings you want to disable “Add Leaf Bones” so it doesn’t add any extra bones or weights, and with “Bake Animation” enabled, disable “NLA Strips” and “All Actions” so we export proper data and only the single animation. (If for some reason you wish to go against the advice of exporting 1 animation per .fbx, you can leave “All Actions” enabled and it will export all animations in the Actions list for that Armature into the FBX, however this can cause issues later down the road in UE5 if you ever try to update them.)

 

Note : Some of these settings and still be used like your typical workflow shortcuts, stuff like “Apply Transform” and such if you animated with it specifically in mind, however it’s best practice here to apply any modifiers before an export. Personally I create a collection for animating and then a second collection for exporting where I apply any modifiers and rename for export, but you would want to find a workflow that works best for you!

 

image.thumb.png.eb72545dff0689ed789e955c593777fa.png

 

Updated : 2024-04-08

Note ) “Key All Bones” and “Force Start/End Keyframes” are technically optional but recommended unless you know exactly what you’re doing. SCake works by overriding animations in-game, to ensure every bone’s animation is overwritten we enable these settings to ensure every bone is keyframed in the animation. However, if there is a bone you don’t want keyframed, either to allow in-game jiggle or allow the character’s head to still move with the camera for example, you can disable this setting and keyframe all the bones you don’t want moving with the in-game animation handling. I only recommend doing this if you know what you’re doing, since not enabling these settings and not keyframeing your animation correctly can result in broken animations.

 

4 ) Once you got everything set, save the file with whatever recognizable name you want, however keep in mind that UE5 does have a path limit so I recommend making your file names recognizable but abbreviated to prevent having import errors or issues with the animation causing crashes in-game! (My current name structure is Actor Count, Abbreviated CharacterIDs, AnimName_Stage with _Cli appended for climax variants, for example “2_FplaMshpball_PetRecreation_0”. This keeps things sorted and easy to link together while being short enough to directly use in UE5)

 

5 ) Now you would repeat this process for every character and stage of the animation you are making, it sounds like it’s a lot but once you get it down things actually go rather quickly. I recommend making a preset for your export settings up at the top where it says “Operator Presets” so you can just select the preset you’ve made and have your settings quickly set-up (also prevents you forgetting what settings are required, which I TOTALLY haven’t done before...).

 

6. Setting up our UE5 Project

Now we get to the more intimidating part of the tutorial, importing the animations into UE5 so that they work in Palworld! But don’t worry! It’s not nearly as complex as it seems and there’s some shortcuts and assets in the works to help make this process quicker with some of these steps becoming redundant as we fill out our modders resource collection, but the methods will still be outlined here for completions sake (and in-case someone needs to make assets not included in our modder assets collection).

 

Setting up the Palworld Modding Kit

If you plan to just import animations and don’t plan on using any of the SCake SDK, then you don’t need to install the full modding kit if you don’t want to; If you choose to do so later you can always move your project assets over into the modding kit and they should work just fine as well. If you DO plan to use the SCake SDK and would like to access more features for animations then you can follow the guide over on the Palworld Modding Wiki (https://pwmodding.wiki/docs/category/palworld-modding-kit) which is a very thorough tutorial that wouldn’t fit within this one. If you’re choosing not to use the modding kit then check the next immediate section.

 

Setting up Without the Modding Kit

Technically you don’t need the modding kit when just importing animations, however not using the modding kit and the SCake SDK will limit you on some features you may want for your animations. Regardless, if you’re not wanting to use the modding kit you can set up your own project. There’s a guide that covers this for Model Swaps (which also don’t need the modding kit) located here https://pwmodding.wiki/docs/asset-swapping/PackagingInUE5 which should work perfectly fine, though I’ll cover setting up the project here as well.

 

1 ) Acquire and start up the Epic Games Launcher, then select the “Unreal Engine” tab on the left side to enter the engine portion of the launcher.

 

2 ) Once here you want to either click the version number in gray letters under “ENGINE VERSIONS” or click the yellow “+” icon next to it, then add and install Unreal Engine 5.1.1 (UE5.1.1), this is the version used by Palworld and we need it for packaging / compiling correctly.

 

3 ) Next we want to click the “Launch” button in the 5.1.1 box to start up the Unreal Editor, once you get to the intro screen create a new project using the “Blank” preset, set your project location near the bottom, set project details to “BLUEPRINT” and “Desktop” for target platform, then name your project “Pal” so it creates the correct file paths. (If you don’t name it Pal then paths may fail to compile properly)

 

4 ) It may take a moment to start up as it sets up the initial project, but once it does you can click “Platforms” in the top bar of the editor and select “Packaging Settings…”, this should open up the project settings. Ensure the only options selected for the first few are “Use Pak File” and “Generate Chunks” with the surrounding options disabled (Which boxes are checked by default can change between installs, check the below screenshot for what this should look like), leave any setting below “Build Http Chunk Install Data” on default. (The model swap tutorial will enable cook everything, we will be including assets we do NOT want to cook or include with the mod, so we don’t enable this. We’ll use an asset label to force cooking instead.)

 

image.png.44f452e82d9bbaf61c5445dac6e8da06.png

 

Updated : 2024-04-08

5 ) In theory this next setting should be optional, however in some instances UE5 doesn’t properly package files without this setting enabled so we’ll just enable it here to avoid any issues later. On the same settings panel as before, scroll down and enable the “Cook everything in the project content directory”. This setting means it will always check all assets in the content directory and set things to cook if not otherwise specified, this causes the packaging process to take a bit longer if you have a lot of assets in the content directory but ensures our mod pak will package and avoid an engine bug.

 

image.png.4045a027f308929320541f7ef69b4466.png

 

6 ) Now your project should be set up and ready to start the import process!

Installing the SCake SDK

If you installed the Palworld Modding Kit, now is a good time to install the SCake SDK, though you can also install it later if you wanted to. If you don’t already have the SDK, you can download it from the SCake mod folder (https://drive.google.com/drive/folders/1vYfgMom7UJs2OmJ5B4FGQTMYEOR0n9Vr?usp=drive_link). Next you want to extract the “mod” folder contained within the SCake SDK into your modding kit’s “Content” folder, and… that’s it, SDK installed! The SDK comes with a preset dummy blueprint for calling the SCake API via Blueprints, ensure you don’t include these files with your mod! Instead, the SDK has an additional folder with a preset ModActor and an asset label already set up to separate the 2 folders in the packaging process. If you’re just importing animations you can delete the ModActor in the preset folder and rename the folder to your animation pack mod name, or just create a new folder for your animation mod which we’ll cover a bit later.

The Bone Index Order Issue

This one requires a brief explanation, however if you’re interested you can check out my write-up blog post about the issue here (https://subscribestar.adult/posts/1160698) but you don’t need to know all the details to fix the issue. In short, UE5 compresses animation and skeleton data so that it references each bone and weight by an index instead of by name when used in-game. This means when we create assets we need to import our animation and bind it to a skeleton with the correct Bone Index Order. Unfortunately FModel does not export the skeleton with the correct bone index order, so to fix this we have to create a new asset that has the correct bone index order before we import our animation, but after we have the correct skeleton to import on-to we can just target that asset for any subsequent animations we wish to add.

Fixed Bone Index Order Assets

Thankfully, we do have some assets which will already be set up to fix the bone index issue for you without much manual work. As we work through things and Palworld gets updates there may not always be an asset available, but if you’re patient you can always ask in our community and we can get one made for you to use! I distribute fixed bone index assets through the GDrive folder under “Modder Resources (https://drive.google.com/drive/folders/1vYfgMom7UJs2OmJ5B4FGQTMYEOR0n9Vr?usp=drive_link). At the time of writing there are 2 types of fixes, uasset and dummybone, uasset is the easiest to implement and is just an uncooked asset with the fixed bone index asset with the correct file path already set up, while the dummybone is a forced bone index order asset which you would need to manually import and place in the correct place. (I recommend only using the dummybone assets if you know what you’re doing or have been asked to do so when asking for help). You can also get fixed assets from the community however I can’t personally provide validate those assets or how to use them properly.

 

Fixed Bone Index Asset – uasset

If you’re downloading from the BoneIndexCorrect_uasset folder, these are set up assets for you to drop directly into your mod project and require minimal work. Download the .7z for the CharacterID of the models you are looking to import, extract the folder, then head to your UE5 project inside the Content Folder and copy over the “Pal” folder to the “Content Folder”. If you did this correctly then when you open your project you should have a new folder in the browser with a path leading down to “Pal/Model/Character/Skeleton/[CharacterID]” with the skeleton asset you’ll be targeting your animation to. (Note : This method won’t work if your animation targets a fully costume rig made for a new model that doesn’t use the base game’s corresponding bone structure) DO NOT include these assets with your mod! Make sure you package your animation pak without these assets or else it will break compatibility and cause other issues, like overwriting model replacers!

 

Fixed Bone Index Asset – dummybone

If you’re using the manual DummyBone assets, these are simple and quick .fbx files set up to have the correct Bone Index Order but may look broken in the editor (these are made by quickly creating a ‘fake’ skeleton with the correct Bone Index Order simply for importing, but does not have the actual positioning or hierarchy of the original skeleton). To use these you need to import the mesh and skeleton like a normal .fbx import (use default import settings with Mesh and Skeleton import enabled), then place the skeleton in the corresponding folder for the model you are trying to import animations for, this location should be in the “Pal/Model/Character/Skeleton/[CharacterID]” folder. When importing animations with these dummy skeletons don’t expect the in-engine animation preview to look correct, but if done properly the animation should playback just fine once you’re in-game. DO NOT include these assets with your mod! Make sure you package your animation package without these assets or else it will break the in-game skeleton and model!

 

Note : If you want to use a custom model for preview, you will want to use the BoneIndexCorrect_uasset option, then when importing the mesh target this skeleton instead of the included one.

 

If you’re using a resource provided from another source, make sure to read up on what exactly their asset is and how to use it properly as other methods may be available!

Fixing the Bone Index Order Manually

If you’re already using a fixed bone index asset you can skip this section and move to “Set-Up Project for Animation Importing”!

Fixing the bone index order isn’t a ‘difficult’ process, but is a tedious one. I highly recommend just using a fixed bone index asset that’s already made and provided by the links from before, however there may be assets that either haven’t been added yet or you may want to just try the method. So to get animations importing properly I’ll give a very brief explanation on how to make your own DummyBone asset and how to get it set-up and imported properly. I’ll also cover the proper method for creating an uncooked asset (fixed bone index uasset method) at the end if you wanted to try doing that as well.

 

Note : The Human Skeleton is a completely different beast than the pal skeletons because of the sheer number of bones included, which requires a few additional considerations caused by limitations. Because of this I recommend using the SK_PalHuman skeleton provided in the modder resource folders. (Making a dummybone asset for humans isn’t an easy task, unlike for pals)

 

1 ) First we need the model extracted using FModel like we did earlier in this tutorial, then we import that into Blender just like before as well. (I recommend not importing it into the same file that has your animation work, save your animations and close Blender, then start from a fresh instance to prevent accidentally breaking your animation file!) Don’t forget to rename the Armature to “Armature” exactly!

 

2 ) Now we need to go back into FModel and find the corresponding Compressed Skeleton Asset for that model which should be in “Pal/Model/Character/Skeleton/[CharacterID]”. We’ll want to inspect this element by double clicking on it and having the JSON data load in the main panel. (If a preview of the skeleton pops up, you can just close that additional panel pop-up)

 

3 ) Inside the JSON data we need to find the section “FinalNameToIndexMap” which should be near the bottom. This is the Bone Index Order we need the skeleton to match exactly when importing the animation.

 

image.png.79369736fb95938e2b2b3eaffaebf413.png

 

4 ) Now we can keep this info up while we go back to blender with our imported model and entering “Edit Mode” in the top left. The next step is to check the hierarchy and delete any “Socket_” prefix bones that don’t appear in the bone index shown in FModel, and then re-parent everything so that it will import with the exact order shown in FModel following alphabetical sorting. For my example I’ve been using SheepBall (Lamball) which does have several socket bones applied we will want to re-parent to the end for the dummybone asset (Or just out-right delete, sockets are added dynamically by UE5 and normally can’t be animated but in-case someone figures this out later re-parenting them to the end would allow animations to import with those sockets animated. Unfortunately there isn’t a way I know of currently to check the order of sockets, so that part would be experimentation).

 

Shortcut Notes : ctrl+P is the re-parent shortcut in Blender by default, keep offset when re-parenting to maintain easier previewing, just select the bone you want to re-parent, then the last bone you select is the bone you want to parent to.

 

Example of the sockets in the bone tree, these would be re-parented to the end or deleted

 

image.png.211a468ce2877fb3a8f62c85415a7de3.png

 

(Left : original exported skeleton, Right : DummyBone Asset) Example of the full SheepBall bone tree re-parented to ensure the correct Bone Index Order with every bone in the exact order required to match. We just start from the top and work our way down, looking for anything that would be out of order, then re-parent them to fix anything that would be out of order following alphabetical sorting (ABCDEFG...).

 

image.png.3619db876eb889fb8b5133cd20bc8c6e.png


5 ) Once you have everything sorted correctly you can now export a .fbx file just like we did before when exporting the animation, and that’s the DummyBone asset! Keep in mind this is only for importing animations and should not be included in any mod, it’s only purpose is to ensure the bone index order is correct when importing.

 

For a proper uncooked uasset asset, we would need to use UE5 or use hex edits with internal knowledge of the compressed skeleton asset. For this it’s important to understand just how UE5 adds additional bones, when adding new bones not seen by the project before, instead of re-sorting the full bone index order UE5 just adds the new bones to the end of the index. So to create a proper uasset you would need to do the same sort of sorting we did for the DummyBone asset, but instead of just re-parenting when finding an inconsistency, you would instead need to import an asset into UE5 with all lower index bones removed, then continue the process re-importing the skeleton any time you hit an inconsistency. This means that UE5 would be adding the new bones of each step onto the end and ensure they are placed in the correct bone index order. For sockets you would also need to not just append them to the end or delete them like we did in the DummyBone asset, instead we would need to re-add them in UE5 through the UI with the appropriate offset. Once complete this would give you a fully working asset that can import animations while also being fully preview-able in the editor! (Also, once one of these uasset versions are made, we don’t have to worry about importing any skeletons, just copy over the uasset in the right spot and it’ll work!) As you can probably tell, this is why I recommend using the DummyBone method if you’re trying to make these assets yourself, since a proper uasset is time consuming and a bit complicated compared to the DummyBone method.

 

Setting up the Mod Folder

Finally for our project set-up, let’s configure your animation pack’s mod folder so it’s ready to export after we get animations imported.

 

1 ) You’ll want to start with creating your mod folders to import your animations into. If you installed the SCake SDK you can rename the preset folder or create a new folder under the “Mods” folder in your project, otherwise if you have a blank project create a “Mods” folder under “Content” then a folder for your animation pack.

 

image.png.73753f4f3eb1a7059ae6615fbefc9903.png

 

(I’m renaming the “YourModHere” folder to my animation pack name, “TutAnimationPak”)

 

2 ) If you used the mod kit you should already have a PrimaryAssetLable in the folder, but if you made your own folder instead of renaming or didn’t use the SCake SDK create a new “Primary Asset Lable” by right clicking within the file browser under your pack’s folder, and select “Miscellaneous” then “Data Asset”. In the popup that shows up type in “PrimaryAssetLabel” and you should get a single option, that’s the one we want to add if you don’t already have it. (In my sample image I used the SCake SDK, which already has this asset added)

 

image.thumb.png.5cc7c550df3ddf1fbef1e2c64c9d25ff.png

 

3 ) Next lets open up our Primary Asset Lable real quick. For this you want to set a “Chunk ID” that doesn’t match any other mods in our project (SCake SDK uses 666, so use a different one!), this Chunk ID is the .pak file our mod will pack into when we run the packaging process. Next we want to set the “Cook Rule” to “Always Cook”, “Label Assets in My Directory” toggled on, and then save the asset and we’re done with that aspect!

 

image.png.94390dc39ff1758ad5a2f11385afee00.png

 

4 ) If you wanted to use the SCake API but didn’t use the preset folder, you’ll need to create an “Actor” called “ModActor” exactly so that UE4SS can find and hook your mod for calling the API. If you didn’t plan on calling the API then you don’t need to worry about it.

7. Importing Animations and Configuring for SCake

Finally, the good bit, actually getting animations in-engine and ready for gameplay! For this we need to import the animation .fbx file we exported earlier targeting the fixed Bone Index Order Asset we set up with the project, then create the animation montage assets using those imported animations to configure with SCake.

 

1 ) First let’s get our animation imported, ensure you got the corrected Bone Index Order Asset imported and set in the file structure correctly as we covered earlier. Next just drag the animation .fbx file for your animation that we exported earlier into the file browser space in your animation pack’s folder within the editor. This should bring up the import FBX settings.

 

2 ) In the FBX settings we only want to import the actual animation. Start by setting the “Skeleton” to the corresponding corrected skeleton asset we imported to the Pal folder earlier, then disable importing the mesh, everything else should be left on default with animations importing (some settings may be changed if you know exactly what you’re doing). (You must select a skeleton first or else when Mesh is untoggled it hides the Skeleton target option.)

 

image.png.0c3e5b6140a28bc860589e828fb50d34.png

 

3 ) Once set up, hit the “import all” and it should import the single animation if everything was set up correctly. You may get an error that reads like “the skeleton transform was different” but this error can be ignored as it has no effect once we’re in-game, if you got a red error however something got messed up in the pipeline and I’d try following the exporting the animation part of the tutorial again. Also, if you used a DummyBone asset as your skeleton to import with you may notice the preview of the animation is broken, DON’T PANIC! That’s just how the Dummy Bone assets work and, as long as everything else was done correctly, it should look fine in-game!

 

4 ) The animation is imported as an Animation Sequence, but SCake uses Animation Montages to playback animations, so we need to make a montage out of our imported asset. Simply right-click the imported Animation Sequence, then at the top of the pop-up menu select “Create” then “Animation Montage. This will create an Animation Montage out of that asset, feel free to call these assets anything you like but we will be referencing the Animation Montage later when configuring the JSON file so make it something you will remember or can easily reference!

 

5 ) If your animation isn’t looping and is only intended to play through once, that’s all we ‘need’ to do, but if your animation is intended to loop you will need to open your new Animation Montage asset by double clicking on it. It should open up the animation with a green bar and the anim playing, to make it loop correctly in-game we need to go into the bottom right section into the “Montage Sections” tab, and click the checkbox for “Default”, then select “Default” under that option to have it loop back to the start. (It should display a little circular arrow next to “Default” when set correctly to display a loop-back)

 

image.png.8007bce889d5b66c8c2e1f5cb2ae0d7b.png

image.png.6130f4bc8514b2007c5ecc519f751f05.png

 

6 ) At this point we’re done with the basic import, you would repeat these steps for each actor in your animation with their corresponding animation. I strongly recommend following a naming scheme that matches actors up based on what animation they are playing together. However there are a lot of really advanced things you can do with Animation Montages, like creating custom loop patterns, trigger sounds and visual effects, implement blending between different animations, and much more! I do recommend not going too crazy and trying to use Stages within Animation Events for most transition type stuffs, that way things stay modular and customizable.

 

7 ) Before we set up things to package it may be a good idea to get the paths for your animations so we can reference them in the JSON file we’re going to configure in the next few steps. If you hover over your animation in the editor it will show the “Path:”, we will want to save this path with the file name appended to the end like “/Game/Mods/TutAnimationPak/TutPetAnim_SheepBall_Mon” and this will be what we directly reference in the JSON file configuration! It’s also a good time to mention the file path limit. UE5 has a limit of 260 characters for a file path, this isn’t a huge deal and provides a lot of freedom however if you get close to the limit with your file name and mod folder structure it may cause issues or even in-game crashes, as such I recommend abbreviating what you can within your asset names to prevent issues. The value to look at is the “Cooking Filepath Length:” which counts the additional stuff it adds in-game, if exceeded it will cause issues and UE5 most likely won’t allow you to package your project.

 

image.png.23145d8951c8c36f23527dd39255e0db.png

 

8. Exporting our Animation Pack and Configuring the JSON

Alright, almost there! Now we just need to export the animation pack and configure the JSON to have usable in-game animations with SCake! If the previous steps were followed correctly this should go relatively smoothly!

 

Exporting the Animation Pak

1 ) Ensure all your assets are saved and ready to be exported, double check your PrimaryAssetLabel settings are correct, then we should be ready to package! Up in the top bar click the “Platforms” option like we did setting up the project, then hover “Windows” then click “Package Project” and select an output folder. The first time you package it will take some time as it sorts out all the engine compiling and baking processes, but after the first time it’s much quicker. (Note : there is a method of packaging mods individually but I won’t be covering that method here)

 

image.png.3d142c16fe22ba3d5c13d98cc25c0f71.png

 

2 ) Once packaging is complete navigate to the output folder you selected, enter into the “Windows/Pal/Content/Paks” folder, and there you should see multiple files labeled “pakchunk##-Windows.pak” with ## being the ChunkID you set for your packs. With the SCake SDK the default Chunk ID that’s set is 10, so you would want “pakchunk10-Windows.pak”, otherwise if you didn’t use the SDK just pull the Chunk ID you used. Go ahead and rename that .pak to what you called your mod folder within the editor, in my case I used “TutAnimationPak”.

 

3 ) Now you can move+copy that .pak file wherever you need for saving/distribution as well as install it into SCake. To touch briefly on installing animations, you would place the animation pack into “[Your palworld install location]/Pal/Content/Paks/~mods” unless the mod uses the SCake API or has Blueprints attached, which would go in “LogicMods” instead of “~mods”. Then we’d move the .json file into the “AnimJSON” folder in the ~mods folder then add the file name of the .json to our _LoadList.json, but we haven’t made that .json yet, so let’s do that!

 

Making a Simple JSON Animation File

SCake comes with a few templates in the AnimJSON folder ready for animators and users to use as a basis for configuring new animations and events. The “_SCake_TemplateWithExplainations.json” will include explanation for every setting as well as examples of how to format the file, however we’re going to keep things super simple and use the “_SCake_SimpleTemplate.json” and use that for our base. You can always use whatever template you feel suites your needs best! (The explanations template is very helpful to open along-side your own .json file so you can reference it for what each parameter does.) The first time through may be a bit confusing, but once you get use to things configuring should go a lot smoother.

 

1 ) Create a copy of the “_SCake_SimpleTemplate.json” template .json file and rename it to your animation pack’s name (technically you can call it whatever, but it will be easiest if it matches your animation pack’s name from the .pak file), then open it in any text editor though I do recommend using one with JSON syntax checking and highlights (you can use https://jsoneditoronline.org/ for an editor that works in the browser and has error checking, custom colors, simplified view, and more, it’s a pretty handy tool).

 

If you only want to do the absolute bare minimum to get your animation playing in-game as a test (or just because you can’t be bothered to set up the .json, I get it.) then all that is required is the UniqueAnimID, AnimByPath, and Compatibility for each Animation you’re registering, then in Animation Events you just need the UniqueEventID and Stages defined with AnimIDs. While everything else is ‘technically’ optional, I do recommend filling out the json before distributing the animation officially.

 

NOTE : When inputting information, avoid using special characters like slashes and punctuation marks as these may not parse correctly and cause the animations/events to fail to register! Underscores and spaces should be fine but I personally replace all spaces with underscores unless it’s a filepath where it needs to be exact.

NOTE 2 : Any section you’re not using in the .json file you can remove, for example if you have no aggressors instead of leaving it blank you can simply remove the entire section. It’s recommended to remove anything you’re not using or need defined differently than default to help prevent errors and keep the most compatibility.

 

2 ) Now let’s just go down the settings in order and configure the animation with minimal information, we can always come back and add stuff later! You can safely delete the DevNote at the top explaining what the template is, and the PackName is purely for readability and ease of use though I recommend filling out your pak name here.

 

3 ) Next let’s set some basic metadata, for each animation you are registering you’ll want to copy the entire anim section and make a new section with with curly braces surrounding each one, each entry that has another one following needs to have a “ , “ at the end to designate another entry follows. This allows us to register multiple animations in a single .json file. Similarly do this with the Register Events section, were you copy the entire section with how many Animation Events you wish to register in-game.

 

image.thumb.png.c786e446b6fbe99d3a1fba55e008eddd.png

 

4 ) Starting at the top of for Animations, you’ll need to set a UniqueAnimID for SCake to reference that specific animation, any duplicate UniqueAnimIDs will overwrite each other based on load order and AnimVersion so make sure it’s actually unique! (I recommend some unique identifier to you like a screen name, followed by the animation type and stage/variant. Try not to make these IDs too long as there is a limit and performance considerations)

 

5 ) The next few settings are optional, AnimVersion is just for version controlling animations and handling duplicates, AnimName is a display name for your animation (use something human readable), and AnimAuthor is for inputing the author of the animation.

 

6 ) AnimByPath is required as this is where we define our animations! Remember earlier when I said to write down or remember the file paths to the montage assets? This is where we use them. You’ll enter the the file paths to the animation montage we imported and created in UE5 in the ‘slot order’ of the animation. (For this example I have the Human character in Slot0, aka the first slot, so their montage will always go first, then followed by the SheepBall montage path.) It is important to keep the order of animations consistent through your animations to ensure they play correctly in-game and all your metadata lines up, Slot Order is very important!

 

image.png.23ddca2fba0fdfc21b099e52deee16e7.png

 

7 ) NonErotic toggle is next, by default SCake assumes all animations are erotic and will trigger sexual pleasure and desires, however if you set “NonErotic” to “true” the animation will not be considered erotic so that it won’t trigger sexual effects.

 

8 ) IsLooping just toggles whether your animation should be considered a looping animation or not. When importing your animations montage and you set up the looping animation you should set this to “true”, otherwise if it should play through once set it to “false”. (If your animation is not set to loop properly a failsafe in SCake will still progress animations when the animation finishes, which means it will only play a single loop then move to the next stage in the Animation Event)

 

9 ) Aggressors is a list of slots this animation should consider aggressive actors, if the list is empty or all slots are defined then the animation is considered consensual, otherwise the listed slots are aggressors.

 

10 ) Tags are a list of optional (but recommended to fill) keywords for positions, sexual orientation, climax location, ect. Fill these so that your animation is easier to find and sort in SCake as well as help automated systems try to fill in any blanks you leave in the .json / metadata.

 

11 ) ActTypes define what kind of act is in the animation, you should create entries between curly brackets like we did when defining each animation which define each type being represented. The template will have your default options listed though modules/updates may add more in the future.

 

(An example from a solo female player masturbation animation)

image.png.b95b4b68b460ae32281460594551b718.png

 

12 ) REQUIRED : Compatibility is extremely important and required for SCake to find compatible animations with different characters! For this section you need to define the type of sex equipment that is required for each slot, so under “SexEquipReq” you list them in the correct slot order (In the example we have female for the human character, and male for the ‘sheepball’ character). You can keep this aspect simple as ‘none’ so no equips are required, ‘female’ where a vaginal and breasts are required or ‘male’ where a penis is required, other options are for more advanced animation paring (read into the docs to learn more about them). Next we would define what character can actually play the animation in each slot under the “ByID” section, this section is sorted by slot order just like before and we want to input the CharacterID we used earlier when extracting models, such as the finding the folder names (reminder that there is a list of CharacterIDs on the modding wiki - https://pwmodding.wiki/docs/game-data/monster-table which should be accurate). The templates should have your equip options listed for ease of use, fill in for each slot available in the animation.

 

image.png.ec3b939f67234697be03a183357c3c32.png

 

13 ) LinkClimaxAnims is where you define the orgasm variants for the animation (if it has one). You can create multiple entries for this section to create multiple variants for what actors are currently climaxing, meaning for a 2 character animation you could define 3 different climaxes, 2 where one or the other is having an orgasm and 1 where both are having an orgasm. You don’t have to fill every possibility, instead it will use the first listed one if the exact combination isn’t found so define the ‘default’ climax animation first, then the rest. In AnimByPath you define the path to your climax variants which would be imported like any other animation and you’d get the path the exact same way after converting to an Animation Montage. If you’d like to register multiple climax variants to a single animation but with the same combination you can copy your registration data for the animation, define a new uniqueID, and then define the different climax animations you want effectively registering 2 animations to use for Events. (Note : It’s recommended to keep climax variants similar to the animation being played, a good example is a missionary position could have the character humping, then for the climax have them press in and stay with a bit of shiver, this can help climax animations feel more dynamic and immersive. Animation Events can also define their own climax variants by referencing other animations as well)

 

(Example from a solo female player masturbation animation)

image.png.2700b7f72862ad0f939c3b5f296eabde.png

 

14 ) One section worth mentioning that isn’t included with the simple template (but is in the other templates) is the optional “ActorAdjust” parameters. These parameters allow you to adjust the positioning of characters in the animation by slot. I’ll be using this in my example pet animation since I didn’t adjust the Lamball’s position within the animation itself. This feature is mostly for making small adjustments to make animations line up if things don’t quite behave the way you expect and can be a handy tool to configure different variants of characters such as those of different sizes. (Check the template with descriptions or read the documentation to learn more, I won’t be covering it in this tutorial as it’s a bit more advanced)

 

15 ) Next we get into registering the Animation Events so we can actually call and play animations in-game! Events are just a set order of animations to play, though there are more advanced settings we’ll just cover the basic few with only “UniqueEventID” and “Stages” being required. UniqueEventID is just like the UniqueAnimID, this should be a Unique ID used to call the Animation Event with SCake. EventVersion, same as AnimVersion, EventName is the name of the Animation Event, and EventAuthor would be the author who made the event!

 

16 ) Stages are just a list of animations to play as part of the event, by default it will play in order starting from 0 (First set entered here), however you can define a custom order for more advanced loops using StageOrder (a parameter we won’t cover here). Make sure to input each stage set surrounded by brackets and in the order you want to have the animations to play in by default (otherwise stages may register out of order and not playback as intended). StageName is just a display name for the stage, but AnimID is the UnqiueAnimID for the register animation you would like to playback during this stage of the Animation Event, these would match up with the UniqueAnimID we set up when making the Animation portion of the .json file. You can also reference external animations as well, however for .json files directly related to animation packs I recommend keeping all the used animations from your own animation pack then provide an optional .json that uses external animations to avoid requiring other animation packs to use.

 

Optionally here you could configure post-climax animations but we won’t be covering those in this tutorial.

 

(Example from a solo female player masturbation animation)

image.png.8bdf751f1c69ebfdb2aa8b84071133f7.png

 

17 ) Once you got that all configured, your .json file is ready to go and register in-game! There are a lot of advanced features I didn’t cover in this section, but these basics are more than enough for an animator to set up. It seems like a lot at first but once you understand what each setting does it becomes quite easy to modify, change, and create new .json animation files. Users will also be able to edit and exchange .json files to allow completely custom events, modified animations, or just extend upon the original .json file such as adding missing information, so don’t fret too much over missing something if you don’t have the time or understanding to fix it!

 

9. Setting up our Animation Pack for Public Release

Once you’re satisfied (enough) with your animation pack, you should set it up for public release! This is the final stretch to embracing the world of SCake an the community, so let’s do this!

 

1 ) First, make sure to actually install your animation pack and related .json file(s) to ensure it works in-game. It’s always possible an error was made somewhere and if you find it’s not working don’t be afraid to ask the community for help! (You can find instructions on how to install and use animation packs in the ReadMe for SCake)

 

2 ) Next we want to set up the proper file path and create a simple ReadMe file letting people know how to install the animation pack in-case they forgot or lost their SCake ReadMe (or, let’s be honest, they didn’t read the ReadMe at all, it happens!). First create a folder for your mod and create a simple .txt file labeled ReadMe with instructions on how to install the mod, then make the correct file path for the animation pack to make things easy, so start with a ~mods folder, place your .pak in there, then inside the ~mods folder create an AnimJSON folder and place your .json in there (matching the install directory you would use to install into your own game). DO NOT include the _LoadList.json in your mod unless you are distributing a server mod pak! Each individual will have their own list of animations and they will have the responsibility of maintaining their own LoadList, if you distribute one with your mod pack it could lead to users overwriting their own on accident!

 

3 ) Once the path is set up, you can zip up your mod and distribute though your desired platforms! (Don’t forget to share over on our Discord!)

 

(Example file paths for distribution from SCake_BasicsAnimPack)

image.png.b4c5a901eff1e82197d300df7c465d0c.png

10. Final Notes

SCake is a very versatile and customizable framework for animated scene in Palworld and has many advanced features so it’s possible that many of these things could improve or change over time so it’s worth keeping up with updates if your interest holds! At the time of writing, some features listed in the templates are not currently functional or may not function correctly. We primarily use Discord as our form of communication around the mod but you can also ask for help in any SCake thread and people are likely to try and help! I don’t know what other “Final Notes” to put here so… just hope you have a wonderful day! See ya laters! =^-^=

Edited by Spirit_Shard
updated info
Link to comment
2 hours ago, Spirit_Shard said:

SCake Guide : How to set up animating and import animations for Project Sugar Cake

(This guide is originally available on our Discord via GDrive and on my site at https://www.michaelpstanich.com/article/SCake_HowToMakeAnimsGuide.html - all sources have the same general information but updates will push to the Discord GDrive version first. Just easiest to update.)

 

Last Guide Update : 2024-03-27

 

Current Project Sugar Cake Thread - https://www.loverslab.com/topic/225549-project-sugar-cake-sex-and-stat-framework-gameplay-mod


-----

 

If you’re unfamiliar with Project Sugar Cake, SCake is an animation framework for Palworld focused on erotic animations. The framework has a lot of options for animators and users that allow the framework to be used for animations ranging from simple to complex with adjustable .json files.

 

This is meant to be a ‘complete’ guide getting you from no knowledge of palworld into making animations for SCake and releasing Animation Packs! Many sections of this tutorial are either extra information are alternate methods and can be skipped entirely, don’t be intimidated by the length! Nearly everything is explain in detail, so if you’re new to Palworld modding this will help catch you up on terms and methods, but if you’re already familiar with modding Palworld you can follow the simple steps outlined without needing to follow every section.

 

Social Links :

Our Discord – The Broken Chatbox – https://discord.gg/h3vB7S4FEw

-v- Donations! -v- =^-^=

SubscribeStar - https://subscribestar.adult/michaelpstanich

 

If you need any additional help or have questions regarding the guide, don’t be afraid to join our discord (linked above)! We’re a creative community and directly endorse SCake, so we are the best equipped to help with SCake directly. You can also ask the Palworld Modding Discord for help with general things, however make sure you follow their rules and content guidelines when asking for help!

 

~ (_) ~ Sections ~ (_) ~

-1. TLDR Version

0. What is this tutorial/guide for?
1. Understanding the Tools and Formats (Palworld with UE5)

2. Understanding and Planning for SCake

3. Extracting the Skeleton/Model

4. Importing into Blender and Animating

5. Exporting our New Animation

6. Setting up our UE5 Project

7. Importing Animations and Configuring for SCake

8. Exporting our Animation Pack and Configuring the JSON

9. Setting up our Animation Pack for Public Release

10. Final Notes

 

Disclaimers :
(0) I’m writing this tutorial for ‘the current state of things’ and there may be better or more fluid workflows for all of this, don’t consider this guide to be the end-all be-all of guides!

(1) I will be linking to the Palworld Modding Wiki ( https://pwmodding.wiki/ ) through-out this guide as a source for other basic guides. This does not mean all the information supplied will be complete or up-to-date. I am not directly affiliated with the palworld modding wiki.

(2) The tools linked here are not affiliated with myself or SCake, nor is their inclusion an endorsement of SCake and its contents. When reaching out for help regarding SCake make sure the parties involved are interested in helping (such as our own community).

 

-1. TLDR Version

This section just lists the steps without any explanations, check each section for more information. This TLDR will help you find where you may want to read more into and what you can skip.

 

0. This guide is for making SCake animation packs

1. Links and Details for the tools we’ll be using

2. SCake registers animations then plays those animations through events which are lists of animations with various parameters, there are also climax variants that can be defined for each animation which plays back dynamically

3. If you already have a model with the appropriate rig to animate, skip this step. If not, find the model you want to animate in FModel and export it.

4. Import into Blender using the io_scene_psk_psa plugin for Blender 4.0 (When using Blender 4.0) with default settings

5. Once done with your animations, export each animation individually into a .fbx file with the displayed settings linked in this section

6. Create a UE5 project for your mod and import Fixed Bone Index Assets for the models you are animating for then create your animation pack’s folder and set-up

7. Import the animations targeting the correct fixed skeleton, create a montage from each asset and set the looping section in the animation if it should loop

8. Export your animation pack as a .pak using UE5’s packaging function, then set up the .json file following the templates provided (section details settings)

9. Test your animation(s) to ensure they work properly in-game, if they do then package up and publish your mod wherever you please!

 

0. What is this tutorial/guide for?

This tutorial is for people wanting to make animations for the Palworld mod ‘Project Sugar Cake’ (SCake), allowing the animation to play in-game through the SCake API. This guide will have a lot of general information about modding Palworld and importing for UE5 mods, however we will be focused on SCake in this guide specifically, linking to other resources to learn about certain aspects that are better handled elsewhere. If you’re already familiar with Palworld modding then this won’t be a problem, but if not I recommend following through each section at your own pace and try not to skip around! By the end of this tutorial you will hopefully have a good starting point for getting Animations into Palworld with full integration with SCake!

 

1. Understanding the Tools and Formats (Palworld with UE5)

Palworld uses UE5 as its engine and the modding community uses general modding tools for UE5 games along with a modkit (Tutorial for its installation here - https://pwmodding.wiki/docs/category/palworld-modding-kit ) created by a community member (localcc), remember to thank them for all their hard work! Palworld using UE5 is actually really beneficial to us since it allows us a lot of power with modding, but it also has some limitations and we have to work with very specific formats in a not always typical fashion. Let’s break down the software and formats we’ll be using.

 

Creation Tools :

Unreal Engine 5.1.1 (Yes, the whole actual engine!)

Resource Link : https://www.unrealengine.com/

This one you’ll install through the Epic Games Launcher, it’s legit just the normal UE5 you’d typically use in game development or CG work. Technically there are packaging methods without using the engine itself, but since we will need to convert imported Animation Sequences into Animation Montages we want the full engine, and specifically we want to get version UE5.1.1 which is the engine version Palworld uses. If you use a different version it may not work as intended or cause issues if you try compiling other types of mods.

 

Palworld Modkit :

Resource Link : https://github.com/localcc/PalworldModdingKit/tree/main

Setup Guide : https://pwmodding.wiki/docs/category/palworld-modding-kit

When doing just animation imports for SCake, the modkit is optional, however if you’re looking to make any Blueprint mods or integrations with SCake it’s required. I will cover both with and without the mod-kit when setting up a project for SCake animation imports, but when we get to integrations or BP methods I will assume you installed the ModKit. (I also find using the modkit to be easier than setting up a project every time I want to import animations, I’ll cover why when we get there)

 

FModel :

Resource Link : https://github.com/4sval/FModel

Guides : https://pwmodding.wiki/docs/asset-swapping/Home > https://pwmodding.wiki/docs/asset-swapping/StartingOut > https://pwmodding.wiki/docs/asset-swapping/ExportingModifying3DAssets

This is a general Unreal Engine asset extraction tool, it’s extremely powerful but has a lot of limitations. For our use case we’ll be interested in extracting the model and skeleton for pals (and maybe textures if that’s something you would also want). If you’re only using models/rigs provided externally and not from the game files, or you already made some yourself, then you may not need Fmodel, but I do recommend it for Bone Index Fixing, which we’ll cover much later in the guide.

 

Blender (4.0+) :

Resource Link : https://www.blender.org/

Blender is a (free and open source) 3D modeling and animation tool. Technically you can use other software but I will be showing blender specifically in this tutorial and guide and we’ll be using a plugin for Blender for imports/exports.

 

io_scene_psk_psa (Blender Plugin v6.2+) :

Resource Link : https://github.com/DarklightGames/io_scene_psk_psa

This is a plugin for Blender that allows us to import Unreal Engine .psk model and .psa animation files. Since we only need this for importing (we export using .fbx which should work by default in Blender 4.0) if you’re not using assets extracted from the game this will be an optional (similar to FModel requirement).

 

UE4SS :

Resource Link : https://github.com/UE4SS-RE/RE-UE4SS

Unreal Engine mod-injection and replacer pak loader. This is required to get SCake running in-game as well as any other script/blueprint mod.

Formats :

.psk/.psa

These are the native formats Unreal Engine uses for Models and Animations. We only deal with these formats if we extract assets directly from the game like when using FModel and we’ll convert them into .blend and .fbx files using Blender.

 

.pak

Packaged assets format for Unreal Engine and what we’ll distribute as the mod so that it can load in-game.

 

.blend

Blender Project Files, we’ll keep a source so we can easily return to fix/change/re-export/ect.

 

.fbx

An open standard for model and animation files, we’ll be exporting .fbx for models and animations then using UE5’s fbx importer to get models/animations into our mod.

 

.uasset

These are the raw unreal asset files. These assets come in 2 forms but are named the same, cooked and uncooked. Uncooked assets are the same as those you save in the editor without any packing or compression, cooked assets are packed and compressed by propitiatory methods and can not be undone or loaded outside of run-time. The SCake API distributes Uncooked .uasset files which you can load in the editor.

 

.json

A simple text file with a specific format specialized in storing data with an easy to edit and read format. SCake as a JSON loader for importing animations (which is the recommended method) and we’ll want to configure a .json file and distribute it with the corresponding animation pack.

 

Additional Resources

CharacterID list

Resource Link : https://pwmodding.wiki/docs/game-data/monster-table

To properly reference various Pals we need the Character ID, this ID is used to reference things not just in-game but is also used in the file structure so having this list is crucial for setting things up properly!

 

Bone Index Corrected Skeletons

Resource Link : https://drive.google.com/drive/folders/1-RwOyqXaZql01ALr5ymq7l23MKpGPmmN?usp=drive_link

We’ll be using these assets for importing animations with the correct Bone Index order. Why and how will be described later in the tutorial. (A tutorial on how to create these assets on your own is in the works)

 

2. Understanding and Planning for SCake

Before we actually get into animating it’s a good idea to quickly cover how SCake works and plays animations so you can appropriately plan your animation to best work with the framework. SCake is fairly flexible, but it is designed around some simple concepts that are expected for Erotic animations specifically. SCake works by registering individual sets of animations where each actor involved in the animations has an associated Animation Montage, these montages are synced up and played at the same time whenever the animation is called. However when actually calling animations to play SCake uses what’s called Animation Events, these events are a configure-able list of those previously mentioned individual animation sets that play in order according to if they are looping and playback time settings. To give a quick example, you may have an scene where a character pets a pal, then gives the pal a hug, then returns to the same ‘petting the pal’ animation. This would be an Animation Event with 3 stages and 2 animations, you would create 1 petting animations, then a hug animation and register those with SCake as Animations, then you would register an Animation Event where you create 3 stages with stage 1 and 3 referencing the petting animation and stage 2 referencing the hugging animation. “Register” in this case would just be configuring the .json file and having it installed correctly (details on this included with SCake). You can also use Stage Order, an advanced setting available for Animation Events where you would just register 2 stages, 1 with the petting animation and 2 with the hugging animation, then just playback stages like “0,1,0” (SCake counts things starting at base 0, this is a technical thing). This will playback the same animation as setting 3 stages, but you only need to register with 2 stages.

 

Additionally since SCake was specifically created with erotic animations in mind it also offers the ability to register orgasm variants of different animations, called “Climax Variants” (or Climax Var for short). If these variants are registered with the animation, when the designated characters orgasm during the animation then it will switch to playing these variants allowing animators to create custom motions and effects based on which animation is playing. This feature is technically optional, but I do encourage animators to give it a shot! If you only feel like making one Climax Variant you can always just reference the same animation for each (You can mix and match however you want). These can also be configured in Animation Events, so users are able to fully customize which animations play. Now with these systems in mind we can move to actually making animations!

3. Extracting the Skeleton/Model

If you already have the Skeleton and Model to start animating then you can skip this step! For the rest of us (or just for those curious) for this step we’re going to be using FModel to extract game assets to use as our basis for animating.

Setting up FModel

1 ) First you’ll need to get FModel, head to their GitHub page - https://github.com/4sval/FModel and click on “Releases” (usually on the right side of the page) and download the latest version labeled “FModel.zip”.

 

2 ) Extract that file and put it wherever you want it (I have dedicated folders for my mod developments), inside the extracted folder you should have FModel.exe, imgui.ini, and a dll file (most likely oo2core_9_win64.dll).

 

3 ) Now you can open the FModel.exe to start up FModel and you should be created with a Directory Selector (if not, go to “Directory” in the top left and click on “selector”), if 2 additional options “Name” and “Directory” are not showing in the lower half, go ahead and click on the double arrow under “ADD UNDETECTED GAME” to open the add game options, from there you’ll want to set the name to something you’ll recognize (I just named my entry as “Palworld”) then find then click the … next to the “Directory” text field and find your palworld installation. If you installed through Steam it should be in your steam library directory (you can right click the game in your Steam library, go to “Manage” then click the “Browse Local Files” button and it will open a file browser to where your game is installed, you can then just copy the address in the top bar to the selector window for FModel. Once you have the Name and Directory set, click the + icon in the bottom right to add it to your Detected Game List. From there change the Detected Game to Palworld and change the UE Versions to “Game_UE5_1 (536870928)” then click “OK” to confirm and select.

 

image.png.0cdba53fbc2512d4c5fae64ba787a07a.png

 

4 ) We’re not quite done with set-up yet because in order to actually pull data from the game we need what’s called a mappings file. This mapping file effectively just tells us how the data is sorted inside the pal, which can then be used by programs like FModel to pull the data properly. I won’t cover how to create your own mappings file (UE4SS is the easiest way if you’re interested in looking it up), instead I’ll link to this specific step in the Asset Swapping guide on the Palworld Modding wiki, which povides a direct download for a mappings file, https://pwmodding.wiki/docs/asset-swapping/Home , should be labeled as “Palworld Mapping File” and will give you the file “Mappings.usmap”.

 

5 ) Next, we’ll go into the “Settings” by clicking the option at the top of FModel, then ensure you’re on the “General” tab. Under “ADVANCED” make sure the Local Mapping File is enabled and then set the “Mapping File Path” to wherever you put the Mappings.usmap file we downloaded in the previous step. (Optionally while here you can also set an Output Directory for where you want exported files to go which can be handy. I just made an Output folder within the FModel folder itself and use that as my Output Directory.)

 

image.png.f7581d7d6fce01295e666629bc8c0a0a.png

 

6 ) (Technically Optional) Next we’ll set things up so we can extract the full skeleton, under the “Models” tab in the settings, near the bottom enable “Handle Skeletons as Empty Meshes”. This option will allow us to extract the full skeleton asset as a single Armature without the mesh and this can then be morphed and weighted on to custom models if the need arises.

7 ) Once you’ve got your settings set up, go ahead and click “OK” at the bottom right to confirm all your changes. If you set up a new Export Directory then you’ll also want to close and start FModel back up so that the new output directory takes effect.
 

Finding/Extracting the assets

Now that we have all the settings configured we can return to the main screen of FModel, you should see various .pak files listed on the left side under “GAME ARCHIVES”. These are the packs loaded into your current install of Palworld, which will also include any mods you have put into the content folder (This will be relevant later when making custom Animation Events for SCake). What we’re interested in is “Pal-Windows.pak” which is the pak file for Palworld’s main assets, go ahead and double click that entry to enter into the pak and see the full file structure. This will now turn the left side into a file/directory tree where we can see everything included in the selected .pak file. Now let’s go grab the model we wish to animation and optionally we can also grab the corresponding skeleton asset.

 

1 ) First navigate to the appropriate folder. All the character models and skeletons are stored in “Pal/Content/Pal/Model/Character” with “Monster” being the folder for pals, “NPC” being the human characters and some boss characters, and “Player” being the playable character assets. All full skeleton assets are stored in the “Skeleton” folder.

 

2 ) For this example I will be grabbing the Lamball assets, which internally the game calls “SheepBall” and associates with its CharacterID, so I navigate into the “Monsters” folder, find “SheepBall” then click the “Packages” tab at the top left which should show 9 assets for this particular folder. This will change the display to showing the assets in that folder and we want to ensure the asset named “SK_[CharacterID].uasset” (would read “SK_SheepBall.uasset” this the Lamball example) is in this folder, otherwise we got the wrong folder and need to find the correct one. This SK asset is the model and associated bones used for this particular character and it’s all we need to start animating. Keep note of the file path as this will be important later when we start importing animations!

 

3 ) So now that we’ve found it, let’s extract it! Right click the appropriate asset and select “Save Model (.psk)”. This will extract the model as a .psk file in the Output folder we optionally set up from before, by default the output folder will also keep the same file path. To navigate quickly to your newly extracted asset you can go to the bottom of FModel where it shows the report log and just click the extracted asset text and it should open a file explorer window where the asset resides. Optionally here you can also extract all the materials/textures if you had any desire to do so but we won’t be bothering with that in this tutorial. (Check tutorials on the Palworld Modding Wiki like the asset swapping tutorial - https://pwmodding.wiki/docs/category/asset-swapping – for more details on that. Textures/Materials are not required to get animations made and imported.)

 

image.png.c021047989ea7c98ed73a97faefe9642.png

 

4 ) Optionally you can do the same thing for the Skeleton asset from the “Skeleton” folder, these assets will have the lable “_Skeleton” appended onto the end of the name used for the model. You will only need this asset if you are trying to create a completely custom model or intend to create your own import assets which we’ll touch on later, if you plan to do this or just want it just-in-case you can right-click and also save this as a .psk file. If the settings were set up correctly it should output a .psk with an armature and an empty mesh, which we can then re-parent to new models.

 

5 ) You can technically do this for animations as well which are in the “Pal/ContentPal/Animations/Character” folder instead. For these you would want to find the animation with the prefix “AS_” which stands for “Animation Sequence” then select the right-click option “Save Animation (.psa)” which will extract the animation as a .psa file we can import into Blender. You would only want to do this if you intended to make an alternative version of the base game’s animation but be aware that extracting .psa files has a lot of issues and things may not extract how you’d think it would. (For most animations you can also extract the AM_ prefixed files instead, which are Animation Montage files, however some have blend profiles and this will cause the export to have distortions and won’t be usable with our current tools.)

4. Importing into Blender and Animating

Once we have models to animation we can import them into Blender and get things moving! This section will be relatively brief, this won’t be a full Blender animation tutorial as there are a ton of great resources for that. Instead I’ll be focusing on just getting the model into Blender and covering some simple quirks with the models/rigs that we should be aware of.

Setting up the import Plugin

If you already have a model/rig properly set up for animating then you can skip this step, otherwise, if you haven’t already, we need to install the io_scene_psk_psa plugin for blender linked in the resources portion so that we can import the .psk model file we exported from FModel.

 

1 ) Head to the github repository ( https://github.com/DarklightGames/io_scene_psk_psa ) and download the latest release compatible with Blender 4.0 (at the time of writing that is Release 6.2.0), you can find releases on the right side of the page under “Releases”. You’ll want the .zip file and DO NOT extract it! To make things easier we want to keep the plugin as a .zip so that Blender can automatically install it for us by just selecting the .zip.

 

2 ) Go ahead and start up Blender 4.0 if you haven’t already and head to the top bar, select “Edit” and then the sub-option “Preferences…”. In the Preferences panel in the left side tabs select “Add-ons” then use the “Install…” button in the top right of the panel and find the .zip file for the plugin we just downloaded in the last step. Once you click and install the Zip it should automatically enter the name in the search field and we just need to click the checkbox to enable it.

 

image.png.42e6a807f1e24beafc794d444de91a2a.png

Import the Model

1 ) Go ahead and open up Blender if you hadn’t already and create a new empty scene, ensure you stick to defaults for the scene set-up to remove any potential variables messing with the importer.

 

2 ) Next we need to import the model we’re looking to animate with the relevant rig. Click “File” in the top bar and select “Import” then the “Unreal PSK (.psk/pskx)” option, this is the plugin we installed and enabled for importing Unreal .psk/.psa files. In the import window navigate to the model you exported from FModel you with to animate and then import it with the default settings. (Most importantly leave scale at 1.00! Some guides will incorrectly tell you to change this, but this will screw things up! Those guides export the FBX incorrectly!)

 

image.png.dfc5c70845e1a8e9852ef0d953802c80.png

 

3 ) Now you have the model and all relevant bones you can animate for it! Just continue like normal! However, I will note that later we will be renaming the armature to “Armature” for importing into UE5, which is a critical step so you may do that now if you wanted. (Optionally this is when you would also import any animation you wanted to, you would click the Armature and then use File > Import > Unreal PSA (.psa) and then navigate to and import the animation you exported with default settings. This will add the animation to the actions list, then it can be altered just like any other animation.)

 

Animation Quirks

There’s a couple of quirks we should touch on here before we continue which will be relevant to animating characters for palworld.

- ) When exporting the skeleton FModel includes the sockets from UE5’s socket system as bones, however these are not actually bones and can safely be deleted. All the sockets will have the prefix “socket_” on them which makes them easy to find. (They don’t even have weights so it’s not like animating them will do anything to the model anyways, and a fixed bone index asset won’t have them)

-) When animating the default models you may notice some strange or sharp weights, this is normal and won’t look nearly as deformed in-game (usually). This is because FModel doesn’t do a perfect job at extracting all the weights correctly so some things will stretch to far or be much sharper than it actually is. Focus on the general shape/motion of the animation and don’t worry too much about trying to fix small deformations, as long as you are animating correctly these shouldn’t look too bad in-game.

- ) In most models the “root” and “pelvis” behave exactly the same, moving/animating the pelvis will move the entire model. You can use some of Blender’s bone/rig locking/limiting tools to help make this less of an issue but remember to apply those modifiers before exporting the animation or else it may not look correctly in-game.

- ) When translating the entire model by shifting the root (or pelvis in most model’s cases) the hit-box of characters will follow the mesh, however the capsule (what’s used for ground and gravity calculations) generally will not. SCake has an option for moving characters but to ensure multi-character animations line up properly we generally want to move the bones in the animation (moving the root/pelvis to where we want the character to be offset) so that they line up and not rely on trying to adjust them in-game, this will help the capsule components line up and apply the same ground position to all actors in the animation. (of course you can play around with this to find whatever works best for your animations ^-^)

 

5. Exporting our New Animation

Ok, got something animated? (Or at least some test animation? I always recommend doing some sort of simple animation first like a waving arm test to get a workflow going!) Now we can take the next technical step, exporting our animation so that Unreal will be able to import it in a way that works in-game and with SCake. There’s a couple of things we need to keep in mind, the Armature must be named exactly “Armature” so that it imports properly, otherwise UE5 messes up the root bone and doesn’t animate in-game. Additionally we want to export each animation as it’s own .fbx so we can adjust and re-import each animation on its own while also being able to import additional animations if needed (in unreal if you re-import an FBX it will just update any animation already imported but won’t add new ones, so we save them individually).

 

1 ) First things first, let’s check and ensure a couple things are set properly. Ensure your armature is named “Armature” (When we import into UE5 the armature must be named exactly “Armature” or else it won’t map to the bones correctly) and your animation is selected in the actions editor (We will be exporting each animation as its own file so we need to select the right animation to export). The currently selected action should show up under the armature in Blender. (For my example I just used the SheepBall petting animation from in-game)

 

image.png.bcc7469b417c2c65d24d9bbbb6a0b859.png

 

2 ) Next ensure you’re in “Object Mode” in the top left, then we need to select the Armature and the associated mesh we are going to export (Use ctrl+click) and click on File in the top left, and under the “Export” Submenu select “FBX (.fbx)”. We will be using the FBX format to import our meshes/animations into UE5.

 

image.png.a7fb0b375c88deab76c91fa47dc1ea24.png

 

3 ) While exporting we need to set some very specific settings to ensure things import correctly, I’ll provide an image of these exact images, but for those that prefer text the settings that diverge from default are… Under “Include, in “Limit to” enable “Selected Objects” and select only the “Armature” and “Mesh” options to prevent garbage data interfering. Under Transform set “Apply Scaling” to “FBX Units Scale”, In the Geometry section set “Smoothing” to “Face” to prevent some strange UE5 errors on import (which can cause shader issues), for “Armature” settings you want to disable “Add Leaf Bones” so it doesn’t add any extra bones or weights, and with “Bake Animation” enabled, disable “NLA Strips” and “All Actions” so we export proper data and only the single animation. (If for some reason you wish to go against the advice of exporting 1 animation per .fbx, you can leave “All Actions” enabled and it will export all animations in the Actions list for that Armature into the FBX, however this can cause issues later down the road in UE5 if you ever try to update them.)

 

Note : Some of these settings and still be used like your typical workflow shortcuts, stuff like “Apply Transform” and such if you animated with it specifically in mind, however it’s best practice here to apply any modifiers before an export. Personally I create a collection for animating and then a second collection for exporting where I apply any modifiers and rename for export, but you would want to find a workflow that works best for you!

 

image.thumb.png.eb72545dff0689ed789e955c593777fa.png

 

4 ) Once you got everything set, save the file with whatever recognizable name you want, however keep in mind that UE5 does have a path limit so I recommend making your file names recognizable but abbreviated to prevent having import errors or issues with the animation causing crashes in-game! (My current name structure is Actor Count, Abbreviated CharacterIDs, AnimName_Stage with _Cli appended for climax variants, for example “2_FplaMshpball_PetRecreation_0”. This keeps things sorted and easy to link together while being short enough to directly use in UE5)

 

5 ) Now you would repeat this process for every character and stage of the animation you are making, it sounds like it’s a lot but once you get it down things actually go rather quickly. I recommend making a preset for your export settings up at the top where it says “Operator Presets” so you can just select the preset you’ve made and have your settings quickly set-up (also prevents you forgetting what settings are required, which I TOTALLY haven’t done before...).

 

6. Setting up our UE5 Project

Now we get to the more intimidating part of the tutorial, importing the animations into UE5 so that they work in Palworld! But don’t worry! It’s not nearly as complex as it seems and there’s some shortcuts and assets in the works to help make this process quicker with some of these steps becoming redundant as we fill out our modders resource collection, but the methods will still be outlined here for completions sake (and in-case someone needs to make assets not included in our modder assets collection).

 

Setting up the Palworld Modding Kit

If you plan to just import animations and don’t plan on using any of the SCake SDK, then you don’t need to install the full modding kit if you don’t want to; If you choose to do so later you can always move your project assets over into the modding kit and they should work just fine as well. If you DO plan to use the SCake SDK and would like to access more features for animations then you can follow the guide over on the Palworld Modding Wiki (https://pwmodding.wiki/docs/category/palworld-modding-kit) which is a very thorough tutorial that wouldn’t fit within this one. If you’re choosing not to use the modding kit then check the next immediate section.

 

Setting up Without the Modding Kit

Technically you don’t need the modding kit when just importing animations, however not using the modding kit and the SCake SDK will limit you on some features you may want for your animations. Regardless, if you’re not wanting to use the modding kit you can set up your own project. There’s a guide that covers this for Model Swaps (which also don’t need the modding kit) located here https://pwmodding.wiki/docs/asset-swapping/PackagingInUE5 which should work perfectly fine, though I’ll cover setting up the project here as well.

 

1 ) Acquire and start up the Epic Games Launcher, then select the “Unreal Engine” tab on the left side to enter the engine portion of the launcher.

 

2 ) Once here you want to either click the version number in gray letters under “ENGINE VERSIONS” or click the yellow “+” icon next to it, then add and install Unreal Engine 5.1.1 (UE5.1.1), this is the version used by Palworld and we need it for packaging / compiling correctly.

 

3 ) Next we want to click the “Launch” button in the 5.1.1 box to start up the Unreal Editor, once you get to the intro screen create a new project using the “Blank” preset, set your project location near the bottom, set project details to “BLUEPRINT” and “Desktop” for target platform, then name your project “Pal” so it creates the correct file paths. (If you don’t name it Pal then paths may fail to compile properly)

 

4 ) It may take a moment to start up as it sets up the initial project, but once it does you can click “Platforms” in the top bar of the editor and select “Packaging Settings…”, this should open up the project settings. Ensure the only options selected for the first few are “Use Pak File” and “Generate Chunks” with the surrounding options disabled (Which boxes are checked by default can change between installs, check the below screenshot for what this should look like), leave any setting below “Build Http Chunk Install Data” on default. (The model swap tutorial will enable cook everything, we will be including assets we do NOT want to cook or include with the mod, so we don’t enable this. We’ll use an asset label to force cooking instead.)

 

image.png.44f452e82d9bbaf61c5445dac6e8da06.png

 

5 ) Now your project should be set up and ready to start the import process!

Installing the SCake SDK

If you installed the Palworld Modding Kit, now is a good time to install the SCake SDK, though you can also install it later if you wanted to. If you don’t already have the SDK, you can download it from the SCake mod folder (https://drive.google.com/drive/folders/1vYfgMom7UJs2OmJ5B4FGQTMYEOR0n9Vr?usp=drive_link). Next you want to extract the “mod” folder contained within the SCake SDK into your modding kit’s “Content” folder, and… that’s it, SDK installed! The SDK comes with a preset dummy blueprint for calling the SCake API via Blueprints, ensure you don’t include these files with your mod! Instead, the SDK has an additional folder with a preset ModActor and an asset label already set up to separate the 2 folders in the packaging process. If you’re just importing animations you can delete the ModActor in the preset folder and rename the folder to your animation pack mod name, or just create a new folder for your animation mod which we’ll cover a bit later.

The Bone Index Order Issue

This one requires a brief explanation, however if you’re interested you can check out my write-up blog post about the issue here (https://subscribestar.adult/posts/1160698) but you don’t need to know all the details to fix the issue. In short, UE5 compresses animation and skeleton data so that it references each bone and weight by an index instead of by name when used in-game. This means when we create assets we need to import our animation and bind it to a skeleton with the correct Bone Index Order. Unfortunately FModel does not export the skeleton with the correct bone index order, so to fix this we have to create a new asset that has the correct bone index order before we import our animation, but after we have the correct skeleton to import on-to we can just target that asset for any subsequent animations we wish to add.

Fixed Bone Index Order Assets

Thankfully, we do have some assets which will already be set up to fix the bone index issue for you without much manual work. As we work through things and Palworld gets updates there may not always be an asset available, but if you’re patient you can always ask in our community and we can get one made for you to use! I distribute fixed bone index assets through the GDrive folder under “Modder Resources (https://drive.google.com/drive/folders/1vYfgMom7UJs2OmJ5B4FGQTMYEOR0n9Vr?usp=drive_link). At the time of writing there are 2 types of fixes, uasset and dummybone, uasset is the easiest to implement and is just an uncooked asset with the fixed bone index asset with the correct file path already set up, while the dummybone is a forced bone index order asset which you would need to manually import and place in the correct place. (I recommend only using the dummybone assets if you know what you’re doing or have been asked to do so when asking for help). You can also get fixed assets from the community however I can’t personally provide validate those assets or how to use them properly.

 

Fixed Bone Index Asset – uasset

If you’re downloading from the BoneIndexCorrect_uasset folder, these are set up assets for you to drop directly into your mod project and require minimal work. Download the .7z for the CharacterID of the models you are looking to import, extract the folder, then head to your UE5 project inside the Content Folder and copy over the “Pal” folder to the “Content Folder”. If you did this correctly then when you open your project you should have a new folder in the browser with a path leading down to “Pal/Model/Character/Skeleton/[CharacterID]” with the skeleton asset you’ll be targeting your animation to. (Note : This method won’t work if your animation targets a fully costume rig made for a new model that doesn’t use the base game’s corresponding bone structure) DO NOT include these assets with your mod! Make sure you package your animation pak without these assets or else it will break compatibility and cause other issues, like overwriting model replacers!

 

Fixed Bone Index Asset – dummybone

If you’re using the manual DummyBone assets, these are simple and quick .fbx files set up to have the correct Bone Index Order but may look broken in the editor (these are made by quickly creating a ‘fake’ skeleton with the correct Bone Index Order simply for importing, but does not have the actual positioning or hierarchy of the original skeleton). To use these you need to import the mesh and skeleton like a normal .fbx import (use default import settings with Mesh and Skeleton import enabled), then place the skeleton in the corresponding folder for the model you are trying to import animations for, this location should be in the “Pal/Model/Character/Skeleton/[CharacterID]” folder. When importing animations with these dummy skeletons don’t expect the in-engine animation preview to look correct, but if done properly the animation should playback just fine once you’re in-game. DO NOT include these assets with your mod! Make sure you package your animation package without these assets or else it will break the in-game skeleton and model!

 

Note : If you want to use a custom model for preview, you will want to use the BoneIndexCorrect_uasset option, then when importing the mesh target this skeleton instead of the included one.

 

If you’re using a resource provided from another source, make sure to read up on what exactly their asset is and how to use it properly as other methods may be available!

Fixing the Bone Index Order Manually

If you’re already using a fixed bone index asset you can skip this section and move to “Set-Up Project for Animation Importing”!

Fixing the bone index order isn’t a ‘difficult’ process, but is a tedious one. I highly recommend just using a fixed bone index asset that’s already made and provided by the links from before, however there may be assets that either haven’t been added yet or you may want to just try the method. So to get animations importing properly I’ll give a very brief explanation on how to make your own DummyBone asset and how to get it set-up and imported properly. I’ll also cover the proper method for creating an uncooked asset (fixed bone index uasset method) at the end if you wanted to try doing that as well.

 

Note : The Human Skeleton is a completely different beast than the pal skeletons because of the sheer number of bones included, which requires a few additional considerations caused by limitations. Because of this I recommend using the SK_PalHuman skeleton provided in the modder resource folders. (Making a dummybone asset for humans isn’t an easy task, unlike for pals)

 

1 ) First we need the model extracted using FModel like we did earlier in this tutorial, then we import that into Blender just like before as well. (I recommend not importing it into the same file that has your animation work, save your animations and close Blender, then start from a fresh instance to prevent accidentally breaking your animation file!) Don’t forget to rename the Armature to “Armature” exactly!

 

2 ) Now we need to go back into FModel and find the corresponding Compressed Skeleton Asset for that model which should be in “Pal/Model/Character/Skeleton/[CharacterID]”. We’ll want to inspect this element by double clicking on it and having the JSON data load in the main panel. (If a preview of the skeleton pops up, you can just close that additional panel pop-up)

 

3 ) Inside the JSON data we need to find the section “FinalNameToIndexMap” which should be near the bottom. This is the Bone Index Order we need the skeleton to match exactly when importing the animation.

 

image.png.79369736fb95938e2b2b3eaffaebf413.png

 

4 ) Now we can keep this info up while we go back to blender with our imported model and entering “Edit Mode” in the top left. The next step is to check the hierarchy and delete any “Socket_” prefix bones that don’t appear in the bone index shown in FModel, and then re-parent everything so that it will import with the exact order shown in FModel following alphabetical sorting. For my example I’ve been using SheepBall (Lamball) which does have several socket bones applied we will want to re-parent to the end for the dummybone asset (Or just out-right delete, sockets are added dynamically by UE5 and normally can’t be animated but in-case someone figures this out later re-parenting them to the end would allow animations to import with those sockets animated. Unfortunately there isn’t a way I know of currently to check the order of sockets, so that part would be experimentation).

 

Shortcut Notes : ctrl+P is the re-parent shortcut in Blender by default, keep offset when re-parenting to maintain easier previewing, just select the bone you want to re-parent, then the last bone you select is the bone you want to parent to.

 

Example of the sockets in the bone tree, these would be re-parented to the end or deleted

 

image.png.211a468ce2877fb3a8f62c85415a7de3.png

 

(Left : original exported skeleton, Right : DummyBone Asset) Example of the full SheepBall bone tree re-parented to ensure the correct Bone Index Order with every bone in the exact order required to match. We just start from the top and work our way down, looking for anything that would be out of order, then re-parent them to fix anything that would be out of order following alphabetical sorting (ABCDEFG...).

 

image.png.3619db876eb889fb8b5133cd20bc8c6e.png


5 ) Once you have everything sorted correctly you can now export a .fbx file just like we did before when exporting the animation, and that’s the DummyBone asset! Keep in mind this is only for importing animations and should not be included in any mod, it’s only purpose is to ensure the bone index order is correct when importing.

 

For a proper uncooked uasset asset, we would need to use UE5 or use hex edits with internal knowledge of the compressed skeleton asset. For this it’s important to understand just how UE5 adds additional bones, when adding new bones not seen by the project before, instead of re-sorting the full bone index order UE5 just adds the new bones to the end of the index. So to create a proper uasset you would need to do the same sort of sorting we did for the DummyBone asset, but instead of just re-parenting when finding an inconsistency, you would instead need to import an asset into UE5 with all lower index bones removed, then continue the process re-importing the skeleton any time you hit an inconsistency. This means that UE5 would be adding the new bones of each step onto the end and ensure they are placed in the correct bone index order. For sockets you would also need to not just append them to the end or delete them like we did in the DummyBone asset, instead we would need to re-add them in UE5 through the UI with the appropriate offset. Once complete this would give you a fully working asset that can import animations while also being fully preview-able in the editor! (Also, once one of these uasset versions are made, we don’t have to worry about importing any skeletons, just copy over the uasset in the right spot and it’ll work!) As you can probably tell, this is why I recommend using the DummyBone method if you’re trying to make these assets yourself, since a proper uasset is time consuming and a bit complicated compared to the DummyBone method.

 

Setting up the Mod Folder

Finally for our project set-up, let’s configure your animation pack’s mod folder so it’s ready to export after we get animations imported.

 

1 ) You’ll want to start with creating your mod folders to import your animations into. If you installed the SCake SDK you can rename the preset folder or create a new folder under the “Mods” folder in your project, otherwise if you have a blank project create a “Mods” folder under “Content” then a folder for your animation pack.

 

image.png.73753f4f3eb1a7059ae6615fbefc9903.png

 

(I’m renaming the “YourModHere” folder to my animation pack name, “TutAnimationPak”)

 

2 ) If you used the mod kit you should already have a PrimaryAssetLable in the folder, but if you made your own folder instead of renaming or didn’t use the SCake SDK create a new “Primary Asset Lable” by right clicking within the file browser under your pack’s folder, and select “Miscellaneous” then “Data Asset”. In the popup that shows up type in “PrimaryAssetLabel” and you should get a single option, that’s the one we want to add if you don’t already have it. (In my sample image I used the SCake SDK, which already has this asset added)

 

image.thumb.png.5cc7c550df3ddf1fbef1e2c64c9d25ff.png

 

3 ) Next lets open up our Primary Asset Lable real quick. For this you want to set a “Chunk ID” that doesn’t match any other mods in our project (SCake SDK uses 666, so use a different one!), this Chunk ID is the .pak file our mod will pack into when we run the packaging process. Next we want to set the “Cook Rule” to “Always Cook”, “Label Assets in My Directory” toggled on, and then save the asset and we’re done with that aspect!

 

image.png.94390dc39ff1758ad5a2f11385afee00.png

 

4 ) If you wanted to use the SCake API but didn’t use the preset folder, you’ll need to create an “Actor” called “ModActor” exactly so that UE4SS can find and hook your mod for calling the API. If you didn’t plan on calling the API then you don’t need to worry about it.

7. Importing Animations and Configuring for SCake

Finally, the good bit, actually getting animations in-engine and ready for gameplay! For this we need to import the animation .fbx file we exported earlier targeting the fixed Bone Index Order Asset we set up with the project, then create the animation montage assets using those imported animations to configure with SCake.

 

1 ) First let’s get our animation imported, ensure you got the corrected Bone Index Order Asset imported and set in the file structure correctly as we covered earlier. Next just drag the animation .fbx file for your animation that we exported earlier into the file browser space in your animation pack’s folder within the editor. This should bring up the import FBX settings.

 

2 ) In the FBX settings we only want to import the actual animation. Start by setting the “Skeleton” to the corresponding corrected skeleton asset we imported to the Pal folder earlier, then disable importing the mesh, everything else should be left on default with animations importing (some settings may be changed if you know exactly what you’re doing). (You must select a skeleton first or else when Mesh is untoggled it hides the Skeleton target option.)

 

image.png.0c3e5b6140a28bc860589e828fb50d34.png

 

3 ) Once set up, hit the “import all” and it should import the single animation if everything was set up correctly. You may get an error that reads like “the skeleton transform was different” but this error can be ignored as it has no effect once we’re in-game, if you got a red error however something got messed up in the pipeline and I’d try following the exporting the animation part of the tutorial again. Also, if you used a DummyBone asset as your skeleton to import with you may notice the preview of the animation is broken, DON’T PANIC! That’s just how the Dummy Bone assets work and, as long as everything else was done correctly, it should look fine in-game!

 

4 ) The animation is imported as an Animation Sequence, but SCake uses Animation Montages to playback animations, so we need to make a montage out of our imported asset. Simply right-click the imported Animation Sequence, then at the top of the pop-up menu select “Create” then “Animation Montage. This will create an Animation Montage out of that asset, feel free to call these assets anything you like but we will be referencing the Animation Montage later when configuring the JSON file so make it something you will remember or can easily reference!

 

5 ) If your animation isn’t looping and is only intended to play through once, that’s all we ‘need’ to do, but if your animation is intended to loop you will need to open your new Animation Montage asset by double clicking on it. It should open up the animation with a green bar and the anim playing, to make it loop correctly in-game we need to go into the bottom right section into the “Montage Sections” tab, and click the checkbox for “Default”, then select “Default” under that option to have it loop back to the start. (It should display a little circular arrow next to “Default” when set correctly to display a loop-back)

 

image.png.8007bce889d5b66c8c2e1f5cb2ae0d7b.png

image.png.6130f4bc8514b2007c5ecc519f751f05.png

 

6 ) At this point we’re done with the basic import, you would repeat these steps for each actor in your animation with their corresponding animation. I strongly recommend following a naming scheme that matches actors up based on what animation they are playing together. However there are a lot of really advanced things you can do with Animation Montages, like creating custom loop patterns, trigger sounds and visual effects, implement blending between different animations, and much more! I do recommend not going too crazy and trying to use Stages within Animation Events for most transition type stuffs, that way things stay modular and customizable.

 

7 ) Before we set up things to package it may be a good idea to get the paths for your animations so we can reference them in the JSON file we’re going to configure in the next few steps. If you hover over your animation in the editor it will show the “Path:”, we will want to save this path with the file name appended to the end like “/Game/Mods/TutAnimationPak/TutPetAnim_SheepBall_Mon” and this will be what we directly reference in the JSON file configuration! It’s also a good time to mention the file path limit. UE5 has a limit of 260 characters for a file path, this isn’t a huge deal and provides a lot of freedom however if you get close to the limit with your file name and mod folder structure it may cause issues or even in-game crashes, as such I recommend abbreviating what you can within your asset names to prevent issues. The value to look at is the “Cooking Filepath Length:” which counts the additional stuff it adds in-game, if exceeded it will cause issues and UE5 most likely won’t allow you to package your project.

 

image.png.23145d8951c8c36f23527dd39255e0db.png

 

8. Exporting our Animation Pack and Configuring the JSON

Alright, almost there! Now we just need to export the animation pack and configure the JSON to have usable in-game animations with SCake! If the previous steps were followed correctly this should go relatively smoothly!

 

Exporting the Animation Pak

1 ) Ensure all your assets are saved and ready to be exported, double check your PrimaryAssetLabel settings are correct, then we should be ready to package! Up in the top bar click the “Platforms” option like we did setting up the project, then hover “Windows” then click “Package Project” and select an output folder. The first time you package it will take some time as it sorts out all the engine compiling and baking processes, but after the first time it’s much quicker. (Note : there is a method of packaging mods individually but I won’t be covering that method here)

 

image.png.3d142c16fe22ba3d5c13d98cc25c0f71.png

 

2 ) Once packaging is complete navigate to the output folder you selected, enter into the “Windows/Pal/Content/Paks” folder, and there you should see multiple files labeled “pakchunk##-Windows.pak” with ## being the ChunkID you set for your packs. With the SCake SDK the default Chunk ID that’s set is 10, so you would want “pakchunk10-Windows.pak”, otherwise if you didn’t use the SDK just pull the Chunk ID you used. Go ahead and rename that .pak to what you called your mod folder within the editor, in my case I used “TutAnimationPak”.

 

3 ) Now you can move+copy that .pak file wherever you need for saving/distribution as well as install it into SCake. To touch briefly on installing animations, you would place the animation pack into “[Your palworld install location]/Pal/Content/Paks/~mods” unless the mod uses the SCake API or has Blueprints attached, which would go in “LogicMods” instead of “~mods”. Then we’d move the .json file into the “AnimJSON” folder in the ~mods folder then add the file name of the .json to our _LoadList.json, but we haven’t made that .json yet, so let’s do that!

 

Making a Simple JSON Animation File

SCake comes with a few templates in the AnimJSON folder ready for animators and users to use as a basis for configuring new animations and events. The “_SCake_TemplateWithExplainations.json” will include explanation for every setting as well as examples of how to format the file, however we’re going to keep things super simple and use the “_SCake_SimpleTemplate.json” and use that for our base. You can always use whatever template you feel suites your needs best! (The explanations template is very helpful to open along-side your own .json file so you can reference it for what each parameter does.) The first time through may be a bit confusing, but once you get use to things configuring should go a lot smoother.

 

1 ) Create a copy of the “_SCake_SimpleTemplate.json” template .json file and rename it to your animation pack’s name (technically you can call it whatever, but it will be easiest if it matches your animation pack’s name from the .pak file), then open it in any text editor though I do recommend using one with JSON syntax checking and highlights (you can use https://jsoneditoronline.org/ for an editor that works in the browser and has error checking, custom colors, simplified view, and more, it’s a pretty handy tool).

 

If you only want to do the absolute bare minimum to get your animation playing in-game as a test (or just because you can’t be bothered to set up the .json, I get it.) then all that is required is the UniqueAnimID, AnimByPath, and Compatibility for each Animation you’re registering, then in Animation Events you just need the UniqueEventID and Stages defined with AnimIDs. While everything else is ‘technically’ optional, I do recommend filling out the json before distributing the animation officially.

 

NOTE : When inputting information, avoid using special characters like slashes and punctuation marks as these may not parse correctly and cause the animations/events to fail to register! Underscores and spaces should be fine but I personally replace all spaces with underscores unless it’s a filepath where it needs to be exact.

NOTE 2 : Any section you’re not using in the .json file you can remove, for example if you have no aggressors instead of leaving it blank you can simply remove the entire section. It’s recommended to remove anything you’re not using or need defined differently than default to help prevent errors and keep the most compatibility.

 

2 ) Now let’s just go down the settings in order and configure the animation with minimal information, we can always come back and add stuff later! You can safely delete the DevNote at the top explaining what the template is, and the PackName is purely for readability and ease of use though I recommend filling out your pak name here.

 

3 ) Next let’s set some basic metadata, for each animation you are registering you’ll want to copy the entire “Anim0” section and make a new section with an incrementing number for each animation you are registering, naming subsequent sections “Anim1” “Anim2” “Anim3” and so on, each entry that has another one following needs to have a “ , “ at the end to designate another entry follows. This allows us to register multiple animations in a single .json file. Similarly do this with the “Event0” section, were you copy the entire section with how many Animation Events you wish to register in-game.

 

image.png.c0ad0865896dbe6eb6f9abc416ab7f54.png

 

4 ) Starting at the top of for Animations, you’ll need to set a UniqueAnimID for SCake to reference that specific animation, any duplicate UniqueAnimIDs will overwrite each other based on load order and AnimVersion so make sure it’s actually unique! (I recommend some unique identifier to you like a screen name, followed by the animation type and stage/variant. Try not to make these IDs too long as there is a limit and performance considerations)

 

5 ) The next few settings are optional, AnimVersion is just for version controlling animations and handling duplicates, AnimName is a display name for your animation (use something human readable), and AnimAuthor is for inputing the author of the animation.

 

6 ) AnimByPath is required as this is where we define our animations! Remember earlier when I said to write down or remember the file paths to the montage assets? This is where we use them. The first value is going to be the “slot” in the animation (each slot will reference the same character through-out the animation and should be kept consistent through-out all the animations you register that are intended to be in the same event, to prevent strange issues), think of slots like a pointer to which character you are referencing from the animation, then the second value will be the file path to the animation montage we imported into UE5 for that character. The slot order is sort of arbitrary, as long as you keep it consistent then it shouldn’t matter.

 

image.png.ebcb177404b96fb2f8ec03f854b180db.png

 

7 ) NonErotic toggle is next, by default SCake assumes all animations are erotic and will trigger sexual pleasure and desires, however if you set “NonErotic” to “true” the animation will not be considered erotic so that it won’t trigger sexual effects.

 

8 ) IsLooping just toggles whether your animation should be considered a looping animation or not. When importing your animations montage and you set up the looping animation you should set this to “true”, otherwise if it should play through once set it to “false”. (If your animation is not set to loop properly a failsafe in SCake will still progress animations when the animation finishes, which means it will only play a single loop then move to the next stage in the Animation Event)

 

9 ) Aggressors is a list of slots this animation should consider aggressive actors, if the list is empty or all slots are defined then the animation is considered consensual, otherwise the listed slots are aggressors.

 

10 ) Tags are a list of optional (but recommended to fill) keywords for positions, sexual orientation, climax location, ect. Fill these so that your animation is easier to find and sort in SCake as well as help automated systems try to fill in any blanks you leave in the .json / metadata.

 

11 ) ActTypes define what kind of act is in the animation, you should create counting entries (copying the full section like when we copied the “Anim0” section and counted them up) which define each type being represented. The template will have your default options listed though modules/updates may add more in the future.

 

(An example from a solo female player masturbation animation)

image.png.e49378efe006e8590913cd79df5735d3.png

 

12 ) REQUIRED : Compatibility is extremely important and required for SCake to find compatible animations with different characters! For this section you need to define the type of sex equipment that is required for each slot, so under “SexEquipReq” the first value is the slot and the following value is the sex equip. You can keep this aspect simple as ‘none’ so no equips are required, ‘female’ where a vaginal and breasts are required or ‘male’ where a penis is required, other options are for more advanced animation paring (read into the docs to learn more about them). Next we would define what character can actually play the animation in each slot under the “ByID” section, this section has the slot first then followed by the CharacterID we used earlier when extracting models, such as the finding the folder names (reminder that there is a list of CharacterIDs on the modding wiki - https://pwmodding.wiki/docs/game-data/monster-table which should be accurate). The templates should have your equip options listed for ease of use, fill in for each slot available in the animation.

 

image.png.19e49f0023c0fb58b584cbddd086144a.png

 

13 ) LinkClimaxAnims is where you define the orgasm variants for the animation (if it has one). You can create multiple entries for this section to create multiple variants for what actors are currently climaxing, meaning for a 2 character animation you could define 3 different climaxes, 2 where one or the other is having an orgasm and 1 where both are having an orgasm. You don’t have to fill every possibility, instead it will use the first listed one if the exact combination isn’t found so use define the ‘default’ climax animation first, then the rest. In AnimByPath you define the path to your climax variants which would be imported like any other animation and you’d get the path the exact same way after converting to an Animation Montage. If you’d like to register multiple climax variants to a single animation but with the same combination you can copy your registration data for the animation, define a new uniqueID, and then define the different climax animations you want effectively registering 2 animations to use for Events. (Note : It’s recommended to keep climax variants similar to the animation being played, a good example is a missionary position could have the character humping, then for the climax have them press in and stay with a bit of shiver, this can help climax animations feel more dynamic and immersive. Animation Events can also define their own climax variants by referencing other animations as well)

 

(Example from a solo female player masturbation animation)

image.png.ffedeacb3757da0f69c5c74bbbe6fb68.png

 

14 ) One section worth mentioning that isn’t included with the simple template (but is in the other templates) is the optional “ActorAdjust” parameters. These parameters allow you to adjust the positioning of characters in the animation by slot. I’ll be using this in my example pet animation since I didn’t adjust the Lamball’s position within the animation itself. This feature is mostly for making small adjustments to make animations line up if things don’t quite behave the way you expect and can be a handy tool to configure different variants of characters such as those of different sizes. (Check the template with descriptions or read the documentation to learn more, I won’t be covering it in this tutorial as it’s a bit more advanced)

 

15 ) Next we get into registering the Animation Events so we can actually call and play animations in-game! Events are just a set order of animations to play, though there are more advanced settings we’ll just cover the basic few with only “UniqueEventID” and “Stages” being required. UniqueEventID is just like the UniqueAnimID, this should be a Unique ID used to call the Animation Event with SCake. EventVersion, same as AnimVersion, EventName is the name of the Animation Event, and EventAuthor would be the author who made the event!

 

16 ) Stages are just a list of animations to play as part of the event, by default it will play in order starting from 0, however you can define a custom order or more advanced loops using StageOrder (a parameter we won’t cover here). Make sure to increment each stage section by 1 in the list so it applies the correct order (otherwise stages may register out of order or bug out). StageName is just a display name for the stage, but AnimID is the UnqiueAnimID for the register animation you would like to playback during this stage of the Animation Event, these would match up with the UniqueAnimID we set up when making the Animation portion of the .json file. You can also reference external animations as well, however for .json files directly related to animation packs I recommend keeping all the used animations from your own animation pack then provide an optional .json that uses external animations to avoid requiring other animation packs to use.

 

Optionally here you could configure post-climax animations but we won’t be covering those in this tutorial.

 

(Example from a solo female player masturbation animation)

image.png.c9f70b607be2141efffa134993e32c58.png

 

17 ) Once you got that all configured, your .json file is ready to go and register in-game! There are a lot of advanced features I didn’t cover in this section, but these basics are more than enough for an animator to set up. It seems like a lot at first but once you understand what each setting does it becomes quite easy to modify, change, and create new .json animation files. Users will also be able to edit and exchange .json files to allow completely custom events, modified animations, or just extend upon the original .json file such as adding missing information, so don’t fret too much over missing something if you don’t have the time or understanding to fix it!

 

9. Setting up our Animation Pack for Public Release

Once you’re satisfied (enough) with your animation pack, you should set it up for public release! This is the final stretch to embracing the world of SCake an the community, so let’s do this!

 

1 ) First, make sure to actually install your animation pack and related .json file(s) to ensure it works in-game. It’s always possible an error was made somewhere and if you find it’s not working don’t be afraid to ask the community for help! (You can find instructions on how to install and use animation packs in the ReadMe for SCake)

 

2 ) Next we want to set up the proper file path and create a simple ReadMe file letting people know how to install the animation pack in-case they forgot or lost their SCake ReadMe (or, let’s be honest, they didn’t read the ReadMe at all, it happens!). First create a folder for your mod and create a simple .txt file labeled ReadMe with instructions on how to install the mod, then make the correct file path for the animation pack to make things easy, so start with a ~mods folder, place your .pak in there, then inside the ~mods folder create an AnimJSON folder and place your .json in there (matching the install directory you would use to install into your own game). DO NOT include the _LoadList.json in your mod unless you are distributing a server mod pak! Each individual will have their own list of animations and they will have the responsibility of maintaining their own LoadList, if you distribute one with your mod pack it could lead to users overwriting their own on accident!

 

3 ) Once the path is set up, you can zip up your mod and distribute though your desired platforms! (Don’t forget to share over on our Discord!)

 

(Example file paths for distribution from SCake_BasicsAnimPack)

image.png.b4c5a901eff1e82197d300df7c465d0c.png

10. Final Notes

SCake is a very versatile and customizable framework for animated scene in Palworld and has many advanced features so it’s possible that many of these things could improve or change over time so it’s worth keeping up with updates if your interest holds! At the time of writing, some features listed in the templates are not currently functional or may not function correctly. We primarily use Discord as our form of communication around the mod but you can also ask for help in any SCake thread and people are likely to try and help! I don’t know what other “Final Notes” to put here so… just hope you have a wonderful day! See ya laters! =^-^=

I'm really illiterate when it comes to these types of things. All I can say really is I appreciate everyone working on this. And I can't wait for it to be released.

Link to comment
21 hours ago, PackMan2024 said:

I'm really illiterate when it comes to these types of things. All I can say really is I appreciate everyone working on this. And I can't wait for it to be released.

Well good news! Project Sugar Cake is (and has been) available to download and use in-game! Here's the development thread which has all the links in the main post! https://www.loverslab.com/topic/225549-project-sugar-cake-sex-and-stat-framework-gameplay-mod

For animations I've released the BasicsAnimPak and over on our Discord there's been a couple of early release animations going around with more people trying their hand at animating!

 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use