Skip to content

Add Custom .PCK Theme Loading#198

Open
shmakota wants to merge 1 commit intoqrrk:masterfrom
shmakota:custom_themes
Open

Add Custom .PCK Theme Loading#198
shmakota wants to merge 1 commit intoqrrk:masterfrom
shmakota:custom_themes

Conversation

@shmakota
Copy link
Copy Markdown

@shmakota shmakota commented May 1, 2025

Adds support for loading custom themes through godot .PCK files.

With this change the user can change the color, icons, and logos of all parts of the Catapult client using custom themes.

NOTE: .PCK files could potentially contain executable code and as such should only be used when received from a trusted party.
image
image

To create a theme:

Clone the repository locally and open with Godot.
Create a folder in res://themes called "custom"
Create a folder in res://themes/custom called "my_theme"
Duplicate an existing theme and icon into this folder, and rename them "my_theme" and "my_theme_logo"
image
Edit the theme as you see fit, and make sure to put any external assets included in the folder

To export, go to resources and change export mode to "Export selected resources (and dependencies)"
Select the custom folder and all of the assets used by your theme
And finally export the file as a .pck.
image
Put this .pck file in your Catapult userdata themes folder and you're done.
image

I can add an example .PCK to the post upon request if needed.

@qrrk
Copy link
Copy Markdown
Owner

qrrk commented Nov 9, 2025

This is a very interesting idea, but honestly it feels excessive to allow loading arbitrary PCKs just for themes. As you pointed out, PCK contents can potentially overwrite anything, including scenes, scripts...

Loading just resource files for themes seems like a more straightforward approach (both to use and to develop/maintain). The challenge here is the dependencies. After some tinkering in a test project I managed to make an almost completely self-contained theme file with sub-resources built in... except for image textures. Those keep pointing to the texture cache created after import, and I am not sure if there is any way to change that. But if we can figure out how to do it, this way is definitely preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants