Skip to content

Editor export plugin for Godot that allows remapping resources by feature.

License

Notifications You must be signed in to change notification settings

allenwp/godot-resource-remaps

Repository files navigation

Godot Resource Remaps

Editor plugin for Godot that enables remapping resources by feature. An essential tool for porting your Godot project!

Resource Remaps project settings screenshot

Features

  • Remap any resource or file in your project to a different one when your project is exported, based on the feature tags of that export.
  • Quickly and easily reduce export size when supporting different platforms.
    • Any remaps that are not used will automatically be excluded from the exported project.
  • Compliments existing Resource Export Modes.
  • A productive Project Settings GUI including undo/redo support.
  • Uses Godot's EditorExportPlugin functionality.

Examples

  • Remap high quality music files used in the PC exports to be low quality mobile music files in the mobile exports.
  • Change button call-out textures to represent the controller used by the platform.
  • Make menu scenes appear different in the mobile game than the PC game.

Usage

Watch tutorial video on YouTube.

Installation

  1. Install the add-on by downloading it from the Asset Library in Godot or copying the files from the release package into your project's addons folder.
  2. Enable the plugin in your Project Settings.

Adding Resource Remaps

  1. Open Project Settings and select the Resource Remaps tab.
  2. Add the path of the resource you would like to remap by tapping the Add... button on the top right.
  3. Add remap(s) by tapping the Add.. button that is to the right of Remaps by Feature:.
    • Tip: multiple remap paths can be added at once by holding shift or ctrl when selecting files!
  4. Change the Feature for each remap.
  5. Reorder remaps to change priority.
    • From top to bottom, the first remap in this list to match a feature in the export will be used. Any resources in this list that are not used will be excluded from the export.

Inherited Resources and Scenes

Care must be taken when remapping inherited resources, such as inherited scenes. For example, you cannot remap a base scene to an inherited scene because the base scene would no longer exist for the inherited scene to inherit from.

To work around this limitation, use a default scene that inherits from a base scene throughout your project. Next, remap the default scene to other scenes that also inherit from the base scene. An example of this approach is included in the example project of this GitHub repository.

Requirements

Godot 4.3

Godot 4.3 or later is required for this plugin.

Earlier Versions of Godot

A custom build of the Godot editor is required for versions earlier than Godot 4.3. At minimum, you will need to cherry pick commit 8e65966.

Feedback

I would love to hear if you've used this plugin in your project! You can share your project on the Showcase Discussion.

Please report any bugs on the Issues page.

If you have any other feedback, you're welcome to post on the Discussions page.

Localization

Any translation contributions would be greatly appreciated! Please make a pull request with your contribution.

All text of this plugin can be found in addons/resource_remaps/resource_remaps_control.gd and passes through the TTR function.

Translations should be made to match those found in the Localization Remaps feature of the Godot Editor. Many of the strings in this plugin are similar to those.

Design Rational

...Can be found in the design notes file.

Special Thanks

Thanks to KoBeWi for giving guidance throughout development of this plugin!

About

Editor export plugin for Godot that allows remapping resources by feature.

Resources

License

Stars

Watchers

Forks