Modding: Difference between revisions

From Thrive Developer Wiki
Jump to navigation Jump to search
Line 24: Line 24:


CHECK THIS: do C# code not exported on current platform in a mod work on other platforms?
CHECK THIS: do C# code not exported on current platform in a mod work on other platforms?
When doing mods that have custom scenes or code files it is a good idea to put them in a subfolder named after the mod. So for example you would have "DamageNumbers/DamageNumbers" folder containing scenes if the "project.godot" file is in "DamageNumbers" folder. This way when multiple mods are loaded (or new files are added to the base game) they won't conflict with your mod's files.


When using C# code in a mod, you need to extract the created .ddl file out of the exported .pck file in order for it to be loadable. You can use godotpcktool for example for this task. You can also use it to check what files are contained in your mod and Thrive to verify that the paths are correct to resources you want to overwrite.
When using C# code in a mod, you need to extract the created .ddl file out of the exported .pck file in order for it to be loadable. You can use godotpcktool for example for this task. You can also use it to check what files are contained in your mod and Thrive to verify that the paths are correct to resources you want to overwrite.

Revision as of 16:07, 19 November 2021


This page is the main hub for information regarding Thrive modding.

Note that a modding guide for Thrive is in progress, however some of the early notes below may be usable as is.

Creating Mods

Before you can start you will need a few tools depending on the type of mod you want to make.

If you want to change anything more than the contained JSON files in the game, you will need Godot editor.

Download Godot mono version. The latest is usually suitable but sometimes Thrive hasn't been yet updated to the latest version. You can refer to the setup instructions file in the main Thrive repository to find out which version is currently used.

Simple Asset Changes

Create a new folder and use the Godot editor to start a new project in the folder. You should name the folder with PascalCase naming convention. And name your Godot project with spaces in the name like "Pascal Case". When selecting the name of the folder to have your mod in, you should use the same name as you used for the Godot project folder.

When exporting make sure to not enable embedding the .pck file option

If you make an icon please size it down to about 128x128 and name it at least a bit uniquely, otherwise the loaded mods all overwrite the icon path with their own. For example "disco_icon.png"

Code Mods

TODO: find out how to do gdscript mods

CHECK THIS: do C# code not exported on current platform in a mod work on other platforms?

When doing mods that have custom scenes or code files it is a good idea to put them in a subfolder named after the mod. So for example you would have "DamageNumbers/DamageNumbers" folder containing scenes if the "project.godot" file is in "DamageNumbers" folder. This way when multiple mods are loaded (or new files are added to the base game) they won't conflict with your mod's files.

When using C# code in a mod, you need to extract the created .ddl file out of the exported .pck file in order for it to be loadable. You can use godotpcktool for example for this task. You can also use it to check what files are contained in your mod and Thrive to verify that the paths are correct to resources you want to overwrite.

Putting the Mod Together

You can use the mod manager in Thrive to create a blank mod folder with an info file. After creating the mod folder you should put the .pck and optionally the extracted .dll files into it. You should edit the info JSON file to refer to your .pck and other resources correctly, for example to the mod icon if you have one. For the mod internal name you should use the same name as for the Godot project you created in an earlier step.

After the mod folder is populated you can start up Thrive and try to enable the mod to see if it works. Some mods may only work properly if the game is restarted in case the mod overwrites some resource that doesn't get reloaded without a restart.

Uploading Mods

If the mod works you can then zip up the mod folder for distributing to other people or upload it to the Steam workshop.

Steam Workshop

TODO: write instructions