> For the complete documentation index, see [llms.txt](https://modding.corekeepergame.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://modding.corekeepergame.com/documentation/creating-mods/creating-a-mod/creating-mods-via-scriptable-data.md).

# Creating Mods via Scriptable Data

### Scriptable Data Editor Window

You can discover the Scriptable Data Editor by going to `Window > Scriptable Data Editor`.

<figure><img src="/files/rZ371yLBCvVOjIsT09kF" alt=""><figcaption></figcaption></figure>

### How to create new assets, and where to find games' assets

All the Sprite Assets that are used in Core Keeper will be located at this path once you've updated the game assets: `Packages/dev.pugstorm.corekeeper.assets/Data/SpriteAsset`.&#x20;

If you want to add new assets you can do so by adding a Scriptable Data Directory asset in your mods' folder and then opening up the Scriptable Data Editor Window and creating an asset of that type.

<figure><img src="/files/bBHVa9i3TbaZKXONFI9s" alt=""><figcaption></figcaption></figure>

To create a new Sprite Asset you'd filter by Sprite Asset type in top Left (make sure your mods' Scriptable Data Directory is selected as well as that's where the Sprite Asset will be created) and clicking Add new Data Block. The same process can be repeated for other Asset Types such as Sprite Asset Skins, Gradient Maps and so on.

### How to convert old Sprite Assets and Sprite Asset Skins from Scriptable Objects to ScriptableDataBlocks.

Create a Scriptable Data Directory assets via the create menu, and make sure your Sprite Assets are located in a sub-directory of where your Scriptable Data Directory asset is located, then open the asset in the Scriptable Data Editor Window.

## Step-by-step guide

{% stepper %}
{% step %}

### Creating a mod base

Head over to the `PugMod` window in Unity, and select `Open Mod SDK Window`. Then head over to the Mod Settings tab, and select `New Mod`, afterwards name your mod and press `Create`. This will generate a mod folder including a scriptable object containing the mods' build settings under the `Assets/<YourModNameFolder>` path. An assembly will also be generated which'll reference all of the games' assemblies that you've fetched by updating game files, this is nothing very useful for now but good to know in the future in case you run into outdated assembly issues.
{% endstep %}

{% step %}

### Creating Scriptable Data Directory config

To mod a ScriptableDataBlock you will first need to make sure that you have a Scriptable Object in your Mods' Folder called \<ModName>, of the type `ScriptableDataDirectory`.&#x20;

<figure><img src="/files/HLFxqEGkJU8EPAY8dYpE" alt=""><figcaption></figcaption></figure>

If your mod is older then you can simply do this by heading over to your mods' folder and then generating the asset by going to the Assets window, and selecting `Create > Scriptable Data > Additional Data Directory`. This will generate the required asset. Make sure it's in the mod folder in which you want to mod Scriptable Data Blocks!

<figure><img src="/files/CAYYLyYRTPxNazI5RFxu" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choosing a ScriptableDataBlock to mod

Open up the Scriptable Data Editor Window using `Window > Scriptable Data Editor` <mark style="color:$info;">,</mark> once it's open you'll see a dropdown for ScriptableDataBlock types, these types are retrieved from the assemblies that are imported into the ModSDK during the "Updating Game Files" step. Once you've picked a ScriptableDataBlock which you think would be fun to mod you can right click it on the left-hand side in the Scriptable Data Editor Window and click `Overload to > <YourScriptableDataDirectoryConfig>`.&#x20;

<figure><img src="/files/yIgFUv11KB9GPCtu67Dv" alt=""><figcaption></figcaption></figure>

Make sure the config is located in the right mod folder for which you want to build this Scriptable Data mod!
{% endstep %}

{% step %}

### Editing your modded ScriptableDataBlock

ScriptableDataBlocks can be edited in the inspector by selecting the instance of that ScriptableDataBlock in your mods' folder, but it's easier and more convenient due to several QoL features to do so in the Scriptable Data Editor Window.&#x20;

<figure><img src="/files/RBuQAC8JaksJ93FJNAot" alt=""><figcaption></figcaption></figure>

Simply make the changes that you'd like to make to the ScriptableDataBlock and then build the mod. The easiest way to test that you've set up everything correctly and that the Scriptable Data Block mods will work is to assign a new `GradientMapDataBlock` to a Sprite Asset.

{% hint style="info" %}
Currently if you reference Textures or ScriptableDataBlocks from the Core Keeper Assets package, references may be lost the next time you update game assets. We're working on a solution for this but be mindful to drag the textures into your mods' folder and make DataBlock copies via overloading.
{% endhint %}

<figure><img src="/files/xbkVVkh8BtHPCe4GcAiO" alt=""><figcaption></figcaption></figure>

Then once you've saved the changes you are ready to build the mod. For this head on over to the Mod SDK window again, go to Mod Management and click `Build Mod`.\
![](/files/M0X6CgUKMijoOcK1b7eI)

Once you built the mod, you can launch your game and test if the ScriptableDataBlock mod changes are reflected in-game.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://modding.corekeepergame.com/documentation/creating-mods/creating-a-mod/creating-mods-via-scriptable-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
